Menu = {timer : null, current : null};

Menu.getStyle = function(name){
   if(document.getElementById) {
      return document.getElementById(name).style;
   }
   else if(document.all) {
      return document.all[name].style;
   }
   else if(document.layers) {
      return document.layers[name];
   }
}

Menu.show = function(name){
   if(this.timer) {
      clearTimeout(this.timer);
   }
   this.getStyle(name).visibility = "visible";
   this.current = name;
}

Menu.hide = function(){
   this.timer = setTimeout("Menu.doHide()", 200);
}

Menu.doHide = function(){
   if(this.current){
      this.getStyle(this.current).visibility = "hidden";
      this.current = null;
   }
}

function NewWindow(mypage, myname, w, h, scroll, resizeable){
   var winl = (screen.width-w) / 2;
   var wint = (screen.height-h) / 2;
   var settings  ='height='+h+',';
   settings +='width='+w+',';
   settings +='top='+wint+',';
   settings +='left='+winl+',';
   settings +='scrollbars='+scroll+',';
   settings +='statusbar=no,';
   settings +='status=no,';
   settings +='resizable='+resizeable+',';
   settings +='menubar=no,';
   win=window.open(mypage, myname, settings);
}
