function checkEmpty(){
	//alert("hallo");
		document.getElementById('inst').disabled=true; 
		document.getElementById('inst').value='Een moment geduld a.u.b.';
proceed=true;
	required=new Array("naam","leeftijd","email","titel","slagzin","foto");
	for(i=0; i<required.length; i++){
		if(document.insturen[required[i]].value==""){
			alert('Je hebt niets ingevuld bij ' + required[i] + '!');
			document.insturen[required[i]].focus();
			proceed=false;
			document.getElementById('inst').disabled=false; 
			document.getElementById('inst').value='insturen';
			break;
		}
	}
	return proceed;
}
function disallowChar(idd,disallow){
var w=document.getElementById(idd).value;
var n="";
	if(disallow !==''){
		for(i=0; i<w.length; i++){	    
		    if(disallow.indexOf(w.substr(i,1))==-1){
				n+=w.substr(i,1);	
			}
		}
	}
	else{
		n=w;
	}
	document.getElementById(idd).value=n;
}
function isNumberKey(evt)
  {
	 var charCode = (evt.which) ? evt.which : event.keyCode
	 if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;

	 return true;
  }

function allowChar(idd,allow){
	ok=false;
var w=document.getElementById(idd).value;
var n="";
	if(allow !==''){
		for(i=0; i<w.length; i++){	    
		    if(allow.indexOf(w.substr(i,1))>-1){
				n+=w.substr(i,1);	
			}
		}
	}
	else{
		n=w;
	}
	document.getElementById(idd).value=n;
	ok=true;
}
function checkLeeftijd(){
	age=document.getElementById('leeftijd').value;
	if(age.length){
		if(age>20){
			document.getElementById('anno2026').style.display='';	
		}
		else{
			document.getElementById('anno2026').style.display='none';	
		}
	}
}
function checkEmptyAge(){
	if(!document.getElementById('leeftijd').value.length){
		alert('Vul eerst uw leeftijd in!');	
		document.getElementById('leeftijd').focus();
	}
}
