window.onload = mladdevents;
			function mladdevents(){
				var divs = document.getElementsByTagName('div');
				for(var j=0;j<divs.length;j++){
					if(divs[j].className.indexOf('mlmenu') != -1){
						var lis = divs[j].getElementsByTagName('li');
						for(var i =0;i<lis.length;i++){
							lis[i].onmouseover = mlover;
							lis[i].onmouseout = mloutSetTimeout;
						}
					}
				}
			}
			function mloutSetTimeout(e){
				if(!e){
					var the_e = window.event;
				}
				else{
					var the_e = e;
				}
				var reltg = (the_e.relatedTarget) ? the_e.relatedTarget : the_e.toElement;
				if(reltg){
					if(reltg != this){
						window.mlLast = this;
						var parent = this.parentNode;
						while(parent.parentNode && parent.className.indexOf('mlmenu') == -1){
							parent = parent.parentNode;
						}
							window.mlTimeout = setTimeout(function(){mlout()},500);		
					}
				}
			}
			function mlout(){
			if(window.mlLast==null)return false;
				//var uls = window.mlLast.getElementsByTagName('ul');
				//var sib;
				window.lastover = null;
			}
			function mlover(e){
				if(!e){
					var the_e = window.event;
				}
				else{
					var the_e = e;
				}
				the_e.cancelBubble = true;
				//clearTimeout(window.mlTimeout);
				if(window.mlLast && window.mlLast != this){
					mlout();
				}
				else{
					window.mlLast = null;
				}
				var reltg = (the_e.relatedTarget) ? the_e.relatedTarget : the_e.fromElement;
				var ob = this.getElementsByTagName('ul');
				
				if(ob[0]){
					if(window.lastover != ob[0]){
						this.className = 'haschild';
						mlEffectOver(ob[0],this);
						window.lastover = ob[0];
				   	}
				}
			}		
			function mlIncreaseHeight(ob){
				var current = parseInt(ob.style.height);
				var newh = current + 1;
				ob.style.height = newh+'px';
			}
			function mlEffectOver(ob,parent){
						ob.style.display = 'block';
						if(ob.offsetHeight){
							var height = ob.offsetHeight
							ob.style.height = '0px';
							ob.style.overflow = 'hidden';
							for(var i=0;i<height;i++){
								setTimeout(function(){mlIncreaseHeight(ob)},i*3);
							}
							setTimeout(function(){ob.style.overflow='visible';},height*3)
						}
				}
			//function mlEffectOut(ob){				
		//	ob.style.display = 'none';
		//	}
	//	function mlEffectLoad(ob){
				//	ob.style.display = 'none';
			//		}

