//-------------------------------------------------------------------
// getWindowHeight()
//   Returns the height of the window element
//-------------------------------------------------------------------
function getWindowHeight() {
	var windowHeight = 0;
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
			var msg = "documentElement.clientHeight=";
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
				var msg = "document.body.clientHeight=";
			}
		}
	return windowHeight;
}

//-------------------------------------------------------------------
// setFooter()
//   Positions a bottom banner at a fixed position
//-------------------------------------------------------------------
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var menuHeight = document.getElementById('menu').offsetHeight;
			var footerElement = document.getElementById('btmbnr');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - footerHeight >= 0) {
				footerElement.style.top = (windowHeight - footerHeight) + 'px';
			}
			else {
				footerElement.style.top = '0px';
			}
		}
	}
}

