/* alert("JS loaded"); */

/*
	add bahaviours to drop-down nav list
	see: http://www.htmldog.com/articles/suckerfish/example/
*/

initMenuList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}


/*
	vertical positioning for footer
	See http://www.alistapart.com/articles/footers/
*/

function getWindowHeight() {
	// Core code from - quirksmode.org
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	return windowHeight;
}

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('pagewrapper').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - footerHeight >= 0) {
				if (self.innerHeight) { // all except Explorer
					footerElement.style.position = 'fixed';
				} else { // all other browsers
					footerElement.style.position = 'absolute';
				}
				footerElement.style.top = (windowHeight - footerHeight) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}

/* open pdf file in new window */



/* initialise form */

function setFocus() {
	element = document.getElementById('Voornaam');
	element.focus();
}

function checkFormInput() {
}

		
window.onload = function() {

	initMenuList();
	
	if(document.getElementById('contactform')) {
		setFocus();
	}
	
	if ('function' == typeof window.initLightbox) {
		initLightbox();
	}
}
