function leeg(){
	document.Informatie.vraag.value = ''
}
function checkIt() {
		     if (document.Informatie.Naam.value  == ''){
		       alert('U heeft geen naam ingevuld');
		       document.Informatie.Naam.focus();
		       return false;
		     } 
		     if (document.Informatie.Adres.value  == ''){
		       alert('U heeft geen adres ingevuld');
		       document.Informatie.Adres.focus();
		       return false;
		     } 
		     if (document.Informatie.Postcode.value  == ''){
		       alert('U heeft geen postcode ingevuld');
		       document.Informatie.Postcode.focus();
		       return false;
		     } 
		     if (document.Informatie.Woonplaats.value  == ''){
		       alert('U heeft geen woonplaats ingevuld');
		       document.Informatie.Woonplaats.focus();
		       return false;
		     } 
		     if (document.Informatie.Telefoonnummer.value  == ''){
		       alert('U heeft geen telefoonnummer ingevuld');
		       document.Informatie.Telefoonnummer.focus();
		       return false;
		     } 
			  var strng = document.Informatie.Telefoonnummer.value;
			  var stripped = strng.replace(/[\(\)\.\-\ ]/g, '');
			  document.Informatie.Telefoonnummer.value = stripped;
			  if (isNaN(parseInt(stripped))) {
   		  	 alert('Een telefoonnummer bevat alleen cijfers');
				 document.Informatie.Telefoonnummer.value = '';
				 document.Informatie.Telefoonnummer.focus();
		       return false;
			  }
			  if (stripped.length < 10) {
 			  	 alert('Het telefoonnummer heeft een onjuiste lengte');
				 document.Informatie.Telefoonnummer.value = '';
				 document.Informatie.Telefoonnummer.focus();
		       return false;
			  }
			  var emailFilter=/^.+@.+\..{2,3}$/;
			  var strng = document.Informatie.Emailadres.value;
			  if (!(emailFilter.test(strng))) { 
       	  	  alert('Onjuist e-mailadres');
				  document.Informatie.Emailadres.value = '';
				  document.Informatie.Emailadres.focus();
				  return false;
			  }
			  var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
			  if (strng.match(illegalChars)) {
       	  	  alert('Onjuist e-mailadres');
				  document.Informatie.Emailadres.value = '';
				  document.Informatie.Emailadres.focus();
				  return false;
			  }
		     if (document.Informatie.vraag.value  == ''){
		       alert('U heeft geen vraag ingevuld');
		       document.Informatie.vraag.focus();
		       return false;
		     } 
			  return true
}
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

function EditCheck()	{
    if (document.editpage.titel.value  == ''){
      alert('U heeft geen titel ingevuld');
      document.editpage.titel.focus();
      return false;
    } 
	return true
}

function NewCheck()	{
    if (document.newpage.titel.value  == ''){
      alert('U heeft geen titel ingevuld');
      document.newpage.titel.focus();
      return false;
    } 
	return true
}

function CheckSelect()
{
   if (document.delpage.pagina[document.delpage.pagina.selectedIndex].value == '')
	{
		alert('U dient eerst een pagina te selecteren');
		return false;
	}
}

function buildTypes(){
	document.types.submit();	
}

function PreviewTop(Image,Type)
{
	if (Type=='Top')
	{
		window.open('../sysimages/tops/' + Image,null);
	}
	if (Type=='BG')
	{
		window.open('../sysimages/bg/' + Image,null);
	}
}

function upload(Type)
{
	if (Type=='Top')
	{
		window.open('popups/upload_general.asp?type=top',null,'height=400,width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes');
	}
	if (Type=='BG')
	{
		window.open('popups/upload_general.asp?type=bg',null,'height=400,width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes');
	}
}
