var x = 0;
var y = 0;

function Init_Position()
{
	var h = 576;
	var w = 1012;
		
	if (window.innerHeight)
	{
		h = window.innerHeight;
		w = window.innerWidth;
	}
	else if (document.body && document.body.offsetHeight)
	{
		h = document.body.offsetHeight;
		w = document.body.offsetWidth;
	}
	
	x = (w - 1012) >> 1;
	y = (h - 576) >> 1;
}

function Init_Page()
{
	Init_Position();
	if (document.getElementById("page"))
	{
		document.getElementById("page").style.left = x + 'px';
		document.getElementById("page").style.top = y + 'px';
	}
}
	
window.onresize = Init_Page;

Init_Position();

document.write('<div id="page" style="position:absolute; width:1012px; left:' + x + 'px; top:' + y + 'px;">');
