function resize()
{
	var swh =  document.getElementById("ScreenWidthHidden");
	var shh =  document.getElementById("ScreenHeightHidden");
	
	var w = 0, h = 0;
	
	if( typeof( innerWidth ) == 'number' )
	{
		// W3C
		w = innerWidth;
		h = innerHeight;
	}
	else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
	{
		// IE 6+ in 'standards compliant mode'
		w = document.documentElement.clientWidth;
		h = document.documentElement.clientHeight;
	}
	else if (document.body && ( document.body.clientWidth || document.body.clientHeight ) )
	{
		// IE 4 compatible
		w = document.body.clientWidth;
		h = document.body.clientHeight;
	}
	
	swh.value = w;
	shh.value = h;
	
	checkReload();
}

function checkReload()
{
	var reloadElem = document.getElementById("FullscreenReload");
	if (reloadElem)
	{
		document.Form1.submit();
	}
}
