//--------------------------------------
// Scroller
//--------------------------------------
// (c) 2009 S. Dissler

var currentSubnav = "";
var navOutTimer = null;

function SubnavOver(subnavId)
{
	ClearTimeout();
	if(subnavId!=currentSubnav && currentSubnav!="")
		HideSubnav();

	ShowSubnav(subnavId);

}

function SubnavOut(subnavId)
{
	navOutTimer = window.setTimeout("HideSubnav()", 1000);
}

function ShowSubnav(subnavId)
{
	var element = document.getElementById(subnavId);
	element.style.display = "block";
	currentSubnav = subnavId;

	var elementMain = document.getElementById("Main_" + subnavId);
	elementMain.className = "cssMainNavigationItemActive";
}

function HideSubnav()
{
	var element = document.getElementById(currentSubnav);
	element.style.display = "none";
	if (navIndex!=currentSubnav)
	{
		var elementMain = document.getElementById("Main_" + currentSubnav);
		elementMain.className = "cssMainNavigationItem";
	}
}

function ClearTimeout()
{
	if (navOutTimer!=null){
		window.clearTimeout(navOutTimer);
	}
}
