var CONTAINER_TOPMARGIN = 0; // px

function PositionContainer()
{
	if (document.getElementById) {
		c = document.getElementById("container");
	} else if (document.all) {
		c = document.all("container");
	} else {
		return;
	}
	
	if (typeof(window.innerHeight) == "number") {
		viewHeight = window.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		viewHeight = document.documentElement.clientHeight;
	} else if (document.body && document.body.clientHeight) {
		viewHeight = document.body.clientHeight;
	} else {
		return;
	}
	
	c.style.marginTop = Math.max(((viewHeight - c.offsetHeight) / 2), CONTAINER_TOPMARGIN) + "px";
}

window.onload = PositionContainer;
window.onresize = PositionContainer;
