// a few IE hacks :) hujer@hujer.cz 2003

var explorer = navigator.userAgent.indexOf('MSIE') != -1 ? true : false;
var dom = document.getElementById ? true : false;

var pageHolder;

var pageHolderWidth=775;
var bodyBackgroundWidth=775;

function reCenter() {
	pageHolder.style.position='absolute';
	if (document.body.clientWidth<pageHolderWidth) {
			pageHolder.style.left=0;
			document.body.style.backgroundPositionX=Math.floor(-(bodyBackgroundWidth-pageHolderWidth)/2);
		} else {
				pageHolder.style.left=Math.floor((document.body.clientWidth/2)-(pageHolderWidth/2));
				document.body.style.backgroundPositionX=Math.floor((document.body.clientWidth/2)-(bodyBackgroundWidth/2));
			}
}

function onLoad() {
	if (explorer) {
		pageHolder=document.getElementById('pageHolder');
		document.body.onresize=function anonymous() { onResize(); };
		reCenter();
	}
}

function onResize() {
	if (explorer) {
		reCenter();
		// rePlaceFooter();
	}
}
