// JavaScript Document
function getWindowheight() { 
	var windowheight = 0; 
	if (typeof window.innerHeight != 'undefined') {
		windowheight = window.innerHeight;
	}
	
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientHeight != 'undefined' && document.documentElement.clientHeight != 0) {
		windowheight = document.documentElement.clientHeight;
	}
	
	// older versions of IE
	else {
		windowheight = document.getElementsByTagName('body')[0].clientHeight
	}
	
	return windowheight; 
} 

function setContent() {
	if (document.getElementById) {
		var windowheight = getWindowheight();
		if (windowheight > 0) {
			var container = document.getElementById('container');
			var maintext = document.getElementById('main-text');
			if (windowheight - 75 > 0) {
				container.style.height = (windowheight - 75) + 'px';
				maintext.style.height = (container.offsetHeight - 140) + 'px';
			}
		}
	}
}

window.onload = function() {
setContent();
}
window.onresize = function() {
setContent();
}