var inmenu=false;
var lastmenu=0;

function SportsMenu(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.left = 8;
   box.style.top= 98;         							// m.offsetTop + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="109px";
}

function SportsMenu2(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.left = 10;
   box.style.top= 92;         							// m.offsetTop + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="109px";
}

function EventsMenu(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.left= 48;
   box.style.top= 300;         							// m.offsetTop + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="98px";
}

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.left= 46;
   box.style.top= 195;									//m.offsetTop; + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="98px";
}

function TMenu(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.left= 46;
   box.style.top= 195;									//m.offsetTop; + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="98px";
}

function GMenu(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.left= 48;
   box.style.top= 243;									//m.offsetTop; + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="98px";
}

function RMenu(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.left= m.offsetLeft + 70;
   box.style.top= 260;									//m.offsetTop; + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="98px";
}

function OtherMenu(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.left= m.offsetLeft + 70;
   box.style.top= 279;									//m.offsetTop; + m.offsetHeight;
   box.style.visibility="visible";
   m.style.backgroundColor="#FFFFFF";
   box.style.backgroundColor="#DDDDDD";
   box.style.width="98px";
}


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="#FFFFFF";
}
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="#DDDDDD";
}
function UnHighlight(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   obj=document.getElementById(item);
   obj.style.backgroundColor="#DDDDDD";
}

function HighlightS(menu,item) {
   if (!document.getElementById) return;
   inmenu=true;
   lastmenu=menu;
   obj=document.getElementById(item);
   obj.style.backgroundColor="#DDDDDD";
}
function UnHighlightS(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   obj=document.getElementById(item);
   obj.style.backgroundColor="#DDDDDD";
   
}


