/* matthias - pour l'antispam */ // les variables sont les champs obligatoires var nomSpam = prenomSpam = adresseSpam = cpSpam = telSpam = villeSpam = emailSpam = false; function activate(inputId) { if(inputId == "nom") nomSpam = true; else if(inputId == "prenom") prenomSpam = true; else if(inputId == "adresse") adresseSpam = true; else if(inputId == "cp") cpSpam = true; else if(inputId == "ville") villeSpam = true; else if(inputId == "tel") telSpam = true; else if(inputId == "email") emailSpam = true; // si tout est à true, on active la validation if(nomSpam === true && prenomSpam === true && adresseSpam === true && cpSpam === true && villeSpam === true && telSpam === true && emailSpam === true) { document.getElementById("spm2").value = "1"; } } /* matthias - inscription à newsletter */ function inscriptionNewsletter(domaine, cle, email) { if (email.match(/^[a-zA-Z0-9][a-zA-Z0-9._-]*@([a-zA-Z][a-zA-Z0-9_\-]*\.)*[a-z0-9]+[a-z0-9\-]+\.[a-z]{2,6}$/) == null) { alert("Bitte überprüfen Sie Ihre E-Mail-Adresse."); document.getElementById('nlemail').focus(); return false; } else { $.get("https://"+domaine+".niouzletter.com/inscription.php?cle="+encodeURIComponent(cle)+"&email="+encodeURIComponent(email), function(data){ alert("Danke, Ihre E-Mail-Adresse wurde registriert."); $("#cadreNL").slideToggle("fast"); }); } } /** * Vérification de l'email lors de la connexion */ function verifierEmailNewletter(mode) { var resultat = true; if (estEmail($('#NLemail').val())) { afficherMessageValidation('nlemail', true); } else { notifierErreur('nlemail', "Die E-Mail-Adresse ist fehlerhaft", mode); resultat = false; } return resultat; } function validatePhone(fld) {     var error = "";     var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');    if (fld.value == "") {         error = "Sie haben keine Telefonnummer angegeben.\n";       //  fld.style.background = 'Yellow';     } else if (isNaN(parseInt(stripped))) {         error = "Die Telefonnummer enthält ungültige Zeichen.\n";       //  fld.style.background = '';     } else if (!(stripped.length == 10)) {         error = "Die Telefonnummer weist nicht die erwartete Länge auf.\n";       //  fld.style.background = 'Yellow';     }     return error; } function validatecp(fld) {     var error = "";     var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');    if (fld.value == "") {         error = "Sie haben keine Postleitzahl angegeben.\n";       //  fld.style.background = 'Yellow';     } else if (isNaN(parseInt(stripped))) {         error = "Die Postleitzahl enthält ungültige Zeichen.\n";       //  fld.style.background = 'Yellow';     } else if (!(stripped.length == 5)) {         error = "Die Postleitzahl weist nicht die erwartete Länge auf.\n";       //  fld.style.background = 'Yellow';     }     return error; } // chargement de l'image d'un sous produit. function changeImage() { var ref_prod = $("#ref_prod").val(); var attribut1 = $("#attribut_un").val(); var attribut2 = $("#attribut_deux").val(); $.ajax( { type: 'GET', url: '/admin/tmpl/affiche_image_sous_prod.php', data: 'refProduit='+encodeURI(ref_prod)+'&attributUn='+encodeURI(attribut1)+'&attributDeux='+encodeURI(attribut2), async:true, success: function(msg) { $("#image_sous_produit").html(msg); $(document).ready(function() { jQuery(function($){ $('a.zoomslide').zoomslide({ theme : 'webcd', //available themes : webcd,lightbox, prettyphoto, darkprettyphoto, simple opacity : 0.8, // Black overlay opacity duration : 800, // Animation duration animation : true, // Do we have to animate the box ? width : 600, // Default width height : 400, // Default height gallery : false, // Allow gallery thumb view autoplay : false // Autoplay for video }); }); }); MagicZoom.start(); } }); }