var inmenu=false;
var lastmenu=0;
function Menu(current) {
   if (!document.getElementById) return;
   inmenu=true;
   var oldmenu=lastmenu;
   lastmenu=current;
   if (oldmenu) Erase(oldmenu);
   var m=document.getElementById("menu-" + current);
   var box=document.getElementById(current);
   box.style.left= m.offsetLeft + 20;
   if (navigator.appName.indexOf("Netscape") == -1) {box.style.top= m.offsetTop + m.offsetHeight + 77} else {box.style.top= m.offsetTop + m.offsetHeight + 77};
   box.style.visibility="visible";
   /*m.style.backgroundColor="Aqua";*/
   box.style.backgroundColor="Black";
   box.style.width="100px";
}
function Erase(current) {
   if (!document.getElementById) return;
   if (inmenu && lastmenu==current) {
	  return;
   }
   var m=document.getElementById("menu-" + current);
   var box=document.getElementById(current);
   box.style.visibility="hidden";
   /*m.style.backgroundColor="Silver";*/
}
function Timeout(current) {
   inmenu=false;
   window.setTimeout("Erase('" + current + "');",800);
}
function Highlight(menu,item) {
   if (!document.getElementById) return;
   inmenu=true;
   lastmenu=menu;
   var obj=document.getElementById(item);
   obj.style.backgroundColor="rgb(166,83,17)";
}
function UnHighlight(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   var obj=document.getElementById(item);
   obj.style.backgroundColor="Black";
}
function ProtectEmail(start,clas,title) { /*Takes the start of an email and adds @maple3D.com to the end and make a link out of it.*/
	var emailE='maple3d.com'
	emailE=(start + '@' + emailE)
	document.write('<A href="mailto:' + emailE + '" class="' + clas +'">' + title + '</a>')
}
