(function() { var callscript = { showad_slot:"", showad_defineSlot : "/21634903505/BT_a_Fl", showad_defineSlot2 : "/21634903505/BT_a_Fl", showad_name : "div-gpt-ad-1671181372605-BT_a_Fl", //showad_defineSize : [ [1, 1] ], showad_defineSize : [ [320, 100], [1, 1], [320, 50] ], //showad_defineSize : [[970, 90], [1, 1], [320, 50], [336, 280], [970, 250], [300, 250], [728, 90], [300, 50], [320, 100], [300, 100]], fetchad:function(){ var showad_name = this.showad_name; var showad_div = document.createElement('div'); var check_rate = Math.floor((Math.random() * (100-1)) +1); if( check_rate> 50 ){ callscript.showad_defineSlot = callscript.showad_defineSlot2; } showad_div.style.textAlign = 'center'; showad_div.id = showad_name; document.body.appendChild(showad_div); //if(document.getElementsByClassName('after-header-widget-area').length>0){ // document.getElementsByClassName('after-header-widget-area')[0].appendChild(showad_div); //} window.googletag = window.googletag || {cmd: []}; var googletag = window.googletag; googletag.cmd.push(function() { callscript.showad_slot = googletag.defineSlot(callscript.showad_defineSlot,callscript.showad_defineSize, callscript.showad_name) .setTargeting('site', location.hostname).setTargeting('url', location.href).addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); googletag.cmd.push(function() { googletag.display(callscript.showad_name); }); },async:function (u, c) { var d = document, t = 'script', o = d.createElement(t), s = d.getElementsByTagName(t)[0]; o.src = u; if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); } //s.parentNode.insertBefore(o, s); d.body.appendChild(o); },callad:function(){ this.async('https://www.googletagservices.com/tag/js/gpt.js',this.fetchad()); } }; setTimeout( function(){ // if(window.googletag){callscript.fetchad();}else{callscript.callad();} },50); // if(window.googletag){callscript.fetchad();}else{callscript.callad();} })();