//var Netscape=(navigator.appName.indexOf("Netscape") != -1);
var inmenu=false;
var lastmenu=0;
var winOffset = 0;
function Menu(current) {
   if (!document.getElementById) return;
   inmenu=true;
   oldmenu=lastmenu;
   lastmenu=current;
   if (oldmenu) Erase(oldmenu);
   m=document.getElementById("menu-" + current);
   box=document.getElementById(current);
//   document.write("<p><b> offsetLeft m:   </b>" + m.offsetLeft);
//   box.style.left = m.offsetLeft;
//   if (Netscape) {
        //calulate window offset based on window width for Netscape browser
       p=document.getElementById("dot");
      (p.offsetLeft <=350)? winOffset=0 : winOffset = p.offsetLeft-350;
      box.style.left= m.offsetLeft + winOffset;
//       }

   box.style.top= m.offsetTop + m.offsetHeight+105;
   box.style.visibility="visible";
   m.style.backgroundColor="rgb(255,250,230)";
   box.style.backgroundColor="rgb(255,250,230)";
   box.style.width="110px";
}
function Erase(current) {
   if (!document.getElementById) return;
   if (inmenu && lastmenu==current) {
	  return;
   }
   m=document.getElementById("menu-" + current);
   box=document.getElementById(current);
   box.style.visibility="hidden";
   m.style.backgroundColor="rgb(156,0,52)";
}
function Timeout(current) {
   inmenu=false;
   window.setTimeout("Erase('" + current + "');",500);
}
function Highlight(menu,item) {
   if (!document.getElementById) return;
   inmenu=true;
   lastmenu=menu;
   obj=document.getElementById(item);
   obj.style.backgroundColor="Silver";
}
function UnHighlight(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   obj=document.getElementById(item);
   obj.style.backgroundColor="rgb(255,250,230)";
}
