function ctrlRemplissage(form, champ){
	if (eval('document.'+form+'.'+champ+'.value') == ""){
		showWarning(champ);
		return false;
	}else{
		hideWarning(champ);
		return true;
	}
}

function validationEmail(form, champ){
	var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]{2,}\.[a-zA-Z]{2,4}$/;
	
	if (emailPattern.test(eval('document.'+form+'.'+champ+'.value'))){
		hideWarning(champ);
		return true;
	}else{
		showWarning(champ);
		return false;
	}
}

function validationTelephone(form, champ){
	var emailPattern = /^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/;
	
	if (emailPattern.test(eval('document.'+form+'.'+champ+'.value'))){
		hideWarning(champ);
		return true;
	}else{
		showWarning(champ);
		return false;
	}
}

function validationCodePostal(form, champ){
	var emailPattern = /^[0-9]{5}$/;
	
	if (emailPattern.test(eval('document.'+form+'.'+champ+'.value'))){
		hideWarning(champ);
		return true;
	}else{
		showWarning(champ);
		return false;
	}
}

function showWarning(champ){
	//document.getElementById("bloc_erreur").style.display = 'block';
	document.getElementById("icon_"+champ).style.visibility = 'visible';
	//alert("et hop une icone pour "+champ+" => FALSE");
}

function hideWarning(champ){
	//document.getElementById("bloc_erreur").style.display = 'none';
	document.getElementById("icon_"+champ).style.visibility = 'hidden';
	//alert("suppression de l'icone pour "+champ+" => TRUE");
}
