$onLoad(init_menu);
function init_menu(){
	document.currentSubnav = {};
	
	var getTarg = function(e){
		var elm = $target(e,'LI');
		if(elm.className == ''){
			elm = $target(elm,'LI',2);
		}
		return elm;
	};
	var onMouseOver = function(e){
		var target = getTarg(e);
		var subnav = $collection(target,'UL');
		if(typeof navtimer != 'undefined'){ clearTimeout(navtimer); }
		if(document.currentSubnav.parentNode != target){
			document.currentSubnav.className = '';
		}
			
		if(subnav.length){
			document.currentSubnav = subnav[0];
			document.currentSubnav.className = 'on';
		}
	};
	var onMouseOut = function(e){
		var subnav = $collection(getTarg(e),'UL');
		
		navtimer = setTimeout(function(){
			if(subnav.length){
				subnav[0].className = '';
			}
		},250);
	};
	
	$listen('cec_navigation','mouseover',onMouseOver);
	$listen('cec_navigation','mouseout',onMouseOut);
}