function showLayer(whichdiv){
	if (document.getElementById(whichdiv.id+"_ov").style.display == ''){
		document.getElementById(whichdiv.id+"_ov").style.display = 'none';
	}else {
		document.getElementById(whichdiv.id+"_ov").style.display = '';
	}
	
}
function checkForm(){
	tel=0;
	var color= '#AA0000';
	var normalcolor='#656565';
	if (document.getElementById("naam").value =='') {				
		tel++;		
		document.getElementById("naam").className = 'txtInputLargeContactWrong';
	} else	{ 
		document.getElementById("naam").className = 'txtInputLargeContact';
	}
	if (document.getElementById("email").value =='' || !checkEmail(document.getElementById("email").value)) {
		tel++;		
		document.getElementById("email").className = 'txtInputLargeContactWrong';		
	} else	{ 
		document.getElementById("email").className = 'txtInputLargeContact';
	}
	if(tel==0){					
		return true;
	} else {
		document.getElementById("formMelding").innerHTML = '<b>* Vul aub. alle verplichte velden in [' + tel + ']</b>';
		document.getElementById("formMelding").style.display = '';
		return false;
	}	
}
function checkEmail(str){
	var testresults = false;
	//uitleg filter: minimaal 1 letter voor @ ; min 1 max 66 letters na @ ; min 2 max 6 letters na punt.
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str)){
		testresults=true;
	}else{
		testresults=false;
	}
	return (testresults);
}	
function changeMainPicture(sSource) {
	document.getElementById("mainImage").src = sSource;
	//.replace(/\/medium\//gi, "/large/");
	sSource = sSource.replace(/\/medium\//gi, "\/large\/");
	document.getElementById("fullImage").href = sSource;
}
