if (window.addEventListener) {
	window.addEventListener("load",setDiv, false);
	window.addEventListener("resize",setDiv, false);
} else if(window.attachEvent) {
	window.attachEvent("onload",setDiv);
	window.attachEvent("onresize",setDiv);
} else {
	window.onload=setDiv();
	window.onresize=setDiv();
}
function setDiv(){
	checkDiv(false);
}
function checkDiv(checkedagain){
	var MinWidth = 1094;
	if (typeof(window.innerHeight) == 'number') {
		win_height = window.innerHeight;
		win_width = window.innerWidth;
	}	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			win_height = document.documentElement.clientHeight;
			win_width = document.documentElement.clientWidth;
		}	else {
			if (document.body && document.body.clientHeight) {
				win_height = document.body.clientHeight;
				win_width = document.body.clientWidth;
			}
		}
	}
	if (document.all) {
		doc_height = document.body.offsetHeight;
		foot_height = document.getElementById('Footer').offsetHeight;
	} else if (document.layers) {
		doc_height = document.body.document.height;
		foot_height = document.getElementById('Footer').height;
	} else {
		doc_height = document.body.offsetHeight;
		foot_height = document.getElementById('Footer').offsetHeight;
	}
	if(win_width<MinWidth){
		document.body.style.width = MinWidth+"px";
		document.getElementById('Container').style.width = MinWidth+"px";
	} else {
		document.body.style.width = "auto";
		document.getElementById('Container').style.width = "auto";
	}
	if(doc_height>win_height){
		document.body.style.height = "auto";
		document.getElementById('Container').style.height = "auto";
	} else {
		document.body.style.height = win_height+"px";
		document.getElementById('Container').style.height = win_height-foot_height+"px";
	}
	if(!checkedagain){
		checkDiv(true);
	}
}