var isDOM = (document.getElementById ? true : false); 
	var isIE4 = ((document.all && !isDOM) ? true : false);
	var isIE = (document.all ? true : false);
	var isNS4 = (document.layers ? true : false);
	//var isDyn = (isDOM || isIE4 || isNS4);
	
function getRef(idx){
	if (isDOM) return document.getElementById(idx);
	if (isIE4) return document.all[idx];
	//if (isNS4) return document.layers[idx];
}
function getSty(idx){
	 if (isDOM) return document.getElementById(idx).style;
	 if (isIE4) return document.all[idx].style;
	 //if (isNS4) return document.layers[idx];
}
function position_waarom(){
	// Positioneer 'waarom' aan de hand van de lengte van de 'text'-div.
	//alert (document.getElementById('text').offsetHeight + "px");
	getSty('waarom').top = document.getElementById('text').offsetHeight - 200 + "px";
}
function spacer(){
	// Bepaal de height van de spacer aan de hand van de lengte van de 'text'-div, en trek 'waarom' er van af.
	//alert(getSty('spacer').height);
	getSty('spacer').height = document.getElementById('text').offsetHeight - 282 + "px";
}
function chk_frm(){
	msg = "Een aantal velden zijn niet juist ingevuld:\n";
	var mailpat = /[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z\.]{2,5}/;
	if(document.frm.achternaam.value == ''){
		msg += "- Uw achternaam ontbreekt\n";
	}
	if(document.frm.mail.value == ''){
		msg += "- Vul alstublieft uw e-mailadres in.\n";
	}else{
		if(!mailpat.test(document.frm.mail.value)){
			msg += "-Uw e-mailadres is niet juist.\n";
		}
	}
	if(msg != 'Een aantal velden zijn niet juist ingevuld:\n'){
		alert(msg);
		return(false);
	}else{
		return(true);
	}
}
