<?

class Menu
{ 
  // class variables
  var $title;
  var $content;
  var $res;

  // Constructor
  function Menu() 
    {
      $this->title = "";
      $this->content = "";
    }

  // Set title of menu
  function setTitle($titlep) 
    {
      $this->title = $titlep;
    }

  // Add a sub new line
  function addSubLine($text, $url)
    {
      $this->content .= "<left> - " .
	"<a href=\"$url\">$text</a></left><br>";
    }
  // Add a new line in menu content
  function addLine($text, $url)
    {
      $this->val++;
      $this->content .= "<li ><a href=\"$url\">$text</a></li>";
    }

  // Compute menu
  function getResult()
    {
      $this->res = "<table width=100%>\n" .
	"<tr><td width=100%>\n" .
	"<div class=\"header\">" . $this->title . "</div>\n" .
	"<div class=\"menucontent\">\n<ol>" .
	$this->content .
	"</ol></div></td></tr></table>";
    }
}

$menu = new Menu();
$menu->setTitle(NAME . " - Main Menu");
$menu->addLine("Introduction", "intro.php");
$menu->addLine("History", "history.php");
$menu->addLine("Features", "features.php");
$menu->addLine("Specifications", "specs.php");
$menu->addSubLine("Data Class Generator", "specs.php#data");
$menu->addSubLine("XML Parser Generator", "specs.php#xml");
$menu->addLine("Full Example", "ex.php");
$menu->addSubLine("XML File", "ex.php#xml");
$menu->addSubLine("parameters.mm", "ex.php#pmm");
$menu->addSubLine("Parameters.hh", "ex.php#phh");
$menu->addSubLine("variable.mm", "ex.php#vmm");
$menu->addSubLine("Variable.hh", "ex.php#vhh");
$menu->addSubLine("config.mm", "ex.php#cmm");
$menu->addSubLine("Config.hh", "ex.php#chh");
$menu->addSubLine("parser.mm", "ex.php#parser");
$menu->getResult();

?>
