var formatNumber = /^\d+$/;							// A number contains only digitsvar formatHouseNumber = /^\d+$/;					// HouseNumber format starts with a digitvar formatPostalCode = /^(\d{4})\s*([a-z]{2})$/i;	// PostalCode format is 4 digits, possibly some blanks, and 2 lettersvar formatEmail = /^[^@\s]+\@[^@\s]+\.[^@\s]+/;		// E-mail is x@x.xvar formatPhone = /^\d{2,4}[ -]{0,1}\d{6,8}$/;		// A phonenumber is formated nn-nnnnnnnn or nnn-nnnnnnn or nnnn-nnnnnnvar formatPhone = /^\d{10}$/;		// A phonenumber is formated nn-nnnnnnnn or nnn-nnnnnnn or nnnn-nnnnnnvar formatDate = /^([0-3]{1}[0-9]{1})(\/|-)([0-1]{1}\d{1})(\/|-)([1]{1}[9]{1}\d{2})$/;	// A date is formated dd/mm/jjjj (or dd-mm-jjjj) with only digitsfunction trim(strText) {     // this will get rid of leading spaces     if (strText==undefined){		return '';	}    if (strText!=''){	    while (strText.substring(0,1) == ' ') {     	   strText = strText.substring(1, strText.length)     	}     }    if (strText!=''){	    // this will get rid of trailing spaces 	    while (strText.substring(strText.length-1,strText.length) == ' '){        	strText = strText.substring(0, strText.length-1)        }    }   return strText;} function isValidPostalCode(Field, errorMessage, bCurrentStatus) {	var value = new String(Field.value);	value = trim(value);		if ((value.search(/^\d{4}[\s]?[a-zA-Z]{2}$/)) == -1) {//		alert(errorMessage);		Field.style.backgroundColor ='tomato'; //'red'		return false;	} else {		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function isValidCity(Field, errorMessage, bCurrentStatus) { //check not begins with digit	var value = new String(Field.value);	value = trim(value);	//	if ((value.search(/^[a-zA-Z]/)) == -1) { FOUT: dan ook geen apostrophe e.d. zoals in 's hertogenbosch....	if ((value.search(/^[0-9]/)) != -1) {//		alert(errorMessage);		Field.style.backgroundColor ='tomato'; //'red'		return false;	} else {		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function textboxFilled(Field, errorMessage, bCurrentStatus) {	var value = Field.value;	value = trim(value);	if (value == '' ) {//		alert(errorMessage);		Field.style.backgroundColor ='tomato'; //'red'		return false;	} else {		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function checkMaxLength(Field,errorMessage, bCurrentStatus) {	var value = Field.value;	value = trim(value);	if (value.length >10 ) {//		alert(errorMessage);		Field.style.backgroundColor ='tomato'; //'red'		return false;	} else {		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}	}function checkboxChecked(Field,errorMessage,bCurrentStatus){	var value = eval(Field); 	if (valeu.checked == false){		Field.style.backgroundColor ='tomato'; //'red'		return false;	} else { 		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}		}}function isValidPhone(Field, errorMessage, bCurrentStatus) {	var value = Field.value;	var format = formatPhone;	if (value !== '') {		value = value.replace('-','');				value = trim(value);		if (! formatNumber.test(value)) {				Field.style.backgroundColor='tomato'; //'red'				Field.focus();				return false;		}		if (! format.test(value)) {				Field.style.backgroundColor='';				Field.focus();				return false;		}		return true;	}	return true;}function hiddenFilled(Field, errorMessage, bCurrentStatus) {	var value = Field.value;	if (value == '') {//		alert(errorMessage);		Field.style.backgroundColor='tomato'; //'red'		return false;	} else {		Field.style.backgroundColor='';		return true;	}}function radioChecked(radioGroup, errorMessage, bCurrentStatus) {	var i;	for (i = 0; i < radioGroup.length; i++) {		if (radioGroup[i].checked) {			radioGroup.style.backgroundColor='';			radioGroup[i].focus;		if (bCurrentStatus==true){			return true;			} else {			return false;		}		}	}	radioGroup.style.backgroundColor='tomato'; //'red'	return false;}function checkboxChecked(checkboxGroup, errorMessage, bCurrentStatus) {	if(checkboxGroup.checked) {		checkboxGroup.style.backgroundColor='';			if (bCurrentStatus==true){			return true;			} else {			return false;		}	}	return radioChecked(checkboxGroup, errorMessage, bCurrentStatus);}function isNumber(numberField, errorMessage, bCurrentStatus) {	var value = numberField.value;	if (! formatNumber.test(value)) {		numberField.style.backgroundColor='tomato'; //'red'		return false;	} else {		numberField.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function isLength(numberField, length, errorMessage, bCurrentStatus) {	var value = numberField.value;	if (value.length != length) {//		alert(errorMessage);		numberField.style.backgroundColor='tomato'; //'red'		return false;	} else {		numberField.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function selectboxFilled(Field, errorMessage, bCurrentStatus) {	var value = Field.selectedIndex;	if (value =='') {		Field.style.backgroundColor='tomato'; //'red'		return false;	} else {		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function selectboxFilledNoMessage(Field, bCurrentStatus) {	var value = Field.selectedIndex;	if (value =='') {		return false;	}else {		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function isValid(Field, format, errorMessage, bCurrentStatus) {	var value = Field.value;	if (! format.test(value)) {		Field.style.backgroundColor='tomato'; //'red'		return false;	} else {		Field.style.backgroundColor=''		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}function isValidOrEmpty(Field, format, errorMessage, bCurrentStatus) {	var value = Field.value;	if (value == '') {		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}	if (!format.test(value)) {		Field.style.backgroundColor='tomato'; //'red'		Field.focus();		return false;	} else {		Field.style.backgroundColor='';		if (bCurrentStatus==true){			return true;			} else {			return false;		}	}}//---------------------------------------------------------------------------------------function openStdDialog(pSource, pName, pWidth, pHeight, pOptions){var callerWindow=self;var windowOptions='';windowX=40;windowY=40;var beIE = document.all?true:falseif (beIE){  if (screen.width<=pWidth){    var windowX =0;    }     else    {    var windowX = (screen.width/2)-(pWidth/2);  }  var windowY = (screen.availHeight/2)-(pHeight/2);}//If windowOptions have not been provided use defaultif(pOptions=='' || pOptions==null)  {windowOptions= 'directories=no, status=no, resizable=yes,toolbar=no,scrollbars=no,menu=no,'+                   'alwaysRaised=yes, menubar=no, location=no,'+                   'width=' + pWidth.toString() + ','+                   'height='  +pHeight.toString()+ ','+                   'top='+windowY+',left=' +windowX;  }else  {windowOptions= pOptions + ',width=' + pWidth.toString() +                   ',height=' + pHeight.toString() +                   'top='+windowY+',left='+windowX;  }var newWin = window.open(pSource,pName);//, windowOptions);	newWin.focus();     }//-- Elf Proef bankrekeningen// Geeft true terug als nummer juist isfunction elf_proef(bankrekeningnummer) {			 		 if (bankrekeningnummer.length!=9) {		 	return false		 }		 // verwijder alle tekens die geen cijfers zijn		 bankrekeningnummer=bankrekeningnummer.replace(/\D/g, "");		 bankrekeningnummer=bankrekeningnummer.replace(/\s+/g, "");		 aantal_tekens=bankrekeningnummer.length;		 var som=0;		 // loop door de 9 cijfers met de 11 proef formule		 for (i=1; i<10; i++) {		 		 getal=bankrekeningnummer.charAt(i-1);		 		 som+=getal*(10-i);		 } 		 // geef resultaat van check terug		 if (som % 11==0 && aantal_tekens==9) {		 		 return true		 } else {		 		 return false		 }}//-- EINDE Elf Proef bankrekeningen//--Negen Proef bankrekeningen// Geeft true terug als nummer juist isfunction negen_proef(bankrekeningnummer) {		 // verwijder alle tekens die geen cijfers zijn		 bankrekeningnummer=bankrekeningnummer.replace(/\D/g, "");		 bankrekeningnummer=bankrekeningnummer.replace(/\s+/g, "");			 aantal_tekens=bankrekeningnummer.length;		 var som=0;		 // loop door de 9 cijfers met de negen proef formule		 for (i=1; i<9; i++) {		 		 getal=bankrekeningnummer.charAt(i-1);		 		 som+=getal*(8-i);		 } 		 // geef resultaat van check terug		 result = som % 9		 result = 9 - result 		 valid = result = bankrekeningnummer.charAt(9);			 if (valid && aantal_tekens==9) {		 		 return true		 } else {		 		 return false		 }}//-- EINDE Negen Proef bankrekeningen
