function fixLayout()
{
	var c = document.getElementById("main");
	if (c)
		c.className = (document.documentElement.scrollHeight > document.documentElement.clientHeight) ? "layout-fix" : "";
}

if (window.addEventListener)
{
	window.addEventListener("load", fixLayout, false);
	window.addEventListener("resize", fixLayout, false);
}
else if (window.attachEvent && Number(navigator.userAgent.substr(navigator.userAgent.indexOf("MSIE") + 5, 3)) > 6)
{
	window.attachEvent("onload", fixLayout);
	window.attachEvent("onresize", fixLayout);
}
