var timerID;
var subMenus = new Array('produkte', 'unternehmen', 'presse', 'kontakt');
var noSubMenus = new Array('messen');

function highlightMainmenuItem(id)
{
	var image = getLayer('main-'+id);
	image.style.backgroundColor = "rgb(179,200,224)";
}
function lowlightMainmenuItem(id)
{

		var image = getLayer('main-'+id);
		image.style.backgroundColor = "rgb(195,212,232)";
}



function showSubmenu(id, productsIsActive)
{

	clearTimeout(timerID);
	hideSubmenus(productsIsActive);
	
	dispBlock('sub-'+id);
	highlightMainmenuItem(id);
}



function submenuOut(productsIsActive)
{
	clearTimeout(timerID);
	timerID = setTimeout('hideSubmenus('+productsIsActive+')', 20);
}

function hideSubmenus(productsIsActive)
{
	for (i=0; i<subMenus.length; i++)
	{
		dispNone('sub-'+subMenus[i]);
		lowlightMainmenuItem(subMenus[i]);
	}
	

	if (productsIsActive) dispBlock('sub-produkte');
}



function popup(url, width, height, sb)
{
	w = window.open(url, 'zoom', 'width=' + width +', height=' + height + ', toolbar=no, scrollbars=' + sb + ', menubar=no, locationbar=no');
	w.focus();
}
