//
var outerContentWidth = 1100;
var outerContentHeight = 800;
var innerContentWidth = 800;
var innerContentHeight = 670;
//
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	} else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		} else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	} else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		} else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}
function setContent() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		var windowWidth = getWindowWidth();
		if (windowHeight > 0) {
			var outerElement = document.getElementById('outer');
			var innerElement = document.getElementById('inner');
			outerElement.style.position = 'relative';
			outerElement.style.top = ((windowHeight / 2) - (outerContentHeight / 2) - innerContentHeight) + 'px';
			if ((windowWidth < outerContentWidth)&&(outerElement.style.left<=0)) {
				outerElement.style.left = ((windowWidth / 2) - (outerContentWidth / 2)) + 'px';
			}
			if (windowHeight - innerContentHeight > 0) {
				innerElement.style.position = 'relative';
				innerElement.style.top = ((windowHeight / 2) - (innerContentHeight / 2)) + 'px';
			} else {
				outerElement.style.position = 'static';
				innerElement.style.position = 'static';
			}
		}
	}
}
window.onload = function() {
	setContent();
}
window.onresize = function() {
	setContent();
}