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){
	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;
		doc_width = document.getElementById('Container').offsetWidth;
		head_height = document.getElementById('Header').offsetHeight;
		foot_height = document.getElementById('Footer').offsetHeight;
		logo_height = document.getElementById('Aevium').offsetHeight;
		logo_width = document.getElementById('Aevium').offsetWidth;
	} else if (document.layers) {
		doc_height = document.body.document.height;
		doc_width = document.getElementById('Container').width;
		head_height = document.getElementById('Header').height;
		foot_height = document.getElementById('Footer').height;
		logo_height = document.getElementById('Aevium').height;
		logo_width = document.getElementById('Aevium').width;
	} else {
		doc_height = document.body.offsetHeight;
		doc_width = document.getElementById('Container').offsetWidth;
		head_height = document.getElementById('Header').offsetHeight;
		foot_height = document.getElementById('Footer').offsetHeight;
		logo_height = document.getElementById('Aevium').offsetHeight;
		logo_width = document.getElementById('Aevium').offsetWidth;
	}
	if(doc_width>win_width){
		document.getElementById('Aevium').style.left = doc_width-logo_width+"px";
	} else {
		document.getElementById('Aevium').style.left = win_width-logo_width-25+"px";
	}
	if(win_width<1028){
		document.body.style.width = "1028px";
		document.getElementById('Container').style.width = "1028px";
	} else {
		document.body.style.width = "auto";
		document.getElementById('Container').style.width = "auto";
	}
	if(doc_height>win_height){
		document.body.style.height = "auto";
		document.getElementById('Content').style.height = "auto";
		document.getElementById('Aevium').style.top = doc_height-logo_height+"px";
	} else {
		document.body.style.height = win_height+"px";
		document.getElementById('Content').style.height = win_height-head_height-foot_height-10+"px";
		document.getElementById('Aevium').style.top = win_height-logo_height+"px";
	}
	if(!checkedagain){
		checkDiv(true);
	}
}