if(typeof Bonismart=="undefined"){var Bonismart={}}Bonismart.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=b[e].split(".");g=window;for(c=0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]]}}return g};Bonismart.namespace("remote");Bonismart.remote=function(){var q=false,j=q?"localhost/bonismart_v1/web/frontend_dev.php":"bonismart.com",m,n,r,u,p,f,b="html",e="head",s="bonismart_remote_call",t="bonismart_iframe_target",d="bonismart_iframe",h="15000",l,c,a=3,o=1,i="",k,g="";k=new Date();g=Date.UTC(k.getFullYear(),k.getMonth(),k.getDate(),k.getHours(),k.getMinutes(),k.getSeconds(),k.getMilliseconds());i+=""+g;i+="|"+Math.floor(Math.random()*1000000);m=function(){var v=f(e)[0];if(v=="undefined"){v=document.createElement("head");u().appendChild(v)}return v};n=function(){return document.getElementById(s)};r=function(){return document.getElementById(t)};u=function(){return document.getElByTagName(b)[0]};f=function(v){var w,x=document.getElementsByTagName(v);w=navigator.userAgent.indexOf("MSIE")>=0;if(x.length==0&&!w){x=document.getElementsByTagNameNS("*",v)}return x};removeScript=function(){var w=m(),v=n();if(v){w.removeChild(v)}};p=function(){return !(document.getElementById(d)==null)};l=function(){this.Interval=1000;this.Enable=false;this.Tick;var v=0,w=this;this.Start=function(){if(!w.Enable){w.Enable=true;w.timerId=setInterval(function(){w.Tick()},w.Interval)}};this.Stop=function(){if(w.Enable){clearInterval(w.timerId);w.Enable=false}}};return{init:function(w,v){var y,x,z;z="font-family:Georgia,Times New Roman,Times,serif;font-size:15px;color:#FD7B00;font-weight:400;";if(v=="fr"){x="Coupons en chargement..."}if(v=="en"){x="Coupons are loading..."}y='<img style="vertical-align:middle;" src="http://bonismart.com/images/loader.gif" width="18px" height="33px" alt="Bonismart"/>';document.write('<div style="width:100%" id="'+t+'"><div style="text-align:center;width:100%;"><br /><br /><br /><br /><br />'+y+'<span style="'+z+'">'+x+"</span></div></div>");Bonismart.remote.sendInfo(w,v);c=new l();c.Interval=h;c.Tick=function(){Bonismart.remote.sendInfo(w,v)};c.Start()},sendInfo:function(y,x){removeScript();var v=encodeURIComponent(Bonismart.remote.getHost()),z="http://"+j+"/fr/iframe/portal?loc="+v+"&pid="+y+"&culture="+x+"&psid="+encodeURIComponent(i),w=document.createElement("script");w.type="text/javascript";w.src=z;w.id=s;if(!p()){m().appendChild(w);o++}else{c.Stop();return}if(!p()&&o>a){Bonismart.remote.writeIframe(480,400,y,x);c.Stop()}},sendInfoCallback:function(B){c.Stop();var z,v,x,w,y,A;z=typeof B.width=="number"?B.width:null;v=typeof B.height=="number"?B.height:null;x=typeof B.culture=="string"&&(B.culture=="fr"||B.culture=="en")?B.culture:null;w=typeof B.pid=="number"?B.pid:null;A=typeof B.psid=="number"?B.psid:null;y=typeof B.spsid=="string"&&B.spsid==i?B.spsid:null;removeScript();if(z==null||v==null||x==null||w==null||A==null||y==null){return}Bonismart.remote.writeIframe(z,v,w,x,A)},getHost:function(){var v=window.location.href;return v},writeIframe:function(z,w,y,x,A){if(p()){return}var v='<iframe id="'+d+'" src="http://'+j+"/"+x+"/iframe/index/"+y+"?psid="+A+'" width="'+z+'px" height="'+w+'px" frameborder="0" scrolling="no"> <p>Votre fureteur ne peut accéder à ce iframe. Rendez-vous sur <a href="http://bonismart.com" target="_blank">bonismart.com</a> pour voir les rabais!</p></iframe>';r().innerHTML=v}}}();