
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 DEFAULTCONTENTHEIGHT = 0;

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var footerElement = document.getElementById('con_footer');
			var footerHeight = footerElement.offsetHeight;
			footerElement.style.visibility = "hidden";
			footerElement.style.display = "inline";
			DEFAULTCONTENTHEIGHT = document.getElementById('con').offsetHeight;
			if (windowHeight - (DEFAULTCONTENTHEIGHT + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.top = (windowHeight - footerHeight + 0) + 'px'; // het getal erbij is de padding van de 'con' container. 
				footerElement.style.visibility = "visible";
			}
			else {
				//footerElement.style.position = 'static';
				footerElement.style.position = 'absolute';
				footerElement.style.top = (DEFAULTCONTENTHEIGHT + 0) + 'px'; // het getal erbij is de padding van de 'con' container.
				footerElement.style.visibility = "visible";
			}
		}
	}
	
}

