function afficher_formulaire () { document.getElementById('cadeau').innerHTML=''; document.getElementById('info').innerHTML=''; document.getElementById('contenu1').innerHTML='
'; } function definition_champ () { champ_civilite0=document.getElementById('mme'); champ_civilite1=document.getElementById('m'); champ_civilite2=document.getElementById('mlle'); champ_nom=document.getElementById('nom'); champ_prenom=document.getElementById('prenom'); champ_mail=document.getElementById('mail'); champ_telephone=document.getElementById('telephone'); champ_prestation=document.getElementById('prestation'); erreur=document.getElementById('mess'); indic=document.getElementById('indicateur'); } function coherence () { definition_champ (); txt_erreur='Vérifier '; validation=true; test=champ_mail.value; if (champ_civilite0.checked==false && champ_civilite1.checked==false && champ_civilite2.checked==false) { validation=false; txt_erreur=txt_erreur+'votre civilité '; } if (champ_nom.value=="") { validation=false; txt_erreur=txt_erreur+'votre nom '; } if (test.search(/^[_a-z0-9-]+(.[_a-z0-9-]+)*[^._-]@[a-z0-9-]+(.[a-z0-9]{2,4})*$/) == -1) { validation=false; txt_erreur=txt_erreur+'votre adresse mail '; } if (!validation) { erreur.innerHTML=txt_erreur; } if (validation) { envoyer(); } } function envoyer () { erreur.innerHTML=""; indic.innerHTML='
| '+message+' Retour à l\'accueil >>> |