(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 a(){var n,t,i,r,f;u()&&(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],f=n.getElementsByClassName("item")[5],r&&r.insertAdjacentElement("afterend",t),f&&f.insertAdjacentElement("afterend",i)))}function v(){googletag.cmd.push(function(){function h(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",v[t]+"; color:white; padding: 2px",t,"",u,r)}var d=googletag.sizeMapping().addSize([980,0],[[728,90],[970,250],[970,90],[1e3,90],[1e3,200],[1800,1e3],[2,1],[1,1]]).addSize([768,0],[[728,90]]).addSize([0,0],[[320,50]]).build(),g=googletag.sizeMapping().addSize([980,0],[[728,90],[970,250],[970,90],[1e3,90],[1e3,200],[1800,1e3],[2,1]]).addSize([768,0],[728,90]).addSize([0,0],[320,50]).build(),nt=googletag.sizeMapping().addSize([768,0],[[300,250]]).addSize([0,0],[[300,250]]).build(),tt=googletag.sizeMapping().addSize([768,0],[[300,250],[300,600]]).addSize([0,0],[[300,250],[300,600]]).build(),a=googletag.sizeMapping().addSize([768,0],[[300,250],[300,600]]).addSize([0,0],[[300,250]]).build(),it=a,c=window.location.hash,rt=c==="#dfp_preview=sublime-boursier"?d:g,t=b(),i=k(),ut=document.getElementById("right_col__pave2"),l,v;e(t,i,"BANNIERE-HAUTE","ad-anx-banner",rt,[[980,0],[768,0],[0,0]]);e(t,i,"PAVE-1","ad-anx-mpu1",ut?nt:tt,[[768,0],[0,0]]);s()&&e(t,i,"PAVE-2","ad-anx-mpu2",a,[[768,0],[0,0]]);u()&&(e(t,i,"PAVE-3","ad-anx-mpu3",it,[[768,0],[0,0]]),o(t,i,"NATIVE-INFO","div-gpt-ad-1549566854562-1",["Position",["NativeBoursier1"]],["fluid"]),o(t,i,"NATIVE-INFO","div-gpt-ad-1549566854562-2",["Position",["NativeBoursier2"]],["fluid"]),o(t,i,"NATIVE-ARTICLE","ad-anx-partner-button",["Position",["NativeBoursier-Article"]],["fluid"]));/^#dfp_/.test(c)&&(l=c.substr(13),googletag.pubads().setTargeting("preview",l),console.warn("DFP Preview Mode = "+l));googletag.pubads().setTargeting("pageType",y());googletag.pubads().setTargeting("pageSection",w());googletag.pubads().setTargeting("articleId",p());tc_vars.custom1&&googletag.pubads().setTargeting("Isin",[tc_vars.custom1]);googletag.pubads().addEventListener("slotRenderEnded",h.bind(this,"slotRenderEnded"));googletag.pubads().addEventListener("impressionViewable",h.bind(this,"impressionViewable"));googletag.pubads().addEventListener("slotOnload",h.bind(this,"slotOnload"));googletag.pubads().addEventListener("slotVisibilityChanged",h.bind(this,"slotVisibilityChanged"));googletag.pubads().addEventListener("slotRequested",h.bind(this,"slotRequested"));googletag.pubads().addEventListener("slotResponseReceived",h.bind(this,"slotResponseReceived"));v={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});r(f);googletag.enableServices()});googletag.cmd.push(function(){googletag.display("ad-anx-banner");googletag.display("ad-anx-mpu1");s()&&googletag.display("ad-anx-mpu2");u()&&(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 u(){return self.location.pathname==="/"}function s(){return u()||document.getElementById("right_col__pave2")!==null}function h(){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 c(){var n=self.location.pathname.toLowerCase();return n.indexOf("/actualites/")!==-1||n.indexOf("/privileges")===0||n.indexOf("/elections/")!==-1||tc_vars.custom3==="services"}function y(){var i=self.location.pathname.toLowerCase(),t=u()||h()?"section":c()?"article":"cotations";return n("log","Page Type = ",[t]),[t]}function p(){var t=tc_vars.content_id?tc_vars.search_page.toLowerCase()+"-"+tc_vars.content_id:"";return n("log","Article = ",[t]),[t]}function w(){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),c()&&t.unshift("actualites"),n("log","Page Section = ",t),t}function b(){return u()?"HP":"RG"}function k(){return h()?"HOME":"ARTICLE"}function e(t,i,r,u,e,o){var h="/144148308/BOURSIER_WEB/"+t+"/"+i+"/"+r,s;n("log","Adding %s to %s",h,u);s=googletag.defineSlot(h,o,u);s.defineSizeMapping(e).addService(googletag.pubads()).setTargeting("Position",r);f[u]=s}function o(t,i,r,u,e,o){var h="/144148308/BOURSIER_WEB/"+t+"/"+i+"/"+r,s;n("log","Adding %s to %s",h,u);s=googletag.defineSlot(h,o,u);s.setTargeting.apply(s,e).addService(googletag.pubads());f[u]=s}var l=(new RegExp("(?:^|; )u=([^;]*)").exec(document.cookie)||[])[1]||"",f;if(location.href.indexOf("/membres/")===-1&&l.indexOf("l=1")===-1&&!t.__processed){if(clearTimeout(i),t.__processed=!0,!window.tc_vars)throw"tc_vars is not available";f={};window.googletag=window.googletag||{};window.googletag.cmd=googletag.cmd||[];a();v()}}function r(t){function f(){setTimeout(b,1e3)}function b(){var o,h,d=Date.now(),g=[],nt=[],b,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?c:l;if(i[o].active||d-i[o].lastActive<a?(tt=!1,rt=!1):(!i[o].viewed||i[o].vieweArea<p||d-i[o].loadtime<ft||d-i[o].viewed<v||d-s>y)&&(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(b=[],w)for(o in i)it=i[o].lineItemId,it&&nt.indexOf(it)!==-1||b.push(t[o]);else for(h=0;h<g.length;h++)b.push(t[g[h]]);if(b.length===0){f();return}for(k="",h=0;h<b.length;h++)o=b[h].getSlotElementId(),k=k+o+" ",e[o]+=1,b[h].setTargeting("rc",e[o]);n("log","slots to refresh: "+k);u.length>0&&googletag.pubads().setTargeting("lih",u);googletag.pubads().refresh(b);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 k(n){var t=n.slot.getSlotElementId();r[t].progress=!0;r[t].timer=setTimeout(function(){o(t)},5e3)}function d(n){var t=n.slot.getSlotElementId();clearTimeout(r[t].timer);r[t].timer=setTimeout(function(){o(t)},500)}function g(n){var t=n.slot.getSlotElementId();i[t].vieweArea=n.inViewPercentage}function nt(n){var t=n.slot.getSlotElementId();i[t].viewed=Date.now()}function tt(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),rt(i)):(it(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 it(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 rt(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 c=2e4,l=3e4,a=2e3,v=1e3,y=6e4,p=50,w=!0,i={},u=[],s=Date.now(),e={},r={};for(var h in t)e[h]=0,r[h]={};googletag.pubads().addEventListener("slotRequested",k);googletag.pubads().addEventListener("slotRenderEnded",tt);googletag.pubads().addEventListener("impressionViewable",nt);googletag.pubads().addEventListener("slotVisibilityChanged",g);googletag.pubads().addEventListener("slotResponseReceived",d);window.addEventListener("scroll",function(n){n instanceof CustomEvent||(s=Date.now())},!1);f()}window.Hubvisor=window.Hubvisor||{};window.Hubvisor.cmd=window.Hubvisor.cmd||[];window.Hubvisor.cmd.push(t);window.hubvisorErrorHandler=function(){t()};var i=setTimeout(hubvisorErrorHandler,3e3)})()