
var isMSIE = document.attachEvent != null;
var isGecko = !document.attachEvent && document.addEventListener;


function showMenu(event,el){
	
	
	if(el.MenuInterval){clearTimeout(el.MenuInterval);}
	el.MenuInterval = setTimeout(
		function(){
			el.className = 'menu_h';
		} ,
		310
	);
	
	
	if (isMSIE){	el.attachEvent ("onmouseout", hideMenu);}
	if (isGecko){	el.addEventListener ("mouseout", hideMenu, true);}
	
	function hideMenu(){
		if(el.MenuInterval){clearTimeout(el.MenuInterval);}
		el.MenuInterval = setTimeout(
			function(){
				el.className = 'menu';
			} ,
			300
		);
	}
}

function showSubMenu(event,el){
	
	el.className = 'submenu_active';
	el.firstChild.className = 'link_a';
	
	if(el.MenuInterval){clearTimeout(el.MenuInterval);}
	el.MenuInterval = setTimeout(
		function(){
			if(el.lastChild.className == 'marker'){
				el.lastChild.firstChild.style.display = 'block';
			}
		} ,
		310
	);
	
	if (isMSIE){	el.attachEvent ("onmouseout", hideMenu);}
	if (isGecko){	el.addEventListener ("mouseout", hideMenu, true);}
	
	function hideMenu(){
		
		el.className = '';
		el.firstChild.className = 'link';
		
		if(el.MenuInterval){clearTimeout(el.MenuInterval);}
		el.MenuInterval = setTimeout(
			function(){
				if(el.lastChild.className == 'marker'){
					el.lastChild.firstChild.style.display = 'none';
				}
			} ,
			300
		);
	}
}

