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 checkFriend(){
	tel=0;
	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 (document.getElementById("naam1").value =='') {				
		tel++;		
		document.getElementById("naam1").className = 'txtInputLargeContactWrong';
	} else	{ 
		document.getElementById("naam1").className = 'txtInputLargeContact';
	}
	if (document.getElementById("email1").value =='' || !checkEmail(document.getElementById("email").value)) {
		tel++;		
		document.getElementById("email1").className = 'txtInputLargeContactWrong';		
	} else	{ 
		document.getElementById("email1").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 sluitVideo(){
	document.getElementById("videoWindow").style.display = 'none';
	document.getElementById("videoWindow").innerHTML = '';
	document.getElementById("backFlash").style.display = 'none';
}
function startVideo(){
	UFO.create(Film, "videoWindow");
	document.getElementById("videoWindow").style.display = '';
	document.getElementById("videoWindow").style.top = (curPagePos()+50) + 'px';
	document.getElementById("backFlash").style.display = '';
	document.getElementById("backFlash").style.height = getPageSize() + 'px';
}
function curPagePos() {
	  var scrOfY = 0;
	  if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
	  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
	  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
	  }
	  return  scrOfY ;
	}
function getPageSize(){
		var scrOfY = 0;
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
		  }
		var windowHeight;
		if (self.innerHeight) {	// all except Explorer
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowHeight = document.body.clientHeight;
		}	
		// for small pages with total height less then height of the viewport
		//alert(scrOfY + " en  " + windowHeight);
		if (scrOfY > 0){
			return (scrOfY+windowHeight);
		} else {
			return windowHeight;
		}
	}	
var curShow = 1;
function showNext(){
	document.getElementById('showNext'+curShow).style.display='';
	curShow++;
	document.getElementById('showNext'+curShow).style.display='';
	curShow++;
	if (curShow > 4)
	{
		document.getElementById('showMore').style.display = 'none';
	}
}
