var inmenu=false;
var lastmenu=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);


   box.style.visibility="visible";
   
   m.style.overflow = "visible";
 m.style.backgroundImage = "url(images/ndo.gif)";
   
   
}
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="transparent";
   m.style.overflow = "hidden";
 m.style.backgroundImage = "url(images/nd.gif)";
}
function Timeout(current) {
   inmenu=false;
   window.setTimeout("Erase('" + current + "');",1500);

box=document.getElementById(current);
   box.style.visibility="hidden";
m=document.getElementById("menu-" + current);
m.style.overflow = "hidden";
}
function Highlight(menu,item) {
   if (!document.getElementById) return;
   inmenu=true;
   lastmenu=menu;
   obj=document.getElementById(item);
m=document.getElementById(menu);

   obj.style.backgroundColor= "#CC0033";
   obj.style.border= "2px #FF3366 outset";

m.style.overflow = "visible";

}
function UnHighlight(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   obj=document.getElementById(item);
   obj.style.backgroundColor="#006633";
   obj.style.border= "2px #009933 outset";

m=document.getElementById(menu);

m.style.overflow = "hidden";
}


