// Menu class
function Menu(sID)
  {
  // Properties
  this.ID = sID;

  if(IE)
    this.Style = document.all[sID].style;
  else if(NS6)
    this.Style = document.getElementById(sID).style;
  else if(NS)
    this.Style = document.layers[sID];

  // Methods  
  this.Position = function(iLeft, iTop)
    {
    this.Style[LEFT] = iLeft;
    this.Style[TOP] = iTop;
    this.Left = iLeft;
    this.Top = iTop
    }

  this.Show = function()
    {
    this.Style.visibility = "visible";
    }

  this.Hide = function()
    {
    this.Style.visibility = "hidden";  
    }
    
  }

function MenuSelect(MenuItem)
  {
  MenuItem.className = "MenuItemSelected";
  }
  
function MenuUnselect(MenuItem)
  {
  MenuItem.className = "MenuItem";
  }     
  
function WriteMenuHeader(sID, iWidth)
  {
  document.write("<DIV ID='" + sID + "' CLASS='Menu'>");
  document.write("<TABLE WIDTH=" + iWidth + " CELLSPACING=0 CELLPADDING=0 BORDER=0>");
  document.write("<TR><TD WIDTH='100%' CLASS='MenuBorder'>");
  document.write("<TABLE WIDTH='100%' CELLSPACING=1 CELLPADDING=0 BORDER=0>");
  document.write("<TR><TD WIDTH='100%' CLASS='Menu'>");
  document.write("<TABLE WIDTH='100%' CELLSPACING=0 CELLPADDING=3 BORDER=0>");
  }

function WriteMenuFooter()
  {
  document.write("</TABLE>");
  document.write("</TD></TR>");
  document.write("</TABLE>");
  document.write("</TD></TR>");
  document.write("</TABLE>");
  document.write("</DIV>");
  }
  
function WriteMenuItem(sURL, sDescription)
  {
  document.write("<TR><TD CLASS='MenuItem' onmouseover='MenuSelect(this);' onmouseout='MenuUnselect(this);'><A HREF='" + sURL + "'>" + sDescription + "</A></TD></TR>");
  }

function ShowMenuAbout() 
  { 
  if(bMenuEnabled == true)
    MenuAbout.Show(); 
  }

function HideMenuAbout() 
  { 
  if(bMenuEnabled == true)
    MenuAbout.Hide(); 
  }

function ShowMenuFreeware() 
  { 
  if(bMenuEnabled == true)  
    MenuFreeware.Show(); 
  }

function HideMenuFreeware() 
  { 
  if(bMenuEnabled == true)  
    MenuFreeware.Hide(); 
  }
  
function ShowMenuFavorites() 
  { 
  if(bMenuEnabled == true)
    MenuFavorites.Show(); 
  }

function HideMenuFavorites() 
  { 
  if(bMenuEnabled == true)
    MenuFavorites.Hide(); 
  }

function ShowMenuSurfices() 
  { 
  if(bMenuEnabled == true)
    MenuSurfices.Show(); 
  }

function HideMenuSurfices() 
  { 
  if(bMenuEnabled == true)
    MenuSurfices.Hide(); 
  }

document.onclick = function()
  {
  if(bMenuEnabled == true)
    {
    HideMenuAbout();
    HideMenuFreeware();
    HideMenuFavorites();
    HideMenuSurfices();  
    }
  }
  
