var inmenu=false;
var lastmenu=0;

function Menu(current)
{
if(!document.getElementById) return;
inmenu=true;
oldmenu=lastmenu;
lastmenu=current;
if(oldmenu) Erase(oldmenu);
logo=document.getElementById("header");
m=document.getElementById("menu-" + current);
box=document.getElementById(current);
box.style.left=m.offsetLeft;
box.style.top=m.offsetTop + logo.offsetHeight;
box.style.visibility="visible";
box.style.backgroundColor="#00ccff";
box.style.width=m.offsetWidth;
box.style.fontFamily="arial,helvetica";
box.style.zIndex="21";
}

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";
}

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="#ffff00";
}

function unHighlight(menu, item)
{
if(!document.getElementById) return;
Timeout(menu);
obj=document.getElementById(item);
obj.style.backgroundColor="#00ccff";
}

