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 setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var marginDiff = 30; /* Watch out for margins - they aren't calculated! */
			var contentHeight = document.getElementById('content').offsetHeight;
			var navHeight = document.getElementById('nav').offsetHeight;
			var footerHeight = document.getElementById('footer').offsetHeight;
			var printerHeight  = document.getElementById('printer_friendly').offsetHeight;
			var topValue = windowHeight - (contentHeight + navHeight + footerHeight);
			//alert (printerHeight);
			if (topValue >= 0) {
				document.getElementById('content').style.height = (windowHeight - footerHeight - navHeight - printerHeight - marginDiff) +'px';
				document.getElementById('content').style.minHeight = (windowHeight - footerHeight - navHeight - printerHeight - marginDiff) +'px';
			}
		}
	}
}