function setContent()
{
	if (document.getElementById) {
		var wh = document.documentElement.clientHeight;
		if (wh > 0) {
			var ce = document.getElementById('contents');
			var ch = ce.offsetHeight;
			var hh = document.getElementById('header').offsetHeight
			var fh = document.getElementById('footer').offsetHeight;
			var top = (wh - ch - hh - fh) / 2;
			if (top > 0) {
				ce.style.position = 'relative';
				ce.style.top = (hh + top) + 'px';
			} else {
				ce.style.position = 'relative';
				ce.style.top = '50px';
			}
		}
	}
}

window.onload = function()
{
	setContent();
}
window.onresize = function()
{
	setContent();
}

