// Position contact image at bottom of page
// URL: all
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() {
	var minimumHeight = 400;
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if ((windowHeight - footerHeight) > minimumHeight) {
				footerElement.style.top = (windowHeight - footerHeight) + 'px';
			} else {
				footerElement.style.top = minimumHeight + 'px';
			}
		}
	}
}
window.onload = function() {
	setFooter();
}
window.onresize = function() {
	setFooter();
}


// Pop-up Image (with auto resize) - see also popup.html
// URL: all service pages
function PopupPic(sPicURL) {
	window.open("popup.html?"+sPicURL, "", "resizable=1,scrollbars=yes,height=400,width=400");
}