(function(){function n(n){var t=window.location.hash;/^#dfp/.test(t)&&console[n].apply(console,Array.prototype.slice.call(arguments,1))}function t(){function y(){var n,t,i,r,u;f()&&(n=document.getElementById("listing-home"),n&&(t=document.createElement("div"),i=document.createElement("div"),t.id="div-gpt-ad-1549566854562-1",i.id="div-gpt-ad-1549566854562-2",r=n.getElementsByClassName("item")[2],u=n.getElementsByClassName("item")[5],r&&r.insertAdjacentElement("afterend",t),u&&u.insertAdjacentElement("afterend",i)))}function p(){googletag.cmd.push(function(){function r(t,i){var u=i.slot.getSlotElementId(),r="";t==="slotVisibilityChanged"?r=" ["+i.inViewPercentage+"%]":t==="impressionViewable"?r=" has been viewed":t==="slotResponseReceived"?document.getElementById(u).setAttribute("data-lazy-loaded","true"):t==="slotRenderEnded"&&(r=" might be rendered");n("log","%c%s%c %s%s",y[t]+"; color:white; padding: 2px",t,"",u,r)}var p=googletag.sizeMapping().addSize([980,0],[[728,90],[970,90],[1e3,90],[1e3,200],[1800,1e3],[2,1],[1,1]]).addSize([768,0],[[728,90]]).addSize([0,0],[[320,50]]).build(),w=googletag.sizeMapping().addSize([980,0],[[728,90],[970,90],[1e3,90],[1e3,200],[1800,1e3],[2,1]]).addSize([768,0],[728,90]).addSize([0,0],[320,50]).build(),tt=googletag.sizeMapping().addSize([768,0],[[300,250]]).addSize([0,0],[[300,250]]).build(),it=googletag.sizeMapping().addSize([768,0],[[300,250],[300,600]]).addSize([0,0],e.indexOf("mobile")!==-1?[[300,250]]:[[300,250],[300,600]]).build(),v=googletag.sizeMapping().addSize([768,0],[[300,250],[300,600]]).addSize([0,0],[[300,250]]).build(),rt=v,l=window.location.hash,ut=l==="#dfp_preview=sublime-boursier"?p:w,t=g(),i=nt(),ft=document.getElementById("right_col__pave2"),a,y;s(t,i,"BANNIERE-HAUTE","ad-anx-banner",ut,[[980,0],[768,0],[0,0]]);s(t,i,"PAVE-1",e,ft?tt:it,[[768,0],[0,0]]);c()&&s(t,i,"PAVE-2","ad-anx-mpu2",v,[[768,0],[0,0]]);f()&&(s(t,i,"PAVE-3","ad-anx-mpu3",rt,[[768,0],[0,0]]),h(t,i,"NATIVE-INFO","div-gpt-ad-1549566854562-1",["Position",["NativeBoursier1"]],["fluid"]),h(t,i,"NATIVE-INFO","div-gpt-ad-1549566854562-2",["Position",["NativeBoursier2"]],["fluid"]),h(t,i,"NATIVE-ARTICLE","ad-anx-partner-button",["Position",["NativeBoursier-Article"]],["fluid"]));/^#dfp_/.test(l)&&(a=l.substr(13),googletag.pubads().setTargeting("preview",a),console.warn("DFP Preview Mode = "+a));googletag.pubads().setTargeting("pageType",b());googletag.pubads().setTargeting("pageSection",d());googletag.pubads().setTargeting("articleId",k());tc_vars.custom1&&googletag.pubads().setTargeting("Isin",[tc_vars.custom1]);googletag.pubads().addEventListener("slotRenderEnded",r.bind(this,"slotRenderEnded"));googletag.pubads().addEventListener("impressionViewable",r.bind(this,"impressionViewable"));googletag.pubads().addEventListener("slotOnload",r.bind(this,"slotOnload"));googletag.pubads().addEventListener("slotVisibilityChanged",r.bind(this,"slotVisibilityChanged"));googletag.pubads().addEventListener("slotRequested",r.bind(this,"slotRequested"));googletag.pubads().addEventListener("slotResponseReceived",r.bind(this,"slotResponseReceived"));y={slotRenderEnded:"background:tomato",impressionViewable:"background:darkcyan",slotOnload:"background:mediumseagreen",slotVisibilityChanged:"background:teal",slotRequested:"background:lightgrey",slotResponseReceived:"background:grey"};googletag.pubads().enableLazyLoad({fetchMarginPercent:100,renderMarginPercent:10,mobileScaling:2});u(o);googletag.enableServices()});googletag.cmd.push(function(){googletag.display("ad-anx-banner");googletag.display(e);c()&&googletag.display("ad-anx-mpu2");f()&&(googletag.display("ad-anx-mpu3"),googletag.display("ad-anx-partner-button"),googletag.display("div-gpt-ad-1549566854562-1"),googletag.display("div-gpt-ad-1549566854562-2"))})}function f(){return self.location.pathname==="/"}function c(){return f()||document.getElementById("right_col__pave2")!==null}function l(){var n=self.location.pathname.toLowerCase();return n==="/"||tc_vars.content_level1==="HomeNew"&&tc_vars.search_page==="bourse"||tc_vars.content_level1==="General"&&tc_vars.custom3==="crypto-monnaies"||tc_vars.content_level1==="accueil"&&tc_vars.custom3==="Opcvm"||tc_vars.content_level1==="recherche"&&tc_vars.custom3==="Derives"||tc_vars.content_level1==="guide"&&tc_vars.search_page==="index"||tc_vars.content_level1==="forum"&&tc_vars.search_page==="Index"||tc_vars.content_level1==="elections"&&tc_vars.search_page==="index"||tc_vars.content_level1==="Accueil"&&tc_vars.custom3==="Devises"||tc_vars.content_level1==="Accueil"&&tc_vars.custom3==="Privileges"}function w(){var n=self.location.href.toLowerCase();return n.indexOf("/actualites/")!==-1&&n.indexOf(".html")!==-1}function a(){var n=self.location.pathname.toLowerCase();return n.indexOf("/actualites/")!==-1||n.indexOf("/privileges")===0||n.indexOf("/elections/")!==-1||tc_vars.custom3==="services"}function b(){var i=self.location.pathname.toLowerCase(),t=f()||l()?"section":a()?"article":"cotations";return n("log","Page Type = ",[t]),[t]}function k(){var t=tc_vars.content_id?tc_vars.search_page.toLowerCase()+"-"+tc_vars.content_id:"";return n("log","Article = ",[t]),[t]}function d(){var t=[],i=tc_vars.content_class.toLowerCase(),r=i!=="index"?i:tc_vars.content_level1.toLowerCase();return tc_vars.custom3&&t.push(tc_vars.custom3.toLowerCase()),tc_vars.relatedfile&&t.push(tc_vars.relatedfile.toLowerCase()),r&&t.push(r),a()&&t.unshift("actualites"),n("log","Page Section = ",t),t}function g(){return f()?"HP":"RG"}function nt(){return l()?"HOME":"ARTICLE"}function s(t,i,r,u,f,e){var h="/144148308/BOURSIER_WEB/"+t+"/"+i+"/"+r,s;n("log","Adding %s to %s",h,u);s=googletag.defineSlot(h,e,u);s.defineSizeMapping(f).addService(googletag.pubads()).setTargeting("Position",r);o[u]=s}function h(t,i,r,u,f,e){var h="/144148308/BOURSIER_WEB/"+t+"/"+i+"/"+r,s;n("log","Adding %s to %s",h,u);s=googletag.defineSlot(h,e,u);s.setTargeting.apply(s,f).addService(googletag.pubads());o[u]=s}var v=(new RegExp("(?:^|; )u=([^;]*)").exec(document.cookie)||[])[1]||"",e,o;if(location.href.indexOf("/membres/")===-1&&v.indexOf("l=1")===-1&&!t.__processed){if(clearTimeout(i),t.__processed=!0,!window.tc_vars)throw"tc_vars is not available";e=r<=640&&w()?"ad-anx-mpu1-mobile":"ad-anx-mpu1";o={};window.googletag=window.googletag||{};window.googletag.cmd=googletag.cmd||[];y();p()}}function u(t){function f(){setTimeout(k,1e3)}function k(){var o,s,d=Date.now(),g=[],nt=[],c,it,k;for(o in i){document.getElementById(o).getAttribute("data-lazy-loaded")!=="true"&&(n("error","Trying to refresh %s while lazy loading new ad",o),document.getElementById(o).setAttribute("data-lazy-loaded","true"));var tt=!0,rt=!0,ut=i[o].lineItemId,ft=ut?l:a;if(i[o].active||d-i[o].lastActive<v?(tt=!1,rt=!1):(!i[o].viewed||i[o].vieweArea<w||d-i[o].loadtime<ft||d-i[o].viewed<y||d-h>p)&&(tt=!1),i[o].lineItemId&&!rt&&nt.indexOf(i[o].lineItemId)!==-1){n("log","Sticky LI "+i[o].lineItemId);nt.push(i[o].lineItemId);continue}if(tt){if(r[o].progress===!0){n("error","Trying to refresh %s while loading new ad, skipping...",o);continue}n("log","Refreshing slot "+o);g.push(o)}}if(g.length===0){f();return}if(c=[],b)for(o in i)it=i[o].lineItemId,it&&nt.indexOf(it)!==-1||c.push(t[o]);else for(s=0;s<g.length;s++)c.push(t[g[s]]);if(c.length===0){f();return}for(k="",s=0;s<c.length;s++)o=c[s].getSlotElementId(),k=k+o+" ",e[o]+=1,c[s].setTargeting("rc",e[o]);n("log","slots to refresh: "+k);u.length>0&&googletag.pubads().setTargeting("lih",u);googletag.pubads().refresh(c);n("log","%cCalling refresh for%c %o","background:blue; color: white; padding: 2px","",k);f()}function o(n){var t=r[n];clearTimeout(t.timer);t.timer=undefined;t.progress=!1}function d(n){var t=n.slot.getSlotElementId();r[t].progress=!0;r[t].timer=setTimeout(function(){o(t)},5e3)}function g(n){var t=n.slot.getSlotElementId();clearTimeout(r[t].timer);r[t].timer=setTimeout(function(){o(t)},500)}function nt(n){var t=n.slot.getSlotElementId();i[t].vieweArea=n.inViewPercentage}function tt(n){var t=n.slot.getSlotElementId();i[t].viewed=Date.now()}function it(t){var i=t.slot.getSlotElementId();o(i);t.isEmpty?(n("log","%cUnfilled or pixel detected in position %s","background:lightred; padding:2px",i,t),ut(i)):(rt(i,t.lineItemId),t.lineItemId&&u.indexOf(t.lineItemId)===-1&&u.push(t.lineItemId));window.dispatchEvent&&typeof CustomEvent=="function"&&(window.dispatchEvent(new CustomEvent("scroll")),window.dispatchEvent(new CustomEvent("resize")));window.Waypoint&&Waypoint.refreshAll()}function rt(t,r){var f,u;n("log","Subscribing slot %s",t);f=document.getElementById(t);i[t]={};i[t].lineItemId=r;i[t].viewed=!1;i[t].active=!1;i[t].loadtime=Date.now();u=f.getElementsByTagName("iframe")[0];u&&(u.onmouseover=function(){i[t].active=!0},u.onmouseout=function(){i[t].active=!1;i[t].lastActive=Date.now()})}function ut(t){var f,u;n("log","Unsubscribing slot %s",t);f=document.getElementById(t);i[t]={};r[t]={};u=f.getElementsByTagName("iframe")[0];u&&(u.onmouseover=null,u.onmouseout=null)}var s=location.hostname==="localhost"?10:1,l=2e4*s,a=3e4*s,v=2e3,y=1e3,p=6e4,w=50,b=!0,i={},u=[],h=Date.now(),e={},r={};for(var c in t)e[c]=0,r[c]={};googletag.pubads().addEventListener("slotRequested",d);googletag.pubads().addEventListener("slotRenderEnded",it);googletag.pubads().addEventListener("impressionViewable",tt);googletag.pubads().addEventListener("slotVisibilityChanged",nt);googletag.pubads().addEventListener("slotResponseReceived",g);window.addEventListener("scroll",function(n){n instanceof CustomEvent||(h=Date.now())},!1);f()}var r=window.innerWidth||documentElement.clientWidth||screen.width,i;window.Hubvisor=window.Hubvisor||{};window.Hubvisor.cmd=window.Hubvisor.cmd||[];window.Hubvisor.cmd.push(t);window.hubvisorErrorHandler=function(){t()};i=setTimeout(hubvisorErrorHandler,3e3)})()