function initPage()
{
	var navRoot = document.getElementById("nav");
	var lis = navRoot.getElementsByTagName("li");
	for (var i=0; i<lis.length; i++)
	{
		lis[i].onmouseover = function()
		{
			if (this.timer) clearTimeout(this.timer);
			if (this.className.indexOf('hover') == -1)
				this.className += " hover";
		}
		lis[i].onmouseout = function()
		{
			var _this = this;
			this.timer = setTimeout(function(){
				_this.className = _this.className.replace("hover","");
			}, 20);
		}
	}

	var _Root = document.getElementById("wrapper");
	var _div = _Root.getElementsByTagName("div");
	for (var i=0; i< _div.length; i++)
	{
		if (_div[i].className.indexOf('head-box') != -1) {
			_div[i].onmouseover = function()
			{
				this.className += " hover";
			}
			_div[i].onmouseout = function()
			{
				this.className = this.className.replace("hover","");
			}
		}
	}
}

if (window.attachEvent && !window.opera)
	attachEvent("onload", initPage);

