<?
function enquote($text) {
  $text=str_replace("\n","<BR>\n",$text);
  $text=str_replace("\t","&nbsp;&nbsp;&nbsp;",$text);
  $text=str_replace("'","&rsquo;",$text);
  $text=str_replace("\"","&quot;",$text);
  return $text;
}

function showad($rows) {
  $title=$rows["title"];
  $text=$rows["adtext"];
  $response=$rows["response"];
  $posted=$rows["posted"];
  $graph=$rows["graphicurl"];
  echo "<TABLE WIDTH=80% BORDER=1 BGCOLOR=WHITE><TR><TD WIDTH=100%>";
  echo enquote("<H3>$title</H3>");
  $text=enquote($text);
  echo "<P>$text";
  if ($graph!="") {
    echo "<BR><IMG SRC=\"$graph\">";
  }

  $postdate=show_date($posted);
  echo "<P>Posted by: <A HREF=\"mailto:$response?subject=$title\">$response</A> at $postdate</P>";
echo "</TD></TR></TABLE>";
}
?>