

function getWindowHeight() {
	if (typeof(window.innerHeight) == 'number') { return window.innerHeight; }
	else if (document.documentElement && document.documentElement.clientHeight) { return document.documentElement.clientHeight; }
	else if (document.body && document.body.clientHeight) { return document.body.clientHeight; }
}
//var Check = 0		
function setFooter() {
  //if (Check == 1) { return 0; } // Prevent IE from running recursively
	if (document.getElementById) {
		//Check = 1
	  var WindowHeight = getWindowHeight();
		if (WindowHeight <= 0) { return 0; }		
		var ContentHeight = document.getElementById('Body').offsetHeight + document.getElementById('Body').offsetTop;
		if (ContentHeight >= WindowHeight) { return 0; }
		var FooterElement = document.getElementById('Footer');
		FooterElement.style.marginTop = (WindowHeight - ContentHeight) + 'px';
		//Check = 0
	}
}
window.onload = function() { setFooter(); }
//window.onresize = function() { setFooter(); }
