function menu_initialize() {
	
	var menu = document.getElementById('xmenu');
	
	if(!menu) return 0;
	
	var lists = menu.getElementsByTagName('ul');
	
	if(!lists) return 0;
	
	
	for(i in lists) {
		
		if(lists[i].style) {
			
			xid = uniqid();
			
			var list = lists[i];
			
			list.id = xid;
			
			list.style.display = 'none';
			
			_parent = list.parentNode;
			
			_parent.className = xid;
								
			_parent.onmouseover = function() {
		
				menu_show(this.className);
				
			}
			
			_parent.onmouseout = function() {
							
				menu_hide(this.className);
			
			}

			var x = list.getElementsByTagName('li');
			
			for(i in x) {
				
				if(x[i].nodeName == 'LI') {
						
					x[i].className = xid;	
						
					x[i].onmouseout = function() {
					
						menu_hide(this.className);
					
					}		
					
					var a = x[i].getElementsByTagName('a')[0];
				
					a.className = xid;
				
					a.onmouseover = function() {
						
						menu_show(this.className);
						
					}	
		
				}
					
			}
			
		}
		
	}
		
}


function menu_show(id) {
	
	
	document.getElementById(id).style.display = 'block';
	
}

function menu_hide(id) {
	
	document.getElementById(id).style.display = 'none';
	
}

function uniqid() {

	var newDate = new Date;
	
	return newDate.getTime();

}


