var com = window.com || {}; if(!window.com){ window.com = com; }; try{ }catch(e){debugger;} var adtechAdConfig = { "canvasId": 424787, "liveStatsEnabled": false, "servicesUrl": "", "dynamic": false, "templateId": 415608, "productFamilyId": 0, "formatId": 16, "servicesHosts": { "http": "", "https": "", "post": "" }, "adServerVars": { "uid": "1586281083838", "id": "424787", "bannerId": "_ADBNID_", "bannerUid": "_ADBNUID_", "networkId": "_ADNETID_", "subNetworkId": "_ADSUBNETID_", "creativeId": "0", "pageId": "_ADFC_PAGEID_", "placementId": "_ADCUID_", "adSize": "_ADFC_ADSIZE_", "servingProto": "https", "servingHost": "localhost", "sequenceId32": "_ADREFSEQUENCEID32_", "sequenceId64": "_ADREFSEQUENCEID64_", "secureAssetHost": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/fcd2b01f929a0f89989eb43f8331c0e3\/", "configBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/fcd2b01f929a0f89989eb43f8331c0e3\/", "assetBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/fcd2b01f929a0f89989eb43f8331c0e3\/", "baseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/fcd2b01f929a0f89989eb43f8331c0e3\/", "viewCounter": "", "campaignId": "_ADMCID_", "publisherId": "_ADWEBSITEID_", "externalId": "" }, "geoData": { "area": "_ADAREATEXT_", "city": "Amsterdam", "country": "_ADCOUNTRYTEXT_", "state": "Noord-Holland", "zip": "_ADZIPTEXT_" }, "tagVars": [ ], "preview": true, "pubVars": { "clickPixel": "", "iframeBusterPath": "", "clickRedirect": "", "overflowFixLevel": "0", "viewCountUrl": "", "overrideX": "", "overrideY": "", "closeTimeout": "0" }, "regs": { "gdpr": { "applies": "_ADGDPR_", "consent": "_ADCONSENT_" }, "ccpa": { "privacy": "_ADUSPRIVACY_" } }, "DeliveryServerTag": { "source": "_ADDCP(tag.srvsrc)_", "lineId": "_ADDCP(tag.srvlid)_", "creativeId": "_ADDCP(tag.srvcid)_", "variables": "_ADDCP(tag.vars:{})_" }, "clickRedirect": "", "assetContainers": { "main": { "type": "inlineDiv", "width": 1, "height": 1, "contentWidth": 1, "contentHeight": 1, "contentWidthUnit": "px", "contentHeightUnit": "px", "xRel": "adSlotLeft", "yRel": "adSlotTop", "x": 0, "y": 0, "renderEvent": "serve", "content": "index.html", "contentType": "html", "zIndex": 27001, "wmode": "opaque", "pluginVersion": 0, "contractedY": 0, "contractedX": 0, "contractedWidth": 1, "contractedHeight": 1, "isExpandable": true, "isCustomResponsive": true, "startContracted": true, "stickyX": false, "stickyY": false, "pushesContent": false, "expandAnimationDuration": 0, "contractAnimationDuration": 0, "closeTimeout": 0, "modal": false, "sequence": 1, "iframeBuster": "", "langVersion": 0 }, "floating": { "type": "floatingDiv", "width": 1, "height": 1, "contentWidth": 1, "contentHeight": 1, "contentWidthUnit": "px", "contentHeightUnit": "px", "xRel": "adSlotLeft", "yRel": "adSlotTop", "x": -100, "y": 100, "renderEvent": "serve", "content": "index2.html", "contentType": "html", "zIndex": 27002, "wmode": "transparent", "pluginVersion": 0, "contractedY": 0, "contractedX": 0, "contractedWidth": 1, "contractedHeight": 1, "isCustomResponsive": true, "isExpandable": true, "startContracted": true, "stickyX": false, "stickyY": false, "pushesContent": false, "expandAnimationDuration": 0, "contractAnimationDuration": 0, "closeTimeout": 0, "modal": false, "sequence": 1, "langVersion": 0 } }, "clickthroughs": { "default": { "id": 2579, "plid": "19820fb2c1c5cecacd4528a5bad3aa93", "dest": "https:\/\/www.adsolutions.com", "target": "_blank", "features": "" }, "backupImageClickthrough": { "id": 7703, "plid": "4d2c2cef5973417f3f03adc213a06d6d", "dest": "https:\/\/www.adsolutions.com", "target": "_blank", "features": "" }, "main": { "id": 16547, "plid": "37f1f67addb076058db521478e783928", "dest": "https:\/\/www.adsolutions.com", "target": "_blank", "features": "" } }, "contentVariables": { "Backup Alt Text": "Amex advertisement", "QRUrl": "" }, "contentProperties": { "initiallyStatic": false, "slotHeight": 700, "Backup image file": "", "Backup image clickthrough": "" }, "adrConfig": { "eventEndpoint": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}" }, "dataFeeds": [ ], "screenGrabs": [ ], "polls": [ ], "assets": [ { "id": "main", "name": "index.html", "url": "index.html" }, { "id": null, "name": "customAd.js", "url": "customAd.js" }, { "id": null, "name": "1x1.gif", "url": "1x1.gif" }, { "id": null, "name": "background.jpg", "url": "background.jpg" }, { "id": null, "name": "style.css", "url": "style.css" }, { "id": null, "name": "background_.jpg", "url": "background_.jpg" }, { "id": "main", "name": "index2.html", "url": "index2.html" }, { "id": null, "name": "logo_large.png", "url": "logo_large.png" }, { "id": null, "name": "hln.jpg", "url": "hln.jpg" } ], "events": [ { "id": 0, "plid": "850415b95f929ae311dc1d1d3f7f2bec", "name": "engagement", "cumulative": false, "interaction": true, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "c35dcf63748b2faf210d23745a8726b4", "name": "interactiveImpression", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "c9f6fe2c78d93485fb24a1ef9bf6c7ef", "name": "viewableImpression", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "49fcf58513758b38fec25dcf95efa15d", "name": "indeterminableViewability", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "7f0b290802215582ce37ccee46549ad7", "name": "expand", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "96875f3fdd120a3a4d8905fc30b4649e", "name": "autoExpand", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "a61ed805bc03915a171c015f73358756", "name": "contract", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "c10258071c4eeb2cfe7888cdddf2c3e7", "name": "close", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "8d950c792a94bcfbb7bc6d9005b32410", "name": "show", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "0f29323080961ce49eed7c51eb377464", "name": "hide", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "86085c297e6923af029c92bd378e157f", "name": "reload", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "a0ec400fd7bfbb0234529c78e0d88f13", "name": "backupView", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "8afd9cf75017beeb04259947c2f58b45", "name": "backupViewableImpression", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "3259edcfc16006f28dc895ed8336d54e", "name": "allMostInScrollPosition", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "60e9b6005ed9c13420635a17533fbb68", "name": "inScrollPosition", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "212c5144d6f1d8401e6429f940a1a1c8", "name": "scrolling", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "ec86cc7ed30fe8aae01b3f933ed8a809", "name": "outOffScrollPosition", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "186f9f929481f4f7b7e4ea9440eda05f", "name": "partlyInView", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "cb973f7e98a664cc835a2caf5fbd2877", "name": "notPlaceraHomePage", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 0, "plid": "ae171a84675cdec5a7665ad78e9d2bdc", "name": "Video Play", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "22357481e5ab6f595a45b2b3e09183de", "name": "Video Start", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "e37ebe31df0629b9a236f0e9afa79d4a", "name": "Video First Quartile", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "16e9d5692317063bf4c8e9402c3c33f2", "name": "Video Midpoint", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "4b88378395c59cc127a13334a70d2b73", "name": "Video Third Quartile", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "abbfcf5a93bf41904ee7e46fb2c0d63a", "name": "Video Complete", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "8e6c8d2a2646d235bd49f5095c421454", "name": "Video Mute", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "be7afffaeffa31d5b163bfa245aa07f1", "name": "Video Unmute", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "2a9b204a26b5344ef9ebc7ec28724862", "name": "Video Pause", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "4d8b80a0f72b4316b8731fef925039e4", "name": "Video Replay", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "55bacb8f73f0768cfa8e2f35bc06c03c", "name": "Video Resume", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "062137e9ab26e01d31cb00d5d1c34a04", "name": "Video Seek", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "77e17c385c650d4b0ad578dbca2249ba", "name": "Video Fullscreen", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 1, "plid": "b4f6905b2b799d7b72dea06c317b6d79", "name": "updatePercentage", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false }, { "id": 1, "plid": "e590b7034f9a6568202fae9bb3156a6f", "name": "inviewPercentage", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": false } ], "timers": [ { "id": 0, "plid": "9e2cc5168834ac4024fd04d15301dd7d", "name": "displayTimer" }, { "id": 0, "plid": "a292c5fb89ef5b03a9fcdb861d430814", "name": "viewTimer" }, { "id": 0, "plid": "4156b82ad1b06efe75b026c5b9c8c361", "name": "engagementTimer" }, { "id": 0, "plid": "ac893edcdd42b26a64ce4d4ef9967b16", "name": "interactionTimer" } ], "eventHandlers": [ { "name": "close", "target": "floating", "source": "*", "action": "close" }, { "name": "show", "target": "floating", "source": "*", "action": "show" }, { "name": "contract", "target": "floating", "source": "*", "action": "contract" }, { "name": "hide", "target": "floating", "source": "*", "action": "hide" }, { "name": "reload", "target": "floating", "source": "*", "action": "reload" }, { "name": "expand", "target": "main", "source": "*", "action": "expand" }, { "name": "autoExpand", "target": "main", "source": "*", "action": "expand" }, { "name": "contract", "target": "main", "source": "*", "action": "contract" } ], "thirdPartyTracking": [ { "id": 1, "type": "1_PIXEL", "url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=19820fb2c1c5cecacd4528a5bad3aa93", "secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=19820fb2c1c5cecacd4528a5bad3aa93", "onEvent": "SPECIFIC_CLICK", "eventName": "default" }, { "id": 2, "type": "1_PIXEL", "url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=4d2c2cef5973417f3f03adc213a06d6d", "secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=4d2c2cef5973417f3f03adc213a06d6d", "onEvent": "SPECIFIC_CLICK", "eventName": "backupImageClickthrough" }, { "id": 3, "type": "1_PIXEL", "url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=37f1f67addb076058db521478e783928", "secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=37f1f67addb076058db521478e783928", "onEvent": "SPECIFIC_CLICK", "eventName": "main" }, { "id": 4, "type": "1_PIXEL", "url": "", "secureUrl": "", "onEvent": "SPECIFIC_EVENT", "eventName": "viewableImpression" } ], "contentHubConfig": { "mapping": [ ], "assets": [ ] }, "fallback": "1x1.gif", "defaultClick": "default" }; /*debugger;*/ if(window.adtechAdConfig){ if(window.adtechAdConfig.clickthroughs && window.adtechAdConfig.clickthroughs["default"] && window.adtechAdConfig.clickthroughs["default"].dest && window.adtechAdConfig.clickthroughs["default"].dest.length>0){ for(var i in window.adtechAdConfig.clickthroughs){ if(i == "default"){ continue; } if(window.adtechAdConfig.clickthroughs[i].dest.length == ""){ window.adtechAdConfig.clickthroughs[i].dest = window.adtechAdConfig.clickthroughs["default"].dest; } } } }; /** * Boilerplate code required to hook into the ADTECH rich media library. * * For API documentation, please contact canvas-help@adtech.com */ if(false){ ADTECH.event('allMostInScrollPosition'); ADTECH.event('inScrollPosition'); ADTECH.event('scrolling'); ADTECH.event('outOffScrollPosition'); ADTECH.event('partlyInView'); ADTECH.event('close'); ADTECH.event('updatePercentage'); ADTECH.event('inviewPercentage'); ADTECH.event('notPlaceraHomePage'); ADTECH.getContent('initiallyStatic',false); ADTECH.getContent('slotHeight','0'); } adtechAdConfig.assetContainers.main.isExpandable = true;//to bust iframe //adtechAdConfig.adServerVars.campFCInfo = "0"; //adtechAdConfig.adServerVars.campFCInfo = 1; adtechAdConfig.adServerVars.campFCInfo = "0"; if(adtechAdConfig.assetContainers.floating){ adtechAdConfig.assetContainers.floating.renderEvent = ""; } (function(adConfig) { var requiresBreakout = false; if (!adConfig.overrides || adConfig.overrides.displayWindowTarget != self) { for (var id in adConfig.assetContainers) { if (adConfig.assetContainers.hasOwnProperty(id)) { var container = adConfig.assetContainers[id]; if (container.type != 'inlineDiv' || container.isExpandable) { requiresBreakout = true; break; } } } } if (adConfig.overrides && adConfig.overrides.displayWindowTarget) { var displayWindowTarget = adConfig.overrides.displayWindowTarget; displayWindowTarget = (typeof adtechIframeHashArray != 'undefined' && self != top) ? displayWindowTarget.parent : displayWindowTarget; } else { var calculatedTarget = null; var currentWindow = parent; while (currentWindow != undefined) { try { var targetDoc = currentWindow.document; if (targetDoc) { calculatedTarget = currentWindow; } } catch(e) {} currentWindow = (currentWindow == top) ? null : currentWindow.parent; } var displayWindowTarget = calculatedTarget || top; } var targetIsFriendly = false; try { var targetDoc = displayWindowTarget.document; if (targetDoc) { targetIsFriendly = true; } } catch(e) {} var targetWindow = (requiresBreakout && (self != top && targetIsFriendly)) ? displayWindowTarget : self; targetWindow.com = targetWindow.com || {}; targetWindow.com.adtech = targetWindow.com.adtech || {}; targetWindow.com.adtech.AdtechCustomAd$AD_ID$ = function() { // Custom code class constructor. }; var win = targetWindow; var doc = win.document; var animSF = (win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.msRequestAnimationFrame || function(cb){setTimeout(cb,16);}); !(function(){ var tmoId = setTimeout(function(){ animSF=function(cb){setTimeout(cb,16);}; },50); animSF(function(){ clearTimeout(tmoId); }); })(); var isS = function(v){ if(typeof(v) != 'undefined' && v != null) return true; return false; } var getComputedStyle = function(el, cssprop,doc){ try{ if (document.defaultView && document.defaultView.getComputedStyle) return document.defaultView.getComputedStyle(el, "")[cssprop] else if (el.currentStyle) //IE return el.currentStyle[cssprop] }catch(e){ } return el.style[cssprop] } function Policies(){ this.policies = []; this.cachePolicy = null; this.defaultPolicy = {}; } !function(){ var pt = Policies.prototype; pt.addPolicy = function(pol){ pol.$owner = this; this.policies.push(pol); } pt.resolvePolicy = function(domain,prop){ if(arguments.length == 1 && isS(this.cachePolicy)){ return this.cachePolicy; } if(arguments.length == 1 || !prop) prop = 'domain'; for(var i=0;i0){ params+= ';'; } params+= 'ckey'+(i+1)+'='+keys[i]; if(i=0){ params += 'expiresSession=1'; }else{ var ex = parseInt(expire,10); if(!isNaN(ex)){ if(expire.indexOf('d')>=0){ params += 'expiresDays='+ex; }else if(expire.indexOf('s')>=0){ params += 'expiresSecs='+ex; } } } }else{ params += 'expiresDays='+expire; } } bindReq.src = doc.location.protocol+"//adserver.adtech.de/bind?"+params+";adct=204;misc="+(Math.round(Math.random()*0xFFFFFFFF)); } var policies = new Policies(); policies.addPolicy({ domain:/.*((adsolutions\.(nl|com))\/(.*url=(hln)02.*)+|(m\.hln\.be))/i, initConfig:function(cnf){ //cnf.assetContainers.main.renderEvent = ""; cnf.pubVars.overflowFixLevel = 2; }, init:function(advrt){ !function(){ var counter = 0; var rty = 0; setTimeout(function(){ //var elm = top.document.getElementById('imu--1'); if((!advrt.container) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } advrt.container.anchorDiv.style.zIndex = '9999'; //this.pageResize(advrt); },0); }(); } });policies.addPolicy({ domain:/.*((adsolutions\.(nl|com))\/(.*url=(hln)01.*)+|(www\.hln\.be))/i, initConfig:function(cnf){ //cnf.assetContainers.main.renderEvent = ""; }, init:function(advrt){ !function(){ var counter = 0; var rty = 0; setTimeout(function(){ var ifrm = self.frameElement; var elm = doc.getElementById('page-main-content'); var cont = doc.getElementsByClassName('page-content')[0]; if((!ifrm || !cont || !advrt.container.anchorDiv) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } advrt.container.anchorDiv.style.zIndex = 1; ifrm.style.width = advrt.container.div.clientWidth+'px'; ifrm.style.height = advrt.container.div.clientHeight+'px'; ifrm.style.position = 'absolute'; ifrm.style.display = 'inline-block'; ifrm.style.left = '50%'; ifrm.style.transform = 'translateX(-50%)'; advrt.container.anchorDiv.style.zIndex = 1; advrt.container.anchorDiv.style.margin = 'initial'; },0); }(); }, getViewportDims:function(advrt){ /*var dims = advrt.utils.getViewportDims(); elm = doc.getElementsByClassName('col-wrapper')[0]; if(elm){ dims.w = elm.clientWidth; } return dims;*/ }, getPageOffsets:function(advrt){ }, processDims:function(advrt, pos){ /*elm = doc.getElementsByClassName('col-wrapper')[0]; //var contDims = elm.getBoundingClientRect(); if(elm){ pos.x = 0; } //advrt.container.anchorDiv.style.left = contDims.left+'px'; */ }, pageResize:function(advrt){ } });policies.addPolicy({ domain:/.*((adsolutions\.(nl|com))\/(.*url=(hln)01.*)+|(demorgen\.be))/i, initConfig:function(cnf){ cnf.assetContainers.main.renderEvent = ""; }, init:function(advrt){ !function(){ var counter = 0; var rty = 0; setTimeout(function(){ var elm = top.document.getElementsByClassName('app-navigation')[0]; if((!elm) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } elm.parentNode.insertBefore(advrt.container.anchorDiv, elm.nextSibling); advrt.container.render(); advrt.container.anchorDiv.style.zIndex = 1; },0); }(); }, getViewportDims:function(advrt){ var dims = advrt.utils.getViewportDims(); elm = doc.getElementsByClassName('app-navigation__sections')[0]; if(elm){ dims.w = elm.clientWidth; } return dims; }, getPageOffsets:function(advrt){ }, processDims:function(advrt, pos){ elm = doc.getElementsByClassName('app-navigation__sections')[0]; if(elm){ var dims = doc.getElementsByClassName('app-navigation__sections')[0].getBoundingClientRect(); pos.x = 0; advrt.container.anchorDiv.style.left = dims.left+'px'; } }, updateScroll:function(advrt, pos){ }, pageScroll:function(advrt){ }, stoppedScrolling:function(advrt){ this.pageScroll(advrt); }, handleScrollAni:function(advrt){ this.pageScroll(advrt); }, render:function(advrt){ }, pageResize:function(advrt){ } }); policies.addPolicy({ domain:/.*((adsolutions\.(nl|com))\/(.*url=(hln)01.*)+|(7sur7\.be))/i, initConfig:function(cnf){ //cnf.assetContainers.main.renderEvent = ""; }, init:function(advrt){ !function(){ var counter = 0; var rty = 0; setTimeout(function(){ var ifrm = self.frameElement; var elm = doc.getElementById('page-main-content'); var cont = doc.getElementsByClassName('page-content')[0]; if((!ifrm || !cont) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } ifrm.style.width = advrt.container.div.clientWidth+'px'; ifrm.style.height = advrt.container.div.clientHeight+'px'; ifrm.style.position = 'absolute'; ifrm.style.display = 'inline-block'; ifrm.style.left = '50%'; ifrm.style.transform = 'translateX(-50%)'; //ifrm.style.top = -advrt.container.div.clientHeight+'px'; advrt.container.anchorDiv.style.zIndex = 1; advrt.container.anchorDiv.style.margin = 'initial'; },0); }(); }, getViewportDims:function(advrt){ /*var dims = advrt.utils.getViewportDims(); elm = doc.getElementsByClassName('col-wrapper')[0]; if(elm){ dims.w = elm.clientWidth; } return dims;*/ }, getPageOffsets:function(advrt){ }, processDims:function(advrt, pos){ /*elm = doc.getElementsByClassName('col-wrapper')[0]; if(elm){ //var dims = doc.getElementsByClassName('col-wrapper')[0].getBoundingClientRect(); pos.x = 0; //advrt.container.anchorDiv.style.left = dims.left+'px'; }*/ }, updateScroll:function(advrt, pos){ }, pageScroll:function(advrt){ }, stoppedScrolling:function(advrt){ //this.pageScroll(advrt); }, handleScrollAni:function(advrt){ //this.pageScroll(advrt); }, render:function(advrt){ }, pageResize:function(advrt){ } }); var pol = policies.resolvePolicy(doc.location.href); if (isS(pol) && isS(pol.initConfig)) { pol.initConfig(adConfig); } targetWindow.com.adtech.AdtechCustomAd$AD_ID$.prototype = { /** * Entry point methods. * * Automatically invoked by the rich media library when the library API is * available to use, and the Advert instance has been instantiated. */ preInit: function() { window.com = com || {}; com.adtech = targetWindow.com.adtech; var origRenderCont = com.adtech.HtmlContent_3_3_0.prototype.renderContent; com.adtech.HtmlContent_3_3_0.prototype.renderContent = function(){ this.origContainerObject = this.containerObject; this.containerObject = this.origContainerObject.appendChild(doc.createElement("div")); this.containerObject2 = this.containerObject; this.containerObject = this.containerObject2.appendChild(doc.createElement("div")); origRenderCont.apply(this, arguments); } com.adtech.HtmlContent_3_3_0.prototype.renderContent.origRenderCont = origRenderCont; }, init: function(advert) { this.container = advert.getAssetContainer('main'); if(advert.getAssetContainer('floating')){ this.layer = advert.getAssetContainer('floating'); this.layer.render = function(){ var holderDiv = this.div = this.content.containerObject = this.anchorDiv.appendChild(this.anchorDiv.ownerDocument.createElement('div')); this.div.style.width = '100%'; this.div.style.height = '100%'; this.div.style.position = 'absolute'; var origRenderCont = com.adtech.HtmlContent_3_3_0.prototype.renderContent.origRenderCont; this.content.renderContent = function(){ this.containerObject = holderDiv; origRenderCont.apply(this, arguments); this.contentObject.style.width = '100%'; this.contentObject.style.height = '100%'; }; this.content.render(); this.addMouseListeners(); } } this.slotHeight = advert.getContent('slotHeight','0'); if(adConfig.assetContainers.main.disabled){ advert.reportEvent('notPlaceraHomePage'); if(this.container && this.container.anchorDiv){ this.container.anchorDiv.style.display = 'none'; } return; } if (!advert.richView) { // The backup client can not render the rich version of the advert. return; } // A few useful things to help you get started. Please delete as necessary! this.advert = advert; this.utils = com.adtech.Utils_3_3_0; this.globalEventBus = targetWindow.adtechAdManager_3_3_0.globalEventBus; this.richMediaEvent = com.adtech.RichMediaEvent_3_3_0; this.policy = pol; this.policies = [pol]; this.closed = false; /* * This is how you listen for your custom events. * ADTECH.close() is actually just an alias of ADTECH.event('close'). */ advert.eventBus.addEventListener('close', this.utils.createClosure(this, this.closeHandler)); if (this.container.rendered) { this.renderEventHandler(); }else{ this.container.addEventListener('render', this.renderEventHandler, this); } /* * Want to wait until the DOM or the page has loaded? No problem! */ if (this.globalEventBus.pageLoaded) { this.pageLoadHandler(); } else { this.globalEventBus.addEventListener(this.richMediaEvent.PAGE_LOAD, this.utils.createClosure(this, this.pageLoadHandler)); } /* MRAID DEBUGGER this.dbg = doc.body.appendChild(doc.createElement('div')); this.dbg.style.position = 'fixed'; this.dbg.style.left = '0px'; this.dbg.style.top = '0px'; this.dbg.style.width = '100%'; this.dbg.style.height = '100%'; this.dbg.style.backgroundColor = 'rgba(255,255,255,.6)'; document.body.style.backgroundColor = 'purple'; xDebug = ""; this.updateDBG = function(mess){ /*var xDebug = "is top: "+ (self == top)+"
"; xDebug += "parentId: "+this.container.anchorDiv.parentNode.id+"
"; xDebug += "parentStyle: "+this.container.anchorDiv.parentNode.cssText+"
"; xDebug += "height: "+this.container.anchorDiv.clientHeight+"
"; xDebug += "loaction: "+location.href+"
"; xDebug += "check has mraid: "+(typeof(mraid) ) +" "+typeof(top.mraid)+"
"; xDebug += "dump: "+document.documentElement.innerHTML; xDebug += mess + "
"; this.dbg.innerHTML = xDebug; } this.updateDBG.bind(this); */ if(win.mraid){ //document.body.style.backgroundColor = 'yellow'; var t=this; //t.updateDBG("starting mraid mode, state is: "+mraid.getState()); var initMraid = function(){ //document.body.style.backgroundColor = 'green'; //t.updateDBG("mraid ready "+mraid.getState()+" "+mraid.getVersion()); //mraid.useCustomClose(); var curPos = mraid.getCurrentPosition(); var maxSize = mraid.getMaxSize(); var screenSize = mraid.getScreenSize(); //t.updateDBG("curPos "+curPos.x+" "+curPos.y+" scrS "+screenSize.width+" "+screenSize.height +" "+maxSize.height); setTimeout(function(){ var curPos = mraid.getCurrentPosition(); var maxSize = mraid.getMaxSize(); var screenSize = mraid.getScreenSize(); //t.updateDBG("curPos "+curPos.x+" "+curPos.y+" scrS "+screenSize.width+" "+screenSize.height +" "+maxSize.height); },1000); //mraid.setResizeProperties({offsetX:-curPos.x,offsetY:0,width:screenSize.width,height:250}); //mraid.resize(); mraid.setResizeProperties({offsetX:0,offsetY:0,width:320,height:500}); mraid.resize(); //t.container.anchorDiv.style.height = screenSize.height+'px'; //t.container.anchorDiv.style.width = screenSize.width+'px'; setInterval(function(){ var curPos2 = mraid.getCurrentPosition(); //t.container.anchorDiv.style.top = (-curPos2.y)+'px'; },30); } if (mraid.getState() === 'loading') { mraid.addEventListener('ready', initMraid); } else { initMraid(); } }else{ this.globalEventBus.addEventListener(this.richMediaEvent.PAGE_RESIZE,this.pageResizeHandler,this); this.globalEventBus.addEventListener(this.richMediaEvent.PAGE_SCROLL,this.pageScrollHandler,this); this.globalEventBus.addEventListener(this.richMediaEvent.ORIENTATION_CHANGE,this.pageResizeHandler,this); //DESKTOP APPLE CHROME CLICK FIX /* this.container.anchorDiv.addEventListener("mouseenter", function(){ this.container.anchorDiv.style.pointerEvents = 'all'; }); this.container.anchorDiv.addEventListener("mouseleave", function(){ this.container.anchorDiv.style.pointerEvents = 'none'; });*/ } this.callPolicies('init'); }, getViewportDims:function(){ var ret = {val:null}; if(this.callPolicies('getViewportDims', null, ret)){ return ret.val || this.utils.getViewportDims(); } return this.utils.getViewportDims(); }, getPageOffsets:function(){ var ret = {val:null}; if(this.callPolicies('getPageOffsets', null, ret)){ return ret.val || this.utils.getPageOffsets(); } return this.utils.getPageOffsets(); }, getYOffset:function(){ var ldims = this.getViewportDims(); var sdims = this.utils.getViewportDims(); return sdims.h - ldims.h; }, callPolicies: function (meth, args, ret) { if (!isS(args) || arguments.length == 1) args = [this]; var handled = false; for (var i = 0; i < this.policies.length; i++) { if (isS(this.policies[i])) { if (isS(this.policies[i][meth])) { var r = this.policies[i][meth].apply(this.policies[i], args); if(ret){ ret.val = r; } handled = true; } } } return handled; }, /********************************************************* * * Create your instance methods below. * * Please remember not to add a trailing comma to you last * method - IE will not like that! * *********************************************************/ renderEventHandler:function(){ /*this.div = doc.body.appendChild(doc.createElement('div')); this.div.style.height = this.div.style.width = '50px'; this.div.style.position = 'fixed'; this.div.style.left = '15px'; this.div.style.top = '7px'; this.div.style.backgroundColor = 'orange'; this.div.style.transfrom = 'translateZ(0)'; this.div.style.zIndex = 10000; this.div.onclick = function(){ var off = this.utils.getPageOffsets(); win.scrollTo(0,off.y-25); }.bind(this); this.div2 = doc.body.appendChild(doc.createElement('div')); this.div2.style.height = this.div2.style.width = '50px'; this.div2.style.position = 'fixed'; this.div2.style.left = '15px'; this.div2.style.top = '60px'; this.div2.style.backgroundColor = 'orange'; this.div2.style.transfrom = 'translateZ(0)'; this.div2.style.zIndex = 10000; this.div2.onclick = function(){ var off = this.utils.getPageOffsets(); win.scrollTo(0,off.y+25); }.bind(this);*/ this.header = this.container.div.appendChild(doc.createElement('div')); this.header.style.position = 'absolute'; this.header.style.left = '0px'; this.header.style.top = '0px'; this.header.style.width = '100%'; this.header.style.height = '12px'; this.header.style.lineHeight = '13px'; this.header.style.color = 'white'; this.header.style.textAlign = 'center'; this.header.style.backgroundColor = 'rgba(0,0,0,0.4)'; //this.header.style.boxShadow = '0px 3px 4px 3px rgba(0,0,0,.4)'; //this.header.style.transfrom = 'translateZ(0)'; this.header.style.fontSize = '8px'; this.header.style.fontFamily = 'Helvetica, Arial, sans-serif'; this.header.style.verticalAlign = 'middle'; this.header.style.opacity=1; /*this.header.style.transitionDuration='1s'; this.header.style.transitionProperty='opacity';*/ //this.header.style.zIndex =2; this.header.innerHTML = "ADVERTISEMENT"; //debugger; //this.layer = this.container.div.appendChild(targetWindow.com.adtech.AssetContainer_3_3_0.ANCHOR_ID_PREFIX + adtechAdConfig.adServerVars.id + "_" + adtechAdConfig.adServerVars.uid); /*this.scrollAni = this.container.div.appendChild(doc.createElement('div')); this.scrollAni.style.position = 'absolute'; this.scrollAni.style.right = '4px'; this.scrollAni.style.bottom = '15%'; this.scrollAni.style.width = '32px'; this.scrollAni.style.height = '32px'; this.scrollAni.style.webkitTransitionDuration = '1s'; this.scrollAni.style.transitionDuration = '1s'; this.scrollAni.style.backgroundImage = "url('"+adConfig.adServerVars.assetBaseURL+'scrolllogo.png'+"')"; this.scrollAni.style.backgroundSize = "cover"; this.scrollAni.style.transform = "scale(1)"; this.scrollAni.style.pointerEvents = 'none';*/ //this.scrollAni.style.zIndex =3; var t = this; //this.container.anchorDiv.style.transform = 'translateZ(0px)'; /*this.container.anchorDiv.style.display= 'none'; this.container.anchorDiv.style.position = 'absolute'; setTimeout(function(){ t.container.anchorDiv.style.display= 'inline-block'; t.container.anchorDiv.style.position = 'relative'; },15);*/ /*var del = function(){ t.scrollAniTmo = setTimeout(function(){ t.scrollAni.style.bottom = '8px'; t.scrollAni.style.transform = "scale(.9)"; t.scrollAniTmo = setTimeout(function(){ t.scrollAni.style.webkitTransitionDuration = '0s'; t.scrollAni.style.transitionDuration = '0s'; t.scrollAniTmo = setTimeout(function(){ t.scrollAni.style.bottom = '15%'; t.scrollAni.style.transform = "scale(1)"; t.scrollAni.style.webkitTransitionDuration = '1s'; t.scrollAni.style.transitionDuration = '1s'; t.scrollAniTmo = setTimeout(function(){ del(); },120); },60); },850); },60); }; del();*/ /*this.clearAni = function(){ clearTimeout(t.scrollAniTmo); t.scrollAni.style.opacity = 0; setTimeout(function(){ t.scrollAni.style.display = 'none'; },1200); } setTimeout(function(){ t.clearAni(); },5500);*/ /*setTimeout(function(){ t.isUnLocked = true; },1000);*/ this.footer = this.container.div.appendChild(doc.createElement('div')); this.footer.style.position = 'absolute'; this.footer.style.left = '0px'; this.footer.style.bottom = '0px'; this.footer.style.width = '100%'; this.footer.style.height = '12px'; this.footer.style.backgroundColor = 'rgba(0,0,0,0.4)'; //this.footer.style.boxShadow = '0px -3px 4px 3px rgba(0,0,0,1)'; //this.footer.style.transfrom = 'translateZ(0)'; this.footer.style.fontFamily = 'Helvetica, Arial, sans-serif'; this.footer.style.verticalAlign = 'middle'; this.footer.style.textAlign = 'center'; this.footer.style.fontSize = '8px'; this.footer.style.lineHeight = '13px'; //this.footer.style.letterSpacing = '2.5px'; this.footer.style.color = 'white'; //this.footer.style.paddingBottom = "3px"; this.footer.style.opacity=1; /*this.footer.style.display = 'flex'; this.footer.style.justifyContent = 'center'; this.footer.style.flexDirection = 'column'; this.footer.style.textAlign = 'center'; this.footer.style.alignItems = 'center';*/ //this.footer.style.lineHeight = '14px'; /*this.footer.style.transitionDuration='1s'; this.footer.style.transitionProperty='opacity';*/ //this.footer.style.zIndex =2; this.footer.innerHTML = "End of advertisement"; //needed for adprofit desktop on placera, todo find good place for custom markup /*this.footer.style.height = '20px'; this.footer.style.lineHeight = '18px'; this.footer.style.fontSize = '18px'; this.header.innerHTML += ' - '+this.footer.innerHTML;*/ if(this.layer){ this.layer.render(); } //IOS CHROME CLICK ISSUE WORKAROUND /*this.clickDiv = this.container.anchorDiv.appendChild(doc.createElement("div")); this.clickDiv.style.position = 'absolute'; this.clickDiv.style.top = '0px'; this.clickDiv.style.width = '100%'; this.clickDiv.style.height = '100%'; this.clickDiv.style.cursor = 'pointer'; this.muteDiv = this.clickDiv.appendChild(doc.createElement("div")); this.unmuteDiv = this.clickDiv.appendChild(doc.createElement("div")); var t=this; this.clickDiv.onclick = function(){ t.advert.executeClick('main'); } for(i=0;i0) animSF(arguments.callee); }); }, pageLoadHandler: function() { // The page has now loaded. Feel free to display an awesome advert. }, pageResizeHandler:function(){ if(this.closed) return; var dims = this.getViewportDims(); var dims2 = {}; for(var i in dims){ dims2[i] = dims[i]; } if(this.slotHeight != 0){ dims.h = this.slotHeight; } //this.container.style.width = dims.w+'px'; this.container.anchorDiv.style.minWidth = dims.w+'px'; this.container.anchorDiv.style.height = dims.h+'px'; //this.slotHeight+'px'; this.container.anchorDiv.style.minHeight = dims.h+'px'; //this.slotHeight+'px'; this.container.anchorDiv.style.zIndex = 1; //this.container.anchorDiv.style.border = '1px solid green'; var pos; if(this.container.anchorDiv.getBoundingClientRect){ var tmpPos = this.container.anchorDiv.getBoundingClientRect(); var off = this.getPageOffsets(); pos = {x:tmpPos.left+off.x,y:tmpPos.top+off.y}; }else{ pos = this.utils.calculateAbsolutePosition(this.container.anchorDiv); } /*var par = this.container.anchorDiv.parentNode; while(par){ if(par.style){ var pad = parseFloat(getComputedStyle(par,'paddingLeft')); var mar = parseFloat(getComputedStyle(par,'marginLeft')); if(!isNaN(mar)){ pad += mar; } if(!isNaN(pad)){ pos.x += pad; } } par = par.parentNode; }*/ //need policies //pos.x -= 15; this.callPolicies('processDims', [this,pos, dims]); this.abs = pos; this.abs.y -= this.getYOffset(); var changed = (!this.dims) ? true : false; for(var i in this.dims){ if(this.dims[i] != dims[i]){ changed = true; break; } } if(changed){ this.dims = dims; this.container.div.style.width = dims.w+'px'; this.container.div.style.height = dims.h+'px'; this.container.div.style.left = (-pos.x)+'px'; this.container.div.style.right = 'auto'; this.container.div.style.top = '0px'; //this.container.anchorDiv.style.overflow = 'hidden'; //this.container.anchorDiv.style.zIndex = 0xFFFFFFFF; this.container.anchorDiv.style.zIndex = 1; if(this.container.content.contentObject.clientWidth>0){ if(this.header) this.header.style.minWidth = this.container.content.contentObject.clientWidth+'px'; if(this.footer) this.footer.style.minWidth = this.container.content.contentObject.clientWidth+'px'; } this.container.div.style.position = 'absolute'; //this.container.div.style.clip = 'rect(auto, auto, auto, auto)'; //this.container.div.style.clip = 'rect(0px, '+dims.w+'px'+', '+(dims.h)+'px'+', '+(-pos.x)+'px'+')'; this.container.div.style.overflow = 'hidden'; //this.container.div.style.border = '1px solid black'; this.container.div.style.transfrom = 'translateZ(0)'; this.container.div.style.clipPath = 'inset(0px)'; //debugger; this.container.div.style.clip = 'rect(0px, '+(dims.w)+'px'+', '+(dims.h)+'px'+', '+(-pos.x)+'px'+')'; //this.clickDiv.style.left = -pos.x+'px'; var absPos = this.utils.calculateAbsolutePosition(this.container.div); this.container.content.containerObject2.style.width = dims2.w+'px'; this.container.content.containerObject2.style.height = dims2.h+'px'; //this.slotHeight)+'px';//(dims2.h+2)+'px'; this.container.content.containerObject2.style.position = 'fixed'; //this.container.content.contentObject.style.position = 'absolute'; this.container.content.containerObject2.style.top = '1px'; //this.container.content.containerObject2.style.left = absPos.x+'px'; //this.container.content.contentObject.style.zIndex = 1; this.container.content.containerObject2.style.transfrom = 'translateZ(0)'; //this.container.content.contentObject.style.display = 'none'; this.container.content.containerObject.style.position = 'absolute'; this.container.content.containerObject.style.left = '0px'; this.container.content.containerObject.style.right = '0px'; this.container.content.containerObject.style.top = '0px'; this.container.content.containerObject.style.bottom = '0px'; this.container.content.containerObject.style.overflow = 'hidden'; this.container.content.containerObject2.style.webkitTransform = 'translate3d(0,0,0)'; this.container.content.containerObject2.style.transform = 'translate3d(0,0,0)'; this.container.content.containerObject2.style.msTransform = 'translate3d(0,0,0)'; this.container.content.contentObject.style.width = dims2.w+'px'; this.container.content.contentObject.style.height = dims2.h+'px'; //this.slotHeight)+'px';//(dims2.h+2)+'px'; if(this.layer && this.layer.div){ this.layer.div.style.width = dims2.w+'px'; var t = this; var x = 0; !function(){ if(t.footer.clientHeight == 0 && x <= 25){ setTimeout(arguments.callee,100); x += 1; }else{ t.layer.div.style.height = (dims.h - (t.footer.clientHeight + t.header.clientHeight))+'px'; t.layer.div.style.top = t.header.clientHeight+'px'; t.layer.div.style.left = -pos.x+'px'; } }(); }else{ } //console.log("changed dims"); } //var absPos = this.container.div.getBoundingClientRect(); //this.container.content.contentObject.style.transform = 'translateZ(0)'; //this.container.div.style.clipPath = this.container.content.contentObject.style.clipPath = 'inset('+Math.max(0,absPos.top)+'px 0px '+Math.max(0,this.container.content.contentObject.clientHeight-absPos.bottom)+'px 0px)'; this.callPolicies('pageResize'); }, pageScrollHandler:function(){ if(this.closed) return; /*requestAnimationFrame(function(){ var off = this.utils.getPageOffsets(); this.div.style.top = off.y+'px'; this.container.content.contentObject.style.top = ((off.y-this.abs.y))+'px'; }.bind(this));*/ ////console.log('scroll'); if(this.cancelHandle){ this.cancelHandle = false; return; } this.isScrolling = true; /*if(!this.isAutoScrolling && this.isUnLocked){ //this.clearAni(); }*/ var sdim = this.getViewportDims(); var off = this.getPageOffsets(); this.lastOff = this.off; this.off = off; var relOff = off.y-this.abs.y; var relOffA = Math.abs(relOff); var elmTop = this.abs.y; var elmBottom = this.abs.y+this.container.div.clientHeight; var windowTop = off.y; var windowBottom = windowTop+sdim.h; var totalHeight = Math.max(elmBottom, windowBottom) - Math.min(elmTop, windowTop); var wComp = totalHeight - sdim.h; var elementPx = this.container.div.clientHeight - wComp; var elementPercentage = Math.min(Math.max(0,((elementPx)/this.container.div.clientHeight)*100),100) if(elementPercentage > 50){ this.container.dispatchInViewportEvent(); }else{ this.container.dispatchOutViewportEvent(); } this.advert.eventBus.dispatchEvent(new this.richMediaEvent('updatePercentage').property('perc', off)); this.advert.eventBus.dispatchEvent(new this.richMediaEvent('inviewPercentage').property('adPerc', elementPercentage)); if(this.container.content.containerObject2.style.position != 'fixed') this.container.content.containerObject2.style.position = 'fixed'; clearTimeout(this.stopScrlTmo); this.stopScrlTmo = setTimeout(this.utils.createClosure(this,function(){ this.pageResizeHandler(); this.stoppedScrolling(); }),230); this.pageResizeHandler(); if(relOffA<260){ /*if(off.y>this.abs.y && this.off.y>this.lastOff.y){ this.container.div.style.top = (relOff)+'px'; this.container.div.style.height = (this.dims.h+(relOffA))+'px'; }else if(off.ythis.abs.y+relOffA+this.dims.h){ ////console.log("reset"); //this.container.div.style.top = '0px'; //this.container.div.style.height = (this.dims.h)+'px'; } this.callPolicies('pageScroll'); var browser = window.navigator.userAgent; var msie = browser.indexOf('MSIE '); var trident = browser.indexOf('Trident/'); var edge = browser.indexOf('Edge/'); var t=this; if(msie > 0 || trident > 0 || edge > 0){ t.container.content.containerObject.style.cssText += ';transform:rotateZ(0deg)' t.container.content.containerObject.offsetHeight t.container.content.containerObject.style.cssText += ';transform:none' this.container.content.containerObject.style.cssText += ';transform:rotateZ(0deg)' this.container.content.containerObject.offsetHeight this.container.content.containerObject.style.cssText += ';transform:none' setTimeout(function(){ t.container.content.containerObject.style.cssText += ';transform:rotateZ(0deg)' t.container.content.containerObject.offsetHeight t.container.content.containerObject.style.cssText += ';transform:none' }(),4000) } }, stoppedScrolling:function(){ if(this.closed) return; this.isScrolling = false; var off = this.getPageOffsets(); var sdim = this.getViewportDims(); var relOff = off.y-this.abs.y; ////console.log(relOff+' '+off.y+' '+this.abs.y); var relOffA = Math.abs(relOff); if(relOffA<150){ this.advert.eventBus.dispatchEvent('allMostInScrollPosition'); clearTimeout(this.scrollAniTmo); if(((this.abs.y<150 && off.y>150) || this.abs.y>=150)){ this.scrollSpeed = relOffA*.13; this.isAutoScrolling = true; this.scrollAniTmo = setTimeout(this.utils.createClosure(this,function(){this.handleScrollAni()}),20); this.isInScrollPosition = true; clearTimeout(this.inScrollTmo); }else{ if((sdim.h-relOffA)/sdim.h>.99){ this.advert.eventBus.dispatchEvent('inScrollPosition'); this.beenInScrollPosition = true; if(this.advert.getContent('initiallyStatic')){ this.container.content.containerObject2.style.position = 'fixed'; } } } }else if(relOffA/2<=sdim.h*.6){ this.advert.eventBus.dispatchEvent(new this.richMediaEvent('partlyInView').property('perc',(sdim.h-relOffA)/sdim.h).property("fromTop",relOff<0)); this.inScrollTmo = setTimeout(this.utils.createClosure(this,function(){this.isInScrollPosition = false;}),15); }else{ this.advert.eventBus.dispatchEvent('outOffScrollPosition'); this.inScrollTmo = setTimeout(this.utils.createClosure(this,function(){this.isInScrollPosition = false;}),15); } this.callPolicies('stoppedScrolling'); }, handleScrollAni:function(){ var off = this.getPageOffsets(); var spd = Math.max(2.5,this.scrollSpeed); var relOff = off.y-this.abs.y; if(relOff>0){ spd*=-1; } var relOffA = Math.abs(relOff); if(relOffA>150){ return; } var res = off.y+spd; if(relOffA<=2){ res = this.abs.y; } if(relOff>0 && resthis.abs.y){ res = this.abs.y; } var del = this.utils.createClosure(this,function(){if(!this.callPolicies('updateScroll',[this, res])){win.scrollTo(0,res);}}); if(res != this.abs.y){ clearTimeout(this.scrollAniTmo); this.container.content.containerObject2.style.position = 'fixed'; this.scrollAniTmo = setTimeout(this.utils.createClosure(this,function(){this.handleScrollAni()}),20); }else{ this.advert.eventBus.dispatchEvent('inScrollPosition'); this.isInScrollPosition = true; this.beenInScrollPosition = true; //this.container.content.contentObject.style.position = 'absolute'; setTimeout(function(){del();animSF(del)},5); this.isAutoScrolling = false; } del(); this.scrollSpeed*=.95; this.callPolicies('handleScrollAni'); } }; targetWindow.adtechCallbackInstances = targetWindow.adtechCallbackInstances || []; var instanceIndex = targetWindow.adtechCallbackInstances.length; targetWindow.adtechCallbackInstances[instanceIndex] = new targetWindow.com.adtech.AdtechCustomAd$AD_ID$(); targetWindow.adtechAdCallbacks = targetWindow.adtechAdCallbacks || {}; targetWindow.adtechAdCallbacks[adConfig.adServerVars.uid] = targetWindow.adtechAdCallbacks[adConfig.adServerVars.uid] || []; targetWindow.adtechAdCallbacks[adConfig.adServerVars.uid].push( targetWindow.adtechCallbackInstances[instanceIndex]); })(adtechAdConfig); (function (D) { if (!D.initOverride) { var B = "https://richmedia.cdnservices.net/adtech/lib/"; var H = (D.mraidCompatible) ? "MRAID" : ""; var F = B + "adtechRichMediaLib" + H + "_3_3_0.js"; D.rmLibUrl = F; if (!window.adtechAdManager_3_3_0) { adtechAdQueue = window.adtechAdQueue || []; adtechAdQueue.push(D); if (!window.adtechAdManagerReqs || !window.adtechAdManagerReqs["3_3_0"]) { adtechAdManagerReqs = window.adtechAdManagerReqs || {}; adtechAdManagerReqs["3_3_0"] = true; var A = "scr"; document.write("<" + A + 'ipt type="text/javascript" src="' + F + '">"); } } else { adtechAdManager_3_3_0.registerAd(D); } } })(adtechAdConfig);