//
// ValignBody.js
//
// Copyright 2005 by Anthony Howe.  All rights reserved.
//

window.onresize = function (e)
{
	var y;
	var thePage = document.getElementById('thePage');

	if (window.innerHeight != null)
		y = Math.floor((window.innerHeight - thePage.offsetHeight)/2);

	else if (document.body.clientHeight != null || document.documentElement.clientHeight != null) {
		var h = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
		y = Math.floor((h - thePage.offsetHeight)/2);
	}
	else
		y = Math.floor((screen.availHeight - thePage.offsetHeight)/4);

	y = y < 0 ? 0 : y;
	thePage.style.marginTop = y +'px';
}

window.onload = window.onresize;
window.onresize(null);

/////////////////////////////////////////////////////////////
// END
/////////////////////////////////////////////////////////////
