/*
  -----------------------------------------------------

  Functies ten behoeve van het werken met het menu
  vanuit javascript.

  -----------------------------------------------------
*/

	inMnu = 0;
	inSub = 0;
	isOut = 0;


	function mnuOver(mnu, hasSub)
	{
		if (inMnu > 0)
		{
			document.getElementById("mnu" + inMnu).className = "button"
			
			if (inSub == 1)
			{
				document.getElementById("submnuct" + inMnu).style.visibility = "hidden"
			}		
		}
		
		inMnu = mnu;
		inSub = hasSub;
		isOut = 0;
		
		document.getElementById("mnu" + mnu).className = "buttonOver"
	
		if (hasSub == 1)
		{
			document.getElementById("submnuct" + mnu).style.visibility = "visible"
		}
	
	}
	
	function mnuOut(mnu, hasSub)
	{
		isOut = 1;
		setTimeout("mouseX()", 100);
	}
	
	function submnuOver()
	{
		isOut = 0;
	}

	function submnuOut()
	{
		isOut = 1;
		setTimeout("mouseX()", 100);
	}
	
	function subitemOver(item)
	{
		
		document.getElementById("subitem" + item).style.backgroundColor = "";
		document.getElementById("subitem" + item).style.color = "LightSteelBlue";
	}

	function subitemOut(item)
	{
		
		document.getElementById("subitem" + item).style.backgroundColor = "";
		document.getElementById("subitem" + item).style.color = "";
	
	}
	
	function mouseX()
	{
		if (isOut == 1)
		{
			if (inMnu > 0)
			{
				document.getElementById("mnu" + inMnu).className = "button"
	
				if (inSub == 1)
				{
					document.getElementById("submnuct" + inMnu).style.visibility = "hidden"
				}		
			}
		}		
	}
