function isValidEmail(email) {
  if (email.search(/^[-a-zA-Z0-9._]*[-a-zA-Z0-9_]@[-a-zA-Z0-9_]+(\.[-a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/) < 0)
  	return false;
  else
  	return true;
}

function validFormContact(myForm){
	var msg="";
	
	if(myForm.cprenom.value=="")
		msg+="  - Prénom\n";
	if(myForm.cnom.value=="")
		msg+="  - Nom\n";
	if(myForm.cemail.value=="")
		msg+="  - E-mail\n";
  	else
  	  if(!isValidEmail(myForm.cemail.value))
  		msg+="  - Votre adresse mail semble incorrecte (verifiez les @ et .)\n";
	/*if(myForm.cctrlimg.value=="")
		msg+="  - Code image\n";
  	else{
  	  	if(myForm.cresultctrl.value==0)
  			msg+="  - Votre code est incorrect\n";
  	}*/
  	
	if(msg!=""){
	  	alert("Veuillez renseigner le(s) champ(s) suivant(s) :\n"+msg);
	  	return false;
	}	
	else
		return true;
}