﻿// Footer
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 contentHeight = document.getElementById('container-page').offsetHeight;
					var footerElement = document.getElementById('container-footer');
					var footerHeight  = footerElement.offsetHeight;
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.position = 'absolute';
						footerElement.style.top = (windowHeight - footerHeight) + 'px';
					}
					else {
						footerElement.style.position = 'static';
					}
				}
			}
		}		
window.onload = function() {
    setFooter();
}
		
window.onresize = function() {
    setFooter();
}
		
// Open AgendaBox
function WindowAgenda(theURL) { 
	open (theURL,"Agenda","status=no,width=400, height=480, resizable=no, scrollbars=yes")
}

// Open Gallery
function WindowGallery(theURL) { 
	open (theURL,"Gallery","status=no,width=550, height=532, resizable=no, scrollbars=no")
}

// Open Stream
function popUp15() {
	window.open('http://www.civicstream.com/Lyndhurst/videoNews.htm', 'poppage', 'toolbars=0,  scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=790, height=375, left=50, top=200');
}

function ShowHide(){
    document.getElementById('postup').style.display="";
    document.getElementById('postup').style.visibility="hidden";
}