<?

function display_tabs ($selected_option) {

  global $text;
  global $background;
  global $frame_background;
  global $frame_text;
  global $option;

  for ($x=0; $x < count($option); $x++) {
    print ("<td bgcolor=\"" . $background . "\">\n");
    print (" <table border=0 cellpadding=1 cellspacing=0 width=\"100%\">\n");
    print (" <tr>\n");
    if ($selected_option == $x) {
      print ("  <td bgcolor=\"" . $frame_background . "\">\n");
      print ("  <table border=0 cellpadding=0 cellspacing=0 width=\"100%\">\n");
      print ("  <tr>\n");
      print ("  <td bgcolor=\"" . $frame_background . "\" align=\"middle\">");
      print ("  <font color=\"" . $frame_text . "\">" . $option[$x] . "</font>");
      print ("  </td>\n");
      print ("  </tr>\n");
      print ("  </table>\n");
      print ("  </td>\n");
    } else {
      print ("  <td bgcolor=\"" . $background . "\">\n");
      print ("  <table border=0 cellpadding=0 cellspacing=0 width=\"100%\">\n");
      print ("  <tr>\n");
      print ("  <td bgcolor=\"" . $background . "\" align=\"middle\">");
      print ("  <a href=\"" . $_SERVER[PHP_SELF] . "?selected_option=" . $x . "\" title=\"Option "
 . $x . "\">");
      print ("  <font color=\"" . $text . "\">" . $option[$x] . "</font>");
      print ("  </a>");
      print ("  </td>\n");
      print ("  </tr>\n");
      print ("  </table>\n");
      print ("  </td>\n");
    }
    print (" </tr>\n");
    print (" </table>\n");
    print ("</td>\n");
  }

}

function display_body ($selected_option) {

  global $text;
  global $background;
  global $frame_background;
  global $frame_text;
  global $option;
  global $submited;

  print ("<td bgcolor=\"" . $frame_background . "\" colspan=\"" . count($option) . "\">\n");
  // body table - this contains things such as the form
  // getting input for the various options
  print ("<center>\n");
  print ("<table width=\"90%\" celpadding=0 cellspacing=0 border=0>\n");
  print ("<tr><td>\n");
  print ("<br>\n");
  print ("<font size=\"+2\" color=\"" . $frame_text . "\">");
  print ($option[$selected_option] . "</font>\n");
  print ("<hr width=\"100%\" noshade>\n");
  $func_options = strtolower ($option[$selected_option] . "_options");
  $func_options();
  print ("<br>\n");

  // Output ?
  if ($submited) {
    // the submit button was pressed and so we want some output
    print ("<hr width=\"100%\" noshade>\n");
    $func_output = strtolower ($option[$selected_option] . "_output");
    $func_output();
    print ("<br>\n");
  }
  print ("</font>\n");
  print ("</td></tr>\n");
  print ("</table>\n");
  print ("</center>\n");
  // end body table
  print ("</td>\n");



}


?>
