var numeros=[],numerosMAX=6;
dojo.addOnLoad(function(){dojo.query("#grille td").onmouseover(function(a){a.target.style.backgroundColor!="rgb(235, 205, 228)"&&a.target.style.backgroundColor!="#EBCDE4"&&a.target.innerHTML!=""&&dojo.style(a.target,{background:"#ffcc04",cursor:"pointer"})}).onmouseout(function(a){a.target.style.backgroundColor!="rgb(235, 205, 228)"&&a.target.style.backgroundColor!="#EBCDE4"&&a.target.innerHTML!=""&&dojo.style(a.target,{background:"",cursor:"pointer"})}).onclick(function(a){if(a.target.innerHTML!=""||
a.target.tagName=="IMG"&&a.target.parentNode.id!=""){var b=a.target.id;if(!b)b=a.target.parentNode.id;numeroDejaPresent(numeros,b)?caseDeselectionne(b):numeros.size()<numerosMAX?caseSelectionnee(b):declencheErreur("Vous avez déjà joué vos "+numerosMAX+" numéros")}})});
function caseSelectionnee(a){numeros.push(a);var b=numeros.size();b==7?dojo.byId("numero_"+b).innerHTML='<img src="images/loterie/'+a+'_violet.png" /><input type="hidden" name="numero_'+b+'" value="'+a+'" />':dojo.byId("numero_"+b).innerHTML='<img src="images/loterie/'+a+'.gif" /><input type="hidden" name="numero_'+b+'" value="'+a+'" />';a=dojo.byId(""+a);a.innerHTML='<img src="/images/loterie_v2/plume_grille.png" height="25px" />';dojo.style(a,"background","#ebcde4");numeros.size()>=numerosMAX&&
(dojo.style("etape2",{display:"block"}),dojox.fx.smoothScroll({node:"etape2",win:window,duration:700,easing:dojo.fx.easing.easeOut}).play())}function caseDeselectionne(a){a=dojo.indexOf(numeros,a);numeros.splice(a,1);a=dojo.clone(numeros);effacer();dojo.map(a,function(a){caseSelectionnee(a)})}function choixAutomatique(){effacer();for(var a=new RNG(new Date),b=0;b<50&&numeros.size()<numerosMAX;b++){var c=a.nextRange(1,50);numeroDejaPresent(numeros,c)||caseSelectionnee(c)}}
function numeroDejaPresent(a,b){var c=a.clone();c.push(b);c=c.uniq();return a.size()+1==c.size()?!1:!0}
function effacer(){dojo.query("#recap_numeros li").forEach(function(a){a.innerHTML='<img src="images/loterie/rond_rouge.gif" />';dojo.style("etape2",{display:"none"})});dojo.query("#numero_7").forEach(function(a){a.innerHTML='<img src="images/loterie/rond_violet.png" />'});dojo.query("#grille td").forEach(function(a){a.style.background="";a.style.color="#cb2c02";a.style.fontWeight="normal";a.innerHTML=a.id});numeros.clear()}
function testNumero7(){var a=dojo.byId("code");a==null||a.value==""?declencheErreur("Vous devez saisir le code fourni lors de l'appel téléphonique pour obtenir un 7<sup>ème</sup> numéro"):dojo.xhrPost({url:"includes/audiotel_loterie.php",timeout:15E3,content:{code:a.value},load:function(a){a=="ok"?(dojo.style("numero_7",{display:"block"}),dojo.style("etape2",{display:"none"}),numerosMAX=7,getCommandeAudiotel(numerosMAX)):(dojo.style("numero_7",{display:"none"}),declencheErreur("Le code saisi n'est pas correct."))},
error:function(){dojo.style("numero_7",{display:"none"});declencheErreur("Une erreur inattendue est survenue.")}})}
function validerGrille(a,b){var c=dojo.byId("form_grille"),d=document.createElement("input");d.setAttribute("type","hidden");d.setAttribute("name","banniere_validation_id");d.setAttribute("value",a);c.appendChild(d);d=document.createElement("input");d.setAttribute("type","hidden");d.setAttribute("name","banniere_validation_grille");d.setAttribute("value",b);c.appendChild(d);document.form_grille.submit()}
function revenirAuJeu(a,b){a=="loterie"?window.open("loterie.php?grille="+b,"loterie"+(new Date).getTime(),"left=0,top=0, width=1000, height=800, scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=1"):a=="concours"?window.open("gagner-cadeaux-gratuits.html","concours","left=0,top=0, width=1000, height=800, scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=1"):a=="planjour"?window.open("booster-jeux.php","planjour","left=0,top=0, width=1000, height=800, scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=1"):
a=="jeux"?window.open("jeux-gratuits.php","jeuxgratuits","left=0,top=0, width=1000, height=800, scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=1"):a=="jeuxig"&&window.open("jeux-gratuits.php?erreur=3&instantgagnant="+b,"jeuxgratuits","left=0,top=0, width=1000, height=800, scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=1");this.close()}
function getFavoris(a,b){dojo.byId("favoris").style.visibility=="visible"?dojo.style("favoris",{visibility:"hidden"}):dojo.xhrGet({url:"../scripts/ajax/favoris_selection.php",handleAs:"text",timeout:2E3,content:{id:a,type:b},load:function(a){dojo.byId("favoris").innerHTML=a;dojo.fx.wipeIn({node:"favoris",duration:400}).play();dojo.style("favoris",{visibility:"visible"});return a},error:function(a){dojo.byId("favoris").innerHTML="Impossible de charger vos favoris";dojo.fx.wipeIn({node:"favoris",duration:400}).play();
dojo.style("favoris",{visibility:"visible"});return a}})}
function enregistrerFavoris(a){if(numeros.size()>=numerosMAX){var b=dojo.clone(numeros);numerosMAX==6&&numeros.size()==6&&b.push(0);dojo.xhrPost({url:"../scripts/ajax/favoris_enregistre.php",handleAs:"text",timeout:2E3,content:{id:a,numero_1:b[0],numero_2:b[1],numero_3:b[2],numero_4:b[3],numero_5:b[4],numero_6:b[5],numero_7:b[6]},load:function(a){return dojo.byId("favoris_enregistre").innerHTML=a},error:function(a){declencheErreur("Une erreur est survenue<br/>Impossible d'enregistrer ces favoris");return a}})}else declencheErreur("Pour enregistrer cette grille en tant que favoris, vous devez sélectionner vos "+
numerosMAX+" numéros")}function supprimerFavoris(a){dojo.xhrPost({url:"../scripts/ajax/favoris_supprime.php",handleAs:"text",timeout:2E3,content:{id_favoris:a},load:function(b){dojo.byId("favoris").removeChild(dojo.byId("favoris_"+a));return b},error:function(a){declencheErreur("Une erreur est survenue<br/>Impossible de supprimer ce favoris");return a}})}
function utiliserFavoris(a,b,c,d,e,h,f){effacer();var g=[];g.push(a);g.push(b);g.push(c);g.push(d);g.push(e);g.push(h);f!=0&&g.push(f);dojo.style("favoris",{visibility:"hidden"});for(a=0;a<7&&a<numerosMAX;a++)numero=g[a],isNaN(numero)==!1&&numero!=0&&caseSelectionnee(numero)}
function getCommandeAudiotel(a){dojo.byId("commandeAudiotel").style.visibility=="visible"?dojo.style("commandeAudiotel",{visibility:"hidden"}):dojo.xhrGet({url:"../scripts/ajax/7emenumero_selection.php",handleAs:"text",timeout:2E3,content:{nbNumeros:a},load:function(a){dojo.byId("commandeAudiotel").innerHTML=a;dojo.fx.wipeIn({node:"commandeAudiotel",duration:400}).play();dojo.style("commandeAudiotel",{visibility:"visible"});return a},error:function(a){dojo.byId("commandeAudiotel").innerHTML="Impossible de charger les informations concernant le 7ème numero";
dojo.fx.wipeIn({node:"commandeAudiotel",duration:400}).play();dojo.style("commandeAudiotel",{visibility:"visible"});return a}})};var numeros_verts=[],numeros_vertsMAX=6;
dojo.addOnLoad(function(){dojo.query("#grilleverte td").onmouseover(function(a){a.target.style.backgroundColor!="rgb(255, 255, 255)"&&a.target.style.backgroundColor!="#ffffff"&&a.target.innerHTML!=""&&dojo.style(a.target,{background:"#C9F6C0",cursor:"pointer"})}).onmouseout(function(a){a.target.style.backgroundColor!="rgb(255, 255, 255)"&&a.target.style.backgroundColor!="#ffffff"&&a.target.innerHTML!=""&&dojo.style(a.target,{background:"",cursor:"pointer"})}).onclick(function(a){if(a.target.innerHTML!=""||
a.target.tagName=="IMG"&&a.target.parentNode.id!=""){var b=a.target.id;if(!b)b=a.target.parentNode.id;numero_vertDejaPresentGrilleVerte(numeros_verts,b)?caseDeselectionneGrilleVerte(b):numeros_verts.size()<numeros_vertsMAX?caseSelectionneeGrilleVerte(b):affichePopupGrilleVerte("numero")}})});
function caseSelectionneeGrilleVerte(a){numeros_verts.push(a);var b=numeros_verts.size();dojo.byId("numero_vert_"+b).innerHTML='<img src="images/loterie_v2/boules/'+a+'_vert.png" /><input type="hidden" name="numero_vert_'+b+'" value="'+a+'" />';a=dojo.byId(""+a);a.innerHTML='<img src="/images/grille-verte/arbregrille.jpg" height="25px" />';dojo.style(a,"background","#ffffff");numeros_verts.size()>=numeros_vertsMAX&&(dojo.style("etape2_grille_verte",{display:"block"}),dojox.fx.smoothScroll({node:"etape2_grille_verte",
win:window,duration:700,easing:dojo.fx.easing.easeOut}).play())}function caseDeselectionneGrilleVerte(a){a=dojo.indexOf(numeros_verts,a);numeros_verts.splice(a,1);a=dojo.clone(numeros_verts);effacerGrilleVerte();dojo.map(a,function(a){caseSelectionneeGrilleVerte(a)})}
function choixAutomatiqueGrilleVerte(){effacerGrilleVerte();for(var a=new RNG(new Date),b=0;b<50&&numeros_verts.size()<numeros_vertsMAX;b++){var c=a.nextRange(1,50);numero_vertDejaPresentGrilleVerte(numeros_verts,c)||caseSelectionneeGrilleVerte(c)}}function numero_vertDejaPresentGrilleVerte(a,b){var c=a.clone();c.push(b);c=c.uniq();return a.size()+1==c.size()?!1:!0}
function effacerGrilleVerte(){dojo.query("#recap_numeros_verts li").forEach(function(a){a.innerHTML='<img src="images/grille-verte/rond_blanc.png" />';dojo.style("etape2_grille_verte",{display:"none"})});dojo.query("#grilleverte td").forEach(function(a){a.style.background="";a.style.color="#404040";a.style.fontWeight="normal";a.innerHTML=a.id});numeros_verts.clear()}
function getFavorisGrilleVerte(a,b){dojo.byId("favoris").style.visibility=="visible"?dojo.style("favoris",{visibility:"hidden"}):dojo.xhrGet({url:"../scripts/ajax/favoris_selection.php",handleAs:"text",timeout:2E3,content:{id:a,type:b},load:function(a){dojo.byId("favoris").innerHTML=a;dojo.fx.wipeIn({node:"favoris",duration:400}).play();dojo.style("favoris",{visibility:"visible"});return a},error:function(a){dojo.byId("favoris").innerHTML="Impossible de charger vos favoris";dojo.fx.wipeIn({node:"favoris",
duration:400}).play();dojo.style("favoris",{visibility:"visible"});return a}})}
function enregistrerFavorisGrilleVerte(a){if(numeros_verts.size()>=numeros_vertsMAX){var b=dojo.clone(numeros_verts);numeros_vertsMAX==6&&numeros_verts.size()==6&&b.push(0);dojo.xhrPost({url:"../scripts/ajax/favoris_enregistre.php",handleAs:"text",timeout:2E3,content:{id:a,numero_1:b[0],numero_2:b[1],numero_3:b[2],numero_4:b[3],numero_5:b[4],numero_6:b[5],numero_7:b[6]},load:function(a){return dojo.byId("favoris_enregistre").innerHTML=a},error:function(a){declencheErreur("Une erreur est survenue<br/>Impossible d'enregistrer ces favoris");
return a}})}else affichePopupGrilleVerte("favori")}function supprimerFavorisGrilleVerte(a){dojo.xhrPost({url:"../scripts/ajax/favoris_supprime.php",handleAs:"text",timeout:2E3,content:{id_favoris:a},load:function(b){dojo.byId("favoris").removeChild(dojo.byId("favoris_"+a));return b},error:function(a){declencheErreur("Une erreur est survenue<br/>Impossible de supprimer ce favoris");return a}})}
function utiliserFavorisGrilleVerte(a,b,c,d,e,h){effacerGrilleVerte();var f=[];f.push(a);f.push(b);f.push(c);f.push(d);f.push(e);f.push(h);dojo.style("favoris",{visibility:"hidden"});for(a=0;a<6&&a<numeros_vertsMAX;a++)numero_vert=f[a],isNaN(numero_vert)==!1&&numero_vert!=0&&caseSelectionneeGrilleVerte(numero_vert)}
function affichePopupGrilleVerte(a,b,c,d){var e=[];width=c==null?430:c;height=d==null?300:d;e.type=a;e.instantgagnant=b;ajaxLayer("/scripts/ajax/grille-verte-popup.php",e,width,height)};function writeCookie(a,b){var c=writeCookie.arguments,d=writeCookie.arguments.length,e=d>2?c[2]:null,h=d>3?c[3]:null,f=d>4?c[4]:null,c=d>5?c[5]:!1;document.cookie=a+"="+escape(b)+(e==null?"":"; expires="+e.toGMTString())+(h==null?"":"; path="+h)+(f==null?"":"; domain="+f)+(c==!0?"; secure":"")}function getCookieVal(a){var b=document.cookie.indexOf(";",a);if(b==-1)b=document.cookie.length;return unescape(document.cookie.substring(a,b))}
function readCookie(a){a+="=";for(var b=a.length,c=document.cookie.length,d=0;d<c;){var e=d+b;if(document.cookie.substring(d,e)==a)return getCookieVal(e);d=document.cookie.indexOf(" ",d)+1;if(d==0)break}return null}function delCookie(a){date=new Date;date.setFullYear(date.getFullYear()-1);writeCookie(a,null,date)}
function checkInscription(a){var b=!0,c="Attention: pour valider votre inscription, vous devez:\n";a.civilite.value==""&&(b=!1,c+="- renseigner votre civilité\n");a.nom.value==""&&(b=!1,c+="- renseigner votre nom\n");a.prenom.value==""&&(b=!1,c+="- renseigner votre prénom\n");a.email.value==""&&(b=!1,c+="- renseigner votre adresse email\n");a.password.value==""&&(b=!1,c+="- renseigner votre mot de passe\n");a.cpassword.value==""&&(b=!1,c+="- renseigner la confirmation de mot de passe\n");!a.optinPart[0].checked&&
!a.optinPart[1].checked&&(b=!1,c+="- accepter ou refuser les offres de nos partenaires\n");a.cpassword.value!=""&&a.password.value!=""&&a.cpassword.value!=a.password.value&&(b=!1,c+="- vous assurer que le mot de passe et sa confirmation correspondent\n");b==!1?alert(c):a.submit()}
function checkInscriptionLoterie(a){var b=!0,c="Attention: pour valider votre inscription, vous devez:\n";a.civilite.value==""&&(b=!1,c+="- renseigner votre civilité\n");a.nom.value==""&&(b=!1,c+="- renseigner votre nom\n");a.prenom.value==""&&(b=!1,c+="- renseigner votre prénom\n");a.email.value==""&&(b=!1,c+="- renseigner votre adresse email\n");a.password.value==""&&(b=!1,c+="- renseigner votre mot de passe\n");a.cpassword.value==""&&(b=!1,c+="- renseigner la confirmation de mot de passe\n");!a.optinPart[0].checked&&
!a.optinPart[1].checked&&(b=!1,c+="- accepter ou refuser les offres de nos partenaires\n");a.cpassword.value!=""&&a.password.value!=""&&a.cpassword.value!=a.password.value&&(b=!1,c+="- vous assurer que le mot de passe et sa confirmation correspondent\n");a.question.value==""&&(b=!1,c+="- nous préciser comment vous avez connu Kalifoo\n");b==!1?alert(c):a.submit()}
function checkInscriptionPrenomMail(a){var b=!0,c="Attention: pour valider votre inscription, vous devez:\n";a.prenom.value==""&&(b=!1,c+="- renseigner votre prénom\n");a.email.value==""&&(b=!1,c+="- renseigner votre adresse email\n");b==!1?alert(c):a.submit()}
function checkInscription_cpm_concours_page1(a){var b=!0,c="Attention: pour valider votre inscription, vous devez:\n";a.prenom.value==""&&(b=!1,c+="- renseigner votre prénom\n");a.email.value==""&&(b=!1,c+="- renseigner votre adresse email\n");a.optinPart.checked||(b=!1,c+="- accepter les conditions pour pouvoir valider votre inscription et participer aux jeux de Kalifoo\n");b==!1?alert(c):a.submit()}
function checkInscription_cpm_concours_page2(a){var b=!0,c=dojo.byId(a),d="Attention: pour valider votre inscription, vous devez:\n";c.civilite.value==""&&(b=!1,d+="- renseigner votre civilité\n");c.nom.value==""&&(b=!1,d+="- renseigner votre nom\n");if(c.jour.value==""||c.mois.value==""||c.annee.value=="")b=!1,d+="- renseigner votre date de naissance\n";c.pays.value==""&&(b=!1,d+="- renseigner votre pays\n");c.code_postal.value==""&&(b=!1,d+="- renseigner votre code postal\n");c.adresse.value==""&&
(b=!1,d+="- renseigner votre adresse\n");c.ville.value==""&&(b=!1,d+="- renseigner votre ville\n");c.telephone.value==""&&(b=!1,d+="- renseigner votre numéro de téléphone\n");isNaN(c.telephone.value)&&(b=!1,d+="- renseigner un numéro de téléphone valide\n");c.cpassword.value!=c.password.value&&(b=!1,d+="- vous assurer que le mot de passe et sa confirmation correspondent\n");b==!1?alert(d):validerInscriptionCpmConcours(a)}
function checkInscriptionCivNomDnMdp(a){var b=!0,c="Attention: pour valider votre inscription, vous devez:\n";a.civilite.value==""&&(b=!1,c+="- renseigner votre civilité\n");a.nom.value==""&&(b=!1,c+="- renseigner votre nom\n");a.cpassword.value!=a.password.value&&(b=!1,c+="- vous assurer que le mot de passe et sa confirmation correspondent\n");b==!1?alert(c):a.submit()}
function complement_reglement(a){window.open("complement-reglement.php?id="+a,"Complement_reglement_"+a,"width=550,height=250,noscrollbars")}function suivreURL(a,b){var c="",c=a.replace(RegExp("§","g"),"/").replace(RegExp("@","g"),".").replace(RegExp("_","g"),"-");c.charAt(0)=="#"&&(c=c.substring(1,c.length));b=="_blank"?window.open(c):window.location.href=c}
function validerQuestion(a,b){document.question.submit();if(readCookie("validation_"+a)==null){date=new Date;date.setHours(date.getHours()+1);writeCookie("validation_"+a,"1",date);url_SU="banniere-validation.php?id="+a+"&jeu="+b;var c=window.open(url_SU,"fenetre"+a,"width=800, height=600,scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=0");c!=null&&(c.blur(),window.focus())}}
function declencheErreur(a,b,c,d){c==null&&(c=450);d==null&&(d=340);dojo.query("#alerteErreur *").onclick(function(){dijit.byId("alerteErreur").hide()});b!=null&&b!=""?dojo.byId("contenuAlerte").innerHTML=b+"<br />"+a:dojo.byId("contenuAlerte").innerHTML="Attention<br />"+a;alerte.dimensions=[c,d];alerte.show()}function RNG(a){this.m=4294967296;this.a=1103515245;this.c=12345;this.state=a?a:Math.floor(Math.random()*(this.m-1))}
RNG.prototype.nextInt=function(){return this.state=(this.a*this.state+this.c)%this.m};RNG.prototype.nextFloat=function(){return this.nextInt()/(this.m-1)};RNG.prototype.nextRange=function(a,b){var c=b-a,d=this.nextInt()/this.m;return a+Math.floor(d*c)};RNG.prototype.choice=function(a){return a[this.nextRange(0,a.length)]};
function ouvrirBonPlan(a){window.open(a,"bonplan","left=0,top=0, width=1000, height=800, scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=1");window.location="accueil.php"}
function pageLoguee(a){dojo.xhrGet({url:"../scripts/ajax/verifie_login.php",handleAs:"json",timeout:1E3,content:{page:a},preventCache:!0,load:function(a){if(a.status=="ok")window.location.href=a.url;else{if(typeof popup=="undefined")dojo.byId("popup_login").innerHTML=a.popup,popup=new dojox.widget.Dialog({title:"Attention",dimensions:[450,440],draggable:!1,easing:dojo.fx.easing.expoInOut,sizeDuration:500,sizeMethod:"combine"},"popup_login"),popup.startup(),dijit.byId("popup_login").show();dijit.byId("popup_login").show()}return a},
error:function(a){console.log("erreur : "+a);return a}})}
function login(){dojo.byId("popup_message").innerHTML="";var a=dojo.byId("popup_email").value,b=dojo.byId("popup_mdp").value;dojo.xhrPost({url:"../scripts/ajax/login.php",handleAs:"json",timeout:2E3,content:{email:a,pass:b},preventCache:!0,load:function(a){if(a.statut=="OK")if(dojo.byId("page_voulu").value=="loterie")window.location.href="loterie.php";else if(dojo.byId("page_voulu").value=="loterie-gratuite")window.location.href="loterie.php";else if(dojo.byId("page_voulu").value=="parrainage")window.location.href=
"parrainage.php";else if(dojo.byId("page_voulu").value=="machine-a-cash")window.location.href="machine-a-cash.php";else if(dojo.byId("page_voulu").value=="ticket-a-gratter")window.location.href="ticket-a-gratter.php";else if(dojo.byId("page_voulu").value=="tombola")window.location.href="tombola-gratuite-gagnez-cadeaux.html";else if(dojo.byId("page_voulu").value=="incentive")window.location.href="kaliflooz-gratuits.html";else if(dojo.byId("page_voulu").value=="grille-verte")window.location.href="grille-verte.php";
else if(dojo.byId("page_voulu").value=="service-premium")window.location.href="service_premium.php";else{if(dojo.byId("page_voulu").value=="autre")window.location.href="jeux-gratuits.php"}else dojo.byId("popup_message").innerHTML=a.erreur;return a},error:function(a){return a}})}
function confirmCommande(a,b,c){dojo.style("contenuConfirmCommande",{display:"block"});dojo.style("resultatConfirmation",{display:"none"});dojo.byId("confirm_libelleCadeau").innerHTML=b;dojo.byId("confirm_pointsCadeau").innerHTML=c;dojo.byId("resultatConfirmation").innerHTML='<center>Nous enregistrons votre commande<br /><img src="images/loterie/ajax-loader.gif" /></center>';dijit.byId("confirmCommande").show();dojo.byId("commande_oui").onclick=function(){dojo.style("contenuConfirmCommande",{display:"none"});
dojo.style("resultatConfirmation",{display:"block"});enregistreCommande(a)}}
function enregistreCommande(a){dojo.xhrGet({url:"../scripts/ajax/cadeau_enregistre.php",handleAs:"json",timeout:1E3,content:{cadeau:a},preventCache:!0,load:function(a){a.enErreur==0?dojo.byId("resultatConfirmation").innerHTML='Votre commande a bien été enregistrée et sera traitée sous 5 jours ouvrés. Vous serez averti par email lors de son traitement.<br /><br />Si vous n\'avez pas encore mis à jour vos données personnelles, faites le maintenant en vous rendant sur <a href="mon-profil.php" style="color:white;cursor:pointer;text-decoration:none;font-weight:bold;">mon profil</a>.<br /><br />Si votre profil n\'est pas à jour au moment du traitement de votre commande, alors la commande sera annulée et les points Kaliflooz correspondant seront perdus.':dojo.byId("resultatConfirmation").innerHTML=
"Votre commande n'a pas pu être enregistrée.<br /><br/>Motif: "+a.message;return a},error:function(a){dojo.byId("resultatConfirmation").innerHTML="Votre commande n'a pas pu être enregistrée.";return a}})}function repondu(){dojo.byId("bloc_banniere").style.display!="block"&&dojo.style("bloc_banniere",{display:"block"})}
function updateBlocByForm(a,b,c){dojo.xhrPost({url:b,handleAs:"text",timeout:1E4,form:c,load:function(b){return dojo.byId(a).innerHTML=b},error:function(a){declencheErreur("Une erreur est survenue<br/>");return a}})}function updateBloc(a,b,c){dojo.xhrPost({url:b,handleAs:"text",timeout:25E3,content:c,preventCache:!0,load:function(b){return dojo.byId(a).innerHTML=b},error:function(a){declencheErreur("Une erreur est survenue<br/>");return a}})}
function ajaxLayer(a,b,c,d){c==null&&(c=700);d==null&&(d=500);dojo.xhrPost({url:a,handleAs:"text",timeout:25E3,content:b,preventCache:!0,load:function(a){afficheLayer(a,c,d);return a},error:function(a){declencheErreur("Une erreur est survenue<br/>");return a}})}function isEmpty(a){return null==a||""==a?!0:!1}function is_numeric(a){return RegExp("^[0-9-.]*$","g").test(a)}
function erreurCouleur(a){a.substring(1,11)=="mon-profil"?dojo.query(a).style({border:"1px solid #cb2c02"}):a.substring(1,26)=="inscription-intermediaire"&&dojo.query(a).style({border:"2px solid #cb2c02"})}function justeCouleur(a){a.substring(1,11)=="mon-profil"?dojo.query(a).style({border:"1px solid #CCCCCC"}):a.substring(1,26)=="inscription-intermediaire"&&dojo.query(a).style({border:"1px solid #cb2c02"})}
function checkTel(a,b){a.substring(0,1)==0&&a.substring(0,2)!="00"&&is_numeric(a)?(justeCouleur(b),a.length==10&&valideTel(a,b)):a.length==""&&b.substring(1,26)=="inscription-intermediaire"?justeCouleur(b):erreurCouleur(b)}function valideTel(a,b){a.length==10?a.substring(0,1)==0&&a.substring(0,2)!="00"&&is_numeric(a)?justeCouleur(b):erreurCouleur(b):a.length==""&&b.substring(1,26)=="inscription-intermediaire"?justeCouleur(b):erreurCouleur(b)}
function checkCP(a,b){is_numeric(a)&&!isEmpty(a)?justeCouleur(b):erreurCouleur(b)}function valideCP(a,b){is_numeric(a)&&a.length==5?justeCouleur(b):erreurCouleur(b)}function afficheLayer(a,b,c){dojo.byId("popupActualiteContenu").innerHTML=a;dojo.query("#popupActualiteContenu*").onclick(function(){dijit.byId("popupActualiteContenu").hide()});layer.dimensions=[b,c];layer.show()}var menuids=["onglets"],submenuoffset=-2;
function createcssmenu(){for(var a=0;a<menuids.length;a++)if(document.getElementById(menuids[a]))for(var b=document.getElementById(menuids[a]).getElementsByTagName("ul"),c=0;c<b.length;c++)b[c].parentNode.onmouseover=function(){this.getElementsByTagName("ul")[0].style.left=this.parentNode.offsetWidth+submenuoffset+"px";this.getElementsByTagName("ul")[0].style.display="block"},b[c].parentNode.onmouseout=function(){this.getElementsByTagName("ul")[0].style.display="none"}}
window.addEventListener?window.addEventListener("load",createcssmenu,!1):window.attachEvent&&window.attachEvent("onload",createcssmenu);function maj_points(){dojo.xhrPost({url:"../scripts/ajax/maj_points_joueur.php",handleAs:"text",timeout:2E3,preventCache:!0,load:function(a){if(!isNaN(a)&&a!="ko")dojo.byId("joueur_kaliflooz").innerHTML=a;return a},error:function(a){declencheErreur("Une erreur est survenue<br/>");return a}})}
function validerInscriptionCpmConcours(a){dojo.xhrPost({url:"../scripts/ajax/landing_page_concours_validation_inscription.php",handleAs:"json",timeout:1E4,form:a,preventCache:!0,load:function(a){dojo.query(".form_concours").forEach("item.disabled = true;");dojo.style("bouton_coregs",{display:"none"});dojo.style("bloc_fln",{display:"block"});dojo.byId("code_postal").value=a.code_postal;dojo.byId("civilite").value=a.civilite;dojo.byId("nom").value=a.nom;dojo.byId("ville").value=a.ville;dojo.byId("pays").value=
a.pays;dojo.byId("date_naissance").value=a.date_naissance;dojo.byId("telephone").value=a.telephone;dojo.byId("adresse").value=a.adresse;return a},error:function(a){declencheErreur("Une erreur est survenue<br/>");return a}})}function repondu_cpc_concours(){dojo.byId("bloc_validation").style.display!="block"&&(dojo.style("bloc_validation",{display:"block"}),dojo.style("bloc_1",{display:"block"}),dojo.style("bloc_2",{display:"block"}))}
function popup_grille_pub(a,b){navigator.appName!="Microsoft Internet Explorer"&&(window.parent.window.close(),window.open(a));window.open(b)}
function affiche_cadre(a){dojo.style("cadre").height=="30px"?(dojo.style("cadre",{height:a+"px"}),dojo.style("cadre_contenu",{visibility:"visible"}),dojo.style("cadre_bouton_deroule",{background:"url('/images/loterie_v2/bouton_a.gif') no-repeat"})):(dojo.style("cadre",{height:"30px"}),dojo.style("cadre_contenu",{visibility:"hidden"}),dojo.style("cadre_bouton_deroule",{background:"url('/images/loterie_v2/bouton_b.gif') no-repeat"}))}
function maj_argent(){dojo.xhrPost({url:"../scripts/ajax/maj_argent_joueur.php",handleAs:"text",timeout:2E3,preventCache:!0,load:function(a){if(!isNaN(a)&&a!="ko")dojo.byId("joueur_argent").innerHTML=a;return a},error:function(a){declencheErreur("Une erreur est survenue<br/>");return a}})}var menubmvids=["menubmv"],submenubmvoffset=-2;
function createcssmenubmv(){for(var a=0;a<menubmvids.length;a++)if(document.getElementById(menubmvids[a]))for(var b=document.getElementById(menubmvids[a]).getElementsByTagName("ul"),c=0;c<b.length;c++)b[c].parentNode.onmouseover=function(){this.getElementsByTagName("ul")[0].style.left=this.parentNode.offsetWidth+submenubmvoffset+"px";this.getElementsByTagName("ul")[0].style.display="block"},b[c].parentNode.onmouseout=function(){this.getElementsByTagName("ul")[0].style.display="none"}}
window.addEventListener?window.addEventListener("load",createcssmenubmv,!1):window.attachEvent&&window.attachEvent("onload",createcssmenubmv);function maj_notification(){dojo.xhrPost({url:"../scripts/ajax/notification_mail_virtuel.php",handleAs:"text",timeout:2E3,preventCache:!0,load:function(a){if(a=="ok")dojo.byId("mail_notification").innerHTML='<img src="/images/boitemailvirtuelle/Picto1.jpg" />';return a},error:function(a){declencheErreur("Une erreur est survenue<br/>");return a}})};var mms_jour=864E5,mms_heure=36E5,mms_minute=6E4,mms_seconde=1E3;
function decompte(){var a=new Date;a.setTime(now*1E3);a=cible.getTime()-a.getTime();diff_jours=Math.floor(a/mms_jour);a-=diff_jours*mms_jour;diff_heures=Math.floor(a/mms_heure);a-=diff_heures*mms_heure;diff_minutes=Math.floor(a/mms_minute);a-=diff_minutes*mms_minute;a=Math.floor(a/mms_seconde);diff_heures<10&&(diff_heures="0"+diff_heures);diff_minutes<10&&(diff_minutes="0"+diff_minutes);a<10&&(a="0"+a);dojo.byId("heure").innerHTML=diff_heures;dojo.byId("minute").innerHTML=diff_minutes;dojo.byId("seconde").innerHTML=
a;diff_heures==0&&diff_minutes==0&&a==0?window.location=window.location.href:(setTimeout("decompte()",1E3),now+=1)}dojo.addOnLoad(function(){decompte()});if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={};
deconcept.SWFObject=function(a,b,c,d,e,h,f,g,i,j){if(document.getElementById){this.DETECT_KEY=j?j:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];a&&this.setAttribute("swf",a);b&&this.setAttribute("id",b);c&&this.setAttribute("width",c);d&&this.setAttribute("height",d);e&&this.setAttribute("version",new deconcept.PlayerVersion(e.toString().split(".")));this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(!window.opera&&document.all&&this.installedVer.major>7&&!deconcept.unloadSet)deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)},window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload),deconcept.unloadSet=!0;h&&this.addParam("bgcolor",h);this.addParam("quality",f?f:"high");this.setAttribute("useExpressInstall",!1);this.setAttribute("doExpressInstall",
!1);this.setAttribute("xiRedirectUrl",g?g:window.location);this.setAttribute("redirectUrl","");i&&this.setAttribute("redirectUrl",i)}};
deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",!0)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]||""},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]||""},getVariables:function(){return this.variables},getVariablePairs:function(){var a=
[],b,c=this.getVariables();for(b in c)a[a.length]=b+"="+c[b];return a},getSWFHTML:function(){var a="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){this.getAttribute("doExpressInstall")&&(this.addVariable("MMplayerType","PlugIn"),this.setAttribute("swf",this.xiSWFPath));a='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'"';
a+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var b=this.getParams(),c;for(c in b)a+=[c]+'="'+b[c]+'" ';b=this.getVariablePairs().join("&");b.length>0&&(a+='flashvars="'+b+'"');a+="/>"}else{this.getAttribute("doExpressInstall")&&(this.addVariable("MMplayerType","ActiveX"),this.setAttribute("swf",this.xiSWFPath));a='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+
'" style="'+(this.getAttribute("style")||"")+'">';a+='<param name="movie" value="'+this.getAttribute("swf")+'" />';b=this.getParams();for(c in b)a+='<param name="'+c+'" value="'+b[c]+'" />';b=this.getVariablePairs().join("&");b.length>0&&(a+='<param name="flashvars" value="'+b+'" />');a+="</object>"}return a},write:function(a){if(this.getAttribute("useExpressInstall")&&this.installedVer.versionIsValid(new deconcept.PlayerVersion([6,0,65]))&&!this.installedVer.versionIsValid(this.getAttribute("version")))this.setAttribute("doExpressInstall",
!0),this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))),document.title=document.title.slice(0,47)+" - Flash Player Installation",this.addVariable("MMdoctitle",document.title);if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version")))return(typeof a=="string"?document.getElementById(a):a).innerHTML=this.getSWFHTML(),!0;else this.getAttribute("redirectUrl")!=""&&document.location.replace(this.getAttribute("redirectUrl"));
return!1}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){var a=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var b=navigator.plugins["Shockwave Flash"];b&&b.description&&(a=new deconcept.PlayerVersion(b.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")))}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0)for(var b=1,c=3;b;)try{c++,b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c),a=new deconcept.PlayerVersion([c,0,
0])}catch(d){b=null}else{try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),a=new deconcept.PlayerVersion([6,0,21]),b.AllowScriptAccess="always"}catch(h){if(a.major==6)return a}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(f){}}b!=null&&(a=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(",")))}return a};
deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){return this.major<a.major?!1:this.major>a.major?!0:this.minor<a.minor?!1:this.minor>a.minor?!0:this.rev<a.rev?!1:!0};
deconcept.util={getRequestParameter:function(a){var b=document.location.search||document.location.hash;if(a==null)return b;if(b)for(var b=b.substring(1).split("&"),c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return b[c].substring(b[c].indexOf("=")+1);return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){for(var a=document.getElementsByTagName("OBJECT"),b=a.length-1;b>=0;b--){a[b].style.display="none";for(var c in a[b])typeof a[b][c]=="function"&&(a[b][c]=function(){})}};
if(!document.getElementById&&document.all)document.getElementById=function(a){return document.all[a]};var getQueryParamValue=deconcept.util.getRequestParameter,FlashObject=deconcept.SWFObject,SWFObject=deconcept.SWFObject;

