	function TestFormThenSend(nom_form){
		//document.f.submit();
		verifFormContact()?nom_form.submit():null;
	
	}
	
	function verifFormContact() {
		
			genre=true
			nom=true
			prenom=true
			email=true
			//societe=true
			if(!verifChampRadio('genre')){genre = false}
			if(!verifChampTexte('nom')){nom =  false;}
			if(!verifChampTexte('prenom')){prenom =  false;}
			
			if(!verifEmail(document.getElementById('email')) )
			{
				email =  false;;
				document.getElementById('email').style.border="1px solid red"
				document.getElementById('email').style.background="#FFFFFF" ;
				document.getElementById('email2').style.color="red" ;
			} else {
				document.getElementById('email').style.border="1px solid #3F5787"
				document.getElementById('email').style.background="#8798C2" ;
				document.getElementById('email2').style.color="#FFFFFF" ;
			}
			
			//if(!verifChampTexte('societe')) {societe = false;}
			
			if(genre==false || nom==false || prenom==false || email==false //||societe==false
			   ) {
				return false
			}
			
			return true ;
	}
	
	function verifChampRadio(id) {
		
		var obj = document.getElementById(id)
		var objDiv = document.getElementById('select')

		var m = document.f_contact.genre[0].checked  
		var mme = document.f_contact.genre[1].checked  
		var mlle = document.f_contact.genre[2].checked  
		
		// Si rien est coché
		if(!m && !mme && !mlle) {
			objDiv.style.border="1px solid red";
			document.getElementById('contact_text1').style.color="red"
			document.getElementById('genre2').style.color="red"
			var lang = document.getElementById('lang').value ;
			
			if(lang=='fr') {			
				document.getElementById('contact_text1').innerHTML="Un ou plusieurs champ n'ont pas été saisis,<br>merci de les compléter pour que nous puissions <br>vous contacter." ;
			} 
			
			
			if(lang=='uk') {			
				document.getElementById('contact_text1').innerHTML="Some information<br> still need to be provided please complete<br> to allow us to contact you promptly." ;
			} else {
				document.getElementById('contact_text1').innerHTML="Uno o più campi obbligatori non sono stati compilati,<br>vi preghiamo di provvedere perchè si possa contattarvi." ;
			}
			
			return false;
		}
		objDiv.style.border="1px solid #3F5787";
		document.getElementById('genre2').style.color="#FFFFFF"
		return true;
	}
	
	
	function verifChampSelect(id) 
	{
		var obj = document.getElementById(id)
		var objDiv = document.getElementById('select')
		if(obj.options.selectedIndex==0 ) {		
			//alert(obj.options.selectedIndex)
			objDiv.style.border="1px solid red";
			document.getElementById('contact_text1').style.color="red"
			document.getElementById('contact_text1').style.background="#FFFFFF"		
			
			var lang = document.getElementById('lang').value ;
			
			if(lang=='fr') {			
				document.getElementById('contact_text1').innerHTML="Un ou plusieurs champ n'ont pas été saisis,<br>merci de les compléter pour que nous puissions <br>vous contacter." ;
			} 
			
			
						if(lang=='uk') {			
				document.getElementById('contact_text1').innerHTML="Some information<br> still need to be provided please complete<br> to allow us to contact you promptly." ;
			} 
			
			
			
			else {
				document.getElementById('contact_text1').innerHTML="Uno o più campi obbligatori non sono stati compilati,<br>vi preghiamo di provvedere perchè si possa contattarvi." ;
			}
			
			return false;
		}	
		objDiv.style.border="1px solid #3F5787";
		return true;
	}
	
	function verifChampTexte(id) 
	{
		var obj = document.getElementById(id) ;
		var objChpTxt = document.getElementById(id+"2") 
		var nom = obj.value;
		
		if(nom=='') {
			obj.style.border="1px solid red";	

			document.getElementById('contact_text1').style.color="red"
			obj.style.background="#FFFFFF"
			objChpTxt.style.color = "red" ;
			
			var lang = document.getElementById('lang').value ;
			
			if(lang=='fr') {			
				document.getElementById('contact_text1').innerHTML="Un ou plusieurs champ n'ont pas été saisis,<br>merci de les compléter pour que nous puissions <br>vous contacter." ;
			} 
			
						if(lang=='uk') {			
				document.getElementById('contact_text1').innerHTML="Some information<br> still need to be provided please complete<br> to allow us to contact you promptly." ;
			} 
			
			
			
			else {
				document.getElementById('contact_text1').innerHTML="Uno o più campi obbligatori non sono stati compilati,<br>vi preghiamo di provvedere perchè si possa contattarvi." ;
			}
			
			return false;
		}	
		obj.style.border="1px solid #3F5787";
		obj.style.background="#8798C2" ;
		objChpTxt.style.color = "#FFFFFF" ;
		return true;
	}	
	
