		var couleurRed = "#E5CED4";
		var couleurGreen = "#B7D5D7";
		var couleurWhite = "#FFFFFF";
		var champs;
		champ = new Array;
		champ[0] = "ville";
		champ[1] = "cp";
		champ[2] = "civ";
		champ[3] = "nom";
		champ[4] = "prenom";
		champ[5] = "pays";
		//champ[6] = "voie";
		champ[6] = "captchacode";
		
		function verifChamp(){
			var result;
			
			result = true;
			var i;
			for(i=0;i<champ.length;i++){
				if(document.getElementById(champ[i]).value == "" ){
					document.getElementById(champ[i]).style.backgroundColor = couleurRed;
					result = false;
				}else{
					document.getElementById(champ[i]).style.backgroundColor = couleurWhite;
				}
			}
			return result;
		}
		
		function RefreshImage(valImageId) {
			var objImage = document.images[valImageId];
			if (objImage == undefined) {
				return;
			}
			var now = new Date();
			objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
		}
		
		function verifChampMAIL(mail1,mail2){
			var result;
			result = false;
			if(mail1.value.length != 0 && mail2.value.length != 0){
						if(mail1.value == mail2.value && mail1.value.indexOf("@",0)>=0 && mail1.value.indexOf(".",0)>=0 && mail2.value.indexOf("@",0)>=0 && mail2.value.indexOf(".",0)>=0){
								mail1.style.backgroundColor = couleurGreen;
								mail2.style.backgroundColor = couleurGreen;
								return true;
						}else{
								mail1.style.backgroundColor = couleurRed;
								mail2.style.backgroundColor = couleurRed;
								return false;
						}
			}else{
				mail1.style.backgroundColor = couleurRed;
				mail2.style.backgroundColor = couleurRed;
				return false;
			}
			return result;
		}
		
		function verifAll(mail1,mail2){
			var result1;
			var result2;
			
			result1 = verifChampMAIL(mail1,mail2);
			result2 = verifChamp();
			
			if (document.getElementById('voie').value == "" && document.getElementById('compadr2').value == ""){
				document.getElementById('voie').style.backgroundColor = couleurRed;
				document.getElementById('compadr2').style.backgroundColor = couleurRed;
				result2 = false;
				}else{
				document.getElementById('voie').style.backgroundColor = couleurGreen;
				document.getElementById('compadr2').style.backgroundColor = couleurGreen;
			}
			
						
			if (!result1 || !result2){
				return false;
				}else{
				return true;
			}
		}
		   
