﻿//Right Click
var message="Copyright 2010, Town of West New York, All rights reserved.";
function click(e) {
    if (document.all){
        if (event.button==2||event.button==3){
            alert(message);
            return false;
        }
    }
    else{
        if (e.button==2||e.button==3) {
            //e.preventDefault();
            //e.stopPropagation();
            alert(message);
            return false;
        }
    }
    //if (e.which){
        //alert("oops Opera?")
   // }
}

// for IE
if (document.all) { 
  document.onmousedown=click;
}
// for FF
else { 
  document.onclick=click;
}



// 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";
}