var theMenus = new Array("baseMenu", "bottomMenu");
function debug(txt)
{
  document.getElementById("debug").innerHTML = txt;
}

window.onload = function()
{
  for(m=0;m<theMenus.length;m++)
  {
    theMenu = document.getElementById(theMenus[m]);
    lis = theMenu.getElementsByTagName("li");
    for(i=0;i<lis.length;i++)
    {
      lis[i].onmouseover = function()
      {
        show(this);
      }
      lis[i].onmouseout = function()
      {
        hide(this);
        //setTimeout("hide(" + this + ")", 500);
      }
    }
  }
}
function show(obj)
{
  items = obj.getElementsByTagName("ul");
  if(items.length > 0)
  {
    items[0].style.display = "block";
  }
}
function hide(obj)
{
  obj.style.backgroundColor = "";
  items = obj.getElementsByTagName("ul");
  if(items.length > 0)
  {
    items[0].style.display = "none";
  }
}