if(racine==null) { var racine='./'; } function envoi_offres_emploi(){ chargement(); var extension_non_autorise="include|conf|directory|htpasswd|c|php|php3|php4|php5|dat|bin|html|js|htm|xml|htaccess|ico|sql|ini|pfx|exe|inf|dll|reg|phpt|inc|h|in|m4|bat|conf|sub|guess|frag|global|gcov|awk|mk|sh|w32|dsp|def|phar|frag|ih|mak|py"; var tab_ext_no=extension_non_autorise.split("|"); var erreur = ""; if(jQuery('.g-recaptcha').length>0){ var response=grecaptcha.getResponse(); if(response.length == 0) erreur += 'Veuillez valider le Captcha.\n'; } var nom=$("nom").value.replace(/\n/g,"__-__"); var ema=$("ema").value.replace(/\n/g,"__-__"); var tel=$("tel").value.replace(/\n/g,"__-__"); var mot=$("mot").value.replace(/\n/g,"__-__"); var cv=$("cv").value; var lm=$("lm").value; if(nom=="") { erreur += 'Veuillez saisir votre nom et / ou prénom SVP.\n'; } if(ema=="") { erreur += 'Remplissez le champ email avec une adresse valide SVP.\n'; } else if(!checkMail(ema)) { erreur += 'Votre adresse email n\'est pas valide, veuillez vérifier SVP.\n'; } if(tel=="") { erreur += 'Veuillez saisir votre numéro de téléphone SVP.\n'; } else if(!IsNumeric(tel)) { erreur += 'Votre téléphone n\'est pas valide, veuillez vérifier SVP.\n'; } else if(tel.length!=10) { erreur += 'Votre telephone doit comporter 10 chiffres, veuillez vérifier SVP.\n'; } if(mot=="") { erreur += 'Veuillez saisir vos motivations SVP.\n'; } if(cv!="") { tab_tmp1 = cv.split("."); var nb = tab_tmp1.length; var ext = tab_tmp1[(nb-1)].toLowerCase(); var ext_ok=1; for(i=0; i<(tab_ext_no.length-1); i++) { if(ext==tab_ext_no[i]) { var ext_ok=0; } } if(ext_ok==0) { erreur += 'Les fichiers de type *.'+ext+' ne sont pas autorisés par mesure de sécurité.\n'; $("cv").value=''; } } if(lm!="") { tab_tmp1 = lm.split("."); var nb = tab_tmp1.length; var ext = tab_tmp1[(nb-1)].toLowerCase(); var ext_ok=1; for(i=0; i<(tab_ext_no.length-1); i++) { if(ext==tab_ext_no[i]) { var ext_ok=0; } } if(ext_ok==0) { erreur += 'Les fichiers de type *.'+ext+' ne sont pas autorisés par mesure de sécurité.\n'; $("lm").value=''; } } if(erreur==""){ document.form_offres_emploi.submit(); } else { alert(erreur); dechargement(); } } function confirmation(){ $("confirmation").innerHTML="Votre message a été envoyé..."; dechargement(); //loading(); show_div("confirmation"); } function deconfirmation(){ hide_div("confirmation"); //deloading(); $("confirmation").innerHTML=""; } function verifie_extension(id) { var extension_non_autorise="include|conf|directory|htpasswd|c|php|php3|php4|php5|dat|bin|html|js|htm|xml|htaccess|ico|sql|ini|pfx|exe|inf|dll|reg|phpt|inc|h|in|m4|bat|conf|sub|guess|frag|global|gcov|awk|mk|sh|w32|dsp|def|phar|frag|ih|mak|py"; var tab_ext_no=extension_non_autorise.split("|"); var file = $(id).value; tab_tmp1 = file.split("."); var nb = tab_tmp1.length; var ext = tab_tmp1[(nb-1)].toLowerCase(); var ext_ok=1; for(i=0; i<(tab_ext_no.length-1); i++) { if(ext==tab_ext_no[i]) { var ext_ok=0; } } if(ext_ok==0) { alert('Les fichiers de type *.'+ext+' ne sont pas autorisés par mesure de sécurité.'); $(id).value=''; } }