function fixLayout()
{
	var d = document.getElementById("pagewidth");
	if (d)
	{
		d.style.minHeight = document.documentElement.clientHeight + "px";
	}
}
if (window.addEventListener)
{
	window.addEventListener("load", fixLayout, false);
	window.addEventListener("resize", fixLayout, false);
}
else if (window.attachEvent && !window.opera)
{
	window.attachEvent("onload", fixLayout);
	window.attachEvent("onresize", fixLayout);
}

function initPage()
{
	var nav = document.getElementById("nav");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{
			nodes[i].onmouseover = function () 
			{
				this.className += " hover";
			}
			nodes[i].onmouseout = function ()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}
if (window.attachEvent && !window.opera)
	window.attachEvent("onload", initPage);
