sub yahooUnifiedHandler
{
   $html = shift;
   $tableCount = shift;

   my $done;
   my $count;
   @rValue = ();

   print "-------------- yahooUnifiedHandler ---------------\n";

   if ($tableCount =~ /^$/)
   {
      $tableCount = 28;
   }

   $done = 0;
   $count = $tableCount;
   while( !$done )
   {
       print "iteration .. count: $count..\n";
       $storyBlock = zUtil::getNthItemNew( $count, $html, "<table", "</table>" );
       print "story block: $storyBlock\n";
       #exit;
       if( $storyBlock =~ /<a\ href="(.*?)"
	                        (><img\ src="(.*?)"\ .*?><\/a>.*?)?
	                        .*?class=topstory>(.*?)<\/a>
	                        .*?<div\ class=.*?timedate>
	                        (.*?)<\/div>
                                 # .*?(<font\ size=-1>)?
	                        (.*?) # (<\/font>)?.*?
	                        <br\ clear=all>
	                       /ixs )
       {
	   #print "=================================================a";
	   #exit;
	   $done = 1;
       }
       else
       {
	   print "b";
	   $count++;
	   if( $count > 50 )
	   {
	       $done = 1;
	   }
       }
   }
   
  print  "html($html)\n";
   print  "storyBlock($storyBlock)\n";
   print  "table=$tableCount\n";
 #  exit();

   while (
      $storyBlock =~ /
	 <a\ href="(.*?)"
	 (><img\ src="(.*?)"\ .*?><\/a>.*?)?
	 .*?class=(topstory|reg)>(.*?)<\/a>
	 .*?<(div|span)\s*?class=.*?timedate>
	 (.*?)<\/(div|span)>
					     # .*?(<font\ size=-1>)?
	 (.*?)                               # (<\/font>)?.*?
#	 <br\ clear=all>
      /gixs
   )
   {
      $image = $3;
      $url = $1;
      $headline = $5;
      $date = $7;
      $blurb = $6;
      if ($image =~ /^$/)
      {
	 $image = "clear.gif";
      }
     # print STDERR "url=($url)\n";
      #print STDERR "img=($image)\n";
      #print STDERR "hdl=($headline)\n";
      #print STDERR "dte=($date)\n";
      #exit();
      push @rValue,
      {
	 'url' => $url,
	 'headline' => $headline,
	 'date' => $date,
	 'blurb' => $blurb,
	 'image' => $image
      };
   }


#   exit;
   print "exiting yahooUnifiedHandler\n";
   return @rValue;
}

1;

