/*
	WebRegio Interactie - WebRegio WebControl Library
	Copyright (C) 2003 WebRegio Development b.v.
*/
function checkAlphaNumeric(lStrValue) {
	return (/^[a-z|A-Z|0-9|\s]*$/.test(lStrValue));
}

function checkAlpha(lStrValue) {
	return (/^[a-z|A-Z]*$/.test(lStrValue));
}

function checkNumeric(lStrValue) {
	return (/^[0-9]*$/.test(lStrValue));
}

function checkDate(lStrValue) {
	if (lStrValue.length == 10) {
		var lArrStr = lStrValue.split( "-" );
		if (lArrStr.length == 3) {
			var lDate	= new Date( lArrStr[ 2 ], lArrStr[ 1 ] - 1, lArrStr[ 0 ] );
			var lIntMonth = lDate.getMonth() + 1;
		
			if (lArrStr[ 2 ].length == 4) {
				if (  lIntMonth == lArrStr[ 1 ] ) {
					return true;
				}
			}
		}
	}
	
	return false;
}

function checkEmail(lstrValue) {
    return (lstrValue.search(/^[\w\.\-_]+@([\w\.\-_]+\.)+[A-Za-z]{2,4}$/) != -1)
}
function checkPhoneNr(lstrValue) {
	return (lstrValue.search(/^[\d|\-|\s]{0,11}$/) != -1)

	/*var regNet = /^\d{3,4}$/;
	var regAbonnee = /^\d{6,7}$/;
	var arrNumbers = lstrValue.split('-');
	if (arrNumbers.length != 2) {
		return false;
	} else {
		return ( (arrNumbers[0].search(regNet) != -1) && (arrNumbers[1].search(regAbonnee) != -1) )
	}*/
}

