/*-----------------------------------------------------------------------name: CheckEmailfunction: return "true" if the email is not null and correct, else "false"-----------------------------------------------------------------------*/function CheckEmail(email){	if((email == "") || (email.search(/^[^._-][a-z0-9._-]+[^._-]@[a-z0-9._-]+([a-z0-9]+[^._-])?[.-]+[a-z]{2,4}$/) == -1)) { 		return false;			}	return true;}/*-----------------------------------------------------------------------name: CheckTelFormatfunction: return "true" if the Tel format is null or correct, else "false"------------------------------------------------------------------------*/function CheckTelFormat(type,num){	switch (type) { 		case 'normal': 			var MonReg = /0[0-9]{9}/;			if ( MonReg.test(num) || (num.length == 0) ){return true;}			/*Belge*/			var MonReg = /0[0-9]{8}/;			if ( MonReg.test(num) || (num.length == 0) ){return true;}			return false;			break;		case 'portable': 			var MonReg = /06[0-9]{8}/;			if ( MonReg.test(num) || (num.length == 0) ){return true;}			/*Belge*/			var MonReg = /04[0-9]{8}/;			if ( MonReg.test(num) || (num.length == 0) ){return true;}					return false;			break;		default:			alert('CheckTelFormat: Switch error');			return false;			break; 	}}/*-----------------------------------------------------------------------name: CheckSiteWebFormatfunction: return "true" if the site web format is null or correct, else "false"------------------------------------------------------------------------*/function CheckSiteWebFormat(SiteWeb){	var MonReg = /http:\/\//i;	if ( MonReg.test(SiteWeb) || (SiteWeb.length == 0) ){return true;}	return false;}/*-----------------------------------------------------------------------name: CheckHoraireFormatfunction: return "true" if the horaire format is null or correct, else "false"------------------------------------------------------------------------*/function CheckHoraireFormat(horaire){	var MonReg = /[0-2]{1}[0-3]{1}:[0-5]{1}[0-9]{1}/;	var MonReg2 = /[0-1]{1}[0-9]{1}:[0-5]{1}[0-9]{1}/;	if ( MonReg.test(horaire) || MonReg2.test(horaire) || (horaire.length == 0) ){return true;}	return false;}/*-----------------------------------------------------------------------name: CheckStringSizefunction: return "true" if the the string size is bigger or equal than sizeminand smaller or equal than sizemax, else "false"-----------------------------------------------------------------------*/function CheckStringSize(string,sizemin,sizemax){	if((string.length >= sizemin) && (string.length <= sizemax)){		return true; 		}	return false;}/*-----------------------------------------------------------------------name: ChangeCursorfunction: Change the cursor style to "type"-----------------------------------------------------------------------*/function ChangeCursor(type){	document.body.style.cursor = type;}