function checkPos(contentWidth, contentHeight) {
	var windowHeight = 0;
	var windowWidth = 0;
	if(window.innerHeight) {
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
	} else if(document.documentElement.clientHeight) {
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if(document.body.clientHeight) {
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	if(windowWidth < contentWidth) {
		x = contentWidth/2 - windowWidth/2;
		marginLeft = (-1)*Math.round(contentWidth/2 - x);
		document.getElementById('pageframe').style.marginLeft = marginLeft+"px";
	}
	if(windowHeight < contentHeight) {
		y = contentHeight/2 - windowHeight/2;
		marginTop = (-1)*Math.round(contentHeight/2 - y);
		document.getElementById('pageframe').style.marginTop = marginTop+"px";
	}
}