var timeOut = null;
var width = pageWidth();
var height = pageHeight();

window.onresize = function(){
	if(pageHeight() !== height){
		resizeh();
	}
};

function resizeh() {
	height = pageHeight();

	if(height > 621) {
		pheight = (height - 620) / 2;
		document.getElementById('container').style.top = pheight+"px";
		document.getElementById('footer').style.top = height-20+"px";
	}
	else {
		pheight = 0;
		document.getElementById('container').style.top = pheight+"px";
		document.getElementById('footer').style.top = 600+"px";
	}
}

function pageWidth() {
	return window.innerWidth != null ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
}

function pageHeight() {
	return window.innerHeight != null ? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null ? document.body.clientHeight : null;
}
