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";
   
   //variables
   m.style.backgroundColor = "#E3DDD2"; 	 		//main menu rollover colour
}

function QuickLinks(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";
   
   //variables
   m.style.backgroundColor = "#89C4EF"; 	 		//main menu rollover colour
}

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";
   
   //variable
   m.style.backgroundColor = "transparent";			//main menu "revert to" colour
}

function Hover() {
   if (!document.getElementById) return;
   inmenu = true;
}

function Timeout(current) {
   inmenu = false;
   window.setTimeout("Erase('" + current + "');",4000);
}

function Highlight(menu,item) {
   if (!document.getElementById) return;
   inmenu = true;
   lastmenu = menu;
   obj = document.getElementById(item);
}

function UnHighlight(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   obj = document.getElementById(item);
}