var defautBackgroundColor = "white"; 
var defautBorderColor = "#666666" ;
var defautBorderStyle = "solid" ;


function verif_champs_contact()
		{
			// PRENOM //////////////////////////////////////////////////////////
			if(document.formContact.prenom.value == "")
			{
				alert("Veuillez entrer votre prénom !");
				document.formContact.prenom.style.borderColor='red';
				document.formContact.prenom.style.borderWidth='1px';
				document.formContact.prenom.style.backgroundColor="#FFEFEF" ;
				document.formContact.prenom.style.borderStyle="dashed" ;
				document.formContact.prenom.focus();
				return false;
			}
			var j;
			for(j=0 ; j<document.formContact.prenom.value.length ; j++)
				if(document.formContact.prenom.value.charAt(j) == "[" || document.formContact.prenom.value.charAt(j) == "]"
				|| document.formContact.prenom.value.charAt(j) == "%" || document.formContact.prenom.value.charAt(j) == "~"
				|| document.formContact.prenom.value.charAt(j) == "#" || document.formContact.prenom.value.charAt(j) == "`"
				|| document.formContact.prenom.value.charAt(j) == "$" || document.formContact.prenom.value.charAt(j) == "&"
				|| document.formContact.prenom.value.charAt(j) == "|" || document.formContact.prenom.value.charAt(j) == "}"
				|| document.formContact.prenom.value.charAt(j) == "{" || document.formContact.prenom.value.charAt(j) == "^"
				|| document.formContact.prenom.value.charAt(j) == ">" || document.formContact.prenom.value.charAt(j) == "<")
				{
					alert("Le prénom n\'est pas valide ! Les caractères suivants sont interdits :\n\n] [ % ~ # ` $ & | } { ^ > <");
					document.formContact.prenom.style.borderColor='red';
					document.formContact.prenom.style.borderWidth='1px';
					document.formContact.prenom.style.backgroundColor="#FFEFEF" ;
					document.formContact.prenom.style.borderStyle="dashed" ;
					document.formContact.prenom.focus();
					return false;
				}					

			// EMAIL ///////////////////////////////////////////////////////////
			if(document.formContact.email.value == "")
			{
				alert("Veuillez nous communiquer votre adresse email !");
				document.formContact.email.style.borderColor='red';
				document.formContact.email.style.borderWidth='1px';
				document.formContact.email.style.backgroundColor="#FFEFEF" ;
				document.formContact.email.style.borderStyle="dashed" ;
				document.formContact.email.focus();
				return false;
			}
			if ((document.formContact.email.value.length == 0) || ((document.formContact.email.value.indexOf("@") == -1) || (document.formContact.email.value.indexOf(".",document.formContact.email.value.indexOf("@")) == -1) || (document.formContact.email.value.indexOf(".",document.formContact.email.value.indexOf("@")) == document.formContact.email.value.indexOf("@")+1) || (document.formContact.email.value.lastIndexOf(".")+1 == document.formContact.email.value.length) || (document.formContact.email.value.indexOf("..") != -1))) 
			{
				alert("L\'adresse Email n\'est pas valide !");
				document.formContact.email.style.borderColor='red';
				document.formContact.email.style.borderWidth='1px';
				document.formContact.email.style.backgroundColor="#FFEFEF" ;
				document.formContact.email.style.borderStyle="dashed" ;
				document.formContact.email.focus();
				return false; 
			}
			if(document.formContact.email.value.length < 7)
			{
				alert("L\'adresse Email n\'est pas valide !");
				document.formContact.email.style.borderColor='red';
				document.formContact.email.style.borderWidth='1px';
				document.formContact.email.style.backgroundColor="#FFEFEF" ;
				document.formContact.email.style.borderStyle="dashed" ;
				document.formContact.email.focus();
				return false;
			}
				
			// MOTIF ///////////////////////////////////////////////////////////
			if(document.formContact.motif.options[document.formContact.motif.selectedIndex].value == 0)
			{
				alert("Veuillez renseigner votre motif !");
				return false;
			}
			
			// CODE //////////////////////////////////////////////////////////////
			if(document.formContact.code.value == "")
			{
				alert("Veuillez entrer le code de l\'image !");
				document.formContact.code.style.borderColor='red';
				document.formContact.code.style.borderWidth='1px';
				document.formContact.code.style.backgroundColor="#FFEFEF" ;
				document.formContact.code.style.borderStyle="dashed" ;
				document.formContact.code.focus();
				return false;
			}		
			if(document.formContact.code.value.length < 6)
			{
				alert("Veuillez entrer le bon code de l\'image !");
				document.formContact.code.style.borderColor='red';
				document.formContact.code.style.borderWidth='1px';
				document.formContact.code.style.backgroundColor="#FFEFEF" ;
				document.formContact.code.style.borderStyle="dashed" ;
				document.formContact.code.focus();
				return false;
			}			
			var j;
			for(j=0 ; j<document.formContact.code.value.length ; j++)
				if(document.formContact.code.value.charAt(j) == "[" || document.formContact.code.value.charAt(j) == "]"
				|| document.formContact.code.value.charAt(j) == "%" || document.formContact.code.value.charAt(j) == "~"
				|| document.formContact.code.value.charAt(j) == "#" || document.formContact.code.value.charAt(j) == "`"
				|| document.formContact.code.value.charAt(j) == "$" || document.formContact.code.value.charAt(j) == "&"
				|| document.formContact.code.value.charAt(j) == "|" || document.formContact.code.value.charAt(j) == "}"
				|| document.formContact.code.value.charAt(j) == "{" || document.formContact.code.value.charAt(j) == "^"
				|| document.formContact.code.value.charAt(j) == ">" || document.formContact.code.value.charAt(j) == "<"
				|| document.formContact.code.value.charAt(j) == "'")
				{
					alert("Le code de l\'image n\'est pas valide ! Les caractères suivants sont interdits :\n\n] [ % ~ # ` $ & | } { ^ ' > <");
					document.formContact.code.style.borderColor='red';
					document.formContact.code.style.borderWidth='1px';
					document.formContact.code.style.backgroundColor="#FFEFEF" ;
					document.formContact.code.style.borderStyle="dashed" ;
					document.formContact.code.focus();
					return false;
				}					

			// COMMENTAIRE /////////////////////////////////////////////////////
			if(document.formContact.comm.value == "")
			{
				alert("Veuillez entrer votre commentaire !");
				document.formContact.comm.style.borderColor='red';
				document.formContact.comm.style.borderWidth='1px';
				document.formContact.comm.style.backgroundColor="#FFEFEF" ;
				document.formContact.comm.style.borderStyle="dashed" ;
				document.formContact.comm.focus();
				return false;
			}
			var j;
			for(j=0 ; j<document.formContact.comm.value.length ; j++)
				if(document.formContact.comm.value.charAt(j) == "[" || document.formContact.comm.value.charAt(j) == "]"
				|| document.formContact.comm.value.charAt(j) == "%" || document.formContact.comm.value.charAt(j) == "~"
				|| document.formContact.comm.value.charAt(j) == "#" || document.formContact.comm.value.charAt(j) == "`"
				|| document.formContact.comm.value.charAt(j) == "$" || document.formContact.comm.value.charAt(j) == "&"
				|| document.formContact.comm.value.charAt(j) == "|" || document.formContact.comm.value.charAt(j) == "}"
				|| document.formContact.comm.value.charAt(j) == "{" || document.formContact.comm.value.charAt(j) == "^"
				|| document.formContact.comm.value.charAt(j) == ">" || document.formContact.comm.value.charAt(j) == "<")
				{
					alert("Le commentaire n\'est pas valide ! Les caractères suivants sont interdits :\n\n] [ % ~ # ` $ & | } { ^ > <");
					document.formContact.comm.style.borderColor='red';
					document.formContact.comm.style.borderWidth='1px';
					document.formContact.comm.style.backgroundColor="#FFEFEF" ;
					document.formContact.comm.style.borderStyle="dashed" ;
					document.formContact.comm.focus();
					return false;
				}					

		}

	function outOfField(obj) {
		obj.style.backgroundColor = defautBackgroundColor ;
		obj.style.borderColor = defautBorderColor ;
		obj.style.borderStyle = defautBorderStyle ;
	}
	