if (!parent.document.getElementById('frame_jdx1a6mdbb8la0n830e')) { var jsElm = document.createElement('script'); jsElm.type = "application/javascript"; jsElm.src = 'https://adserve.2adpro.com/js/viewability.js'; parent.document.body.appendChild(jsElm); function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } var interacted = 1; var interactedscrollon = 1; var interactedscrolloff = 1; var interactedview = 1; var interactedTracked = 0; var freqCapCnt = getCookie('jdx1a6mdbb8la0n830e'); var displayVideo = ''; var displaySliveAd = 'none'; var setFreqCapCnt = '1'; if (freqCapCnt == '') { displayVideo = ''; displaySliveAd = 'none'; } else if (freqCapCnt == '1') { displayVideo = ''; displaySliveAd = 'none'; } website = ''; if (parent.location.href !== undefined) { website = parent.location.href; } else if (location.href !== undefined) { website = location.href; } scrollValue = parent.window.pageYOffset; winHeight = parent.window.innerHeight || parent.document.body.clientHeight || parent.window.clientHeight; //console.log("sV "+scrollValue); //console.log("loadWH "+winHeight); iframe = document.createElement('iframe'); iframe.id = 'frame_jdx1a6mdbb8la0n830e'; iframe.src = "temp10296705/output/web/V1/R0/interscroller_INS_Dktp.html?refId=jdx1a6mdbb8la0n830e&clickUrl=&clickmacro=https://adclick.g.doubleclick.net/pcs/click%3Fxai%3DAKAOjsvaU0MYTvwqun4E-IPEzpqTbgSfkMXopaKPH07fGSN9AapIcRm57QJPDq0pEsfzax2XsWjAE6lAxzymG7ZszR6K9qynJKkWsN2SBthhl7GRJW04rxQf6C23R01Sn1SyDQk00q6ZPY4MALcy1gW_7__ITgHAXSs-pGdWZkWqiYjZKG80AxljemPZESEKfrCcY0joHAaYKfNAIKiLbVrs7dUKQ2uRutrC10C4Qoue8_pFL5iTVp4aRzA89ZCXEC_qlun_joS2osOS_IWWLuZ8esxK-phu-Qj2b1m7MYHNin-cD5vWSruII4HmAhw0dR4DqJPjXkF4GNdf894E5GlWBIBDbUMvgyPbSqop4nlf72NLq5lbyYarmktaVJa7tgU%26sai%3DAMfl-YTf-0PRX6bvPtzUXyAIU15XPrONXnXyte2yV_VcGWdb9INewnjtCFIq7D_BC2ns_EqoljSQ_wHfUoLAlG7SuEdX_gI6TcxbWDToqdxYE9RQT3b4pP48befrRgH6G84u%26sig%3DCg0ArKJSzLYEOwgnh_TZEAE%26fbs_aeid%3D%5Bgw_fbsaeid%5D%26urlfix%3D1%26adurl%3D&lId=6110112626&cId=138411270915&oId=3080604137" + "&referer=" + website + '&w=' + parent.screen.width + '&h=' + parent.screen.height + '&uniqid='; iframe.setAttribute('style', 'position: fixed; bottom: 20px; right:0; left:0; top:20px; width: 100%; margin:0; padding:0; transform: translateZ(0px);-webkit-transition:.3s height ease-in;-o-transition:.3s height ease-in;transition:.3s height ease-in;display:'); iframe.setAttribute('scrolling', 'no'); iframe.setAttribute('frameborder', '0'); iframe.setAttribute('allowfullscreen', "true"); iframe.setAttribute('allowTransparency', "true"); iframe.setAttribute('webkitallowfullscreen', "true"); iframe.setAttribute('mozallowfullscreen', "true"); //iframe.style.height = (winHeight-32)+'px'; iframe.style.height = 100 + 'vh'; iframeImg = document.createElement('img2'); iframeImg.id = 'frameImg_jdx1a6mdbb8la0n830e'; iframeImg.setAttribute('src', "https://adservepreview.2adpro.com/images/screenshots/0_0_0.png"); iframeImg.setAttribute('style', 'border:none;width:300px;height:250px;display:'); divTop = document.createElement('div'); divTop.id = 'divTop'; divTop.setAttribute('style', 'position: absolute; top: 0px; left: 0px; background: transparent; width: calc(100% - 56px); height: 100%; margin: 0px; margin-left:28px; padding: 0px; overflow: hidden; clip-path: inset(0px); clip: rect(0px, auto, auto, 0px);'); //divTop.style.height = (winHeight+87)'px'; divMarkT = document.createElement('div'); divMarkT.setAttribute('style', 'background: rgb(255, 255, 255); color: rgb(30, 30, 30); position: absolute; z-index: 4; top: 0px; border-top: 2px solid #e6e6e6; left: 0px; right: 0px; width: auto; margin: 0px; padding: 0; text-align: center; text-transform: uppercase; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: 31px; font-family: Helvetica, Arial, sans-serif;'); divMarkT.innerHTML = 'ADVERTISEMENT'; divMarkB = divMarkT.cloneNode(true); divMarkB.setAttribute('style', 'background: rgb(255, 255, 255); color: rgb(30, 30, 30); position: absolute; z-index: 3; bottom: 0px; left: 0px; right: 0px; width: auto; margin: 0px; padding: 0; text-align: center; text-transform: uppercase; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: 28px; font-family: Helvetica, Arial, sans-serif;border-bottom: 2px solid #e6e6e6;'); divMarkB.innerHTML = 'SCROLL TO CONTINUE WITH THE CONTENT'; var time = Date.now(); section = document.createElement('section'); section.appendChild(divMarkT); section.appendChild(divMarkB); divTop.appendChild(iframe); section.appendChild(divTop); section.appendChild(iframeImg); section.id = 'creative_dispjdx1a6mdbb8la0n830e' + time; section.setAttribute('style', 'overflow: hidden; display: block; margin: 0; position: relative; left: 0px; right: auto; top: 0px; bottom: auto;z-index:1;-webkit-transition:.3s height ease-in;-o-transition:.3s height ease-in;transition:.3s height ease-in;border-left: 2px solid #e6e6e6;border-right: 2px solid #e6e6e6;background:rgb(255, 255, 255);'); //section.style.height = (winHeight-87)+"px"; section.style.height = 326 + "px"; section.style.display = displayVideo; var sectionLv; var iframeLv; if (!parent.document.querySelector('*[id^="creative_disp"]')) { sectionLv = parent.document.getElementById(window.frameElement.id).parentNode.insertBefore(section, parent.document.getElementById(window.frameElement.id)); iframeLv = parent.document.querySelectorAll('*[id^="creative_disp"] iframe')[0]; } parent.document.getElementById('creative_dispjdx1a6mdbb8la0n830e' + time).parentNode.parentNode.setAttribute('style','min-height:100%;min-width:100%;padding:0px;') parent.document.getElementById('creative_dispjdx1a6mdbb8la0n830e' + time).parentNode.parentNode.parentNode.parentNode.setAttribute('style','overflow:visible;') console.log(parent.document.getElementById('creative_dispjdx1a6mdbb8la0n830e' + time).parentNode); parent.document.getElementById(window.frameElement.id).parentNode.style.position = 'relative'; parent.document.getElementById(window.frameElement.id).setAttribute('style', 'display:block; height:1px; width:1px; position: absolute; top:0; right:0; left:0; margin:0 auto; z-index:99999; border:none;'); window.onload = function() { parent.document.getElementById(window.frameElement.id).setAttribute('style', 'display:block; height:1px; width:1px; position:absolute; top:0; right:0; left:0; margin:0 auto; z-index:99999; border:none;'); } var ua = window.navigator.userAgent; var edge = ua.indexOf('Edge/'); var ie = ua.indexOf('Trident/'); if(edge > 0 || ie > 0) { console.log('IE Edge'); // IE only this-Style-Stard Here if(parent.document.getElementsByClassName('grid__main_sticky_left')[0]){ parent.document.getElementsByClassName('article__article-story')[0].setAttribute('style','position:relative; z-index:999; background:#fff;margin-bottom:0; padding-bottom:10px;'); parent.document.getElementsByClassName('article__story-highlights')[0].setAttribute('style','position:relative; z-index:999; background:#fff;'); parent.document.getElementsByClassName('article__author')[0].setAttribute('style','position:relative; z-index:999; background:#fff; width:100%; padding-top:5px'); parent.document.getElementById('taboola-below-article-thumbnails-2nd-0').setAttribute('style','position:relative; z-index:999; background:#fff; margin:0;'); } if(parent.document.getElementsByClassName('article__embed')[0]){ parent.document.getElementsByClassName('article__embed')[0].setAttribute('style','position:relative; z-index:999; background:#fff; width:100%;'); } if(parent.document.getElementsByClassName('story-highlights')[0]){ parent.document.getElementsByClassName('story-highlights')[0].setAttribute('style','margin-bottom:0; padding-bottom:10px;'); } if(parent.document.getElementsByClassName('article-story__abstract')[0]){ parent.document.getElementsByClassName('article-story__abstract')[0].setAttribute('style','position:relative; z-index:999; background:#fff; margin-bottom:0; padding-bottom:15px;'); } if(parent.document.getElementsByClassName('twitter-tweet')[0]){ parent.document.getElementsByClassName('twitter-tweet')[0].setAttribute('style','margin:0;'); } if(parent.document.getElementsByClassName('grid__module_top_true')[0]){ parent.document.getElementsByClassName('grid__module_top_true')[0].setAttribute('style','z-index:999; background:#fff;'); } if(parent.document.getElementsByClassName('grid__module_top_true')[2]){ parent.document.getElementsByClassName('grid__module_top_true')[2].setAttribute('style','z-index:999; background:#fff;'); } var x = parent.document.querySelectorAll(".article-body p"); var i; for (i = 0; i < x.length; i++) { x[i].setAttribute('style','position:relative; z-index:999; background:#fff;margin:0; padding:1em 0;'); } var x1 = parent.document.querySelectorAll(".ad_position_article_flex_btf"); var i; for (i = 0; i < x1.length; i++) { x1[i].setAttribute('style','position:relative; z-index:999; background:#fff;'); } var x2 = parent.document.querySelectorAll(".grid__main_sticky_left"); var i; for (i = 1; i < x2.length; i++) { x2[i].setAttribute('style','position:relative; z-index:999; background:#fff;'); } var x2 = parent.document.querySelectorAll(".grid__main_sticky_left"); var i; for (i = 1; i < x2.length; i++) { x2[i].setAttribute('style','position:relative; z-index:999; background:#fff;'); } //IE New_Site_Styles_Start_Here if(parent.document.getElementsByClassName('article__body')[0]) { var x3 = parent.document.querySelectorAll(".article__section_type_text"); var j; for (j = 1; j < x3.length; j++) { x3[j].setAttribute('style','position:relative; z-index:999; background:#fff; margin:0; padding:15px 0;'); } parent.document.getElementsByClassName('article__section_type_ad')[0].style.margin ='0'; var x4 = parent.document.querySelectorAll(".grid__module_loaded_true"); x4[1].setAttribute('style','position:relative; z-index:999; background:#fff;'); x4[0].setAttribute('style','padding:15px 0 0 0'); } // IE only this - Style -- End var stat = "c"; var cTime = -1; var eTime; var timeLapse; window.adViewed = 0; function isElementInViewport(el4) { if (cTime == -1) { cTime = Date.now(); } else {} eTime = Date.now() - cTime; var rect = el4.getBoundingClientRect(); var h = parent.window.innerHeight || parent.document.body.clientHeight || parent.window.clientHeight; if (stat != "interscroll_show" && ((rect.top <= h * (1) && rect.top >= 0) || (rect.bottom >= h * (0.0109375) && rect.bottom <= h))) { timeLapse = setTimeout(function() { isElementInViewport(el4); }, 1000); if (eTime >= 1000) { stat = "interscroll_show"; console.log(stat); divTop.style.position = 'static'; //clearTimeout(timeLapse); cTime = -1; } } if (stat == "interscroll_show" && (rect.bottom <= 15|| rect.top > h)) { stat = "interscroller_hide"; console.log(stat); divTop.style.position = 'absolute'; } } var el4 = parent.document.getElementById('creative_dispjdx1a6mdbb8la0n830e' + time); parent.window.addEventListener('scroll', function() { isElementInViewport(el4); }); isElementInViewport(el4); console.log('---IE edge'); }; parent.window.addEventListener('message', function() { }) if (parent.document.getElementsByClassName('ad_position_article_mid1')[0]) { parent.document.getElementsByClassName('ad_position_article_mid1')[0].setAttribute('style', 'padding:0;width:750px;height:570px;border:none;'); sectionLv = parent.document.querySelector('*[id^="creative_disp"]'); iframeLv = parent.document.querySelector('*[id^="creative_disp"] iframe'); sectionLv.style.width = "750px"; sectionLv.style.height = "570px"; iframeLv.style.height = "100vh"; iframeLv.style.width = "690px"; iframeLv.style.left = sectionLv.getBoundingClientRect().left + 30 + "px"; parent.window.addEventListener('resize', function() { articlePageResize() }); parent.window.onorientationchange = articlePageResize(); sectionLv.style.margin = "0"; articlePageResize(); } else if (parent.document.getElementsByClassName('grid__section-group')[2]) { //parent.document.getElementsByClassName('grid__section-group')[2].setAttribute('style', 'border-top:1px solid #eee;'); parent.window.onscroll = function() { var s = parent.window.pageYOffset || parent.document.documentElement.scrollTop; // how much page is scrolled var rt = parent.document.getElementsByClassName('grid__section-group')[2].getBoundingClientRect().top; var secheight = 326; var t = rt + secheight; var secdheight = 800; //console.log('=====' + t); if (s >= t) { section.style.height = 326 + "px"; } } } function articlePageResize() { if (parent.document.getElementsByClassName('ad_position_article_mid1')[0]) { winHeight = parent.window.innerHeight || parent.document.body.clientHeight || parent.window.clientHeight; console.log(winHeight); sectionLv = parent.document.querySelector('*[id^="creative_disp"]'); iframeLv = parent.document.querySelector('*[id^="creative_disp"] iframe'); iframeLv.style.left = sectionLv.getBoundingClientRect().left + 30 + "px"; var ifrTop; if (((winHeight - 570) / 2) < 70) { ifrTop = "20px"; console.log('2'); } else { //ifrTop = ((winHeight - 570)/2) + 70 + "px"; ifrTop = '20px' console.log('3'); }; iframeLv.style.top = ifrTop; } }; function oriChange() { clearTimeout(timer); var timer = setTimeout(function() { winHeight2 = parent.window.innerHeight || parent.document.body.clientHeight || parent.window.clientHeight; sectionLv = parent.document.querySelectorAll('*[id^="creative_disp"]'); iframeLv = parent.document.querySelectorAll('*[id^="creative_disp"] iframe'); for (k = 0; k < sectionLv.length; k++) { sectionLv[k].style.height = (winHeight2 - 87) + 'px'; console.log(sectionLv[k].style.height + " s " + winHeight2); } for (l = 0; l < iframeLv.length; l++) { iframeLv[l].style.height = (winHeight2 - 32) + 'px'; console.log(iframeLv[l].style.height + " f " + winHeight2); } }, 300); } //parent.window.onorientationchange = oriChange; //parent.window.onresize = resized; var sectionGetBound = sectionLv.getBoundingClientRect(); //viewable impression | interscroller var stat = "c"; var cTime = -1; var eTime; var timeLapse; window.adViewed = 0; function isElementInViewport(el2) { if (cTime == -1) { cTime = Date.now(); } else {} eTime = Date.now() - cTime; var rect = el2.getBoundingClientRect(); var h = parent.window.innerHeight || parent.document.body.clientHeight || parent.window.clientHeight; if (stat != "interscroller_e" && ((rect.top <= h * (0.5) && rect.top >= 0) || (rect.bottom >= h * (0.5) && rect.bottom <= h)) && (rect.bottom <= h * (1.5) || rect.bottom >= h)) { timeLapse = setTimeout(function() { isElementInViewport(el2); }, 1000); if (eTime >= 1000) { stat = "interscroller_e"; console.log(stat); if(edge > 0 || ie > 0) { divTop.style.position='static'; } //parent.document.getElementById('frame_jdx1a6mdbb8la0n830e').contentWindow.postMessage(stat, "*"); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() {}; var params = 'refId=jdx1a6mdbb8la0n830e'; params += '&lineId=6110112626'; params += '&oId=3080604137'; params += '&cId=138411270915'; params += '&event=SCROLLON'; params += '&interacted=' + interactedscrollon; params += '&interactedTracked=' + interactedTracked; xmlhttp.open("POST", "https://adserve.2adpro.com/trackuseractivity", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(params); clearTimeout(timeLapse); cTime = -1; if (adViewed == 0) { console.log('view' + stat); interactedview = 1; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() {}; var params = 'refId=jdx1a6mdbb8la0n830e'; params += '&lineId=6110112626'; params += '&oId=3080604137'; params += '&cId=138411270915'; params += '&event=VIEWED'; params += '&interacted=' + interactedview; params += '&interactedTracked=' + interactedTracked; xmlhttp.open("POST", "https://adserve.2adpro.com/trackuseractivity", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(params); interactedview = 2; tracked = 1; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() {}; var params = 'refId=jdx1a6mdbb8la0n830e'; params += '&lineId=6110112626'; params += '&oId=3080604137'; params += '&cId=138411270915'; xmlhttp.open("POST", "https://adserve.2adpro.com/trackview", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(params); clearTimeout(timeLapse); cTime = -1; adViewed = 2; } } } if (stat == "interscroller_e" && (rect.bottom <= 50 || rect.top > h)) { stat = "interscroller_collapse"; console.log(stat); if(edge > 0 || ie > 0) { divTop.style.position='absolute'; } //parent.document.getElementById('frame_jdx1a6mdbb8la0n830e').contentWindow.postMessage(stat, "*"); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() {}; var params = 'refId=jdx1a6mdbb8la0n830e'; params += '&lineId=6110112626'; params += '&oId=3080604137'; params += '&cId=138411270915'; params += '&event=SCROLLOFF'; params += '&interacted=' + interactedscrolloff; params += '&interactedTracked=' + interactedTracked; xmlhttp.open("POST", "https://adserve.2adpro.com/trackuseractivity", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(params); } } function isElementInViewportDwell(el3) { var rect = el3.getBoundingClientRect(); var h = parent.window.innerHeight || parent.document.body.clientHeight || parent.window.clientHeight; if (stat != "viewable_adslot_Dwelled" && rect.top <= h * (0.5)) { stat = "viewable_adslot_Dwelled"; console.log(stat); tracked = 1; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() {}; var params = 'refId=jdx1a6mdbb8la0n830e'; params += '&lineId=6110112626'; params += '&oId=3080604137'; params += '&cId=138411270915'; params += '&event=DWELLED'; params += '&interacted=' + interacted; params += '&interactedTracked=' + interactedTracked; xmlhttp.open("POST", "https://adserve.2adpro.com/trackuseractivity", true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(params); interacted = 2; } } var el2 = parent.document.getElementById('creative_dispjdx1a6mdbb8la0n830e' + time); var el3 = parent.document.getElementById('creative_dispjdx1a6mdbb8la0n830e' + time); parent.window.addEventListener('scroll', function() { isElementInViewport(el2); }); isElementInViewport(el2); parent.window.addEventListener('mouseover', function() { isElementInViewportDwell(el3); }); setCookie('jdx1a6mdbb8la0n830e', setFreqCapCnt, 1); var threshold = 0.5 var elapsedTime = 0 var startOfElapsedTime = -1 // -1 means not started var tracked = 0; if (!parent.window['postMessage']) {} else { if (parent.window.addEventListener) { // For standards-compliant web browsers (ie9+) parent.window.addEventListener("message", ReceiveMessageAdserve, false); } else { //alert("not standards-compliant (ie8)"); parent.window.attachEvent("onmessage", ReceiveMessageAdserve); } } function ReceiveMessageAdserve(evt) { if (evt != undefined && evt.data != undefined) { if ((evt.data.toString().indexOf('expand') != undefined && evt.data.toString().indexOf('expand') != -1) || (evt.data.toString().indexOf('collapse') != undefined && evt.data.toString().indexOf('collapse') != -1)) { expandCollapse(evt.data); } else if (evt.data.toString().indexOf('screenshot') != undefined && evt.data.toString().indexOf('screenshot') != -1) { //screenShot(); } else if (evt.data.toString().indexOf('background') != undefined && evt.data.toString().indexOf('background') != -1) { var bgStr = evt.data.toString(); var bgClr = bgStr.substring(bgStr.indexOf('#'), bgStr.indexOf(';')); parent.document.getElementById('divTop').style.background = bgClr; } } } // End Function ReceiveMessage } //T_Interscroller_D