// globale variabele definities
var activeTop;

// initialisatie functie die aangeroepen wordt bij het openen van elke pagina
function init (topID, subID)
{
	activeTop = topID;
	if (subID.length != 0)
	{
		// actief maken van het topmenu
		mouseover(topID);
		// actief maken van het submenu
		document.getElementById(subID).className = "subma";
		// openklappen van het submenu
		var id = topID.replace("root", "sub");
		//document.getElementById(id.replace("sub", "img")).src = "http://www.revasa.nl/images/min.gif";
	}
	else
	{
		document.getElementById(topID).className = "topma";
	}
}

// functie voor de onmouseout
function mouseout (id)
{
	if (id != activeTop && document.getElementById(id))
		document.getElementById(id).className = "topmenui";
}

// functie voor de onmouseout
function mouseout2 (id)
{
	document.getElementById(id).style.display = "block";
	if (id != activeTop && document.getElementById(id))
		document.getElementById(id).className = "lipaars";
}

// functie voor de onmouseover
function mouseover (id)
{
	if (document.getElementById(id)){
	document.getElementById(id).className = "topmenua";
	}
}

// functie voor de onmouseover
function mouseover2 (id)
{
	//document.getElementById(id).className = "ligrijs";
	document.getElementById(id).style.display = "none";
}

// functie die menu delen uit laat klappen
function collapse (id)
{	
	if (document.getElementById(id))
	{
		if (document.getElementById(id).style.display == "block")
		{
			document.getElementById(id).style.display = "none";
			//document.getElementById(id.replace("sub", "img")).src = "http://www.revasa.nl/images/plus.gif";
		}
		else
		{
			document.getElementById(id).style.display = "block";
			//document.getElementById(id.replace("sub", "img")).src = "http://www.revasa.nl/images/min.gif";
		}
	}
}

