
addListenner(window, "load", mainMenuRollover, true);





function mainMenuRollover()
{
	var oMenu = document.getElementById('menu');
	if (!oMenu) {
		return false;
	}
	oMenu = oMenu.firstChild; // ul
	
	for (var oN = oMenu.firstChild; oN; oN = oN.nextSibling) {
		oN.onmouseover = showMenu;
		oN.onmouseout = hideMenu;
	}
}


function showMenu()
{
	if (this.hideTimer) {
		clearTimeout(this.hideTimer);
	}
	if (this.className.indexOf('sousmenu') >= 0) {
		return false;
	}
	addClass(this, 'sousmenu');
}




function hideMenu()
{
	var that = this;
	
	function hideFn()
	{
		removeClass(that, 'sousmenu');
		clearTimeout(that.hideTimer);
	};
	
	this.hideTimer = setTimeout(hideFn, 200);

}

