<!-- begin
var retvalselect = true;
var retvalchamp = true;
var retvalnom = true;
var retvalprenom = true;
var retvalville = true;
var retvaladresse = true;
var retvalconfirmation = true;
var retvalcp = true;
var retvalemail = true;
var retvalsite = true;
var retvaltel = true;

function validselect(id,variable, alerte){
	retvalselect = false;
	if (variable != ""){
		document.getElementById(id).style.backgroundColor = "LightGreen";
	}else{
		alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
		retvalselect = true;
	}
	return retvalselect
}

function validchamp(id, variable, alerte){
	retvalchamp=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (variable.length == 0){ 
        alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
        retvalchamp=true; 
    }
	return retvalchamp
} 
function validnom(id,variable, alerte){
	retvalnom=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (variable.length == 0){ 
        alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
        retvalnom=true; 
    }
	return retvalnom
} 
function validprenom(id,variable, alerte){
	retvalprenom=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (variable.length == 0){ 
        alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
        retvalprenom=true; 
    }
	return retvalprenom
} 
function validville(id,variable, alerte){
	retvalville=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (variable.length == 0){
		if (alerte == '')
			alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
        retvalville=true; 
    }
	return retvalville
} 
function validadresse(id, variable, alerte){
	retvaladresse=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (variable.length == 0){ 
        alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
        retvaladresse=true; 
    }
	return retvaladresse
} 
function validconfirmation(id1, id2, var1, var2, alerte){
	retvalconfirmation=false;	
	document.getElementById(id1).style.backgroundColor = "LightGreen";
	document.getElementById(id2).style.backgroundColor = "LightGreen";
	if (var1 != var2){
		if (var2 == ""){
			document.getElementById(id1).style.backgroundColor = "#FDCEB5";
			document.getElementById(id2).style.backgroundColor = "#FDCEB5";
			retvalconfirmation=true; 
		}else{
			document.getElementById(id1).style.backgroundColor = "#FDCEB5";
			document.getElementById(id2).style.backgroundColor = "#FDCEB5";
			document.getElementById(id1).value = "";
			document.getElementById(id2).value = "";
			alert(alerte) ;
			retvalconfirmation=true; 
		}
	return retvalconfirmation
	}
} 
function validemail(id, valeur, alerte)
	{
	var testexp = new RegExp("^[a-z0-9._-]+\@[a-z0-9._-]+\.[a-z]{2,4}$");
	retvalemail=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (valeur == "" || ! testexp.test(valeur)){
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
		alert(alerte);
		retvalemail=true;
		}
	return retvalemail
} 
function validcp(id,valeur,alerte)
	{
	var testexp = new RegExp("^[0-9]{5}$");
	retvalcp=false;	
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (valeur == "" || ! testexp.test(valeur)){
		alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
		retvalcp=true;
		}
	return retvalcp
} 
function validsite(id,valeur,alerte)
	{
	var testexp = new RegExp("^[a-z0-9._-]$");
	retvalsite=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (valeur == "" || ! testexp.test(valeur)){
		alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
		retvalsite=true;
		}
	return retvalsite
}
function validtel(id,valeur,alerte)
	{
	var testexp = new RegExp("^[0-9]{10}$");
	retvaltel=false;
	document.getElementById(id).style.backgroundColor = "LightGreen";
	if (valeur == "" || ! testexp.test(valeur)){
		alert(alerte);
		document.getElementById(id).style.backgroundColor = "#FDCEB5";
		retvaltel=true;
		}
	return retvaltel
}

// end -->
