<!--
function verifQuoteForm(theForm)
	{
	var chpObligatoires = ["f_Company","f_Adress","f_Town","f_Post_code","f_Contact","f_Telephone","f_Email"] ;
	
	//verif captcha
	var captcha_ok = $.ajax({
			type: "POST",
			url:  "../captcha/get.phtml",
			data: "texte="+theForm.userCode.value,
			dataType: "html",
			async:false,
			error: function(XMLHttpRequest, textStatus, errorThrown){
				alert( "Error: " + XMLHttpRequest + " - textStatus : " + textStatus + " - textStatus : " + textStatus );
		}
	}).responseText;
	
	for ( var i= 0 ; i < theForm.elements.length  ; i++) {
		var namechamps = theForm.elements[i].name ;
		var valuechamps = theForm.elements[i].value ;		
		for ( var j = 0 ; j < chpObligatoires.length ; j++){
			//if ( namechamps == "userCode" ) { alert("text :"+md5(theForm.elements[i].value)+" capctha:"+theForm.md5_pass.value) ; }
			if (namechamps == chpObligatoires[j] && valuechamps.trim() == ""){
				alert("Please fill all the required field");
				theForm.elements[i].focus();
				return false ;
			}
			if (namechamps == "f_Email" )
				if(!is_email(valuechamps)) {
					alert("Please fill your email address well.");
					theForm.elements[i].focus();
					return false ;
					}
				else 
					{
				 // Emetteur direct en from pour réponse
				theForm.mailfrom.value = theForm.f_Email.value ; 
					}
					
		}

	}
	
	if (captcha_ok=="true") {
		return true ;
	} else {
		alert("Please fill the code well.") ;
		return false;
	}
	
}

String.prototype.trim = function()
{ return this.replace(/(^\s*)|(\s*$)/g, ""); }

function is_email(email)
  {
     var reg = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]{2,}[.][a-zA-Z0-9]{2,4}$/ ;
     var reg2 = /[.@]{2,}/ ;
     return ((reg.exec(email)!=null) && (reg2.exec(email)==null)) ;
  }
  
  
//-->
