var ns=window.navigator.appName == "Netscape"
var ie=window.navigator.appName == "Microsoft Internet Explorer"
var timer = null;
var last_opened = null;

function menu_open(argStrItems)
{
  var arrSplitted = new Array();
  var max = 0;
  var showbox = "";
  var nummer = 0;

  arrSplitted = argStrItems.split(".");
  max = arrSplitted.length
  last_opened = argStrItems;

  for(i = 0; i < max; i++)
  {
    if(ns)
    {
      if (timer!=null) clearTimeout(timer);
      timer = setTimeout("menu_close()", 3000);
      showbox = document.layers["box"+arrSplitted[i]];
      showbox.visibility = "show";
    }
    if(ie)
    {
      nummer = "box"+arrSplitted[i];
      document.all[nummer].style.visibility = "visible";
      window.document.getElementById(nummer).style.visibility = "visible";
    }
  }
}

function menu_close()
{
  var items = null;

  if(ns)
  {
    items = document.layers.length;
    for (j=0; j<items+1; j++)
    {
      document.layers[j].visibility = "hide";
    }
  }
  if(ie)
  {
    items = 3
    for (j=1; j<items+1; j++)
    {
      //window.alert("close: box"+j);
      document.all["box"+j].style.visibility = "hidden";
    }
  }
}

function lastopened()
{
  //window.alert(last_opened);
  menu_open(last_opened);
}
