function initMenu()
{
	var items = document.getElementById("menu").getElementsByTagName("li"); 
	
	for (var i = 0; i < items.length; i++)
	{
		var item = items[i];
		
		item.onmouseover = function()
		{
			this.className += (this.className.length > 0 ? " " : "") + "xhover"; 
		}
		
		item.onmouseout = function()
		{
			this.className = this.className.replace(new RegExp("( ?|^)xhover\\b"), ""); 
		}
	}
}

window.onload = initMenu;

