// Change style info if browser window smaller than page width
// Works around problem with centering code

function resizeCheck()
{
	if(window.innerWidth)
	{
		var winWidth = window.innerWidth;
	}
	else if(document.documentElement.clientWidth)
	{
		var winWidth = document.documentElement.clientWidth;
	}
	else
	{
		return; // incompatible, abort
	}
	var pageEl = document.getElementById("page");
	if(winWidth < pageEl.offsetWidth)
	{
		pageEl.style.left = "0px";
		pageEl.style.marginLeft = "0px";
		document.body.style.backgroundPosition = "left top";
	}
	else
	{
		pageEl.style.left = "";
		pageEl.style.marginLeft = "";
		document.body.style.backgroundPosition = "center top";
	}
}
window.onresize = resizeCheck;
