
var inmenu=false;
var lastmenu=0;

function toggleview(element1) {  
	
	element1 = document.getElementById(element1);   
	if (element1.style.display == 'none' || element1.style.display == '') 
		element1.style.display = 'block'; 
		
	else  
		element1.style.display = 'none';  
		 
	return;
}
function showWickerDecors(element1){
	element1 = document.getElementById(element1);
	element1.style.display = 'block';
}

function hideWickerDecors(element1){
	element1 = document.getElementById(element1);
	element1.style.display = 'none';
}
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= m.offsetLeft + 310;
   //box.style.top= m.offsetTop + m.offsetHeight;
   box.style.visibility="visible";
   //m.style.backgroundColor="Aqua";
   //m.style.backgroundColor='#FFFF99'
   //box.style.backgroundColor="Aqua";
   //box.style.backgroundColor='#FFFF99';
  //alert(current);
   //box.style.width="155px";
}
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= '#FFCC00';
}
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= '#FFCC00';
}
function UnHighlight(menu,item) {
   if (!document.getElementById) return;
   Timeout(menu);
   obj=document.getElementById(item);
   obj.style.backgroundColor='#FFFF99';
}
