";
single_ads_s[i].appendChild(readmoread_div);
var achang_tw_ad = document.createElement("script");
achang_tw_ad.async = true;
achang_tw_ad.src = "https://cell1.adbottw.net/dy/native/?ca=achang.tw";
//document.body.appendChild(achang_tw_ad);
window.googletag = window.googletag || { cmd: [] };
googletag.cmd.push(function () {
//googletag.defineSlot('/22675675822/kocpc_ir_1_left_2022', [ [1,1], [336,280],[300, 250]], 'div-gpt-ad-1644571119441-'+i).addService(googletag.pubads().setTargeting('url', location.pathname));
//googletag.defineSlot('/40655003/BT_ar_O_1', [ [1,1], [336,280],[300, 250]], 'div-gpt-ad-1644571119441-'+i).addService(googletag.pubads().setTargeting('url', location.pathname));
//googletag.defineSlot('/22897020361/BT_ar_O_1', [ [1,1], [336,280],[300, 250]], 'div-gpt-ad-1644571119441-'+i).addService(googletag.pubads().setTargeting('url', location.pathname));
//googletag.defineSlot('/21697024903,40655003/BT_ar_O_1', [ [1,1], [336,280],[300, 250]], 'div-gpt-ad-1644571119441-'+i).addService(googletag.pubads().setTargeting('url', location.pathname));
googletag.defineSlot('/40655003/BT_ar_O_1', [ [1,1], [336,280],[300, 250]], 'div-gpt-ad-1644571119441-'+i).addService(googletag.pubads().setTargeting('url', location.pathname));
googletag.defineSlot('/40655003/BT_ar_O_2', [[336, 280], [336, 100], [320, 50], [650, 245], "fluid", [300, 250], [728, 90], [320, 100], [1, 1]], 'div-gpt-ad-1528785658031-' + i).setCollapseEmptyDiv(false).addService(googletag.pubads().setTargeting('zi-web', location.hostname));
googletag.pubads().enableSingleRequest();
//googletag.pubads().enableLazyLoad({fetchMarginPercent: 150, renderMarginPercent: 130, mobileScaling: 1.5});
googletag.pubads().enableLazyLoad({fetchMarginPercent: 500, renderMarginPercent: 200, mobileScaling: 2.0});
googletag.enableServices();
});
if(document.getElementById('div-gpt-ad-1644571119441-' + i)){
googletag.cmd.push(function () { googletag.display('div-gpt-ad-1644571119441-' + i); });
single_ads_s[i].setAttribute('ad', 'show');
//console.log(document.getElementById('div-gpt-ad-1644571119441-' + i));
clearInterval(single_ads_s_f_count);
}
if(document.getElementById('div-gpt-ad-1528785658031-' + i)){
googletag.cmd.push(function () { googletag.display('div-gpt-ad-1528785658031-' + i); });
}
}
}
}
//var singlestyleElement = document.createElement("STYLE");
//singlestyleElement.innerHTML = ".single_ads { min-height: 0px;}";
//document.body.appendChild(singlestyleElement);
window.setTimeout(function(){single_ads_s_f_check();},2000);
var single_ads_s_f_count = "";
var gpt_jss = document.createElement('script');gpt_jss.src = "https://securepubads.g.doubleclick.net/tag/js/gpt.js"; document.head.appendChild(gpt_jss);
function single_ads_s_f_check(){
single_ads_s_f_count = window.setInterval(function(){single_ads_s_f_auth();},2000);
//single_ads_s_f_check2();
//window.setTimeout(function(){single_ads_s_f_check2();},15000);
window.setTimeout(function(){single_ads_s_f_check3();},15000);
}
function single_ads_s_f_check2(){
(function() {
var popIn_recommend_div = document.createElement('div');
popIn_recommend_div.id = "_popIn_recommend";
if (document.getElementsByClassName('jnews_content_bottom_ads')[0].getAttribute('ad') != 'show') {
document.getElementsByClassName('jnews_content_bottom_ads')[0].innerHTML = "";
document.getElementsByClassName('jnews_content_bottom_ads')[0].appendChild(popIn_recommend_div);
var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.charset = "utf-8"; pa.async = true;
pa.src = window.location.protocol + "//api.popin.cc/searchbox/kocpc.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pa, s);
document.getElementsByClassName('jnews_content_bottom_ads')[0].setAttribute('ad', 'show');
}
})();
}
function single_ads_s_f_check3(){
(function() {
/*
var INTERSTITIAL_script1 = window.top.document.createElement('script')
INTERSTITIAL_script1.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js'
window.top.document.head.appendChild(INTERSTITIAL_script1)
*/
if (document.getElementsByClassName('jnews_content_bottom_ads')[0].getAttribute('ad') != 'show') {
var INTERSTITIAL_script1 = window.top.document.createElement('script')
INTERSTITIAL_script1.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js'
window.top.document.head.appendChild(INTERSTITIAL_script1)
var i=0;
var adx_fb_div = window.top.document.createElement('div');
adx_fb_div.innerHTML = "
";
//document.body.appendChild(adx_fb_div);
document.getElementsByClassName("Zi_ad_ar_O_3")[0].appendChild(adx_fb_div);
window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/22124825655/recommend', [1, 1] , 'div-gpt-ad-1625231385598-'+i).setTargeting('web', location.hostname).setCollapseEmptyDiv(false).addService(googletag.pubads());
googletag.pubads().enableLazyLoad({ fetchMarginPercent: -1, renderMarginPercent: -1, mobileScaling: -1 });
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
// document.getElementById('div-gpt-ad-1625231385598-'+i).scrollIntoView();
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1625231385598-'+i); });
document.getElementsByClassName('jnews_content_bottom_ads')[0].setAttribute('ad', 'show');
}
})();
}