// 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 + "' target='home'>" + sDescription + "</A></TD></TR>");
  }

function WriteMenuItemToOutside(sURL, sDescription)
  {
  document.write("<TR><TD CLASS='MenuItem' onmouseover='MenuSelect(this);' onmouseout='MenuUnselect(this);'><A HREF='" + sURL + "' target='_top'>" + sDescription + "</A></TD></TR>");
  }

function ShowMenuFamTree()
  {
  if(bMenuEnabled == true)
    MenuFamTree.Show();
  }

function HideMenuFamTree()
  {
  if(bMenuEnabled == true)
    MenuFamTree.Hide();
  }

function ShowMenuFotoArchive()
  {
  if(bMenuEnabled == true)
    MenuFotoArchive.Show();
  }

function HideMenuFotoArchive()
  {
  if(bMenuEnabled == true)
    MenuFotoArchive.Hide();
  }

function ShowMenuNews()
  {
  if(bMenuEnabled == true)
    MenuNews.Show();
  }

function HideMenuNews()
  {
  if(bMenuEnabled == true)
    MenuNews.Hide();
  }

function ShowMenuLinks()
  {
  if(bMenuEnabled == true)
    MenuLinks.Show();
  }

function HideMenuLinks()
  {
  if(bMenuEnabled == true)
    MenuLinks.Hide();
  }

document.onclick = function()
  {
  if(bMenuEnabled == true)
    {
    HideMenuFamTree();
    HideMenuFotoArchive();
    HideMenuNews();
    HideMenuLinks();
    }
  }

