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;
}

var margin = 4; /** entspricht stylesetings body margin */

function setPAGE() {
	
	if (document.getElementById) {
		
		var windowHeight = getWindowHeight();
		
		if (windowHeight > 0) {

		var containerElement = document.getElementById('container');
		var containerHeight = containerElement.offsetHeight;
		containerElement.style.visibility = 'hidden';
		
		if (containerHeight < windowHeight) {
			containerElement.style.top = (windowHeight-containerHeight-16-(margin*2)) / 2 + 'px'; /** 16 wegen der visuellen Mitte */
			containerElement.style.visibility = 'visible';
		
			
		
		} else {
			containerElement.style.top = 0 + 'px';
			containerElement.style.visibility = 'visible';
			}
		}
					

	}
}

window.onload = function() {
		setPAGE();
		}	

window.onresize = function() {
		setPAGE();
		}
	
