function fadeMailForm() {
	$("#mailform").toggle();
}

function toon_groteafbeelding(afbeelding) {
	afbeelding.src = '/images/not_available_big.gif';
}

function toon_spacer(afbeelding) {
	afbeelding.src = '/images/dot_clear.gif';
	afbeelding.style.width = '1px';
}

function setBorder(afbeelding) {
	var src = afbeelding.src;
	var temp = new Array();
	temp = src.split('/');

	if (typeof temp == 'object') {
		if (temp[4] !== 'dot_clear.gif')
			afbeelding.style.border = '1px solid #C0272E';
	}
 }

function InvulveldChecken() {
	if (document.zoekformulier.search_for.value.length>0) {
		document.zoekformulier.submit();
	} else {
		alert ('U moet iets invullen in het veld "Zoeken op".');
		document.zoekformulier.search_for.focus();
	}
}

//benodigde functie voor foto overzichts bouwsteen
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var popupscherm=0;

function popup_afbeelding(filename, fileid, width, height, scrollbars, resizable, menubar, toolbar, status, location) {
	if (popupscherm && ! popupscherm.closed)	popupscherm.close();
	if (!filename || filename=="")				filename="http://www.pageprocessor.nl";
	if (!fileid || fileid=="")					fileid="PageProcessor";
	if (!width || width=="")					width="50";
	if (!height || height=="")					height="50";
	if (!scrollbars || scrollbars=="")			scrollbars="no";
	if (!resizable || resizable=="")			resizable="no";
	if (!menubar || menubar=="")				menubar="no";
	if (!toolbar || toolbar=="")				toolbar="no";
	if (!status || status=="")					status="no";
	if (!location || location=="")				location="no";
	popupscherm=0;
	var args = "height=" + height + ", width=" + width + ", scrollbars=" + scrollbars + ", resizable=" + resizable +  ", menubar=" + menubar + ", toolbar=" +toolbar + ", status=" + status + " ,location=" + location;
	popupscherm = open(filename, fileid, args);
	if (!InternetExplorer) 						popupscherm.focus();
}

//koppel de juiste classes bij mouseover uitklapmenu
sfHover = function() {
	if (document.getElementById("nav")) {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);