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\/6f0e27efc06c6349cd87f93e8e1976eb\/", "configBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/6f0e27efc06c6349cd87f93e8e1976eb\/", "assetBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/6f0e27efc06c6349cd87f93e8e1976eb\/", "baseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/6f0e27efc06c6349cd87f93e8e1976eb\/", "viewCounter": "{{{renderedPixel}}}", "campaignId": "_ADMCID_", "publisherId": "_ADWEBSITEID_", "externalId": "" }, "geoData": { "area": "_ADAREATEXT_", "city": "Amsterdam", "country": "_ADCOUNTRYTEXT_", "state": "Noord-Holland", "zip": "_ADZIPTEXT_" }, "tagVars": [], "preview": true, "pubVars": { "clickPixel": "", "iframeBusterPath": "", "clickRedirect": "{{{clickTrackingUrl}}}", "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": "{{{clickUrl}}}?r=", "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, "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, "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": "", "target": "_blank", "features": "" }, "backupImageClickthrough": { "id": 7703, "plid": "4d2c2cef5973417f3f03adc213a06d6d", "dest": "", "target": "_blank", "features": "" }, "main": { "id": 16547, "plid": "37f1f67addb076058db521478e783928", "dest": "https:\/\/ad.doubleclick.net\/ddm\/trackclk\/N7861.149030HLN.BE\/B23861224.271431994;dc_trk_aid=466001446;dc_trk_cid=131162011;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=", "target": "_blank", "features": "" } }, "contentVariables": { "Backup Alt Text": "Amex advertisement", "QRUrl": "" }, "contentProperties": { "initiallyStatic": false, "slotHeight": 0, "Backup image file": "", "Backup image clickthrough": "" }, "adrConfig": { "eventEndpoint": "https:\/\/{{{adServerHost}}}\/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": true }, { "id": 0, "plid": "96875f3fdd120a3a4d8905fc30b4649e", "name": "autoExpand", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "a61ed805bc03915a171c015f73358756", "name": "contract", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "c10258071c4eeb2cfe7888cdddf2c3e7", "name": "close", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "8d950c792a94bcfbb7bc6d9005b32410", "name": "show", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "0f29323080961ce49eed7c51eb377464", "name": "hide", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "86085c297e6923af029c92bd378e157f", "name": "reload", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "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": true }, { "id": 0, "plid": "60e9b6005ed9c13420635a17533fbb68", "name": "inScrollPosition", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "212c5144d6f1d8401e6429f940a1a1c8", "name": "scrolling", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "ec86cc7ed30fe8aae01b3f933ed8a809", "name": "outOffScrollPosition", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "186f9f929481f4f7b7e4ea9440eda05f", "name": "partlyInView", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "cb973f7e98a664cc835a2caf5fbd2877", "name": "notPlaceraHomePage", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "ae171a84675cdec5a7665ad78e9d2bdc", "name": "Video Play", "cumulative": true, "interaction": true, "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": false, "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": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "55bacb8f73f0768cfa8e2f35bc06c03c", "name": "Video Resume", "cumulative": true, "interaction": true, "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 } ], "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": 175436, "type": "1_PIXEL", "url": "https:\/\/pixel.adsafeprotected.com\/rfw\/st\/419366\/44642523\/skeleton.gif", "secureUrl": "https:\/\/pixel.adsafeprotected.com\/rfw\/st\/419366\/44642523\/skeleton.gif", "onEvent": "VIEW", "eventName": "" }, { "id": 175437, "type": "JS_URL", "url": "https:\/\/pixel.adsafeprotected.com\/rjss\/st\/419366\/44642524\/skeleton.js", "secureUrl": "https:\/\/pixel.adsafeprotected.com\/rjss\/st\/419366\/44642524\/skeleton.js", "onEvent": "VIEW", "eventName": "" }, { "id": 175438, "type": "1_PIXEL", "url": "https:\/\/ad.doubleclick.net\/ddm\/trackimp\/N7861.149030HLN.BE\/B23861224.271431994;dc_trk_aid=466001446;dc_trk_cid=131162011;ord=_TIMESTAMP_;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=?", "secureUrl": "https:\/\/ad.doubleclick.net\/ddm\/trackimp\/N7861.149030HLN.BE\/B23861224.271431994;dc_trk_aid=466001446;dc_trk_cid=131162011;ord=_TIMESTAMP_;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=?", "onEvent": "VIEW", "eventName": "" }, { "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": "{{{viewUrl}}}", "secureUrl": "{{{viewUrl}}}", "onEvent": "SPECIFIC_EVENT", "eventName": "viewableImpression" }, { "id": 1, "type": "1_PIXEL", "url": "https:\/\/{{{adServerHost}}}\/u?rt={{{rt}}}&customType=19820fb2c1c5cecacd4528a5bad3aa93", "secureUrl": "https:\/\/{{{adServerHost}}}\/u?rt={{{rt}}}&customType=19820fb2c1c5cecacd4528a5bad3aa93", "onEvent": "SPECIFIC_CLICK", "eventName": "default" }, { "id": 2, "type": "1_PIXEL", "url": "https:\/\/{{{adServerHost}}}\/u?rt={{{rt}}}&customType=4d2c2cef5973417f3f03adc213a06d6d", "secureUrl": "https:\/\/{{{adServerHost}}}\/u?rt={{{rt}}}&customType=4d2c2cef5973417f3f03adc213a06d6d", "onEvent": "SPECIFIC_CLICK", "eventName": "backupImageClickthrough" }, { "id": 3, "type": "1_PIXEL", "url": "https:\/\/{{{adServerHost}}}\/u?rt={{{rt}}}&customType=37f1f67addb076058db521478e783928", "secureUrl": "https:\/\/{{{adServerHost}}}\/u?rt={{{rt}}}&customType=37f1f67addb076058db521478e783928", "onEvent": "SPECIFIC_CLICK", "eventName": "main" }, { "id": 4, "type": "1_PIXEL", "url": "{{{viewUrl}}}", "secureUrl": "{{{viewUrl}}}", "onEvent": "SPECIFIC_EVENT", "eventName": "viewableImpression" } ], "contentHubConfig": { "mapping": [], "assets": [] }, "fallback": "1x1.gif" }; if(typeof(adtechAdConfig) == 'object'){window.adtechAdConfig = adtechAdConfig}; window.adtechAdConfig = window.adtechAdConfig || {}; window.adtechAdConfig.overrides = window.adtechAdConfig.overrides || {}; window.adtechAdConfig.overrides.displayWindowTarget=self; document.write(''); /*mraid = { getState:function() { return 'ready'; }, getCurrentPosition:function() { return { x:parent.document.body.scrollLeft, y:parent.document.body.scrollTop }; }, getMaxSize:function() { return { width: 320, height: 600 }; }, getScreenSize:function() { return { width: 320, height: 480 }; } }; /** * 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"; 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;i"; //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) { var t = this; var initMraid = function() { var curPos = mraid.getCurrentPosition(); var maxSize = mraid.getMaxSize(); var screenSize = mraid.getScreenSize(); setTimeout(function() { var curPos = mraid.getCurrentPosition(); var maxSize = mraid.getMaxSize(); var screenSize = mraid.getScreenSize(); t.container.div.style.position = 'absolute'; t.container.anchorDiv.style.width = '320px'; //maxSize.width+'px'; t.container.anchorDiv.style.height = '600px'; //maxSize.height+'px'; t.container.div.firstChild.style.transition = 'top 0.75s'; t.container.div.firstChild.style.transitionTimingFunction = 'cubic-bezier(0.25, 0.1, 0.25, 1)'; t.pageResizeHandler(); }, 1000); setInterval(function(){ var curPos2 = mraid.getCurrentPosition(); t.container.div.firstChild.style.top = -curPos2.y+'px'; },100); } 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); } var t = this; self.onScrollChanged = function(x, y) { //t.container.div.firstChild.style.top = -y + 'px'; //t.updateDBG(y); }; 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.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 = '14px'; this.header.style.lineHeight = '18px'; this.header.style.color = 'white'; this.header.style.textAlign = 'center'; this.header.style.backgroundColor = 'rgba(0,0,0,1)'; this.header.style.fontSize = '9.8px'; this.header.style.fontFamily = 'Helvetica, Arial, sans-serif'; this.header.style.verticalAlign = 'middle'; this.header.style.opacity=1; this.header.innerHTML = "ADVERTISEMENT"; var t = this; 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 = '13px'; this.footer.style.backgroundColor = 'rgba(0,0,0,1)'; this.footer.style.fontFamily = 'Helvetica, Arial, sans-serif'; this.footer.style.verticalAlign = 'middle'; this.footer.style.textAlign = 'center'; this.footer.style.fontSize = '9.5px'; this.footer.style.lineHeight = '13px'; this.footer.style.color = 'white'; this.footer.style.opacity=1; 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(); } //this.container.content.contentObject.style.display = 'none'; //this.container.content.contentObject.style.transform = 'translateZ(0px)'; if(this.advert.getContent('initiallyStatic')){ this.container.content.containerObject2.style.position = 'absolute'; } var del = this.utils.createClosure(this,function(){this.pageResizeHandler();}); del(); setTimeout(del,25); setTimeout(del,50); setTimeout(del,100); setTimeout(function(){del();animSF(del)},35); setTimeout(function(){del();animSF(del)},150); animSF(del); this.lastOff = this.off = this.getPageOffsets(); this.pageScrollHandler(); this.callPolicies('render'); this.stoppedScrolling(); setTimeout(function(){t.stoppedScrolling()},100); setTimeout(function(){t.stoppedScrolling()},250); }, closeHandler: function() { /* * This will get invoked when the close event has been dispatched by any one * of your ad units. */ if(this.closed) return; this.closed = true; this.footer.style.opacity = 0; this.header.style.opacity = 0; var sp = 30,t=this; t.callPolicies('close'); window.requestAnimationFrame(function(){ //console.log('ANIM 1'); }); animSF(function(){ //console.log('ANIM 2'); var h = t.container.anchorDiv.clientHeight; if(this.slotHeight != 0){ h = this.slotHeight; } h = Math.max(0,(h-sp)); sp*=1.03; t.container.anchorDiv.style.height = h+'px'; t.container.anchorDiv.style.minHeight = h+'px'; t.container.div.style.height = h+'px'; t.container.div.style.clip = 'rect(auto, auto, auto, auto)'; t.callPolicies('closing',[t,h]); if(h>0) animSF(arguments.callee); }); }, pageLoadHandler: function() { // The page has now loaded. Feel free to display an awesome advert. }, pageResizeHandler:function(){ if (this.closed) return; if (win.mraid) { var screenSize = mraid.getScreenSize(); var dims = { w: this.container.anchorDiv.clientWidth, h: this.container.anchorDiv.clientHeight } var dims2 = {}; for (var i in dims) { dims2[i] = dims[i]; } if (this.slotHeight != 0) { dims.h = this.slotHeight; } //this.container.anchorDiv.style.minWidth = dims.w+'px'; //this.container.anchorDiv.style.height = dims.h+'px'; //this.container.anchorDiv.style.minHeight = dims.h+'px'; 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; } } 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(auto, auto, auto, auto)'; this.container.div.style.clip = 'rect(0px, ' + (dims.w) + 'px' + ', ' + (screenSize.height) + '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 = dims.w + 'px'; this.container.content.containerObject2.style.height = screenSize.height + '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 = dims.w + 'px'; this.container.content.contentObject.style.height = screenSize.height + '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"); } else { 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.anchorDiv.style.minWidth = dims.w + 'px'; this.container.anchorDiv.style.height = dims.h + 'px'; this.container.anchorDiv.style.minHeight = dims.h + 'px'; this.container.content.containerObject2.style.height = '100%'; 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(auto, auto, auto, auto)'; 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 + 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 + 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 { } } } 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);