Advertisement
Marvolism_

Planetminecraft.com Javascript (ebStdBanner.js)

Jan 12th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. EBGInfra={declareNamespace:function(a){for(var b=window.EBG,a=a.split("."),c=0;c<a.length;c++){var d=a[c],e=b[d];e||(e=b[d]={});b=e}},declareClass:function(a,b){a.prototype.constructor=a;if(b)a.__superClass=b,a.__basePrototypePending=!0,EBG._resolveInheritance(a);return a},runTimed:function(a,b,c,d){return setTimeout(function(){b.apply(a,c)},d)},setInterval:function(a,b,c,d){return setInterval(function(){b.apply(a,c)},d)},clearInterval:function(a){clearInterval(a)},_resolveInheritance:function(a){if(a.__basePrototypePending){var b=
  2. a.__superClass;EBG._resolveInheritance(b);var b=b.prototype,c=a.prototype,d;for(d in b)c[d]=c[d]||b[d];delete a.__basePrototypePending}},callSuperConstructor:function(a,b,c){(a=a.__superClass)&&(c?a.apply(b,c):a.apply(b));return b},callSuperFunction:function(a,b,c,d){if(a=a.__superClass)var e=a.prototype[c];if(e instanceof Function)return d?e.apply(b,d):e.apply(b)},typeOf:function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array||!(a instanceof Object)&&"[object Array]"==Object.prototype.toString.call(a)||
  3. "number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if(!(a instanceof Object)&&("[object Function]"==Object.prototype.toString.call(a)||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call")))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},isFunc:function(a){return"function"==EBG.typeOf(a)},isDefined:function(a){return"undefined"!=
  4. EBG.typeOf(a)},notNull:function(a){return null!=a},isDefinedNotNull:function(a){return this.isDefined(a)&&this.notNull(a)},hasValue:function(a){return null!=a&&"undefined"!=EBG.typeOf(a)},getRandomNumber:function(){var a="";try{a=Math.random().toString(),a=a.substr(a.indexOf(".")+1)}catch(b){a=""}return a},isObj:function(a){return"object"==EBG.typeOf(a)},isBool:function(a){return"boolean"==EBG.typeOf(a)},isNumber:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},format:function(a){for(var b=1;b<
  5. arguments.length;b++)a=a.replace(RegExp("\\{"+(b-1)+"\\}","gi"),""+arguments[b]);return a},throwEx:function(a){throw{name:"",message:a};},mergeObj:function(a,b,c){var c=!!c,d;for(d in a)if(a.hasOwnProperty(d)&&(!b.hasOwnProperty(d)||c))b[d]=a[d]},cloneObj:function(a){if(!EBG.isObj(a))return null;var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=EBG.isObj(a[c])?EBG.cloneObj(a[c]):a[c]);return b},combinePaths:function(a,b){a=a||"";b=b||"";a&&"/"!=a[a.length-1]&&(a+="/");var c=a;b&&(c+=b);return c},px:function(a){return EBG.format("{0}px",
  6. a)},strEQ:function(a,b,c){return a&&b?c?a===b:a.toLowerCase()===b.toLowerCase():!1},indexOfArray:function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},isGlobalDef:function(a,b){var c="undefined"!=eval("typeof("+a+")");b&&c&&(c=eval(a+"=="+b));return c},numberToEnum:function(a,b){var c="",d;for(d in b)if(b.hasOwnProperty(d)&&b[d]===a){c=d;break}return c}};EBG=window.EBG||{};EBGInfra.mergeObj(EBGInfra,EBG,!1);EBG.declareNamespace("Logging");
  7. EBG.Logging.LoggerLevels={NONE:0,ERROR:1,INFO:2,WARN:3,DEBUG:4};EBG.Logging.Logger=function(a){this._level=a;this.startNestingGroupNames=[];this.endNestingGroupNames=[]};
  8. EBG.Logging.Logger.prototype={setLevel:function(a){this._level=a},debug:function(a){this._reportToLog(EBG.Logging.LoggerLevels.DEBUG,arguments)},info:function(a){this._reportToLog(EBG.Logging.LoggerLevels.INFO,arguments)},warn:function(a){this._reportToLog(EBG.Logging.LoggerLevels.WARN,arguments)},error:function(a){this._reportToLog(EBG.Logging.LoggerLevels.ERROR,arguments)},exception:function(a,b){var c="string"!==b?EBG.format("Exception in {0}. message: {1}",a,b.message):EBG.format("Exception in: {0}. message: {1}",
  9. a,b);b.stack&&(c+=EBG.format(" stack: {0}",b.stack));this._reportToLog(EBG.Logging.LoggerLevels.ERROR,[c])},startGroup:function(a){this._supportNesting()&&this.startNestingGroupNames.push(a)},endGroup:function(){this._supportNesting()&&0<this.endNestingGroupNames.length&&window.console.groupEnd(this.endNestingGroupNames.pop())},_consoleAvailable:function(){return void 0!==window.console},_supportNesting:function(){return this._consoleAvailable()?void 0!==window.console.group:!1},_supportErrorMessage:function(){return void 0!==
  10. window.console.error},_supportInfoMessage:function(){return void 0!==window.console.info||void 0!==window.opera},_supportWarnMessage:function(){return void 0!==window.console.warn||void 0!==window.opera},_supportObjectView:function(){return void 0!==window.console.dir||void 0!==window.opera},_callConsoleFunction:function(a,b){var c=!1;switch(a){case EBG.Logging.LoggerLevels.INFO:this._supportInfoMessage()&&(window.console.info(b),c=!0);break;case EBG.Logging.LoggerLevels.WARN:this._supportWarnMessage()&&
  11. (window.console.warn(b),c=!0);break;case EBG.Logging.LoggerLevels.ERROR:this._supportErrorMessage()&&(consoleFunction=window.console.error(b),c=!0)}c||window.console.log(b)},_reportToLog:function(a,b){if(this._level>=a&&this._consoleAvailable()){var c=b[0];"[object String]"!==Object.prototype.toString.call(c)?this._supportObjectView()||(c=c.toString()):c=EBG.format.apply(null,b);if(void 0===window.opera){for(;this.startNestingGroupNames.length;)window.console.group(this.startNestingGroupNames[0]),
  12. this.endNestingGroupNames.push(this.startNestingGroupNames.shift());this._callConsoleFunction(a,c)}else opera.postError(c)}}};EBG.declareClass(EBG.Logging.Logger,null);EBG.log=EBG.log||new EBG.Logging.Logger(EBG.Logging.LoggerLevels.DEBUG);
  13. EBG.VideoInteraction={STARTED:"ebVideoStarted",PERCENT_25_PLAYED:"eb25Per_Played",PERCENT_50_PLAYED:"eb50Per_Played",PERCENT_75_PLAYED:"eb75Per_Played",FULLPLAY:"ebVideoFullPlay",MUTE:"ebVideoMute",UNMUTE:"ebVideoUnmute",PAUSE:"ebVideoPause",REPLAY:"ebVideoReplay",UNMUTED:"ebVideoUnmuted",FULLSCREEN_START:"ebFSStart",FULLSCREEN_END:"ebFSEnd",FULLSCREEN_MUTE:"ebFSVideoMute",FULLSCREEN_PAUSE:"ebFSVideoPause",SLIDER_DRAGGED:"ebSliderDragged",VIDEO_PLAY_DURATION:"ebVideoPlayDuration",VIDEO_ASSET_DURATION:"ebVideoAssetDuration",
  14. FULLSCREEN_DURATION:"ebFSVideoPlayDuration",FULLSCREEN_ASSET_DURATION:"ebFSVideoAssetDuration",USER_INITIATED_VIDEO:"ebUserInitiatedVideo"};
  15. EBG.EBMessage={REQ_INIT:"reqInit",INIT:"ebInit",INITDONE:"ebInitDone",SHOW_DEFAULT_IMAGE:"ebShowDefaultImage",CLICKTHROUGH:"ebclickthrough",VERSION_TRACKING_IMPRESSION:"ebversiontrackingimpression",USER_ACTION_COUNTER:"ebCIUserActionCounter",AUTOMATIC_EVENT_COUNTER:"ebCIAutomaticEventCounter",START_TIMER:"ebCIStartTimer",UPDATE_TIMER:"ebUpdateTimer",STOP_TIMER:"ebCIStopTimer",START_VIDEO_TIMER:"ebStartVideoTimer",STOP_VIDEO_TIMER:"ebendvideotimer",VIDEO_INTERACTION:"ebVideoInteraction",VIDEO_LOAD:"ebVideoLoad",
  16. INIT_VIDEO_LOADER:"ebInitVideoLoader",VIDEO_FS_OPEN:"ebVideoFSOpen",VIDEO_FS_CLOSE:"ebVideoFSClose",VIDEO_FS_AUTO_CLOSE:"ebVideoFSAutoClose",START_VIDEO:"ebtStartVideo",STOP_VIDEO:"ebtStoptVideo",UPDATE_VIDEO_DURATION:"ebtUpdateVideoDuration",FULL_SCREEN_OPEN:"ebFullScreenOpen",FULL_SCREEN_CLOSE:"ebFullScreenClose",FULL_SCREEN_AUTO_CLOSE:"ebFullScreenAutoClose",MOUSE_MOVE:"ebMouseMove",INIT_EXPANSION_PARAMS:"ebInitExpansionParams",EXPAND:"ebExpandPanel",EXPAND_DONE:"ebExpandDone",COLLAPSE:"ebCollapsePanel",
  17. COLLAPSE_DONE:"ebCollapseDone",NOTIFY_INTERACTION_MONITOR:"NotifyInteractionMonitor",HIDE_INTRO:"ebHideIntro",INTRO_FULL_PLAY:"ebIntroFullPlay",KEEP_AD_OPREN:"ebKeepAdOpen",GO_TO_MINISITE:"ebGoToMiniSite"};EBG.DurationInteraction={TIMER:"Timer",AGGREGATE:"Aggregate"};
  18. EBG.INNERIFRAMEMessage={LOADED:"ebInnerIframeLoaded",INIT:"ebInitInnerIframe",VERIFY:"ebVerifyInnerIframe",EBO:"ebO",GLOBALPARAMS:"ebGlobalParams",CONTINUE_SENDING:"ContinueSending",NOT_LASTMSG:"NotLastMsg",LASTMSG:"LastMsg",ADCONFIG_REQUEST:"AdConfig_Request",SECRET_TAGS:"Secret_Tags"};
  19. EBG.FS={EB_VERSION_TRACKING_IMPRESSION:"ebversiontrackingimpression",EB_CLICKTHROUGH:"ebclickthrough",EB_CI_USER_ACTION_COUNTER:"ebciuseractioncounter",EB_CI_AUTOMATIC_EVENT_COUNTER:"ebciautomaticeventcounter",EB_VIDEO_INTERACTION:"ebvideointeraction",EB_START_TIMER:"ebstarttimer",EB_END_TIMER:"ebendtimer",EB_CI_START_TIMER:"ebcistarttimer",EB_CI_STOP_TIMER:"ebcistoptimer",EB_UPDATE_TIMER:"ebupdatetimer",EB_START_VIDEO_TIMER:"ebstartvideotimer",EB_STOP_VIDEO_TIMER:"ebendvideotimer",EB_PAGE_LOAD:"ebpageload",
  20. EB_COMMAND:"ebcommand",EB_MSG:"ebmsg",EB_EXPAND_PANEL:"ebexpandpanel",EB_COLLAPSE_PANEL:"ebcollapsepanel",EB_SET_STATE:"ebsetstate",EB_RESET_STATE:"ebresetstate",EB_MOUSE_TRACKER:"ebmousetracker",EB_MOUSE_MOVE:"ebmousemove",EB_TEST_DC:"ebtestdc",EB_CLOSE_AD:"ebclosead",EB_REPLAY_AD:"ebreplayad",EB_REPLAY_EXP:"ebreplayexp",EB_LOAD_RICH_BANNER:"ebloadrichbanner",EB_SHOW_RICH_BANNER:"ebshowrichbanner",EB_INIT_VIDEO_LOADER:"ebinitvideoloader",EB_HIDE_INTRO:"ebhideintro",EB_INTRO_FULL_PLAY:"ebintrofullplay",
  21. EB_KEEP_AD_OPREN:"ebkeepadopen",EB_GO_TO_MINISITE:"ebgotominisite",EB_VIDEO_LOAD:"ebvideoload",EB_VIDEO_LOAD_AND_PLAY:"ebvideoloadandplay",EB_FULL_SCREEN_OPEN:"ebfullscreenopen",EB_FULL_SCREEN_CLOSE:"ebfullscreenclose",EB_FULL_SCREEN_AUTO_CLOSE:"ebfullscreenautoclose",EB_VIDEO_FS_OPEN:"ebvideofsopen",EB_VIDEO_FS_CLOSE:"ebvideofsclose",EB_VIDEO_FS_AUTO_CLOSE:"ebvideofsautoclose",EB_START_VIDEO:"ebtstartvideo",EB_STOP_VIDEO:"ebtstopvideo",EB_UPDATE_VIDEO_DURATION:"ebtupdatevideoduration",EB_GET_JS_VAR:"ebgetjsvar",
  22. EB_GET_ALL_JS_VARS:"ebgetalljsvars",EB_SET_JS_VAR:"ebsetjsvar",EB_INIT_SE:"ebinitse",EB_SET_SE_PROXY:"ebsetseproxy",EB_SE_EXPAND_STARTED:"ebseexpandstarted",EB_SE_RETRACT_STARTED:"ebseretractstarted",EB_SE_RETRACT_FINISHED:"ebseretractfinished",EB_NOTIFICATION:"notification",EB_VIDEO_ACTIVE_MODE:"ebvideoactivemode"};EBG.ActionType={USER:"user",AUTO:"auto"};EBG.ExpBaseInteractions={PANELS_VIEWED:"ebPanelsViewed",AUTO_SHOW:"autoshow",DURATION:"duration"};EBG.SingleExpInteractions=EBG.ExpBaseInteractions;
  23. EBG.adTypes={RichBannerHtml5:"Html5Banner",SEBannerHtml5:"Html5SEBanner",StdBanner:"StdBanner",Banner:"Banner",SingleExpBanner:"SingleExpBanner",ExpBanner:"ExpBanner",VisibilityAd:"Visibility",FloatingAd:"FloatingAd",FloatingAdWithRem:"FloatingAdWithReminder"};EBG.WindowTarget={BLANK:"_blank",SELF:"_self",PARENT:"_parent",TOP:"_top"};
  24. EBG.Const={OUTER_DIV:"eyeDiv",DATACAPTURE:"/BurstingPipe/BurstingDataCapturePipe.asp",AKAMAIFCS_PLUID_9:"rtmp://flv.stream.atwola.com/flash/flv/mm",AKAMAIFCS_PLUID_43:"rtmp://eyeblaster.fcod.msecnd.net/vod/a10061/e1",AKAMAIFCS_PLUID_42_45:"rtmp://cp57388.edgefcs.net/ondemand",AKAMAI_DEFAULT:"rtmp://cp16207.edgefcs.net/ondemand",SHOW_HIDE_FLAG:"data-ebhidingoverlappingelement",SHOW_HIDE_BACKUP:"data-ebvisibilitybackup"};
  25. EBG.PanelPositionType={PAGE_RELATIVE_PERCENTAGE:0,BANNER_RELATIVE_PIXELS:1,PAGE_RELATIVE_PIXELS:2,VIEWPORT_RELATIVE_PERCENTAGE:3,VIEWPORT_RELATIVE_PIXELS:4};EBG.PanelCorner={TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_LEFT:3,BOTTOM_RIGHT:4};EBG.AnimationType={NONE:"none",LINEAR:"linear",EASE_OUT:"easeout",EASE_OUT_SNAP:"easeoutsnap"};EBG.ExpandCollapseMethod={CLIP:"clip",RESIZE:"resize"};
  26. EBG.AnimationDefaults={easeOutCoefficient:0.1,stepTime:10,linearSteps:50,snapThreshold:10,animationType:EBG.AnimationType.NONE,snap:!1,checkShowHideOnEachStep:!1,hideAssetAfterExpand:!1,removeAssetAfterExpand:!1,hideAssetAfterCollapse:!0,removeAssetAfterCollapse:!0,method:EBG.ExpandCollapseMethod.ExpBanner,endAnimationHideAsset:!1,endAnimationRemoveAsset:!1};
  27. EBG.AnimationPushDownDefaults={easeOutCoefficient:0.1,stepTime:50,linearSteps:20,snapThreshold:10,animationType:EBG.AnimationType.LINEAR,snap:!1,checkShowHideOnEachStep:!1,hideAssetAfterExpand:!1,removeAssetAfterExpand:!1,hideAssetAfterCollapse:!0,removeAssetAfterCollapse:!0,method:EBG.ExpandCollapseMethod.ExpBanner,endAnimationHideAsset:!1,endAnimationRemoveAsset:!1};EBG.ProtectedElementIds=["ebAd","eyeDiv","ebDefault","ebRich","ebDiv"];
  28. EBG.VisibilityMode={DEFAULT_MODE:"defaultMode",BASIC_MODE:"basicMode",ENHANCED_MODE:"enhancedMode"};EBG.AcCertProgram={IAB_EU:0,NAI_US:1};EBG.AcIconPosition={TopRight:0,TopLeft:1,BottomRight:2,BottomLeft:3};EBG.PreloadType={DefaultImg:0,PreloadImg:1,DefaultFlash:2};EBG.declareNamespace("Events");EBG.Events.EventTiming={BEFORE:"BEFORE",ONTIME:"ONTIME",AFTER:"AFTER",ONTIME_AND_AFTER:"ONTIME_AND_AFTER"};
  29. EBG.Events.EventNames={CREATE_AD:"CREATE_AD",CREATE_ADAPTOR:"CREATE_ADAPTOR",CREATE_INT_MGR:"CREATE_INT_MGR",CREATE_ANIM_MGR:"CREATE_ANIM_MGR",CREATE_POSITIONING_HELPER:"CREATE_POSITIONING_HELPER",SHOW_AD:"SHOW_AD",ADD_CREATIVES:"ADD_CREATIVES",ADD_INTERACTION:"ADD_INTERACTION",ADD_BANNER_DEFAULT_IMAGE_CREATIVE:"ADD_BANNER_DEFAULT_IMAGE_CREATIVE",ADD_BANNER_PRELOAD_IMAGE_CREATIVE:"ADD_BANNER_PRELOAD_IMAGE_CREATIVE",ADD_BANNER_DEFAULT_FLASH_CREATIVE:"ADD_BANNER_DEFAULT_FLASH_CREATIVE",ADD_BANNER_RICH_FLASH_CREATIVE:"ADD_BANNER_RICH_FLASH_CREATIVE",
  30. ADD_PANEL_RICH_FLASH_CREATIVE:"ADD_PANEL_RICH_FLASH_CREATIVE",SHOW_BANNER_RICH_FLASH_CREATIVE:"SHOW_BANNER_RICH_FLASH_CREATIVE",SHOW_PANEL_RICH_FLASH_CREATIVE:"SHOW_PANEL_RICH_FLASH_CREATIVE",SHOW_REMINDER:"SHOW_REMINDER",SHOW_MINISITE:"SHOW_MINISITE",PAGE_LOAD:"PAGE_LOAD",COLLECT_TIMERS:"COLLECT_TIMERS",PAGE_UNLOAD:"PAGE_UNLOAD",PAGE_BEFORE_UNLOAD:"PAGE_BEFORE_UNLOAD",PAGE_HIDE:"PAGE_HIDE",PAGE_RESIZE:"PAGE_RESIZE",PAGE_SCROLL:"PAGE_SCROLL",PAGE_FOCUS:"PAGE_FOCUS",PAGE_BLUR:"PAGE_BLUR",PAGE_HIDDEN:"PAGE_HIDDEN",
  31. PAGE_VISIBLE:"PAGE_VISIBLE",INTERACTION_REPORT_REMOTE_SERVERS:"INTERACTION_REPORT_REMOTE_SERVERS",START_TIMER:"START_TIMER",STOP_TIMER:"STOP_TIMER",UPDATE_TIMER:"UPDATE_TIMER",HANDLE_COUNTER_INTERACTION:"HANDLE_COUNTER_INTERACTION",DEFAULT_CLICK:"DEFAULT_CLICK",EXPAND:"EXPAND",COLLAPSE:"COLLAPSE",USER_INTERACTION:"USER_INTERACTION",MOUSE_OVER:"MOUSE_OVER",MOUSE_OUT:"MOUSE_OUT",MOUSE_MOVE:"MOUSE_MOVE",USER_INITIATED_VIDEO:"USER_INITIATED_VIDEO",DWELL_UNIQUE:"DWELL_UNIQUE",DWELL_VIDEO_START:"DWELL_VIDEO_START",
  32. DWELL_VIDEO_STOP:"DWELL_VIDEO_STOP",CREATIVE_CONTAINER_READY:"CREATIVE_CONTAINER_READY",RICH_FLASH_PLAYED:"RICH_FLASH_PLAYED",REPLAY_AD:"REPLAY_AD",BANDWITH_DETECTED:"BANDWITH_DETECTED",FULL_SCREEN_START:"FULL_SCREEN_START",FULL_SCREEN_END:"FULL_SCREEN_STOP",ANIMATE_PANEL:"ANIMATE_PANEL",CLOSE_AD:"CLOSE_AD",OPEN_PAGE:"OPEN_PAGE",MAX_AD_DURATION:"MAX_AD_DURATION",FLASH_IN_FRAME_TWO:"FLASH_IN_FRAME_TWO",SHOW_HIDE_ELEMENTS:"SHOW_HIDE_ELEMENTS",DEFAULT_IMPRESSION:"DEFAULT_IMPRESSION",AIE_LOADED:"AIE_LOADED",
  33. INIT_MANAGERS:"INIT_MANAGERS",MOUSE_MOVE_NEEDED:"MOUSE_MOVE_NEEDED"};EBG.Events.EbEventNames={PAGE_LOAD:EBG.Events.EventNames.PAGE_LOAD};EBG.Events.EventSubscription=function(a,b,c){this.eventName=a;this.callback=b;this.callbackBinding=c?c:null};
  34. EBG.Events.EventSubscription.prototype={dispatcherFilters:null,timing:EBG.Events.EventTiming.ONTIME,isElementEvent:!1,elementId:"",isDocumentEvent:!1,isValid:function(){return EBG.isFunc(this.callback)&&(!this.callbackBinding||EBG.isObj(this.callbackBinding))},toString:function(){return EBG.format("EventSubscription: eventName={0}, timing={1}, callback={2}, callbackBinding={3}, dispatcherFilters={4}",this.eventName,this.timing,EBG.typeOf(this.callback),EBG.typeOf(this.callbackBinding),EBG.typeOf(this.dispatcherFilters))}};
  35. EBG.declareClass(EBG.Events.EventSubscription,null);EBG.Events.Event=function(a){this.name=a;this.creationTime=+new Date};EBG.Events.Event.prototype={dispatcher:null,eventData:null,timing:null,toString:function(){return EBG.format("Event: name={0}, creationTime={1}, dispatcher={2}, eventData={3}",this.name,this.creationTime,EBG.typeOf(this.dispatcher),EBG.typeOf(this.eventData))}};EBG.declareClass(EBG.Events.Event,null);EBG.Events.EventManager=function(){this._subscriptions={}};
  36. EBG.Events.EventManager.prototype={_subscriptions:{},subscribeToEvent:function(a){if(a.isValid())if(a.isElementEvent)EBG.adaptor&&EBG.adaptor.subscribeToEventOnElement(a.eventName,a.elementId,a.callback);else{var b=this._subscriptions[a.eventName]=this._subscriptions[a.eventName]||{},c;for(c in EBG.Events.EventTiming)EBG.Events.EventTiming.hasOwnProperty(c)&&(b[c]=b[c]||[]);b[a.timing].push(a);EBG.adaptor&&EBG.adaptor.hasEvent(a.eventName)&&EBG.adaptor.subscribeToEvent(a.eventName,a.isDocumentEvent)}},
  37. dispatchEvent:function(a){var b=!1;switch(a.timing){case EBG.Events.EventTiming.BEFORE:case EBG.Events.EventTiming.ONTIME:case EBG.Events.EventTiming.AFTER:b=this._dispatchEventByTiming(a,a.timing);break;case EBG.Events.EventTiming.ONTIME_AND_AFTER:b=(b=this._dispatchEventByTiming(a,EBG.Events.EventTiming.ONTIME))||this._dispatchEventByTiming(a,EBG.Events.EventTiming.AFTER);break;default:b=(b=(b=this._dispatchEventByTiming(a,EBG.Events.EventTiming.BEFORE))||this._dispatchEventByTiming(a,EBG.Events.EventTiming.ONTIME))||
  38. this._dispatchEventByTiming(a,EBG.Events.EventTiming.AFTER)}return b},attachToAdaptor:function(){EBG.adaptor.setListener(this.dispatchEvent,this)},_dispatchEventByTiming:function(a,b){var c=this._subscriptions[a.name];if(!c)return!1;for(var c=c[b],d=!1,e=0;e<c.length;e++){var f=this._dispatchEventToSubscription(a,c[e]);if(EBG.isBool(f)&&!f){d=!0;break}}return d},_dispatchEventToSubscription:function(a,b){var c=b.dispatcherFilters;if(EBG.isObj(c))for(var d in c)if(c.hasOwnProperty(d)){var e=c[d],f=
  39. !0,g=d.split("."),h=a.dispatcher;if(h)for(var k=0;k<g.length;k++){var h=h[g[k]],p=k==g.length-1;if(!h||p&&h!==e){f=!1;break}}if(!f)return null}c=null;d=b.callback;if(EBG.isFunc(d)){e=[a];try{c=d.apply(b.callbackBinding,e)}catch(q){}}return c}};EBG.declareClass(EBG.Events.EventManager,null);EBG.eventMgr=EBG.eventMgr||new EBG.Events.EventManager;EBG.declareNamespace("Adaptors");EBG.Adaptors.TagNames={DIV:"div",IFRAME:"iframe",IMG:"img",SCRIPT:"script",OBJECT:"object",EMBED:"embed",SPAN:"span",A:"a"};
  40. EBG.Adaptors.InjectionMethod={APPEND:"append",INSERT_BEFORE:"insertBefore"};EBG.Adaptors.WindowProp={top:"top",left:"left",location:"location",menubar:"menubar",width:"width",height:"height"};EBG.Adaptors.MoreSupportedEvent={visibilitychange:1,mozvisibilitychange:1,msvisibilitychange:1,webkitvisibilitychange:1};EBG.Adaptors.StdWebAdaptor=function(){this._setEvents()};EBG.Adaptors.StdWebAdaptor.onEnvEvent=function(){EBG.adaptor._handleEvent.apply(EBG.adaptor,arguments)};
  41. EBG.Adaptors.StdWebAdaptor.prototype={_environmentEvents:{},_logicalEvents:{},_subscribedEvents:{},_subscribedEventsOnElement:[],_listener:null,_listenerBinding:null,initInnerModules:function(a,b,c){if(!this.browser)this.browser=new EBG.Adaptors.Browser(a,b,c);if(!this.flash)this.flash=EBG.Adaptors.FlashDetector?new EBG.Adaptors.FlashDetector:null},copy:function(a){for(var b in this._subscribedEvents)this._subscribedEvents.hasOwnProperty(b)&&(this._removeEventListener(window,this._environmentEvents[b].name,
  42. EBG.Adaptors.StdWebAdaptor.onEnvEvent),a.subscribeToEvent(b));for(b=0;b<this._subscribedEventsOnElement.length;b++){var c=this._subscribedEventsOnElement[b],d=c.elementId,e=c.eventName,c=c.callback,f=this.getElementById(d);f&&(this._removeEventListener(f,e,c),a.subscribeToEventOnElement(e,d,c))}},intMonitorExist:function(){return EBG.isPreview&&top.ebHandleFsCommandsPrev},notifyIntMonitor:function(a){top.ebHandleFsCommandsPrev(a.command,a.args,a.objName,a.adId,a.elapsedTime)},hasEvent:function(a){return!!this._environmentEvents[a]},
  43. generateElementId:function(a,b){return EBG.format("eb{0}_{1}",a,b)},_getTags:function(a,b){EBG.isGlobalDef("JSON");var c="";if(b&&a.tagName==EBG.Adaptors.TagNames.SCRIPT&&a.text&&!a.attributes)b.push(a);else{c="";a.attributes&&(this._setObjDefaultAttributes(a),c=this._getObjAttributesStr(a));c=EBG.format("<{0} {1}>",a.tagName,c);a.innerHTML&&(c+=a.innerHTML);a.text&&(c+=a.text);a.params&&(c+=this._getObjParamsStr(a));if(a.children)for(var d=0;d<a.children.length;d++)c+=this._getTags(a.children[d],
  44. b);c+=EBG.format("</{0}>",a.tagName)}return c},writeReportingIFrame:function(a,b,c){this.inject({tagName:EBG.Adaptors.TagNames.IFRAME,attributes:{id:a,src:b,style:{width:"0px",height:"0px"},frameborder:0}},EBG.Adaptors.InjectionMethod.APPEND,this.getElementById(c))},writeScript:function(a,b,c){try{this.inject({tagName:EBG.Adaptors.TagNames.SCRIPT,attributes:{id:a,name:a,src:b}},EBG.Adaptors.InjectionMethod.APPEND,this.getElementById(c))}catch(d){}},write:function(a){this._documentWrite(this._getTags(a))},
  45. inject:function(a,b,c){var d=c.ownerDocument.createElement(a.tagName);if(a.attributes){this._setObjDefaultAttributes(a);for(var e in a.attributes)EBG.isObj(a.attributes[e])?this.setStyleToElem(d,a.attributes[e]):d.setAttribute(e,a.attributes[e])}switch(b){case EBG.Adaptors.InjectionMethod.INSERT_BEFORE:c.parentNode.insertBefore(d,c);break;default:c.appendChild(d)}e="";if(a.innerHTML)e=a.innerHTML;var f=[];if(a.children)for(var g=0;g<a.children.length;g++)e+=EBG.adaptor._getTags(a.children[g],f);if(e)d.innerHTML=
  46. e;if(a.text)d.text=a.text;for(g=0;g<f.length;g++)this.inject(f[g],b,c)},addInlineDOM:function(a,b){this.inject(a,EBG.Adaptors.InjectionMethod.APPEND,this.getElementById(b))},setInnerHtml:function(a,b){a.innerHTML=b},setStyleToElem:function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a.style[c]=b[c])},getStyleOfElem:function(a){if(a)return a.style},setListener:function(a,b){this._listener=a;this._listenerBinding=b},subscribeToEvent:function(a,b){if(this.hasEvent(a)&&!this._subscribedEvents[a]){var c=
  47. this._environmentEvents[a],d=c.inCurWin?window:this.getPageWin();if(b)d=d.document;this._addEventListener(d,c.name,EBG.Adaptors.StdWebAdaptor.onEnvEvent);this._subscribedEvents[a]={}}},subscribeToEventOnElement:function(a,b,c){var d=!1,e="string"==typeof b?this.getDisplayWin().document.getElementById(b):b;e||(d=!0);for(var f=this._subscribedEventsOnElement.length,g=0;g<f;g++)if(this._subscribedEventsOnElement[g].elementId==b&&this._subscribedEventsOnElement[g].eventName==a){d=!0;break}d||(this._addEventListener(e,
  48. a,c),this._subscribedEventsOnElement[f]={elementId:b,eventName:a,callback:c})},_addEventListener:function(a,b,c){"load"==b&&this.isPageLoaded()?setTimeout(function(){c({type:"load"})},5):window.addEventListener?a.addEventListener(b,c,!1):window.attachEvent&&a.attachEvent("on"+b,c)},_removeEventListener:function(a,b,c){window.removeEventListener?a.removeEventListener(b,c,!1):window.detachEvent&&a.detachEvent("on"+b,c)},_checkIfPropExist:function(a,b){return a&&0<=a?EBG.format(", {0}={1}",b,a):""},
  49. openPage:function(a,b){var c=EBG.WindowTarget.BLANK,d="",e=null;if(b&&(c=b.target,b.xPos||b.yPos||b.width||b.height))d="titlebar=1,resizable=1,scrollbars=1,directories=0,toolbar=1,status=1"+this._checkIfPropExist(b.yPos,EBG.Adaptors.WindowProp.top),d+=this._checkIfPropExist(b.xPos,EBG.Adaptors.WindowProp.left),d+=this._checkIfPropExist(b.showAddressBar,EBG.Adaptors.WindowProp.location),d+=this._checkIfPropExist(b.showMenuBar,EBG.Adaptors.WindowProp.menubar),d+=this._checkIfPropExist(b.width,EBG.Adaptors.WindowProp.width),
  50. d+=this._checkIfPropExist(b.height,EBG.Adaptors.WindowProp.height);return e=""!=d?window.open(a,c,d):window.open(a,c)},reportToRemoteServerUsingImage:function(a){this.ReportingImg=new Image;this.ReportingImg.src=a},getDataFromRemoteServer:function(a,b,c,d,e){if(!a||EBG.isOfflineDemo)return!1;var d=EBG.isBool(d)?d:!0,e=EBG.isBool(e)?e:!1,f=function(){try{if(e){var a,g;a=document.createElement("div");a.innerHTML="<xml>"+k.responseText+"</xml>";document.body.appendChild(a);g=a.firstChild.XMLDocument;
  51. document.body.removeChild(a);b.call(c,g)}else b.call(c,k.responseText)}catch(h){b.call(c)}},g=!1;try{if(this._isXMLHttpRequestSupported()){var h=new XMLHttpRequest;h.open("GET",a,d);h.send();g=!0;d?h.onreadystatechange=function(){4==h.readyState&&(200==h.status?b.call(c,e?h.responseXML:h.responseText):b.call(c))}:b.call(c,e?h.responseXML:h.responseText)}else if(window.XDomainRequest&&d){var k=new XDomainRequest;if(k)k.onerror=function(){EBG.log.error("XDomain request error");b.call(c)},k.ontimeout=
  52. function(){EBG.log.error("XDomain request timeout");b.call(c)},k.onload=f,k.open("get",a),k.send(),g=!0}}catch(p){g=!1}return g},reportToRemoteServer:function(a,b){if(a&&!EBG.isOfflineDemo){var b=EBG.isBool(b)?b:!0,c=!1;try{if(this._isXMLHttpRequestSupported()){var d=new XMLHttpRequest;d.open("GET",a,b);try{d.send()}catch(e){if(b)throw e;}c=!0}else if(window.XDomainRequest&&b){var f=new XDomainRequest;f.open("GET",a);f.send();c=!0}}catch(g){c=!1}c||this.reportToRemoteServerUsingImage(a)}},getElementById:function(a,
  53. b){var c=null,b=b?b:this.getDisplayWin();EBG.isDefinedNotNull(a)&&(c=b.document.getElementById(a));return c},supportsPageLoadEvents:function(){return!this.browser.isOpera()&&!(this.browser.isIE()&&7>this.browser.getVersion())},getHostName:function(a){return(a?a:this.getDisplayWin()).location.hostname},getDomain:function(a){return(a?a:this.getDisplayWin()).document.domain},getDisplayWin:function(){return window},getPageWin:function(){return window},inInnerIframe:function(){return!1},inPlacementIframe:function(){return!1},
  54. _setEvents:function(){this.supportsPageLoadEvents&&(this._setEvent(EBG.Events.EventNames.PAGE_LOAD,"load"),this._setEvent(EBG.Events.EventNames.PAGE_UNLOAD,"unload",!0),this._setEvent(EBG.Events.EventNames.PAGE_BEFORE_UNLOAD,"beforeunload",!0),this._setEvent(EBG.Events.EventNames.PAGE_HIDE,"pagehide",!0));this._setEvent(EBG.Events.EventNames.PAGE_RESIZE,"resize");this._setEvent(EBG.Events.EventNames.MOUSE_MOVE,"mousemove",!1,["clientX","clientY","pageX","pageY"])},_setEvent:function(a,b,c,d){this._environmentEvents[a]=
  55. {name:b,inCurWin:c?c:!1};this._logicalEvents[b]={name:a};if(d){this._logicalEvents[b].attr=[];for(a=0;a<d.length;a++)this._logicalEvents[b].attr[a]=d[a]}},_documentWrite:function(a){document.write(a)},_isXMLHttpRequestSupported:function(){var a=window.XMLHttpRequest?new XMLHttpRequest:null;return a&&EBG.isBool(a.withCredentials)},isPageLoaded:function(){if(this._isPageLoaded)return!0;this._isPageLoaded=EBGInfra.isDefined(window.gEBMainWindow)&&EBGInfra.isDefined(gEBMainWindow.EBP.downloadMgr)&&gEBMainWindow.EBP.isPageLoaded;
  56. if(!this._isPageLoaded&&this.getPageWin().document.readyState)this._isPageLoaded="complete"==this.getPageWin().document.readyState;return EBG.adaptor._isPageLoaded},_handleEvent:function(a){var b=this._logicalEvents[a.type].name;switch(b){case EBG.Events.EventNames.PAGE_LOAD:this._isPageLoaded=!0;break;case EBG.Events.EventNames.PAGE_RESIZE:EBG.adaptor.inInnerIframe()&&this.serving.rehidePlacementIframe()}b&&(b=new EBG.Events.Event(b),EBGInfra.isDefinedNotNull(this._logicalEvents[a.type].attr)&&this._prepareLogicalEventData(b,
  57. a,this._logicalEvents[a.type].attr),EBG.isFunc(this._listener)&&this._listener.call(this._listenerBinding,b))},_prepareLogicalEventData:function(a,b,c){try{a.eventData={};for(var d=0;d<c.length;d++)a.eventData[c[d]]=b[c[d]]}catch(e){}},_getDefaultAttributes:function(a){var b={};switch(a.toLowerCase()){case EBG.Adaptors.TagNames.IFRAME:b={marginheight:"0px",marginwidth:"0px",frameborder:"0",scrolling:"no"}}return b},_getDefaultStyle:function(a){var b={border:"0px",padding:"0px",margin:"0px"};switch(a.toLowerCase()){case EBG.Adaptors.TagNames.DIV:EBG.mergeObj({top:"0px",
  58. left:"0px",overflow:"visible",fontSize:"0px",lineHeight:"0px",textAlign:"left"},b,!0)}return b},_setObjDefaultAttributes:function(a){var b=this._getDefaultAttributes(a.tagName);EBG.mergeObj(a.attributes,b,!0);b.style=this._getDefaultStyle(a.tagName);a.attributes.style&&EBG.mergeObj(a.attributes.style,b.style,!0);a.attributes=b},_getObjParamsStr:function(a){var a=a.params,b="",c;for(c in a)a.hasOwnProperty(c)&&(b+=EBG.format("<PARAM name='{0}' value='{1}'>",c,a[c]));return b},_getObjAttributesStr:function(a){var a=
  59. a.attributes,b="",c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(EBG.isObj(d)){var e=d,d="",f;for(f in e)if(e.hasOwnProperty(f)){var g=e[f];"textAlign"==f&&(f="text-align");d+=EBG.format("{0}:{1}; ",f,g)}}if(d)try{d=d.toString().replace(/\"/ig,"&quot;"),b+=EBG.format(' {0}="{1}"',c,d)}catch(h){}}return b},handleEvent:function(a){this._handleEvent(a)},setElemStyle:function(a,b,c){a.style[b]=c},getBrowserLanguage:function(){var a="en-US";if("undefined"!==typeof navigator.language)a=navigator.language;
  60. else if("undefined"!==typeof navigator.userLanguage)a=navigator.userLanguage;return a},getPositioningById:function(a,b,c){return this.getPositioningByElement(this.getElementById(a),b,c)},getPositioningByElement:function(a,b,c){a=a&&a.getBoundingClientRect?a.getBoundingClientRect():null;if(!a)return null;b=this.getScrollLeftTop(b,c);return{X:Math.floor(a.left)+b.X,Y:Math.floor(a.top)+b.Y}},getScrollLeftTop:function(a,b){var c=this._getCurrentWindow(a,b),d=c.document,e={X:{"0":"XOffset",1:"Left"},Y:{"0":"YOffset",
  61. 1:"Top"}},f;for(f in e)e[f]=c["page"+e[f][0]]||(d.documentElement?d.documentElement["scroll"+e[f][1]]:d.documentElement["page"+e[f][0]])||(d.body?d.body["scroll"+e[f][1]]:0);return e},_getCurrentWindow:function(a){try{return a?this.getDisplayWin():top}catch(b){}},removeElement:function(a){if(a=this.getElementById(a))a.parentNode.removeChild(a),a.removeNode&&a.removeNode(!0)},appendChildElement:function(a,b){a&&b&&this.getElementById(a).appendChild(b)},getMaxZIndex:function(a){if(this.browser.isIE()&&
  62. 8>this.browser.getVersion())return 10001;var b=0;if(a){var c=this.getStyleOfElem(a);c&&c.zIndex&&(b=c.zIndex);for(var d in a.childNodes)d&&a.childNodes[d]&&(c=this.getMaxZIndex(a.childNodes[d]),b=b>c?b:c)}return b},setCookieKeyValuePair:function(a,b,c){if(EBG.isDefined(a)&&""!=a&&EBG.isDefined(b))b=EBG.isDefined(c)&&c?escape(b):b,document.cookie=a+"="+b+";"}};EBG.declareClass(EBG.Adaptors.StdWebAdaptor,null);EBG.Adaptors.Browser=function(a,b,c){this.set(a,b,c)};
  63. EBG.Adaptors.Browser.prototype={_platform:0,_browserType:0,_browserVer:0,_browserTypes:{NON_SUPPORTED:0,IE:1,FF:2,NN:3,SAFARI:4,CHROME:5,AOL:6,OPERA:7},_platformTypes:{NON_SUPPORTED:0,WIN_95:1,WIN_98:2,WIN_2000:3,WIN_XP:4,WIN_ME:5,WIN_NT:6,MAC:7,WIN_VISTA:8,WIN_7:9,IPHONE:10,IPAD:11,IPOD:12,ANDROID_2_TAB:13,ANDROID_3_TAB:14,BLACKBARRY_5:15,WIN_MOBILE_7:16,ANDROID_2_MOBILE:17,ANDROID_3_MOBILE:18},set:function(a,b,c){a=a?a:this._platformTypes.NON_SUPPORTED;b=b?b:this._browserTypes.NON_SUPPORTED;this._platform=
  64. a;this._browserType=b;this._browserVer=c?c:0},getVersion:function(){return this._browserVer},getDocumentMode:function(){return window.document.documentMode},isIE:function(){return this._browserType==this._browserTypes.IE||this._browserType==this._browserTypes.AOL},isStrictType:function(a){var b=!1;this.isIE()&&(b=a?"CSS1Compat"==a.compatMode:"CSS1Compat"==document.compatMode);return b},isFF:function(){return this._browserType==this._browserTypes.FF},isSafari:function(){return this._browserType==this._browserTypes.SAFARI},
  65. isChrome:function(){return this._browserType==this._browserTypes.CHROME},isOpera:function(){return this._browserType==this._browserTypes.OPERA},isMac:function(){return this._platform==this._platformTypes.MAC},isMobile:function(){return this._platform==this._platformTypes.IPHONE||this._platform==this._platformTypes.IPAD||this._platform==this._platformTypes.IPOD||this._platform==this._platformTypes.ANDROID_2_TAB||this._platform==this._platformTypes.ANDROID_3_TAB||this._platform==this._platformTypes.BLACKBARRY_5||
  66. this._platform==this._platformTypes.WIN_MOBILE_7||this._platform==this._platformTypes.ANDROID_2_MOBILE||this._platform==this._platformTypes.ANDROID_3_MOBILE?!0:!1}};EBG.Adaptors.FlashDetector=function(){this._init()};
  67. EBG.Adaptors.FlashDetector.prototype={version:0,_init:function(){var a=-1;try{a=(new ActiveXObject("Shockwaveflash.Shockwaveflash.7")).GetVariable("$version"),a=this._splitFlashMajorMinorVersions(a),a=Number(a)}catch(b){}if(-1==a)try{var c=0,d=0,e=0;if(null!=navigator.plugins&&0<navigator.plugins.length){var f=navigator.mimeTypes;if(f&&f["application/x-shockwave-flash"]&&f["application/x-shockwave-flash"].enabledPlugin&&f["application/x-shockwave-flash"].enabledPlugin.description){var g=f["application/x-shockwave-flash"].enabledPlugin.description.split(" "),
  68. h=g[2].split("."),c=h[0],d=h[1],e=g[3];""==e&&(e=g[4]);isNaN(e[0])&&(e=e.substring(1));0<e.indexOf("d")&&(e=e.substring(0,e.indexOf("d")))}a=Number(c+"."+d+e)}}catch(k){}if(!isNaN(a))this.version=a},_splitFlashMajorMinorVersions:function(a){if(a)return a=a.split(" ")[1].split(","),EBG.format("{0}.{1}{2}",a[0],a[1],a[2])}};EBG.declareNamespace("Interactions");
  69. EBG.Interactions.SystemInts={CLICK:"_eyeblaster",AD_DURATION:"ebAdDuration",REPLAY:"ebReplay",CLOSE:"ebClose",CLOSE_REM:"ebRemClose",DEFAULT_CLICK:"ebDefaultClick",USER_INTERACTION:"ebUserInteraction",UNIQUE_VIDEO_STARTED:"ebUniqueVideoStarted",DWELL_TIME:"ebDwellTime",DWELL_UNIQUE:"ebUniqueDwell",RICH_FLASH_PLAYED:"ebRichFlashPlayed",INT_DURATION:"ebIntDuration",VISIBILITY_RECORDABLE:"VsR",VISIBILITY_AGENCY_RECORDABLE:"VsRAg",VISIBILITY_ADVERTISER_RECORDABLE:"VsRAd",VISIBILITY_ADVERTISER:"VsAd",
  70. VISIBILITY_AGENCY:"VsAg",VISIBILITY_IAB:"VsIAB",VISIBILITY_ADVERTISER_DURATION:"VsAdDu",VISIBILITY_AGENCY_DURATION:"VsAgDu",VISIBILITY_AVG_AD_SURFACE:"VsAvSu",VISIBILITY_AVG_SCREEN_SHARE:"VsAvSc",REM_DURATION:"ebRemDuration",INTRO_FULL_PLAY:"ebFullPlay",REM_FULL_PLAY:"ebRemFullPlay"};EBG.Interactions.VideoInteractionOrder=[EBG.VideoInteraction.STARTED,EBG.VideoInteraction.PERCENT_25_PLAYED,EBG.VideoInteraction.PERCENT_50_PLAYED,EBG.VideoInteraction.PERCENT_75_PLAYED,EBG.VideoInteraction.FULLPLAY];
  71. EBG.Interactions.Categories={SYSTEM:2,VIDEO:1,CUSTOM:0};EBG.Interactions.InitiationTypes={AUTO:"auto",USER:"user"};EBG.Interactions.InteractionTypes={COUNTER:"Counter",TIMER:"Timer"};EBG.Interactions.checkURL=function(a){var b=a.toLowerCase();-1==b.indexOf("http://")&&-1==b.indexOf("https://")&&-1==b.indexOf("ftp://")&&-1==b.indexOf("aim:")&&-1==b.indexOf("mailto:")&&(a=0==b.indexOf("/")?"http://"+EBG.adaptor.getHostName()+a:"http://"+a);return a};EBG.Interactions.RemoteServersData=function(){};
  72. EBG.Interactions.RemoteServersData.prototype={networkUrl:null,agencyUrl:null};EBG.declareClass(EBG.Interactions.RemoteServersData,null);EBG.Interactions.InteractionData=function(a,b,c){this.reportingName=a;this.adUId=b;this.category=c};EBG.Interactions.InteractionData.prototype={initiationType:EBG.Interactions.InitiationTypes.AUTO,category:EBG.Interactions.Categories.SYSTEM,isPanel:!1};EBG.declareClass(EBG.Interactions.InteractionData,null);
  73. EBG.Interactions.CounterInteractionData=function(a,b,c){EBG.callSuperConstructor(EBG.Interactions.CounterInteractionData,this,[a,c,b]);this.remoteServers=new EBG.Interactions.RemoteServersData};EBG.Interactions.CounterInteractionData.prototype={reportImmediately:!1,countAsClick:!1,remoteServers:null,clickURL:null,numLeftToReport:10,state:null};EBG.declareClass(EBG.Interactions.CounterInteractionData,EBG.Interactions.InteractionData);
  74. EBG.Interactions.TimerInteractionData=function(a,b,c){this.reportingName=a;EBG.callSuperConstructor(EBG.Interactions.TimerInteractionData,this,[a,c,b])};EBG.Interactions.TimerInteractionData.prototype={value:0,startTime:0,idleDuration:0};EBG.declareClass(EBG.Interactions.TimerInteractionData,EBG.Interactions.InteractionData);EBG.Interactions.AggregationInteractionData=function(a,b,c){this.reportingName=a;EBG.callSuperConstructor(EBG.Interactions.AggregationInteractionData,this,[a,c,b])};
  75. EBG.Interactions.AggregationInteractionData.prototype={value:0,isPlaying:!1};EBG.declareClass(EBG.Interactions.AggregationInteractionData,EBG.Interactions.InteractionData);EBG.Interactions.Interaction=function(){};
  76. EBG.Interactions.Interaction.prototype={unique:!0,_escapeInteractionName:function(a){a=a.toString();a=a.replace(/\~/ig,"_");a=a.replace(/\^/ig,"_");a=a.replace(/\|/ig,"_");return escape(a)},_buildReportFormat:function(a,b,c,d){d||(d=0);return EBG.format("{0}{2}{1}{3}{1}{4}{1}{5}{6}{7}{8}{9}",EBG.Interactions.InteractionManager.charIntDelimeter,EBG.Interactions.InteractionManager.charAdFieldsDelimeter,this._escapeInteractionName(this.interactionData.reportingName),c,d,a,this.unique?1:0,b,this.interactionData.category,
  77. this.interactionData.isPanel?1:0)}};EBG.Interactions.CounterInteraction=function(a){EBG.callSuperConstructor(EBG.Interactions.CounterInteraction,this);this.interactionData=a?a:new EBG.Interactions.CounterInteractionData};
  78. EBG.Interactions.CounterInteraction.prototype={type:EBG.Interactions.InteractionTypes.COUNTER,handle:function(a){var b=this.interactionData,c=!0;0==b.numLeftToReport||EBG.isPreview?c=!1:b.numLeftToReport--;var d=!1,e=!1;if(b.clickData){var f=b.clickData,g="undefined"==typeof f.tmpData.windowWasOpen?!1:f.tmpData.windowWasOpen,h=f.tmpData?f.tmpData.clickUrl:null,k=h||f.jumpUrl;if(k){if(e=c&&(f.tmpData.isClick||this._isEBClick()),!g){if(e){this._isEBClick()&&(h||(k=""),d=!0);var p=b.reportingName.toLowerCase()==
  79. EBG.Interactions.SystemInts.DEFAULT_CLICK.toLowerCase(),g=f.tmpData.isProductClick?f.tmpData.isClick?1:2:f.tmpData.isClick?1:0,k=""==k?"":EBG.Interactions.checkURL(k),k=this._getBannerRedirectUrl(k,g,p,f.tmpData.clickedVersion)}k=""==k?"":EBG.Interactions.checkURL(k);if(b.adConfig.newClickTracking){var q=[];if(f.tmpData&&!EBG.isPreview){if(f.tmpData.isClick){q=b.adConfig.clickTrackingUrls;if(p||b.adConfig.showOnlyImage)for(p=0;p<b.adConfig.defaultClickTrackingUrls.length;p++)q[q.length]=b.adConfig.defaultClickTrackingUrls[p];
  80. this._handleRemoteServers(q)}if(f.tmpData.isProductClick&&f.tmpData.clickedVerUrl)q[q.length]=f.tmpData.clickedVerUrl}}-1==f.target.indexOf(EBG.WindowTarget.BLANK)?(b.reportImmediately=!0,EBG.runTimed(this,this._openPage,[k,f,q],1E3)):this._openPage(k,f,q)}}else this._isEBClick()&&(c=!1)}f="";b.adConfig.newClickTracking?c&&!d&&(f=this._getReportingData(a,e)):c&&(this._handleRemoteServers(),d||(f=this._getReportingData(a,e)));return f},getClickTagUrl:function(a){var b="",a=EBG.isDefined(a)&&""!=a?
  81. EBG.Interactions.checkURL(a):void 0;EBG.isPreview?EBG.isInWorkshop?b=EBG.format("ReportPage_{0}.html",HTMLPageVer):(b=this.interactionData.clickData.jumpUrl,4<=b.length&&"http"!=b.substr(0,4)&&(b=EBG.format("{0}{1}",ebPtcl,b))):(b=this._getBannerRedirectUrl(a),b=EBG.format("{0}/ReportPage{1}.html?ebReportURL={2}$$ebImpressionID={3}",ebBigS,EBG.reportPageVer,escape(b),EBG.Ads.Ad.Fn.getRandFromAdUId(this.interactionData.adConfig.uid)),a=-1,EBG.adaptor.browser.isIE()&&(a=9<=EBG.adaptor.browser.getVersion()?
  82. 4096:2048,a-=b.length),a=this._getReportPageTrackingUrls(a),b+=a);return b},_getReportPageTrackingUrls:function(a){var b="$$ebTURLs=[";if(-1!=a){if(b.length>=a)return"";a-=b.length}for(var c=this.interactionData.adConfig.clickTrackingUrls,d=0;d<c.length;d++){var e=EBG.format('{0}"{1}"',0!=d?",":"",c[d]);if(-1!=a){if(e.length>=a)break;a-=e.length}b+=e}return b+"]"},_openPage:function(a,b,c){if(this.interactionData.adConfig.newClickTracking)if(this.tempWin=null,c&&0<c.length&&!EBG.isIMBanner&&!b.tmpData.isEB)try{var d=
  83. this._getReportScript(c,a),e=EBG.adaptor.getDomain();if(EBG.adaptor.browser.isIE()&&"undefined"!=e&&""!=e&&EBG.adaptor.getHostName()!=e){var f=this._getSourceUrl(e,a);EBG.intMgr.adsData[this.interactionData.adConfig.uid].clickReportScript=d;this.tempWin=EBG.adaptor.openPage(f,b)}else(this.tempWin=EBG.adaptor.openPage("",b))&&this.tempWin.document&&this.tempWin.document.write(d)}catch(g){}else EBG.adaptor.openPage(a,b);else EBG.adaptor.openPage(a,b)},_getReportScript:function(a,b){return'<script type="text/javascript">var clkURLs = ["'+
  84. a.join('","')+'"];var reported = false;var cntr = 0; for (var i=0;i<'+a.length+';i++){var img = document.createElement("img");img.onload = img.onerror = function(){cntr++; if (cntr=='+a.length+' && !reported){reported = true; window.location.replace("'+b+'");}};try{img.src = clkURLs[i];}catch(e){cntr++; if (cntr=='+a.length+' && !reported){reported = true; window.location.replace("'+b+'");}}}setTimeout(function(){if (!reported){reported=true;window.location.replace("'+b+'");}}, 1000);<\/script><body></body>'},
  85. _getSourceUrl:function(a,b){return'javascript: void((function(y){try{document.open();document.domain="'+a+'";var x = window.opener.EBG.intMgr.getRepScr("'+this.interactionData.adConfig.uid+'");if (typeof(x) != "undefined" && x != null && x != ""){document.write(x);} else {window.location.replace(y);}document.close();}catch(e){window.location.replace(y);}})("'+b+'"))'},_getReportingData:function(a,b){var c=0,d=0;b||(c=this.interactionData.clickData&&this.interactionData.clickData.tmpData.isClick?1:
  86. 0,d=this.interactionData.initiationType==EBG.Interactions.InitiationTypes.USER?1:0);c=this._buildReportFormat(c,d,0,a);this.unique=!1;return c},_getBannerRedirectUrl:function(a,b,c,d){var c=EBG.isBool(c)?c:!1,e=this.interactionData.adConfig,f=EBG.Ads.Ad.Fn.getAdIdFromAdUId(this.interactionData.adConfig.uid),f=EBG.protocol+EBG.combinePaths(EBG.bs,EBG.format("BurstingPipe/adServer.bs?cn=brd&Page={0}&PluID={1}&Pos={2}&EyeblasterID={3}",e.page,e.pluId,e.rnd,f));void 0!=b&&(f=EBG.format("{0}&clk={1}",
  87. f,b));if(e.massVersioning.adVersions||e.massVersioning.defaultAdVersion)f=d?f+EBG.format("&vid={0}&vcl=1",d):f+EBG.format("&vid={0}",EBG.Ads.Ad.Fn.getVersionToReport(e.massVersioning.adVersions));a&&(a=a.replace(/#/g,"%23"),f+=EBG.format("&rtu=$${0}$$",a));e.massVersioning.targetAudienceId&&(f+=EBG.format("&ta={0}",e.massVersioning.targetAudienceId));e.massVersioning.deliveryGroupId&&(f+=EBG.format("&dg={0}",e.massVersioning.deliveryGroupId));e.sPublisherPlacementId&&(f+=EBG.format("&pc={0}",e.sPublisherPlacementId));
  88. c||(f+="&di=0");e.sID&&(f+=EBG.format("&sessionid={0}",e.sID));EBGInfra.isDefined(e.optOut)&&(f+=EBG.format("&OptOut={0}",e.optOut));return f},_handleRemoteServers:function(a){if(!EBG.isPreview&&this.interactionData.remoteServers){var b=this.interactionData.remoteServers,c=new EBG.Events.Event(EBG.Events.EventNames.INTERACTION_REPORT_REMOTE_SERVERS);c.dispatcher=this;c.timing=EBG.Events.EventTiming.BEFORE;c.eventData={remoteServers:b};EBG.eventMgr.dispatchEvent(c)||(this.interactionData.adConfig.newClickTracking?
  89. a&&(b.networkUrl&&(c=this._replaceRSTokens(b.networkUrl),a[a.length]=c),b.agencyUrl&&(b=this._replaceRSTokens(b.agencyUrl),a[a.length]=b)):(b.networkUrl&&(c=this._replaceRSTokens(b.networkUrl),EBG.adaptor.reportToRemoteServerUsingImage(c)),b.agencyUrl&&(b=this._replaceRSTokens(b.agencyUrl),EBG.adaptor.reportToRemoteServerUsingImage(b))))}},_replaceRSTokens:function(a){try{a=a.replace(/\[ebInteraction\]/ig,this.interactionData.reportingName),a=a.replace(/\[ebInteractionNum\]/ig,EBG.intMgr.adsData[this.interactionData.adConfig.uid].numOfInteractions)}catch(b){}return a},
  90. _getReportingPage:function(){var a=this.interactionData.adConfig.page,a=a.replace(/\~/ig,"_"),a=a.replace(/\^/ig,"_"),a=a.replace(/\|/ig,"_");return escape(a)},_isEBClick:function(){return this.interactionData&&(EBG.strEQ(this.interactionData.reportingName,EBG.Interactions.SystemInts.CLICK)||EBG.strEQ(this.interactionData.reportingName,EBG.Interactions.SystemInts.DEFAULT_CLICK))}};EBG.declareClass(EBG.Interactions.CounterInteraction,EBG.Interactions.Interaction);
  91. EBG.Interactions.StdInteractionManager=function(){this.adsData=EBG.intMgr?EBG.intMgr.adsData:{};this.adsIntQueues=EBG.intMgr?EBG.intMgr.adsIntQueues:{}};
  92. EBG.Interactions.StdInteractionManager.prototype={copy:function(a){this.adsIntQueues=a.adsIntQueues;this.adsData=a.adsData},initAdData:function(a,b){var c=a.uid;this.adsIntQueues[c]=[];c=this.adsData[c]={adConfig:a,isUserInteractionOccur:!1,isClickOccur:!1,isProductClicked:[],numOfInteractions:0,delayIntReport:b,videoState:{},assetsTimers:{},clickReportScript:""};c[EBG.Interactions.InteractionTypes.COUNTER]={};c[EBG.Interactions.InteractionTypes.TIMER]={};c.adConfig.isStdAd||this._addSystemInteractions(a)},
  93. allowInteractionReport:function(a){if(this.adsData[a])this.adsData[a].delayIntReport=!1},addInteraction:function(a,b){var c=EBG.isDefinedNotNull(b)?b.toLowerCase():a.interactionData.reportingName.toLowerCase(),d=a.interactionData.adUId,e=new EBG.Events.Event(EBG.Events.EventNames.ADD_INTERACTION);e.eventData=a;e.dispatcher={_adConfig:{rnd:this.adsData[d].adConfig.rnd}};e.timing=EBG.Events.EventTiming.BEFORE;var f=EBG.eventMgr.dispatchEvent(e),g=this.adsData[d];if(!f){if(!g)return;g[a.type][c]=a;a.interactionData.adConfig=
  94. this.adsData[d].adConfig}e.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(e)},getClickTag:function(a){return(a=this._getCounterInteraction(EBG.Interactions.SystemInts.CLICK,a))?a.getClickTagUrl():""},getClickTarget:function(a){return(a=this._getCounterInteraction(EBG.Interactions.SystemInts.CLICK,a))?a.interactionData.clickData.target:""},handleCounterInteraction:function(a,b,c,d,e,f){var g=this.adsData[b].adConfig.isStdAd&&this.adsData[b].adConfig.visibility.mode!=EBG.VisibilityMode.ENHANCED_MODE&&
  95. this.adsData[b].adConfig.visibility.mode!=EBG.VisibilityMode.BASIC_MODE;"undefined"==typeof f&&(f=!0);var c=c||0,h=this._getCounterInteraction(a,b);if(d)d=h.interactionData,d.initiationType=EBG.Interactions.InitiationTypes.USER,g||this._handleUserInteraction(b,d);if(h){d=h.interactionData;if(d.clickData)d.clickData.tmpData=e;e=new EBG.Events.Event(EBG.Events.EventNames.HANDLE_COUNTER_INTERACTION);e.dispatcher=this;if(!e.dispatcher._adConfig)e.dispatcher._adConfig={rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(b)};
  96. e.timing=EBG.Events.EventTiming.BEFORE;e.eventData={interaction:h};if(!EBG.eventMgr.dispatchEvent(e)){g||this._handleSpecialInteractions(a,b,c);if(d.clickData){if(1==d.clickData.fClose){var k=new EBG.Events.Event(EBG.Events.EventNames.CLOSE_AD);k.dispatcher=this;k.eventData={closeDueToClickthrough:!0};EBG.eventMgr.dispatchEvent(k)}d.clickData.tmpData.isClick=d.countAsClick&&!this.adsData[b].isClickOccur;if(d.clickData.tmpData.isClick)this.adsData[b].isClickOccur=!0;d.clickData.tmpData.isProductClick=
  97. d.countAsClick&&d.clickData.tmpData.clickedVersion&&!this.adsData[b].isProductClicked[d.clickData.tmpData.clickedVersion];d.clickData.tmpData.isProductClick&&(this.adsData[b].isProductClicked[d.clickData.tmpData.clickedVersion]=!0)}f=f?h.handle(c):"";if(this.adsData[b].adConfig.newClickTracking){if(d.clickData&&!EBG.isPreview&&(EBG.isIMBanner||d.clickData.tmpData.isEB)){if(d.clickData.tmpData.isClick){k=this.adsData[b].adConfig.clickTrackingUrls;for(h=0;h<k.length;h++)EBG.adaptor.reportToRemoteServerUsingImage(k[h])}d.clickData.tmpData.isProductClick&&
  98. d.clickData.tmpData.clickedVerUrl&&EBG.adaptor.reportToRemoteServerUsingImage(d.clickData.tmpData.clickedVerUrl)}}else if(d.clickData&&!EBG.isPreview){if(d.clickData.tmpData.isClick){k=this.adsData[b].adConfig.clickTrackingUrls;for(h=0;h<k.length;h++)EBG.adaptor.reportToRemoteServerUsingImage(k[h]);if(d.reportingName.toLowerCase()==EBG.Interactions.SystemInts.DEFAULT_CLICK.toLowerCase()||this.adsData[b].adConfig.showOnlyImage){k=this.adsData[b].adConfig.defaultClickTrackingUrls;for(h=0;h<k.length;h++)EBG.adaptor.reportToRemoteServerUsingImage(k[h])}}d.clickData.tmpData.isProductClick&&
  99. d.clickData.tmpData.clickedVerUrl&&EBG.adaptor.reportToRemoteServerUsingImage(d.clickData.tmpData.clickedVerUrl)}this.adsData[b].numOfInteractions++;g||(this._handleUserInteraction(b,d),f&&this._handleReportData(b,d,f),this._handleSpecialInteractions(a,b,c),f&&!this._isReportDataInQueue(b,f)&&this.reportInteractionQueues());e.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(e)}}},isInteractionExist:function(a,b,c){if(this.adsData[c]&&this.adsData[c][b])return this.adsData[c][b][a]?
  100. !0:!1},_getCounterInteraction:function(a,b){a=a.toLowerCase();if(this.adsData[b]&&this.adsData[b][EBG.Interactions.InteractionTypes.COUNTER]&&this.adsData[b][EBG.Interactions.InteractionTypes.COUNTER][a])return this.adsData[b][EBG.Interactions.InteractionTypes.COUNTER][a]},getRepScr:function(a){if(this.adsData[a]&&this.adsData[a].clickReportScript)return this.adsData[a].clickReportScript}};EBG.declareClass(EBG.Interactions.StdInteractionManager,null);EBG.declareNamespace("AdChoice");
  101. EBG.AdChoice.AdChoiceManager=function(a){this._adConfig=a;this._active=a.adChoice.includeMarker;this._iconAdded=!1};EBG.AdChoice.AdChoiceManager.ImageData=function(){this.iconSrc="";this.id=""};
  102. EBG.AdChoice.AdChoiceManager.IabIconData={en:{icon:"OBA_DEFAULT.png",url:"http://www.youronlinechoices.com/uk/"},"de-at":{icon:"OBA_AUSTRIA.png",url:"http://www.youronlinechoices.com/at/"},"fr-be":{icon:"OBA_BELGIUM_FR.png",url:"http://www.youronlinechoices.com/be-fr/"},"nl-be":{icon:"OBA_BELGIUM_NL.png",url:"http://www.youronlinechoices.com/be-nl/"},bg:{icon:"OBA_BULGARIA.png",url:"http://www.youronlinechoices.com/bg/"},cs:{icon:"OBA_CZECH.png",url:"http://www.youronlinechoices.com/cs/"},da:{icon:"OBA_DENMARK.png",
  103. url:"http://www.youronlinechoices.com/den/"},fi:{icon:"OBA_FINLAND.png",url:"http://www.youronlinechoices.com/fi/"},fr:{icon:"OBA_FRANCE.png",url:"http://www.youronlinechoices.com/fr/"},de:{icon:"OBA_GERMANY.png",url:"http://www.youronlinechoices.com/de/"},el:{icon:"OBA_GREEK.png",url:"http://www.youronlinechoices.com/gr/"},hu:{icon:"OBA_HUNGARY.png",url:"http://www.youronlinechoices.com/hu/"},"en-ie":{icon:"OBA_IRELAND.png",url:"http://www.youronlinechoices.com/ie/"},it:{icon:"OBA_ITALY.png",url:"http://www.youronlinechoices.com/it/"},
  104. nl:{icon:"OBA_NETHERLANDS.png",url:"http://www.youronlinechoices.com/nl/"},no:{icon:"OBA_NORWAY.png",url:"http://www.youronlinechoices.com/nor/"},pl:{icon:"OBA_POLAND.png",url:"http://www.youronlinechoices.com/pl/"},ro:{icon:"OBA_ROMANIA.png",url:"http://www.youronlinechoices.com/ro/"},sl:{icon:"OBA_SLOVAKIA.png",url:"http://www.youronlinechoices.com/sl/"},es:{icon:"OBA_SPAIN.png",url:"http://www.youronlinechoices.com/es/"},sv:{icon:"OBA_SWEDEN.png",url:"http://www.youronlinechoices.com/se/"},"de-ch":{icon:"OBA_SWITZERLAND_DE.png",
  105. url:"http://www.youronlinechoices.com/ch-de/"},"fr-ch":{icon:"OBA_SWITZERLAND_FR.png",url:"http://www.youronlinechoices.com/ch-fr/"},"it-ch":{icon:"OBA_SWITZERLAND_IT.png",url:"http://www.youronlinechoices.com/ch-it/"},"en-gb":{icon:"OBA_UK.png",url:"http://www.youronlinechoices.com/uk/"},hr:{icon:"OBA_DEFAULT.png",url:"http://www.youronlinechoices.com/hr/"},is:{icon:"OBA_DEFAULT.png",url:"http://www.youronlinechoices.com/is/"},lt:{icon:"OBA_DEFAULT.png",url:"http://www.youronlinechoices.com/lt/"},
  106. lv:{icon:"OBA_DEFAULT.png",url:"http://www.youronlinechoices.com/lv/"},pt:{icon:"OBA_DEFAULT.png",url:"http://www.youronlinechoices.com/pt/"},sk:{icon:"OBA_DEFAULT.png",url:"http://www.youronlinechoices.com/sk/"}};EBG.AdChoice.AdChoiceManager.NaiIconData={en:{icon:"OBA_DEFAULT.png",url:"http://www.aboutads.info/consumers"}};EBG.AdChoice.AdChoiceManager.IabClosedIconName="OBA.png";EBG.AdChoice.AdChoiceManager.NaiClosedIconName="OBA.png";
  107. EBG.AdChoice.AdChoiceManager.VisibilityState={HIDDEN:"hidden",VISIBLE:"visible"};EBG.AdChoice.AdChoiceManager.Position={ABSOLUTE:"absolute",RELATIVE:"relative"};EBG.AdChoice.AdChoiceManager.ImageLoadTimeout=100;EBG.AdChoice.AdChoiceManager.DefaultOffset=-1E3;
  108. EBG.AdChoice.AdChoiceManager.prototype={_imgData:null,_imgExpData:null,_iconLocalData:null,_acCloseIconName:null,_spanId:null,_iconsBaseUrl:null,_containerId:null,_assetObjId:null,init:function(){if(this._active){this._iconsBaseUrl=this._getIconsDir(this._adConfig.adChoice.iconPosition);var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.ADD_CREATIVES,this._handleAdChoice,this);a.timing=EBG.Events.EventTiming.AFTER;a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd};EBG.eventMgr.subscribeToEvent(a);
  109. a=new EBG.Events.EventSubscription(EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE,this._handleAdChoice,this);a.timing=EBG.Events.EventTiming.AFTER;a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd};EBG.eventMgr.subscribeToEvent(a);a=new EBG.Events.EventSubscription(EBG.Events.EventNames.ADD_BANNER_DEFAULT_FLASH_CREATIVE,this._handleAdChoice,this);a.timing=EBG.Events.EventTiming.AFTER;a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd};EBG.eventMgr.subscribeToEvent(a);EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_RESIZE,
  110. this._pageResizeHandler,this));this._adConfig.adChoice.certificationProgram==EBG.AcCertProgram.NAI_US?(this._iconLocalData=this._getIconDataByLanguage(EBG.AdChoice.AdChoiceManager.NaiIconData),this._acCloseIconName=EBG.AdChoice.AdChoiceManager.NaiClosedIconName):(this._iconLocalData=this._getIconDataByLanguage(EBG.AdChoice.AdChoiceManager.IabIconData),this._acCloseIconName=EBG.AdChoice.AdChoiceManager.IabClosedIconName)}},_handleAdChoice:function(a){if(a.eventData&&!a.eventData.isPanel)this._assetObjId=
  111. a.eventData.assetId;if(this._iconAdded){var a=EBG.adaptor.getElementById(this._containerId),b=EBG.adaptor.getElementById(this._spanId);EBG.adaptor.removeElement(b);EBG.adaptor.appendChildElement(a.id,b)}else this._iconAdded=!0,this._containerId=this._adConfig.placeHolderId,this._imgData=this._getImageData(),this._imgExpData=this._getExpImageData(),this._addAdChoiceIcons(this._imgData,this._imgExpData,this._getAdChoiceUrl()),this._subscribeIconToEvents(this._imgData.id,this._imgExpData.id)},_getImageData:function(){var a=
  112. new EBG.AdChoice.AdChoiceManager.ImageData;a.iconSrc=this._iconsBaseUrl+this._acCloseIconName;a.id="acImage_"+this._adConfig.uid;return a},_getExpImageData:function(){var a=new EBG.AdChoice.AdChoiceManager.ImageData;a.iconSrc=this._iconsBaseUrl+this._iconLocalData.icon;a.id="acExpImage_"+this._adConfig.uid;return a},_getAdChoiceUrl:function(){var a="";return a=this._adConfig.adChoice.customUrl?unescape(this._adConfig.adChoice.customUrl):this._iconLocalData.url},_getIconDataByLanguage:function(a){var b=
  113. EBG.adaptor.getBrowserLanguage().toLowerCase(),c=a[b];c||(b=b.split("-")[0],c=a[b]);c||(c=a.en);return c},_getIconOffsets:function(a,b,c,d,e,f){var g={offsetLeft:EBG.px(EBG.AdChoice.AdChoiceManager.DefaultOffset),offsetTop:EBG.px(EBG.AdChoice.AdChoiceManager.DefaultOffset)};if(this._assetObjId&&(adPos=EBG.adaptor.getPositioningById(this._assetObjId,!0,this._adConfig.actualServingMode))){acPos=EBG.adaptor.getPositioningById(a,!0,this._adConfig.actualServingMode);var h=EBG.adaptor.getStyleOfElem(EBG.adaptor.getElementById(a)),
  114. a=parseInt(h.left)+adPos.X-acPos.X,h=parseInt(h.top)+adPos.Y-acPos.Y;switch(b){case EBG.AcIconPosition.BottomLeft:g.offsetLeft=EBG.px(a);g.offsetTop=EBG.px(h+f-d);break;case EBG.AcIconPosition.BottomRight:g.offsetLeft=EBG.px(a+e-c);g.offsetTop=EBG.px(h+f-d);break;case EBG.AcIconPosition.TopLeft:g.offsetLeft=EBG.px(a);g.offsetTop=EBG.px(h);break;case EBG.AcIconPosition.TopRight:g.offsetLeft=EBG.px(a+e-c),g.offsetTop=EBG.px(h)}}return g},_getIconsDir:function(a){var b=this._adConfig.imagesDir+"/AdChoice/";
  115. switch(a){case EBG.AcIconPosition.BottomLeft:b+="BottomLeft/";break;case EBG.AcIconPosition.BottomRight:b+="BottomRight/";break;case EBG.AcIconPosition.TopLeft:b+="TopLeft/";break;case EBG.AcIconPosition.TopRight:b+="TopRight/"}return b},_addAdChoiceIcons:function(a,b,c){var d="acImgLinkWrapper_"+this._adConfig.uid;this._spanId="acSpan_"+this._adConfig.uid;var e=EBG.adaptor.getElementById(this._containerId);if(e&&(c={tagName:EBG.Adaptors.TagNames.DIV,attributes:{id:this._spanId,style:{position:EBG.AdChoice.AdChoiceManager.Position.ABSOLUTE,
  116. zIndex:EBG.adaptor.getMaxZIndex(e)+1}},children:[{tagName:EBG.Adaptors.TagNames.A,attributes:{id:d,target:"_blank",href:c,mmskipreplace:1},children:null}]},this._containerId==this._adConfig.placeHolderId?EBG.adaptor.inject(c,EBG.Adaptors.InjectionMethod.APPEND,e):EBG.adaptor.inject(c,EBG.Adaptors.InjectionMethod.INSERT_BEFORE,e),d=EBG.adaptor.getElementById(d))){e={tagName:EBG.Adaptors.TagNames.IMG,attributes:{id:a.id,style:{position:EBG.AdChoice.AdChoiceManager.Position.ABSOLUTE,visibility:EBG.AdChoice.AdChoiceManager.VisibilityState.VISIBLE,
  117. left:EBG.px(EBG.AdChoice.AdChoiceManager.DefaultOffset),top:EBG.px(EBG.AdChoice.AdChoiceManager.DefaultOffset)}},children:null};EBG.adaptor.inject(e,EBG.Adaptors.InjectionMethod.APPEND,d);e={tagName:EBG.Adaptors.TagNames.IMG,attributes:{id:b.id,style:{position:EBG.AdChoice.AdChoiceManager.Position.ABSOLUTE,visibility:EBG.AdChoice.AdChoiceManager.VisibilityState.HIDDEN,left:EBG.px(EBG.AdChoice.AdChoiceManager.DefaultOffset),top:EBG.px(EBG.AdChoice.AdChoiceManager.DefaultOffset)}},children:null};EBG.adaptor.inject(e,
  118. EBG.Adaptors.InjectionMethod.APPEND,d);var d=EBG.adaptor.getElementById(a.id),e=EBG.adaptor.getElementById(b.id),f=this,g=function(){EBG.runTimed(f,f._handleImgOnloadEvent,[a.id,0],EBG.AdChoice.AdChoiceManager.ImageLoadTimeout)},c=function(){EBG.runTimed(f,f._handleImgOnloadEvent,[b.id,0],EBG.AdChoice.AdChoiceManager.ImageLoadTimeout)};if(d)g=new EBG.Events.EventSubscription("load",g,this),g.isElementEvent=!0,g.elementId=a.id,EBG.eventMgr.subscribeToEvent(g),d.src=a.iconSrc;if(e)g=new EBG.Events.EventSubscription("load",
  119. c,this),g.isElementEvent=!0,g.elementId=b.id,EBG.eventMgr.subscribeToEvent(g),e.src=b.iconSrc}},_subscribeIconToEvents:function(a,b){var c=this,d=function(){c._handleMouseOverEvent(a,b)},e=new EBG.Events.EventSubscription("mouseover",d,this);e.isElementEvent=!0;e.elementId=a;EBG.eventMgr.subscribeToEvent(e);e=new EBG.Events.EventSubscription("mouseout",d,this);e.isElementEvent=!0;e.elementId=b;EBG.eventMgr.subscribeToEvent(e)},_handleMouseOverEvent:function(a,b){var c=EBG.adaptor.getElementById(a),
  120. d=EBG.adaptor.getElementById(b),e=EBG.adaptor.getStyleOfElem(c),f=EBG.AdChoice.AdChoiceManager.VisibilityState.VISIBLE,g=EBG.AdChoice.AdChoiceManager.VisibilityState.HIDDEN;if(e.visibility==EBG.AdChoice.AdChoiceManager.VisibilityState.VISIBLE)f=EBG.AdChoice.AdChoiceManager.VisibilityState.HIDDEN,g=EBG.AdChoice.AdChoiceManager.VisibilityState.VISIBLE;e={visibility:g};EBG.adaptor.setStyleToElem(c,{visibility:f});EBG.adaptor.setStyleToElem(d,e)},_pageResizeHandler:function(){this._handleImgOnloadEvent(this._imgData.id);
  121. this._handleImgOnloadEvent(this._imgExpData.id)},_handleImgOnloadEvent:function(a,b){var c=EBG.adaptor.getElementById(a);imgPos=this._getIconOffsets(a,this._adConfig.adChoice.iconPosition,c.width,c.height,this._adConfig.width,this._adConfig.height);EBGInfra.isDefinedNotNull(b)&&10>b?EBG.runTimed(this,this._rehandleImgOnloadEvent,[a,b],EBG.AdChoice.AdChoiceManager.ImageLoadTimeout):EBG.adaptor.setStyleToElem(c,{left:imgPos.offsetLeft,top:imgPos.offsetTop})},_rehandleImgOnloadEvent:function(a,b){this._handleImgOnloadEvent(a,
  122. b+1)}};EBG.declareNamespace("Ads");EBG.Ads.Ad=function(a){this._adConfig=a;this._adConfig.isStdAd=this._isStdAd();this._fixPage();this._updateURLs();this._show()};
  123. EBG.Ads.Ad.prototype={resizePlaceHolder:!0,_adConfig:null,_adChoice:null,_isStdAd:function(){return!0},_counterInteractionHandler:function(a){try{var b=a.eventData.intName;if(!b)b=EBG.Interactions.SystemInts.CLICK;a.eventData.clickUrl=this._replaceURLTokens(a.eventData.clickUrl);a.eventData.clickedVerUrl=this._replaceURLTokens(a.eventData.clickedVerUrl);EBG.intMgr.handleCounterInteraction(b,this._adConfig.uid,0,null,a.eventData,"undefined"!=typeof a.eventData.handleClickInt?a.eventData.handleClickInt:
  124. !0)}catch(c){}},_versionTrackingImpressionHandler:function(a){try{a.eventData.impTrackingUrls&&this._reportImpressionTrackingURLs(a.eventData.impTrackingUrls)}catch(b){}},_reportImpressionTrackingURLs:function(a){if(!EBG.isPreview)for(var b=0;b<a.length;b++){var c=a[b];c&&(c=this._replaceURLTokens(c),EBG.adaptor.reportToRemoteServerUsingImage(c))}},_show:function(){try{var a=new EBG.Events.Event(EBG.Events.EventNames.SHOW_AD);a.dispatcher=this;a.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(a);
  125. var b=!this._canShow()||this._adConfig.showOnlyImage||this._adConfig.showAieDefaultImage;this._adConfig.defaultImageDisplayed=!(!b||!this._adConfig.defaultImagePath);this._subscribeToEvents();EBG.intMgr.initAdData(this._adConfig,this._adConfig.reportDelayedImpression?!0:!1);this._addSystemInteractions();this._verifyPlaceHolder();this._adChoice=new EBG.AdChoice.AdChoiceManager(this._adConfig);this._adChoice.init();var c=EBG.adaptor.getElementById(this._adConfig.placeHolderId);c&&this.resizePlaceHolder&&
  126. "undefined"!=typeof this._adConfig.display&&EBG.adaptor.setElemStyle(c,"display",this._adConfig.display);if(b){if(this._adConfig.defaultImagePath){if(!this._adConfig.imageOnly){var d=new EBG.Events.Event(EBG.Events.EventNames.DEFAULT_IMPRESSION);d.eventData={impTrackingUrls:this._adConfig.defaultImpTrackingUrls};d.dispatcher=this;d.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(d)}this._subscribeToAdEvent(EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE,this._terminateShow,
  127. EBG.Events.EventTiming.AFTER);this.checkAndShowDefaultImage()}}else this._addVideoInteractions(),this._addCustomInteractions(),this._addCreatives(),this._terminateShow()}catch(e){}},_terminateShow:function(){var a=EBG.adaptor.getElementById(this._adConfig.placeHolderId);a&&this.resizePlaceHolder&&(EBG.adaptor.setElemStyle(a,"width",EBG.px(this._adConfig.width)),EBG.adaptor.setElemStyle(a,"height",EBG.px(this._adConfig.height)),EBG.adaptor.setElemStyle(a,"margin","0px auto"));a=new EBG.Events.Event(EBG.Events.EventNames.SHOW_AD);
  128. a.dispatcher=this;a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(a)},_verifyPlaceHolder:function(){!EBG.adaptor.getElementById(this._adConfig.placeHolderId)&&!document.body&&document.write('<img style="width:0;height:0"></img>');return EBG.adaptor.getElementById(this._adConfig.placeHolderId)},_canShow:function(){return!0},_onPlayHandler:function(){this._adConfig.arrOnPlayEvents&&this._executeEvents(this._adConfig.arrOnPlayEvents)},_onDownloadHandler:function(){this._adConfig.arrOnStartDnlEvents&&
  129. this._executeEvents(this._adConfig.arrOnStartDnlEvents)},_collectUrl:function(){if(!EBG.isPreview&&this._adConfig.shouldCollectUrl)try{EBG.adaptor.reportToRemoteServer(EBG.format("{0}{1}/BurstingPipe/adServer.bs?cn=curl&ai={2}&url=$${3}$$",EBG.protocol,EBG.bs,this._adConfig.adId,top.document.URL))}catch(a){}},_executeEvents:function(a){for(var b=0;b<a.length;b++){var c,d=this._replaceURLTokens(a[b].url);switch(a[b].typeId){case 3:c="ebPlayScript"+b;EBG.adaptor.writeScript(EBG.adaptor.generateElementId(c,
  130. this._adConfig.uid),d,this._adConfig.placeHolderId);break;case 5:c="ebDnlScript"+b;EBG.adaptor.writeScript(EBG.adaptor.generateElementId(c,this._adConfig.uid),d,this._adConfig.placeHolderId);break;case 4:c="ebPlayIFR"+b;EBG.adaptor.writeReportingIFrame(EBG.adaptor.generateElementId(c,this._adConfig.uid),d,this._adConfig.placeHolderId);break;case 6:c="ebDnlIFR"+b,EBG.adaptor.writeReportingIFrame(EBG.adaptor.generateElementId(c,this._adConfig.uid),d,this._adConfig.placeHolderId)}}},_addSystemInteractions:function(){try{var a=
  131. this._adConfig.interactions[EBG.Interactions.SystemInts.CLICK];if(a){var b=EBG.Interactions.Categories.SYSTEM;this._adConfig.interactions[EBG.Interactions.SystemInts.DEFAULT_CLICK]=EBG.cloneObj(a);this._addCounterInteraction(EBG.Interactions.SystemInts.CLICK,b);this._addCounterInteraction(EBG.Interactions.SystemInts.DEFAULT_CLICK,b)}}catch(c){}},_addCounterInteraction:function(a,b,c){var d=this._adConfig.interactions[a],b=new EBG.Interactions.CounterInteractionData(a,b,this._adConfig.uid);b.initiationType=
  132. d.nInitiated?EBG.Interactions.InitiationTypes.USER:EBG.Interactions.InitiationTypes.AUTO;b.countAsClick=d.fClick;if(d.agencyURL)b.remoteServers.agencyUrl=d.agencyURL;if(d.networkURL)b.remoteServers.networkUrl=d.networkURL;this._adjustClickTarget(a);b.clickData=d;b.reportImmediately=c?!0:!1;a=new EBG.Interactions.CounterInteraction(b);EBG.intMgr.addInteraction(a)},_addVideoInteractions:function(){},_addCustomInteractions:function(){},_adjustClickTarget:function(a){var a=this._adConfig.interactions[a],
  133. b;switch(a.target){case 0:b=EBG.WindowTarget.SELF;break;case 2:b=EBG.WindowTarget.TOP;break;default:b=EBG.WindowTarget.BLANK}a.target=b},_subscribeToEvents:function(){this._adConfig.interactionsToReport&&this._subscribeToAdEvent(EBG.Events.EventNames.ADD_INTERACTION,this._handleInteractionsSubscription,EBG.Events.EventTiming.BEFORE);this._subscribeToAdEvent(EBG.EBMessage.CLICKTHROUGH,this._counterInteractionHandler);this._subscribeToAdEvent(EBG.EBMessage.VERSION_TRACKING_IMPRESSION,this._versionTrackingImpressionHandler);
  134. this._subscribeToAdEvent(EBG.Events.EventNames.DEFAULT_IMPRESSION,this._versionTrackingImpressionHandler,EBG.Events.EventTiming.ONTIME);this._subscribeToAdEvent(EBG.Events.EventNames.DEFAULT_CLICK,this._counterInteractionHandler);this._subscribeToAdEvent(EBG.Events.EventNames.ADD_CREATIVES,this._onAddCreativesHandler,EBG.Events.EventTiming.ONTIME);this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,this._onDownloadHandler,EBG.Events.EventTiming.ONTIME);this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,
  135. this._onPlayHandler,EBG.Events.EventTiming.AFTER);this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,this._collectUrl,EBG.Events.EventTiming.AFTER);this._subscribeToAdEvent(EBG.EBMessage.NOTIFY_INTERACTION_MONITOR,this._notifyInteractionManager)},_handleInteractionsSubscription:function(a){try{var b=a.eventData.interactionData.reportingName;return this._adConfig.interactionsToReport&&this._adConfig.interactionsToReport[b]?!0:!1}catch(c){}},_onAddCreativesHandler:function(a){try{if(!EBG.Initializer._getAdClass({tn:this._adConfig.templateName}).requiresIframeBust||
  136. this._adConfig.actualServingMode==EBG.Adaptors.ServingMode.SCRIPT){var b=a.dispatcher._adConfig.placeHolderId;if(b){var c=EBG.adaptor.getDisplayWin().document.getElementById(b);if(c)c.style.backgroundImage="",c.onclick=function(){}}}}catch(d){}},_onAdCreativesAdded:function(){var a=new EBG.Events.Event(EBG.Events.EventNames.AD_CREATIVES_ADDED);a.dispatcher=this;EBG.eventMgr.dispatchEvent(a)},_fixPage:function(){var a=this._adConfig.page,a=a.replace(/\~/ig,"_"),a=a.replace(/\^/ig,"_"),a=a.replace(/\|/ig,
  137. "_"),a=escape(a);this._adConfig.page=a},_updateURLs:function(){for(var a=this._adConfig.clickTrackingUrls,b=0;b<a.length;b++)a[b]=this._replaceURLTokens(a[b]);var a=this._adConfig.interactions,c;for(c in a)if(a.hasOwnProperty(c))a[c].agencyURL=this._replaceURLTokens(a[c].agencyURL),a[c].networkURL=this._replaceURLTokens(a[c].networkURL),a[c].jumpUrl=this._replaceURLTokens(a[c].jumpUrl)},getAdId:function(){return this._adConfig.adId},_replaceURLTokens:function(a){var b=this._adConfig;try{a&&(a=a.replace(/\[%random%\]/ig,
  138. b.rnd),a=a.replace(/\[ebRandom\]/ig,b.rnd),a=a.replace(/\[timestamp\]/ig,b.rnd),a=a.replace(/\[%tp_adid%\]/ig,b.adId),a=a.replace(/\[%tp_flightid%\]/ig,b.placementId),a=a.replace(/\[%tp_campaignid%\]/ig,b.campaignId));if(!a||!b.sUrlTokens)return a;if(!EBG.isObj(b.objURLTokens))b.oURLTokens=this._pairsToObj(b.sUrlTokens,"$$");for(var c in b.oURLTokens)b.oURLTokens.hasOwnProperty(c)&&(a=a.replace(RegExp("\\[%"+c+"%\\]","ig"),b.oURLTokens[c]))}catch(d){}return a},_pairsToObj:function(a,b){for(var c=
  139. {},d=unescape(a).split(b),e=0;e<d.length;e++)try{if(d[e]){var f=d[e].indexOf("="),g=d[e].substr(0,f),h=d[e].substr(f+1);c[g]=escape(h)}}catch(k){}return c},_subscribeToAdEvent:function(a,b,c){a=new EBG.Events.EventSubscription(a,b,this);a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd};if(c)a.timing=c;EBG.eventMgr.subscribeToEvent(a)},_getCDIUrl:function(a){var a=EBG.format("{0}{1}/BurstingPipe/adServer.bs?cn=cdi&ai={2}&p={3}&pluid={4}&ru={5}&pc={6}&ord={7}",EBG.protocol,EBG.bs,this._adConfig.adId,
  140. this._adConfig.page,this._adConfig.pluId,EBG.isDefinedNotNull(a)&&""!=a?a:EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.defaultImagePath),this._adConfig.sPublisherPlacementId,this._adConfig.rnd),b=this._adConfig.massVersioning.targetAudienceId;b&&(a+=EBG.format("&ta={0}",b));(b=this._adConfig.massVersioning.deliveryGroupId)&&(a+=EBG.format("&dg={0}",b));this._adConfig.massVersioning.adVersions&&(b=this._removePrefixFromVersions(),a+=EBG.format("&vid={0}",b));return a},_removePrefixFromVersions:function(){var a=
  141. "",b=this._adConfig.massVersioning.adVersions;if(b){a=[];b=b.split(",");for(avIdIndex in b){var c=b[avIdIndex].indexOf("_");a.push(-1==c?b[avIdIndex]:b[avIdIndex].substring(0,c))}a=a.join()}return a},buildJSONImgObj:function(a,b){return{tagName:EBG.Adaptors.TagNames.IMG,attributes:{id:EBG.format(a+"_{0}",this._adConfig.uid),src:b,width:this._adConfig.width,height:this._adConfig.height,style:{width:this._adConfig.width,height:this._adConfig.height},title:this._adConfig.title?this._adConfig.title:""}}},
  142. setImageClick:function(a,b,c,d){a.attributes.onclick=EBG.format('EBG.ads["'+this._adConfig.uid+'"].onImageClick("{0}", {1},"{2}", "{3}", "{4}")',this._adConfig.uid,b,a.attributes.id,c,d);EBG.mergeObj({cursor:"pointer; cursor: hand"},a.attributes.style)},checkAndShowDefaultImage:function(){var a="";if(EBG.isDefined(this._adConfig.massVersioning)&&""!=this._adConfig.massVersioning.defaultAdVersion&&""!=this._adConfig.massVersioning.adBasePath)a=this._adConfig.massVersioning.defaultAdVersion,a=0<this._adConfig.massVersioning.massVersionFolderDivider?
  143. EBG.Ads.Ad.Fn.fixMVPathString(a,this._adConfig.massVersioning.massVersionFolderDivider):a,a=EBG.combinePaths(this._adConfig.massVersioning.adBasePath,a+".xml"),a=EBG.combinePaths(this._adConfig.resourcePath,a);(!a||!EBG.adaptor.getDataFromRemoteServer(a,this._readMassVersionInfo,this,!0,!0))&&this.showDefaultImage()},showDefaultImage:function(a){var b=!this._adConfig.imageOnly,c="",c=this._adConfig.showOnlyImage||this._adConfig.imageOnly||this._adConfig.reportDelayedImpression?a&&a.isValid?a.defaultImagePath:
  144. EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.defaultImagePath):a&&a.isValid?this._getCDIUrl(a.defaultImagePath):this._getCDIUrl(),c=this.buildJSONImgObj("ebDefaultImg",c),d=a&&a.isValid?a.jumpUrl:b?this._adConfig.interactions[EBG.Interactions.SystemInts.DEFAULT_CLICK].jumpUrl:this._adConfig.interactions[EBG.Interactions.SystemInts.CLICK].jumpUrl;d&&this.setImageClick(c,b,d,a&&a.isValid?a.selectedVersion:"");a=new EBG.Events.Event(EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE);
  145. a.eventData={assetId:c.attributes.id};a.dispatcher=this;a.timing=EBG.Events.EventTiming.BEFORE;if(!EBG.eventMgr.dispatchEvent(a))b=EBG.adaptor._getTags(c),c=EBG.adaptor.getElementById(this._adConfig.placeHolderId),EBG.adaptor.setInnerHtml(c,b),a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER,EBG.eventMgr.dispatchEvent(a)},_readMassVersionInfo:function(a){var b={isValid:!1,jumpUrl:"",defaultImagePath:"",selectedVersion:""};try{if(EBG.isDefined(a)&&null!=a){var c=a.documentElement.attributes.getNamedItem("productClickThrough"),
  146. d=a.documentElement.attributes.getNamedItem("DefaultImage"),e=this._adConfig.massVersioning.defaultAdVersion.indexOf("_"),b={isValid:null!=d&&""!=d.value,jumpUrl:null!=c?c.value:"",defaultImagePath:null!=d?d.value:"",selectedVersion:-1==e?this._adConfig.massVersioning.defaultAdVersion:this._adConfig.massVersioning.defaultAdVersion.substring(0,e)};if(b.isValid&&EBG.isNumber(b.defaultImagePath)){b.isValid=!1;var f=this._adConfig.assets,g="ebMovie"+b.defaultImagePath;if(EBG.isDefinedNotNull(f[g].dsPath))b.defaultImagePath=
  147. EBG.isInWorkshop?f[g].dsPath:EBG.combinePaths(this._adConfig.resourcePath,f[g].dsPath),b.isValid=!0}}this.showDefaultImage(b)}catch(h){this.showDefaultImage(b)}},dispatchCustomEvent:function(a,b,c,d){a=new EBG.Events.Event(a);a.dispatcher=d;a.eventData={assetId:b};a.timing=c;return EBG.eventMgr.dispatchEvent(a)},_notifyInteractionManager:function(a){var b={};if(a&&a.eventData)b=a.eventData;b.elapsedTime="";if(EBG.intMgr.getAdDuration)b.elapsedTime=EBG.intMgr.getAdDuration(this._adConfig.uid);EBG.adaptor.notifyIntMonitor(a.eventData)},
  148. onImageClick:function(a,b,c,d,e){try{var f=b?new EBG.Events.Event(EBG.Events.EventNames.DEFAULT_CLICK):new EBG.Events.Event(EBG.EBMessage.CLICKTHROUGH);f.eventData=b?{intName:EBG.Interactions.SystemInts.DEFAULT_CLICK}:{intName:EBG.Interactions.SystemInts.CLICK};if(EBG.isDefined(d))f.eventData.clickUrl=d;if(EBG.isDefined(e))f.eventData.clickedVersion=e;f.dispatcher=EBG.ads[a];EBG.eventMgr.dispatchEvent(f);if(EBG.adaptor.intMonitorExist()){var g=new EBG.Events.Event(EBG.EBMessage.NOTIFY_INTERACTION_MONITOR);
  149. g.eventData={command:EBG.EBMessage.CLICKTHROUGH,args:"",objName:c,adId:EBG.Ads.Ad.Fn.getAdIdFromAdUId(a)};EBG.eventMgr.dispatchEvent(g)}}catch(h){}}};EBG.declareClass(EBG.Ads.Ad,null);
  150. EBG.Ads.Ad.Fn={getAdIdFromAdUId:function(a){return a.split("_")[0]},getRandFromAdUId:function(a){return a.split("_")[1]},getVersionToReport:function(a){return-1<a.indexOf(",")?"m":-1<a.indexOf("_")?a.substr(0,a.indexOf("_")):a},getAdVersions:function(a){for(var b="",a=a.adVersions.split(","),c=0;c<a.length;c++)b&&(b+=","),b+=a[c];return b},fixMVPathString:function(a,b){if(0<b){var c=a.split(","),d="",e="",f,g,h;for(i in c)h=c[i],f="",EBG.isDefinedNotNull(h.match("_"))&&(f=h.substr(h.indexOf("_"))),
  151. h=parseInt(h),g=parseInt(h/b),h=g+f+"/"+h,d+=e+h,""==e&&(e=",")}return d}};EBG.Ads.StdBanner=function(a){EBG.callSuperConstructor(EBG.Ads.StdBanner,this,[a])};EBG.Ads.StdBanner.requiresIframeBust=!1;
  152. EBG.Ads.StdBanner.prototype={_flashResID:null,_CCs:{},_canShow:function(){var a=!1;this._adConfig.flashResPath?EBG.adaptor.flash.version>=this._adConfig.flashVer&&(a=!0):this._adConfig.imageOnly=!0;return a},_writeCreativeElements:function(){try{var a={resPath:this._adConfig.flashResPath,resId:this._flashResID,width:this._adConfig.width,height:this._adConfig.height,play:"true",wmode:this._adConfig.wmode?this._adConfig.wmode:"opaque"},b=EBG.adaptor.generateElementId("StdBannerDiv",this._adConfig.uid),
  153. c={tagName:EBG.Adaptors.TagNames.DIV,attributes:{id:b,dir:"ltr",style:{width:this._adConfig.width,height:this._adConfig.height}},children:this._CCs[this._flashResID].buildCreativeContainerJson(a)};if("undefined"!=typeof this._adConfig.display)c.attributes.style.display=this._adConfig.display;var d=new EBG.Events.Event(EBG.Events.EventNames.ADD_CREATIVES);d.dispatcher=this;d.eventData={tagsObj:c,assetId:this._flashResID,isPanel:!1};d.timing=EBG.Events.EventTiming.BEFORE;if(!EBG.eventMgr.dispatchEvent(d))EBG.adaptor.addInlineDOM(c,
  154. this._adConfig.placeHolderId),d.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.dispatchEvent(d),d.timing=EBG.Events.EventTiming.AFTER,EBG.eventMgr.dispatchEvent(d)}catch(e){}},_addCreatives:function(){this._flashResID=EBG.adaptor.generateElementId("StdBannerFlash",this._adConfig.uid);this._CCs[this._flashResID]=new EBG.FlashCC(this._adConfig);this._writeCreativeElements()}};EBG.declareClass(EBG.Ads.StdBanner,EBG.Ads.Ad);EBG.declareNamespace("CreativeContainer");
  155. EBG.CreativeContainer=function(a){this._adConfig=a};EBG.declareClass(EBG.CreativeContainer,null);EBG.declareNamespace("FlashCC");EBG.FlashCC=function(a){EBG.callSuperConstructor(EBG.FlashCC,this,[a]);this.fs={};this._addSupportedFSCommands()};
  156. EBG.FlashCC.prototype={_createIntMonitorObj:function(a,b){return{command:a,args:b,objName:this._flashResID,adId:this._adConfig.adId}},_buildAdditionalResStr:function(){var a="",b=this._adConfig.assets,c;for(c in b)try{var d=b[c],e=EBG.isInWorkshop?d.dsPath:EBG.combinePaths(this._adConfig.resourcePath,d.dsPath),a=EBG.format("{0}{1}{2}={3}",a,a?"&":"",c,e)}catch(f){}return a},_getSmartVersioningFlashVars:function(){var a="",b="",a="undefined"!=typeof this._adConfig.isSVSVP&&this._adConfig.isSVSVP,c=
  157. this._adConfig.massVersioning.adVersions&&this._adConfig.sv2DisplayMap;c&&(b=EBG.Ads.Ad.Fn.getAdVersions(this._adConfig.massVersioning),b=0<this._adConfig.massVersioning.massVersionFolderDivider?EBG.Ads.Ad.Fn.fixMVPathString(b,this._adConfig.massVersioning.massVersionFolderDivider):b,b=EBG.format("&ebAdVersions={0}&ebAdMap={1}&ebResPath={2}&ebAdSVBasePath={3}",b,this._adConfig.sv2DisplayMap,EBG.isInWorkshop?"":this._adConfig.resourcePath,this._adConfig.massVersioning.adBasePath));if(this._adConfig.svXML&&
  158. (a||!c))a=EBG.isGlobalDef("ebAdXmlPath")&&ebAdXmlPath?ebAdXmlPath:EBG.isInWorkshop?this._adConfig.svXML:EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.svXML),b+=EBG.format("&ebAdXML={0}",a);return b},_getFlashParams:function(){var a=EBG.adaptor.getHostName(),b=EBG.intMgr.getClickTag(this._adConfig.uid),c=EBG.intMgr.getClickTarget(this._adConfig.uid),d=EBG.adaptor.browser.isIE()?"":this._flashResID+"_DoFSCommand",e=EBG.format("ebDomain={0}&ebAdID={1}&clickTag={2}&clickTAG={2}&clicktag={2}&ebFSCmdHandler={3}&clickTARGET={4}&ebFlashID={5}{6}&{7}{8}",
  159. a,this._adConfig.adId,escape(b),d,c,this._flashResID,this._getSmartVersioningFlashVars(),this._buildAdditionalResStr(),this._getAdditionalClickTagParams());EBG.adaptor.browser.isChrome()&&21<=EBG.adaptor.browser.getVersion()&&!EBG.adaptor.browser.isMac()&&(e=EBG.format("ebDomain={0}&ebAdID={1}&clickTag={2}&clickTAG={2}&clicktag={2}&clickTARGET={4}&ebFlashID={5}{6}&{7}{8}",a,this._adConfig.adId,escape(b),d,c,this._flashResID,this._getSmartVersioningFlashVars(),this._buildAdditionalResStr(),this._getAdditionalClickTagParams()));
  160. if(this._adConfig.additionalFlashVars)for(var f in this._adConfig.additionalFlashVars)this._adConfig.additionalFlashVars.hasOwnProperty(f)&&f&&(e+=EBG.format("&{0}={1}",f.toLowerCase(),this._adConfig.additionalFlashVars[f]));return e},_getAdditionalClickTagParams:function(){var a="",b=this._adConfig.interactions,c;for(c in b)try{if(/clicktag\d+/i.test(c)){var d=EBG.intMgr.adsData[this._adConfig.uid][EBG.Interactions.InteractionTypes.COUNTER][c.toLowerCase()],e=d&&""!=d.interactionData.clickData.jumpUrl?
  161. d.getClickTagUrl(d.interactionData.clickData.jumpUrl):"";""!=e&&(a+=EBG.format("&{0}={1}",c,escape(e)))}}catch(f){}return a},buildCreativeContainerJson:function(a){var b,c,d=null;b=["transparent","opaque","window"];for(c=0;3>c;c++)b[b[c]]=b[c];this._flashResID=a.resId;this.isIMPanel&&0<a.unique&&(a.resPath+="?"+Math.random());this._src=a.resPath;this._weight=a.weight;c=EBG.format("EBG.ads['{0}']._CCs['{1}']",this._adConfig.uid,this._flashResID);d=EBG.format("function {0}_DoFSCommand(command,args)",
  162. this._flashResID);d+=EBG.format("{ try{ if(!args||args=='null')args='';command = command.replace(/FSCommand:/ig,''); return "+(this.isIMPanel?"document.parentWindow.parent.":"")+"{0}._handleMessage(command,args,'{1}');}catch(e){if(window.mmFSExceptionAlert)mmFSExceptionAlert('Command: '+command+'\\nargs: '+args.toString()+'\\n\\nexception in DoFS func:\\n'+e.message)}}",c,this._flashResID);d=EBG.adaptor.browser.isChrome()&&21<=EBG.adaptor.browser.getVersion()&&!EBG.adaptor.browser.isMac()?d+"function ebIsFlashExtInterfaceExist(){return false;}":
  163. d+"function ebIsFlashExtInterfaceExist(){return true;}";c={tagName:EBG.Adaptors.TagNames.SCRIPT,text:d};var d=EBG.format("try{{0}_DoFSCommand(command,args);}catch(e){}",this._flashResID),d={tagName:EBG.Adaptors.TagNames.SCRIPT,attributes:{"for":this._flashResID,event:"FSCommand(command,args)"},text:d},e=this.getResPath(a.resPath),e=-1!=e.toLowerCase().indexOf("http://")||-1!=e.toLowerCase().indexOf("https://")?e:EBG.combinePaths(this._adConfig.resourcePath,e);b={tagName:EBG.Adaptors.TagNames.OBJECT,
  164. attributes:{id:this._flashResID,dir:"ltr",name:this._flashResID,style:{textAlign:"left",width:EBG.format("{0}px",a.width),height:EBG.format("{0}px",a.height)},codebase:EBG.format("{0}download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#",EBG.protocol),version:EBG.format("{0},0,0,0",this._getFlashVersion()),title:this._adConfig.title?this._adConfig.title:""},params:{play:a.play,wmode:this.isIMPanel?"opaque":b[a.wmode],menu:"false",flashVars:this._getFlashParams(),allowScriptAccess:"always",
  165. allowFullScreen:"true"}};this._isSupportShockwave()?(b.attributes.type="application/x-shockwave-flash",b.attributes.data=e):(b.attributes.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",b.params.movie=e);return 0<a.unique?[b,d]:[b,c,d]},_isSupportShockwave:function(){var a=!0;if(EBG.adaptor.browser.isIE()&&11>EBG.adaptor.browser.getVersion()||10<EBG.adaptor.browser.getVersion()&&9>EBG.adaptor.getDisplayWin().document.documentMode)a=!1;return a},getResPath:function(a){return a},_getFlashVersion:function(){return this._adConfig.flashVer},
  166. _handleMessage:function(a,b,c){var a=a.replace(/FSCommand:/ig,""),d=a=a.toLowerCase(),e=b;a==EBG.EBMessage.CLICKTHROUGH&&b&&0==b.indexOf("SV2:")&&-1!=b.indexOf(String.fromCharCode(127))&&(e=b.substring(4),d=a+"sv2");var f=this.fs[d];if(f){var g=f.mapEvent||d.toLowerCase(),g=new EBG.Events.Event(g);g.dispatcher=this;g.flashResId=c;var c=",",h=!1;switch(d){case EBG.EBMessage.CLICKTHROUGH:g.eventData={};break;case EBG.EBMessage.CLICKTHROUGH+"sv2":case EBG.FS.EB_SET_JS_VAR:c="\u007f";break;case EBG.EBMessage.VERSION_TRACKING_IMPRESSION:h=
  167. !0,g.eventData={},g.eventData[f.args[0]]=b.split("\u007f")}if(f&&f.args&&!h&&(g.eventData={adUId:this._adConfig.uid},0<b.length)){d=e.split(c);for(e=0;e<f.args.length;e++)c=f.args[e],h="",e<d.length&&(h='"'==d[e].charAt(0)||"'"==d[e].charAt(0)||"false"==d[e]||"true"==d[e]?eval(d[e]):d[e]),g.eventData[c]=h}this._handleIntMonitor(a,b);if(f){if(f.command)return b=[g.eventData],f.command.call(this,b);f.combinedCommand&&(b=[g.eventData],f.combinedCommand.call(this,b));EBG.eventMgr.dispatchEvent(g)}}},
  168. _handleIntMonitor:function(a,b){if(EBG.adaptor.intMonitorExist()){var c=new EBG.Events.Event(EBG.EBMessage.NOTIFY_INTERACTION_MONITOR);c.eventData=this._createIntMonitorObj(a,b);EBG.eventMgr.dispatchEvent(c)}},_addSupportedFSCommands:function(){this.fs[EBG.FS.EB_CLICKTHROUGH]={mapEvent:EBG.EBMessage.CLICKTHROUGH};this.fs[EBG.FS.EB_CLICKTHROUGH+"sv2"]={mapEvent:EBG.EBMessage.CLICKTHROUGH,args:["clickUrl","clickedVersion","clickedVerUrl"]};this.fs[EBG.FS.EB_VERSION_TRACKING_IMPRESSION]={mapEvent:EBG.EBMessage.VERSION_TRACKING_IMPRESSION,
  169. args:["impTrackingUrls"]}}};EBG.FlashCC.FlashProperty={XPOSITION:0,YPOSITION:1,XSCALE:2,YSCALE:3,CURRENTFRAME:4,TOTALFRAMES:5,ALPHA:6,VISIBILITY:7,WIDTH:8,HEIGHT:9,ROTATION:10,TARGET:11,FRAMESLOADED:12,NAME:13,DROPTARGET:14,URL:15};EBG.declareClass(EBG.FlashCC,EBG.CreativeContainer);var tempExtensionHook=ebO.extensionHooks;
  170. try{ebO.extensionHooks.splice(0,0,function(a,b){var c={CFF_PanelFrequencywithoutCookies:function(){if(EBG.RichModules&&EBG.RichModules.PanelFrequencyManager)EBG.RichModules.PanelFrequencyManager.prototype.init=function(a,b,c,d,e,f){try{if(this._frequencyTimes=EBG.isDefinedNotNull(a)?a:6,this._frequencyPeriod=EBG.isDefinedNotNull(b)?b:4,this._adId=c,this._maxLen=EBG.isDefinedNotNull(d)?d:30,this._optOutFlag=EBG.isDefinedNotNull(e)&&e,this._optOutGlobal=EBG.isGlobalDef("gEbFOptOut")&&gEbFOptOut,this._optOut=
  171. this._optOutFlag||this._optOutGlobal,this._disableAutoExpand="undefined"!=typeof f?f:1,this._cookieName=1==this._frequencyPeriod?"ebPanelFrequencyPerSession":"ebPanelFrequency",!this._optOut){a="";(this._isStorageSupported=this.isStorageSupported())&&(a=this._readStorage(this._cookieName));if(""!=a)this._adsInfo=a.split("&");if(0<this._adsInfo.length){for(a=0;a<this._adsInfo.length;a++){this._adsInfo[a]=this._adsInfo[a].split(":");for(var j=this._adsInfo[a],b=0;b<j.length;b++)j[b]=parseInt(j[b]);
  172. if(j[0]==this._adId)this._adInfoIdx=a}this._deleteOldItems();6==this._frequencyTimes?-1!=this._adInfoIdx&&(this._deleteItem(this._adInfoIdx),this._updateCookie()):this._adjustFreqPeriod()}}}catch(m){this._adInfoIdx=-1}},EBG.RichModules.PanelFrequencyManager.prototype.shouldExpand=function(){var a=!0;this._optOut||!this._isStorageSupported?a=!this._disableAutoExpand:-1!=this._adInfoIdx&&this._adsInfo[this._adInfoIdx][2]>=this._frequencyTimes&&(a=!1);return a},EBG.RichModules.PanelFrequencyManager.prototype._updateCookie=
  173. function(){for(var a=[],b=0;b<this._adsInfo.length;b++)a[b]=this._adsInfo[b].join(":");a=a.join("&");!this._optOut&&this._isStorageSupported&&6>this._frequencyTimes&&this._setStorage(this._cookieName,a)},EBG.RichModules.PanelFrequencyManager.prototype._readStorage=function(a){a=this._storageName.getItem(a);return a=EBG.isDefinedNotNull(a)?unescape(a):""}}};if(b.ffs)try{for(var d=0;d<b.ffs.length;d++){var e=b.ffs[d];if("CFF_PanelFrequencywithoutCookies"==e.name&&e.state){c[e.name]();break}}}catch(f){ebO.extensionHooks=
  174. tempExtensionHook}})}catch(e$$36){ebO.extensionHooks=tempExtensionHook}tempExtensionHook=ebO.extensionHooks;
  175. try{ebO.extensionHooks.splice(0,0,function(a,b){var c={ServerClickTracking:function(){if(EBG.Interactions.Interaction)EBG.Interactions.Interaction.prototype.unique=1,EBG.Interactions.Interaction.prototype._buildReportFormat=function(a,b,c,d){d||(d=0);return EBG.format("{0}{2}{1}{3}{1}{4}{1}{5}{6}{7}{8}{9}",EBG.Interactions.InteractionManager.charIntDelimeter,EBG.Interactions.InteractionManager.charAdFieldsDelimeter,this._escapeInteractionName(this.interactionData.reportingName),c,d,a,this.unique,
  176. b,this.interactionData.category,this.interactionData.isPanel?1:0)};if(EBG.Ads.Ad&&(EBG.Ads.Ad.prototype._addCounterInteraction=function(a,b,c){var d=this._adConfig.interactions[a],b=new EBG.Interactions.CounterInteractionData(a,b,this._adConfig.uid);b.initiationType=d.nInitiated?EBG.Interactions.InitiationTypes.USER:EBG.Interactions.InitiationTypes.AUTO;b.countAsClick=d.fClick;if(d.agencyURL)b.remoteServers.agencyUrl=d.agencyURL;if(d.networkURL)b.remoteServers.networkUrl=d.networkURL;this._adjustClickTarget(a);
  177. b.counterJumpUrlData=d;b.reportImmediately=c?!0:!1;a=new EBG.Interactions.CounterInteraction(b);EBG.intMgr.addInteraction(a)},EBG.Ads.StdBanner))EBG.Ads.StdBanner.prototype._addCounterInteraction=EBG.Ads.Ad.prototype._addCounterInteraction;if(EBG.Interactions.CounterInteraction)EBG.Interactions.CounterInteraction.prototype.handle=function(a){var b=this.interactionData,c=b.counterJumpUrlData,d=c&&c.tmpData?c.tmpData.isClick:!1,e=c&&c.tmpData?c.tmpData.isProductClick:!1,f=!1,j=!0,m=!1,m="",l=(c&&c.tmpData?
  178. c.tmpData.clickUrl:null)||(c?c.jumpUrl:""),c=c&&c.tmpData&&c.tmpData.windowWasOpen?!0:!1;this.shouldReportInteraction()?(this._handleRemoteServers(),b.counterJumpUrlData&&(j=l&&this._isEBClick()?!1:!0,f=l&&(d||this._isEBClick())?!0:!1,(m=d||this._isEBClick())?f?c||this.handleBRDFlow():(d||e)&&this.reportThirdPartyUrls():!c&&l&&(l=EBG.Interactions.checkURL(l),this._openOrRedirect(l))),m=j?this._getReportingData(a,f):""):!c&&l&&(l=EBG.Interactions.checkURL(l),this._openOrRedirect(l));return m},EBG.Interactions.CounterInteraction.prototype.reportThirdPartyUrls=
  179. function(){var a=this.interactionData.reportingName.toLowerCase()==EBG.Interactions.SystemInts.DEFAULT_CLICK.toLowerCase(),b=this.interactionData.counterJumpUrlData,c=[];if(b&&b.tmpData&&b.tmpData.isClick&&(c=this.interactionData.adConfig.clickTrackingUrls,a||this.interactionData.adConfig.showOnlyImage))for(a=0;a<this.interactionData.adConfig.defaultClickTrackingUrls.length;a++)c[c.length]=this.interactionData.adConfig.defaultClickTrackingUrls[a];if(b&&b.tmpData&&b.tmpData.isProductClick&&b.tmpData.clickedVerUrl)c[c.length]=
  180. b.tmpData.clickedVerUrl;b=EBGInfra.getRandomNumber();for(a=0;a<c.length;a++)c[a]+=EBG.format("&cb={0}",b),EBG.adaptor.reportToRemoteServerUsingImage(c[a])},EBG.Interactions.CounterInteraction.prototype.shouldReportInteraction=function(){var a=!0;0==this.interactionData.numLeftToReport||EBG.isPreview?a=!1:this.interactionData.numLeftToReport--;return a},EBG.Interactions.CounterInteraction.prototype.handleBRDFlow=function(){var a=this.interactionData,b=this.interactionData.counterJumpUrlData,c=EBGInfra.isDefinedNotNull(b)&&
  181. b.tmpData?b.tmpData.clickUrl:null,d=c||EBGInfra.isDefinedNotNull(b)&&b.jumpUrl;this._isEBClick()&&(c||(d=""));a=a.reportingName.toLowerCase()==EBG.Interactions.SystemInts.DEFAULT_CLICK.toLowerCase();c=0;b.tmpData.isClick?c=1:b.tmpData.isProductClick&&(c=2);d=""==d?"":EBG.Interactions.checkURL(d);d=this._getBannerRedirectUrl(d,c,a,b.tmpData.clickedVersion);d=EBG.Interactions.checkURL(d);this._openOrRedirect(d)},EBG.Interactions.CounterInteraction.prototype._handleRemoteServers=function(){if(!EBG.isPreview&&
  182. this.interactionData.remoteServers){var a=this.interactionData.remoteServers,b=new EBG.Events.Event(EBG.Events.EventNames.INTERACTION_REPORT_REMOTE_SERVERS);b.dispatcher=this;b.timing=EBG.Events.EventTiming.BEFORE;b.eventData={remoteServers:a};if(!EBG.eventMgr.dispatchEvent(b)){b=EBGInfra.getRandomNumber();if(a.networkUrl){var c=this._replaceRSTokens(a.networkUrl),c=c+EBG.format("&cb={0}",b);EBG.adaptor.reportToRemoteServerUsingImage(c)}a.agencyUrl&&(a=this._replaceRSTokens(a.agencyUrl),a+=EBG.format("&cb={0}",
  183. b),EBG.adaptor.reportToRemoteServerUsingImage(a))}}},EBG.Interactions.CounterInteraction.prototype._getBannerRedirectUrl=function(a,b,c,d,e){var c=EBG.isBool(c)?c:!1,f=this.interactionData.adConfig,j=EBG.Ads.Ad.Fn.getAdIdFromAdUId(this.interactionData.adConfig.uid),j=EBG.protocol+EBG.combinePaths(EBG.bs,EBG.format("BurstingPipe/adServer.bs?cn=brd&Page={0}&PluID={1}&Pos={2}&EyeblasterID={3}",f.page,f.pluId,f.rnd,j));void 0!=b&&(j=EBG.format("{0}&clk={1}",j,b));if(f.massVersioning.adVersions||f.massVersioning.defaultAdVersion)j=
  184. d?j+EBG.format("&vid={0}&vcl=1",d):j+EBG.format("&vid={0}",EBG.Ads.Ad.Fn.getVersionToReport(f.massVersioning.adVersions));!d&&a&&(a=a.replace(/#/g,"%23"),j+=EBG.format("&rtu=$${0}$$",a));EBGInfra.isDefined(f.ncu)&&(a=f.ncu.replace(/#/g,"%23"),j+=EBG.format("&ncu=$${0}$$",a));f.massVersioning.targetAudienceId&&(j+=EBG.format("&ta={0}",f.massVersioning.targetAudienceId));f.massVersioning.deliveryGroupId&&(j+=EBG.format("&dg={0}",f.massVersioning.deliveryGroupId));f.sPublisherPlacementId&&(j+=EBG.format("&pc={0}",
  185. f.sPublisherPlacementId));c||(j+="&di=0");f.sID&&(j+=EBG.format("&sessionid={0}",f.sID));EBGInfra.isDefined(f.optOut)&&(j+=EBG.format("&OptOut={0}",f.optOut));f.ServerClickTracking&&!EBG.isPreview&&!e&&(j+=EBG.format("&sct={0}",f.ServerClickTracking));return j},EBG.Interactions.CounterInteraction.prototype._openPage=function(a,b){EBG.adaptor.openPage(a,b)},EBG.Interactions.CounterInteraction.prototype._getReportingData=function(a,b){var c=0,d=0;b||(c=this.interactionData.counterJumpUrlData&&this.interactionData.counterJumpUrlData.tmpData.isClick?
  186. 1:0,d=this.interactionData.initiationType==EBG.Interactions.InitiationTypes.USER?1:0);c=this._buildReportFormat(c,d,0,a);this.unique=0;return c},EBG.Interactions.CounterInteraction.prototype.getClickTagUrl=function(a){var b="",a=EBG.isDefined(a)&&""!=a?EBG.Interactions.checkURL(a):void 0;EBG.isPreview?EBG.isInWorkshop?b=EBG.format("ReportPage_{0}.html",HTMLPageVer):(b=this.interactionData.counterJumpUrlData.jumpUrl,4<=b.length&&"http"!=b.substr(0,4)&&(b=EBG.format("{0}{1}",ebPtcl,b))):(b=this._getBannerRedirectUrl(a,
  187. null,null,null,!0),b=EBG.format("{0}/ReportPage{1}.html?ebReportURL={2}$$ebImpressionID={3}",ebBigS,EBG.reportPageVer,escape(b),EBG.Ads.Ad.Fn.getRandFromAdUId(this.interactionData.adConfig.uid)),a=-1,EBG.adaptor.browser.isIE()&&(a=9<=EBG.adaptor.browser.getVersion()?4096:2048,a-=b.length),a=this._getReportPageTrackingUrls(a),b+=a);return b},EBG.Interactions.CounterInteraction.prototype._openOrRedirect=function(a){-1==this.interactionData.counterJumpUrlData.target.indexOf(EBG.WindowTarget.BLANK)?(this.interactionData.reportImmediately=
  188. !0,EBG.runTimed(this,this._openPage,[a,this.interactionData.counterJumpUrlData],1E3)):this._openPage(a,this.interactionData.counterJumpUrlData)};if(EBG.Interactions.StdInteractionManager&&(EBG.Interactions.StdInteractionManager.prototype.getClickTarget=function(a){return(a=this._getCounterInteraction(EBG.Interactions.SystemInts.CLICK,a))?a.interactionData.counterJumpUrlData.target:""},EBG.Interactions.StdInteractionManager.prototype.handleCounterInteraction=function(a,b,c,d,e,f){var j=this._getCounterInteraction(a,
  189. b),m=j?j.interactionData:null,l=m?m.counterJumpUrlData:null,n=this.adsData[b],s=n.adConfig.isStdAd,r="",f=EBGInfra.isDefined(f)?f:!0,c=c||0;if(!s&&m)m.initiationType=d?EBG.Interactions.InitiationTypes.USER:m.initiationType,this._handleUserInteraction(b,m),this._handleSpecialInteractions(a,b,c);if(j){a=new EBG.Events.Event(EBG.Events.EventNames.HANDLE_COUNTER_INTERACTION);a.dispatcher=this;if(!a.dispatcher._adConfig)a.dispatcher._adConfig={rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(b)};a.timing=EBG.Events.EventTiming.BEFORE;
  190. a.eventData={interaction:j};if(!EBG.eventMgr.dispatchEvent(a)){if(l){l.tmpData=e;if(1==l.fClose)e=new EBG.Events.Event(EBG.Events.EventNames.CLOSE_AD),e.dispatcher=this,e.eventData={closeDueToClickthrough:!0},EBG.eventMgr.dispatchEvent(e);l.tmpData.isClick=m.countAsClick&&!n.isClickOccur;n.isClickOccur=l.tmpData.isClick?!0:n.isClickOccur;l.tmpData.isProductClick=m.countAsClick&&l.tmpData.clickedVersion&&!n.isProductClicked[l.tmpData.clickedVersion];l.tmpData.isProductClick&&(n.isProductClicked[l.tmpData.clickedVersion]=
  191. !0)}r=f?j.handle(c):"";n.numOfInteractions++;r&&(this._handleReportData(b,m,r),this._isReportDataInQueue(b,r)||this.reportInteractionQueues());a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(a)}}},EBG.Interactions.InteractionManager))EBG.Interactions.InteractionManager.prototype.getClickTarget=EBG.Interactions.StdInteractionManager.prototype.getClickTarget,EBG.Interactions.InteractionManager.prototype.handleCounterInteraction=EBG.Interactions.StdInteractionManager.prototype.handleCounterInteraction,
  192. EBG.Interactions.InteractionManager.prototype._handleReportData=function(a,b,c){this.adsIntQueues[a].push(c);a=this.adsIntQueues[a].length==EBG.Interactions.InteractionManager.intStackLength?!0:!1;(b&&(b.reportImmediately||b.counterJumpUrlData&&b.counterJumpUrlData.tmpData.isClick)||a)&&this.reportInteractionQueues()};if(EBG.FlashCC){EBG.FlashCC.prototype._getAdditionalClickTagParams=function(){var a="",b=this._adConfig.interactions,c;for(c in b)try{if(/clicktag\d+/i.test(c)){var d=EBG.intMgr.adsData[this._adConfig.uid][EBG.Interactions.InteractionTypes.COUNTER][c.toLowerCase()],
  193. e=d&&""!=d.interactionData.counterJumpUrlData.jumpUrl?d.getClickTagUrl(d.interactionData.counterJumpUrlData.jumpUrl):"";""!=e&&(a+=EBG.format("&{0}={1}",c,escape(e)))}}catch(f){}return a};if(EBG.RichFlashCC)EBG.RichFlashCC.prototype._getAdditionalClickTagParams=EBG.FlashCC.prototype._getAdditionalClickTagParams;if(EBG.RichFlashPanelCC)EBG.RichFlashPanelCC.prototype._getAdditionalClickTagParams=EBG.FlashCC.prototype._getAdditionalClickTagParams}}};if(b.ffs)try{for(var d=0;d<b.ffs.length;d++){var e=
  194. b.ffs[d];if("ServerClickTracking"==e.name&&e.state){b.ServerClickTracking=1;c[e.name]();break}}}catch(f){ebO.extensionHooks=tempExtensionHook}})}catch(e$$39){ebO.extensionHooks=tempExtensionHook}tempExtensionHook=ebO.extensionHooks;
  195. try{ebO.extensionHooks.splice(0,0,function(a){var b={CFF_VisRefactor:function(){EBG.Events.EventNames.VISIBILITY_CHECK="VISIBILITY_CHECK";EBG.Events.EventNames.VISIBILITY_HIDDEN="VISIBILITY_HIDDEN";if(EBG.Ads.RichAd){RichAdFF=function(a){EBG.callSuperConstructor(RichAdFF,this,[a])};RichAdFF.prototype={addCreativesHandler:function(a){try{if(this._adConfig.bgImgSrc&&this._changeBackgroundImage(),!a.eventData.isPanel)this.visibilityMgr?this.visibilityMgr.updateResourceObjId(a.eventData.assetId):this.visibilityMgr=
  196. new EBG.RichModules.VisibilityManager(this._adConfig,a.eventData.assetId)}catch(b){}}};var b=new EBG.Events.EventSubscription(EBG.Events.EventNames.CREATE_AD,function(a){EBG.declareClass(RichAdFF,a.eventData.currentClass);a.eventData.currentClass=RichAdFF});b.timing=EBG.Events.EventTiming.BEFORE;b.dispatcherFilters={"_adConfig.rnd":a.rnd};EBG.eventMgr.subscribeToEvent(b)}if(EBG.Ads.StdBannerEx)StdBannerExFF=function(a){EBG.callSuperConstructor(StdBannerExFF,this,[a])},StdBannerExFF.prototype={addCreativesHandler:function(a){if(this._adConfig.visibility.mode==
  197. EBG.VisibilityMode.BASIC_MODE||this._adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE)this.visibilityMgr?this.visibilityMgr.updateResourceObjId(a.eventData.assetId):this.visibilityMgr=new EBG.RichModules.VisibilityManager(this._adConfig,a.eventData.assetId)}},b=new EBG.Events.EventSubscription(EBG.Events.EventNames.CREATE_AD,function(a){EBG.declareClass(StdBannerExFF,a.eventData.currentClass);a.eventData.currentClass=StdBannerExFF}),b.timing=EBG.Events.EventTiming.BEFORE,b.dispatcherFilters=
  198. {"_adConfig.rnd":a.rnd},EBG.eventMgr.subscribeToEvent(b);if(EBG.Ads.VisibilityAd)VisibilityAdFF=function(a){EBG.callSuperConstructor(VisibilityAdFF,this,[a])},VisibilityAdFF.prototype={addCreativesHandler:function(a){try{var b=a.eventData;if(EBG.adaptor.serving&&EBG.adaptor.serving.servingMode==EBG.Adaptors.ServingMode.INNER_IFRAME&&EBG.adaptor.serving.placementIframe)EBG.adaptor.serving.placementIframe.id?b=EBG.adaptor.serving.placementIframe.id:EBG.adaptor.serving.placementIframe.id=a.eventData;
  199. this.visibilityMgr?this.visibilityMgr.updateResourceObjId(b):this.visibilityMgr=new EBG.RichModules.VisibilityManager(this._adConfig,b)}catch(c){}}},b=new EBG.Events.EventSubscription(EBG.Events.EventNames.CREATE_AD,function(a){EBG.declareClass(VisibilityAdFF,a.eventData.currentClass);a.eventData.currentClass=VisibilityAdFF}),b.timing=EBG.Events.EventTiming.BEFORE,b.dispatcherFilters={"_adConfig.rnd":a.rnd},EBG.eventMgr.subscribeToEvent(b);EBG.declareNamespace("RichModules");EBG.RichModules.BasicVisibilityProvider=
  200. function(a,b){this._resObjId=a;this.adConfig=b;this._subscribeToEvents()};EBG.RichModules.BasicVisibilityProvider._isAvailable=function(){return!1};EBG.RichModules.BasicVisibilityProvider.prototype={_isStarted:!1,_calculateVisibilityPercentage:function(){return 0},_getViewPortMetrics:function(){return null},_dispatchCheckVisibility:function(a){if(this._isStarted){var b=new EBG.Events.Event(EBG.Events.EventNames.VISIBILITY_CHECK);b.dispatcher=this;b.eventData=a;b.timing=EBG.Events.EventTiming.ONTIME;
  201. EBG.eventMgr.dispatchEvent(b)}},_dispatchVisibilityHidden:function(){var a=new EBG.Events.Event(EBG.Events.EventNames.VISIBILITY_HIDDEN);a.dispatcher=this;a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(a)},_subscribeToEvents:function(){},updateResourceObjId:function(a){this._resObjId=a},_isVisible:function(){return!1},_calculateVisibilityResult:function(){var a={};try{a.percentage=this._calculateVisibilityPercentage(),a.viewPort=this._getViewPortMetrics()}catch(b){}return a},start:function(){this._isStarted=
  202. !0}};EBG.declareClass(EBG.RichModules.BasicVisibilityProvider,null);EBG.RichModules.GeometricVisibilityProvider=function(a,b){EBG.callSuperConstructor(EBG.RichModules.GeometricVisibilityProvider,this,[a,b])};EBG.RichModules.GeometricVisibilityProvider._isAvailable=function(a){var b=!0,c=EBG.adaptor.isVisibilityPossibleForIframe(),d=a.actualServingMode==EBG.Adaptors.ServingMode.IFRAME,e=EBG.Initializer._getAdClass({tn:a.templateName}),f=!e.requiresIframeBust&&!a.UiVz,a=e.requiresIframeBust&&!EBG.iframeLocation&&
  203. a.aiE&&!a.aiE.iflExists;if(!c&&d&&(f||a))b=!1;return b};EBG.RichModules.GeometricVisibilityProvider.prototype={_focusOnResourceElem:null,_justReceivedFocusOnPage:null,_reachedMaxAdDuration:!1,_calculateVisibilityPercentage:function(a){var a=a||{},b=a.resourceObjId||this._resObjId,c=a.width||this.adConfig.width,d=a.height||this.adConfig.height,e=a.offsetX||this.adConfig.offsetX,f=a.offsetY||this.adConfig.offsetY,j=a.actualServingMode||this.adConfig.actualServingMode,m=a.isUIVZ||this.adConfig.UiVz;
  204. try{var l=a=0,n=0,s=!(EBG.adaptor.getDisplayWin()!=top&&j==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME),r=EBG.adaptor.getScrollLeftTop(s,j),t=EBG.adaptor.getViewPortMetrics(s,m,j),u=this.calculateRightBottowCoordinate(r,t.Width,t.Height),o=EBG.adaptor.getPositioningById(b,!s,j);if(null!=o){b={X:0,Y:0};try{!s&&window.frameElement&&(b=EBG.adaptor.getPositioningByElement(window.frameElement,!1,j))}catch(w){b={X:0,Y:0}}o.X+=b.X;o.Y+=b.Y;"undefined"!=typeof e&&(o.X+=e);"undefined"!=typeof f&&(o.Y+=f);var v=
  205. this.calculateRightBottowCoordinate(o,c,d),n=c*d,l=this.calculateVisibleArea(r,u,o,v),a=n?l/n:0}return 100*a}catch(x){return 0}},_getViewPortMetrics:function(){return EBG.adaptor.getViewPortMetrics(void 0,this.adConfig.UiVz,this.adConfig.actualServingMode)},calculateRightBottowCoordinate:function(a,b,c){var d={X:0,Y:0};d.X=a.X+b;d.Y=a.Y+c;return d},calculateVisibleArea:function(a,b,c,d){try{var e=0,f=0;if(c.Y==d.Y&&c.X==d.X||b.X<=a.X||b.Y<=a.Y)return 0;c.X<=a.X&&a.X<=d.X?e=b.X<=d.X?b.X-a.X:d.X-a.X:
  206. a.X<=c.X&&c.X<=b.X&&(e=d.X>=b.X?b.X-c.X:d.X-c.X);c.Y<=a.Y&&a.Y<=d.Y?f=b.Y<=d.Y?b.Y-a.Y:d.Y-a.Y:a.Y<=c.Y&&c.Y<=b.Y&&(f=d.Y>=b.Y?b.Y-c.Y:d.Y-c.Y);return e*f}catch(j){}},_isVisible:function(a){a=a||{};return!!this._calculateVisibilityPercentage({resourceObjId:a.resourceObjId||this._resObjId,width:a.width||this.adConfig.width,height:a.height||this.adConfig.height,offsetX:a.offsetX||this.adConfig.offsetX,offsetY:a.offsetY||this.adConfig.offsetY,isUIVZ:a.isUIVZ||this.adConfig.isUIVZ,actualServingMode:a.actualServingMode||
  207. this.adConfig.actualServingMode})},_subscribeToEvents:function(){try{EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,this,"_subscribeToEvents");EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_RESIZE,this._pageResizeHandler,this));EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_SCROLL,this._pageScrollHandler,this));EBG.adaptor._getVisibilityEventName()||(EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_FOCUS,
  208. this._pageFocusHandler,this)),EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_BLUR,this._pageBlurHandler,this)),this._subscribeToElementEvents());EBG.adaptor.browser.isFF()&&this.actualServingMode==EBG.Adaptors.ServingMode.IFRAME&&!this.adConfig.UiVz&&(EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.MAX_AD_DURATION,this._maxAdDurationHandler,this)),EBG.runTimed(this,this._visibilityPollingCheck,[],EBG.RichModules.VisibilityManager.VisibilityPollingTimer));
  209. var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_HIDDEN,this._pageHiddenHandler,this);a.isDocumentEvent=!0;EBG.eventMgr.subscribeToEvent(a);a=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_VISIBLE,this._pageVisibleHandler,this);a.isDocumentEvent=!0;EBG.eventMgr.subscribeToEvent(a)}catch(b){}},_subscribeToElementEvents:function(){var a=this,b=function(){a._resourceBlurHandler()},c=new EBG.Events.EventSubscription("focus",function(){a._resourceFocusHandler()},this);c.isElementEvent=
  210. !0;c.elementId=this._resObjId;EBG.eventMgr.subscribeToEvent(c);if(EBG.adaptor.browser.isIE()&&this.actualServingMode!=EBG.Adaptors.ServingMode.SCRIPT)c=new EBG.Events.EventSubscription("blur",b,this),c.isElementEvent=!0,c.elementId=this._resObjId,EBG.eventMgr.subscribeToEvent(c)},updateResourceObjId:function(a){EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,this,"updateResourceObjId",[a]);EBG.adaptor._getVisibilityEventName()||this._subscribeToElementEvents()},_pageVisibleHandler:function(){this._dispatchCheckVisibility(this._calculateVisibilityResult())},
  211. _pageHiddenHandler:function(){this._dispatchVisibilityHidden();this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&this._dispatchCheckVisibility({percentage:0,viewPort:this._getViewPortMetrics()})},_resourceFocusHandler:function(){this._focusOnResourceElem=!0;EBG.runTimed(this,function(){this._focusOnResourceElem=!1},[],60);this._pageFocusHandler()},_resourceBlurHandler:function(){EBG.runTimed(this,function(){this._justReceivedFocusOnPage||this._pageBlurHandler()},[],30)},_pageFocusHandler:function(){this._justReceivedFocusOnPage=
  212. !0;EBG.runTimed(this,function(){this._justReceivedFocusOnPage=!1},[],60);this._dispatchCheckVisibility(this._calculateVisibilityResult())},_pageBlurHandler:function(){EBG.runTimed(this,function(){this._focusOnResourceElem||this._pageHiddenHandler()},[],30)},_visibilityPollingCheck:function(){this._reachedMaxAdDuration||(this._dispatchCheckVisibility(this._calculateVisibilityResult()),EBG.runTimed(this,this._visibilityPollingCheck,[],EBG.RichModules.VisibilityManager.VisibilityPollingTimer))},_pageScrollHandler:function(){this._dispatchCheckVisibility(this._calculateVisibilityResult())},
  213. _pageResizeHandler:function(){if(!this._resizeTimeOut){var a=this;this._resizeTimeOut=setTimeout(function(){a._resizeTimeOut=null;var b=a._calculateVisibilityResult();a._dispatchCheckVisibility(b)},100)}},_maxAdDurationHandler:function(){this._reachedMaxAdDuration=!0},start:function(){EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,this,"start");this._dispatchCheckVisibility(this._calculateVisibilityResult())}};EBG.declareClass(EBG.RichModules.GeometricVisibilityProvider,EBG.RichModules.BasicVisibilityProvider);
  214. EBG.declareNamespace("RichModules");EBG.RichModules.FlashVisibilityProvider=function(a,b){EBG.callSuperConstructor(EBG.RichModules.FlashVisibilityProvider,this,[a,b]);try{this.maxVisibilityArea=b.width*b.height,this.pixelContainer=this._writeFlashRenderPixels(),this._subscribeToEvents()}catch(c){}};EBG.RichModules.FlashVisibilityProvider._isAvailable=function(a){var b=!0;if(EBG.adaptor.browser.isChrome()&&EBG.adaptor.flash&&9<=EBG.adaptor.flash.version&&a.visibility)for(var c=["advertiserMinSurface",
  215. "agencyMinSurface","iabMinSurface"],d,e=0;e<c.length;e++){if(d=a.visibility[c[e]],EBG.isDefined(d)&&50!=d&&100!=d){b=!1;break}}else b=!1;return b};EBG.RichModules.FlashVisibilityProvider.prototype={pixelContainerId:null,pixels:[],maxVisibilityArea:0,_calculationTimeOut:!1,_isReady:!1,_loadedPixelsCounter:0,pixelCountPerAxis:2,_calculateVisibilityPercentage:function(){if(!this._isReady)return-1;var a=0;if(EBG.adaptor.isPageVisible())var b=this.maxVisibilityArea/this.pixelCountPerAxis,a=this.getAxisHiddenAreaPercent("Y",
  216. b),b=this.getAxisHiddenAreaPercent("X",b),a=b>a?this._calculateVisibilityPercentageByAlgorithem(b,a):this._calculateVisibilityPercentageByAlgorithem(a,b);return a},_calculateVisibilityPercentageByAlgorithem:function(a,b){return 100*(1-(a+(b-a*b)))},_getViewPortMetrics:function(){return null},getAxisHiddenAreaPercent:function(a,b){for(var c=0,d=0;d<this.pixels.length;d++)this.pixels[d].axis==a&&!this.pixels[d].isVisible&&(c+=b);return c/this.maxVisibilityArea},_handlePixelMessage:function(a){var b=
  217. {};if(0<a.length)for(var a=a.split(","),c=["id","isVisible","axis"],d=0;d<a.length;d++){var e=a[d];b[c[d]]='"'==e.charAt(0)||"'"==e.charAt(0)||"false"==e||"true"==e?eval(e):e}for(d=0;d<this.pixels.length;d++)if(this.pixels[d].id==b.id){this.pixels[d].isVisible="1"===b.isVisible;if(!this.pixels[d].loaded)this.pixels[d].loaded=!0,this._loadedPixelsCounter++;this._triggerCalculation();break}},_writeFlashRenderPixels:function(){var a=EBG.adaptor.getPositioningById(this._resObjId,!0,this.adConfig.actualServingMode),
  218. b=EBG.adaptor.generateElementId("VisibilityDiv",this.adConfig.uid),a={tagName:EBG.Adaptors.TagNames.DIV,attributes:{id:b,dir:"ltr",style:{position:"absolute",width:EBG.px(this.adConfig.width),height:EBG.px(this.adConfig.height),top:EBG.px(a.Y),left:EBG.px(a.X),"z-index":-10}},children:this._createPixelsJson()};if("undefined"!=typeof this.adConfig.display)a.attributes.style.display=this.adConfig.display;EBG.adaptor.addInlineDOM(a,this.adConfig.placeHolderId);return EBG.adaptor.getElementById(b)},_createPixelsJson:function(){var a=
  219. this._getPixelCordinates();if(!a||0==a.length)throw"could not get cordinates for creating render pixels";for(var b=[],c,d,e=0;e<2*this.pixelCountPerAxis;e++)c=a[e],d=this._resObjId+"pixel"+c.X+":"+c.Y,b.push(this._buildRenderPixelJson(d,c.axis,c.X,c.Y)),this.pixels.push({id:d,axis:c.axis,isVisible:!1,loaded:!1});b.push(this._createScriptTag());return b},_createScriptTag:function(){var a="handlePixel_"+this.adConfig.uid,b=EBG.format("EBG.ads['{0}'].visibilityMgr._visibilityProvider._handlePixelMessage",
  220. this.adConfig.uid),a=EBG.format("function {0}(args)",a),a=a+EBG.format("{ try{ if(!args||args=='null')args=''; return {0}(args);}catch(e){if(window.mmFSExceptionAlert)mmFSExceptionAlert('Command: '+command+'\\nargs: '+args.toString()+'\\n\\nexception in DoFS func:\\n'+e.message)}}",b);return{tagName:EBG.Adaptors.TagNames.SCRIPT,text:a}},_getPixelCordinates:function(){for(var a=[],b=0+Math.round(this.adConfig.height/2),c=0,d=this.adConfig.width/(this.pixelCountPerAxis-1),e=0;e<this.pixelCountPerAxis;e++)a.push({X:c,
  221. Y:b,axis:"Y"}),c+=d;b=0;c=0+Math.round(this.adConfig.width/2);d=this.adConfig.height/(this.pixelCountPerAxis-1);for(e=0;e<this.pixelCountPerAxis;e++)a.push({X:c,Y:b,axis:"X"}),b+=d;return a},_buildRenderPixelJson:function(a,b,c,d){a={play:"true",resId:this.adConfig.uid,resPath:this.adConfig.bigSDir+"/Res/Assets/Pixel"+EBG.flashPixelVer+"/pixel.swf",unique:0,wmode:"transparent",tagName:EBG.Adaptors.TagNames.OBJECT,attributes:{id:a,dir:"ltr",name:a,style:{position:"absolute",textAlign:"left",width:"1px",
  222. height:"1px",left:EBG.px(c),top:EBG.px(d),"z-index":-10},codebase:EBG.format("{0}download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#",EBG.protocol),version:EBG.format("{0},0,0,0",this.adConfig.flashVer)},params:{play:"true",wmode:"transparent",menu:"false",flashVars:"ebAdUID="+this.adConfig.uid+"&id="+a+"&axis="+b,allowScriptAccess:"always",allowFullScreen:"true"}};this._isSupportShockwave()?(a.attributes.type="application/x-shockwave-flash",a.attributes.data=a.resPath):(a.attributes.classid=
  223. "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",a.params.movie=a.resPath);return a},_isSupportShockwave:function(){var a=!0;if(EBG.adaptor.browser.isIE()&&11>EBG.adaptor.browser.getVersion()||10<EBG.adaptor.browser.getVersion()&&9>EBG.adaptor.getDisplayWin().document.documentMode)a=!1;return a},_subscribeToEvents:function(){EBG.callSuperFunction(EBG.RichModules.BasicVisibilityProvider,this,"_subscribeToEvents");EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_RESIZE,
  224. this._repositonPixels,this))},_repositonPixels:function(){var a=EBG.adaptor.getPositioningById(this._resObjId,!0,this.adConfig.actualServingMode);this.pixelContainer.style.top=EBG.px(a.Y);this.pixelContainer.style.left=EBG.px(a.X)},_triggerCalculation:function(){if(this._checkPixelsLoaded()&&!this._calculationTimeOut){var a=this;this._calculationTimeOut=setTimeout(function(){a._calculationTimeOut=null;var b=a._calculateVisibilityResult();a._dispatchCheckVisibility(b)},600)}},_checkPixelsLoaded:function(){if(!this._isReady)this._isReady=
  225. 2*this.pixelCountPerAxis==this._loadedPixelsCounter;return this._isReady},start:function(){EBG.callSuperFunction(EBG.RichModules.FlashVisibilityProvider,this,"start");this._triggerCalculation()}};EBG.declareClass(EBG.RichModules.FlashVisibilityProvider,EBG.RichModules.BasicVisibilityProvider);EBG.RichModules.VisibilityManager=function(a,b){this.adConfig=a;this._resObjId=b;this.actualServingMode=this.adConfig.actualServingMode;this._averageLastCalcTime=(new Date).getTime();if(this._shouldInitialize()&&
  226. (this._visibilityProvider=this._getVisibilityProvider(this._resObjId,this.adConfig)))this._initializeVisibilityData(),this._subscribeToEvents(),this._visRecordable=!0,this._reportVisibilityRecordable(),this._visibilityProvider.start()};EBG.RichModules.VisibilityManager.ThreholdType={IAB:0,Agency:1,Advertiser:2};EBG.RichModules.VisibilityManager.VisibilityPollingTimer=1E3;EBG.RichModules.VisibilityManager.prototype={adConfig:null,_resObjId:null,_visibilityData:null,_visRecordable:!1,_lastVisPercentage:0,
  227. _lastVisViewPort:null,_averageVisibility:0,_averageScreenShare:0,_averageAdDuration:0,_averageLastCalcTime:null,actualServingMode:EBG.Adaptors.ServingMode.SCRIPT,_visibilityProvider:null,_availableVisibilityProviders:[EBG.RichModules.GeometricVisibilityProvider,EBG.RichModules.FlashVisibilityProvider],checkVisibility:function(a){EBG.isDefined(a)||(a={});if(!EBG.isDefined(a.percentage)||!EBG.isNumber(a.percentage))a.percentage=this.calculateVisibilityPercentage();if(0<=a.percentage){if(!("viewPort"in
  228. a))a.viewPort=this.getViewPortMetrics();this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&this._calculateAverages(a);for(var b in EBG.RichModules.VisibilityManager.ThreholdType)EBG.RichModules.VisibilityManager.ThreholdType.hasOwnProperty(b)&&this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[b]]&&this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[b]].isActive&&this._execCheckVisibility(a.percentage,EBG.RichModules.VisibilityManager.ThreholdType[b])}},
  229. updateResourceObjId:function(a){if(this._visibilityProvider&&a&&this._resObjId!=a)this._resObjId=a,this._visibilityProvider.updateResourceObjId(a)},_shouldInitialize:function(){var a=EBG.Initializer._getAdClass({tn:this.adConfig.templateName});return this.adConfig.actualServingMode==EBG.Adaptors.ServingMode.IFRAME&&!a.requiresIframeBust&&this.adConfig.UiVz?!1:!0},_getVisibilityProvider:function(a,b){for(var c=0;c<this._availableVisibilityProviders.length;c++)if(this._availableVisibilityProviders[c]._isAvailable(b))return new this._availableVisibilityProviders[c](a,
  230. b);return null},calculateVisibilityPercentage:function(a,b,c,d,e,f,j){var m=0;EBG.adaptor.isPageVisible()?this._visibilityProvider&&(m=this._visibilityProvider._calculateVisibilityPercentage({resourceObjId:a,width:b,height:c,offsetX:d,offsetY:e,isUIVZ:f,actualServingMode:j})):m=0;return m},isVisibile:function(a,b,c){var d=!1;if(EBG.adaptor.isPageVisible()&&this._visibilityProvider)try{d=!!this._visibilityProvider._isVisible({resourceObjId:a,width:b,height:c})}catch(e){}return d},getViewPortMetrics:function(){var a=
  231. null;this._visibilityProvider&&(a=this._visibilityProvider._getViewPortMetrics());return a},_subscribeToEvents:function(){try{var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.VISIBILITY_CHECK,this._visibilityCheckHandler,this);a.dispatcherFilters={"adConfig.rnd":this.adConfig.rnd};a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.subscribeToEvent(a);if(this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE)a=new EBG.Events.EventSubscription(EBG.Events.EventNames.COLLECT_TIMERS,
  232. this._collectTimersHandler,this),a.timing=EBG.Events.EventTiming.BEFORE,EBG.eventMgr.subscribeToEvent(a);var b=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_HIDDEN,this._stopTimersHandler,this);b.isDocumentEvent=!0;EBG.eventMgr.subscribeToEvent(b);b=new EBG.Events.EventSubscription(EBG.Events.EventNames.VISIBILITY_HIDDEN,this._stopTimersHandler,this);EBG.eventMgr.subscribeToEvent(b)}catch(c){}},_visibilityCheckHandler:function(a){EBG.isDefined(a)&&EBG.isDefined(a.eventData)&&this.checkVisibility(a.eventData)},
  233. _initializeVisibilityData:function(){this._visibilityData=[];this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType.IAB]={minSurface:this.adConfig.visibility.iabMinSurface,minDuration:this.adConfig.visibility.iabMinDuration,visibilityInteraction:EBG.Interactions.SystemInts.VISIBILITY_IAB,durationInteraction:null,isActive:!0,durationNeeded:!1,timeOutFlag:null,reported:!1};this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType.Agency]={minSurface:this.adConfig.visibility.agencyMinSurface,
  234. minDuration:this.adConfig.visibility.agencyMinDuration,visibilityInteraction:EBG.Interactions.SystemInts.VISIBILITY_AGENCY,durationInteraction:EBG.Interactions.SystemInts.VISIBILITY_AGENCY_DURATION,isActive:this.adConfig.visibility.mode!=EBG.VisibilityMode.DEFAULT_MODE,durationNeeded:this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE,timeOutFlag:null,reported:!1};this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType.Advertiser]={minSurface:this.adConfig.visibility.advertiserMinSurface,
  235. minDuration:this.adConfig.visibility.advertiserMinDuration,visibilityInteraction:EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER,durationInteraction:EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_DURATION,isActive:this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE,durationNeeded:this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE,timeOutFlag:null,reported:!1}},_execCheckVisibility:function(a,b){try{if(a>=this._visibilityData[b].minSurface)if(!this._visibilityData[b].reported&&
  236. !this._visibilityData[b].timeOutFlag){var c=this;this._visibilityData[b].timeOutFlag=EBG.runTimed(this,function(){c._visibilityData[b].timeOutFlag=null;EBG.intMgr.handleCounterInteraction(c._visibilityData[b].visibilityInteraction,c.adConfig.uid);c._visibilityData[b].durationNeeded&&c._visibilityData[b].durationInteraction&&(EBG.intMgr.updateTimer(c._visibilityData[b].durationInteraction,c.adConfig.uid,c._visibilityData[b].minDuration),EBG.intMgr.startTimer(c._visibilityData[b].durationInteraction,
  237. c.adConfig.uid));c._visibilityData[b].reported=!0},[],1E3*this._visibilityData[b].minDuration)}else this._visibilityData[b].reported&&this._visibilityData[b].durationNeeded&&this._visibilityData[b].durationInteraction&&EBG.intMgr.startTimer(this._visibilityData[b].durationInteraction,this.adConfig.uid);else this._stopDurationTimeout(b),this._visibilityData[b].durationInteraction&&this._stopDurationCounting(b)}catch(d){}},_stopDurationTimeout:function(a){if(this._visibilityData[a].timeOutFlag)clearTimeout(this._visibilityData[a].timeOutFlag),
  238. this._visibilityData[a].timeOutFlag=null},_stopDurationCounting:function(a){this._visibilityData[a].durationNeeded&&this._visibilityData[a].durationInteraction&&EBG.intMgr.stopTimer(this._visibilityData[a].durationInteraction,this.adConfig.uid)},_reportVisibilityRecordable:function(){EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_RECORDABLE,this.adConfig.uid);(this.adConfig.visibility.mode==EBG.VisibilityMode.BASIC_MODE||this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE)&&
  239. EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_AGENCY_RECORDABLE,this.adConfig.uid);this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_RECORDABLE,this.adConfig.uid)},_collectTimersHandler:function(){EBG.intMgr.clearTimer(EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE,this.adConfig.uid);EBG.intMgr.clearTimer(EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE,this.adConfig.uid);
  240. this._calculateAverages({percentage:0,viewPort:this._visibilityProvider._getViewPortMetrics()});EBG.intMgr.updateTimer(EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE,this.adConfig.uid,this._averageVisibility);EBG.intMgr.updateTimer(EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE,this.adConfig.uid,this._averageScreenShare)},_stopTimersHandler:function(){for(var a in EBG.RichModules.VisibilityManager.ThreholdType)EBG.RichModules.VisibilityManager.ThreholdType.hasOwnProperty(a)&&this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[a]]&&
  241. this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[a]].isActive&&(this._stopDurationTimeout(EBG.RichModules.VisibilityManager.ThreholdType[a]),this._stopDurationCounting(EBG.RichModules.VisibilityManager.ThreholdType[a]))},stopMeasureVisibility:function(){this._collectTimersHandler();this._stopTimersHandler()},_calculateAverages:function(a){var b=(new Date).getTime()-this._averageLastCalcTime;if(0<this._lastVisPercentage&&1E3<b){this._averageVisibility=(this._averageVisibility*this._averageAdDuration+
  242. this._lastVisPercentage*b)/(this._averageAdDuration+b);if(this._lastVisViewPort&&this._lastVisViewPort.Width&&this._lastVisViewPort.Height)this._averageScreenShare=(this._averageScreenShare*this._averageAdDuration+100*(this._lastVisPercentage*this.adConfig.width*this.adConfig.height/100/(this._lastVisViewPort.Width*this._lastVisViewPort.Height))*b)/(this._averageAdDuration+b);this._averageAdDuration+=b}this._lastVisPercentage=a.percentage;this._lastVisViewPort=a.viewPort;this._averageLastCalcTime=
  243. (new Date).getTime()}};EBG.declareClass(EBG.RichModules.VisibilityManager,null)}};if(this.ebO.ffs)try{for(var c=0;c<this.ebO.ffs.length;c++){var d=this.ebO.ffs[c];if("CFF_VisRefactor"==d.name&&d.state){b[d.name]();break}}}catch(e){ebO.extensionHooks=tempExtensionHook}})}catch(e$$52){ebO.extensionHooks=tempExtensionHook}EBG.declareNamespace("Initializer");
  244. EBG.Initializer={initialize:function(){var a=null,b;void 0!==b&&b||(a=EBG.Initializer._getCurrentServerResponse(),EBG.Initializer._initGlobals(a),EBG.Initializer._callExtensionHooks(a),EBG.Initializer._initAdaptor(a),EBG.Initializer._initManagers(a),EBG.Initializer._initDisplayAd(a));return a},_initManagers:function(a){var b=new EBG.Events.Event(EBG.Events.EventNames.INIT_MANAGERS);b.eventData={"_adConfig.rnd":a.rnd};b.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(b);EBG.Initializer._initInteractionManager();
  245. EBG.Initializer._initAnimationManager();EBG.Initializer._initPositioningHelper();b.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(b)},_initDisplayAd:function(a){EBG.Initializer._updateAdConfig(a);if(EBG.Initializer._shouldInitAd(a)){if(!EBG.isDefined(EBG.adaptor.getDisplayWin().EBG))EBG.adaptor.getDisplayWin().EBG=EBG;EBG.Initializer._initAd(a)}},_shouldInitAd:function(a){return a.innerIframe||0==a.ifrm||-1==a.ifrm&&EBG.adaptor.serving&&EBG.adaptor.serving.servingMode!=
  246. EBG.Adaptors.ServingMode.IFRAME},_getCurrentServerResponse:function(){for(var a=0,b;a<ebOArr.length;){if((b=ebOArr[a])&&this._getAdClass(b)){ebOArr.splice(a,1);break}a++}return b},_initGlobals:function(a){var b=navigator.userAgent.toLowerCase();EBG.isOfflineDemo=EBG.isGlobalDef("gEbfOfflineDemo")?gEbfOfflineDemo:!1;EBG.resourcePath=ebResourcePath;a.adConfig.resourcePath=ebResourcePath;EBG.sms=a.sms?a.sms:"";EBG.fcsVirtualPath=a.fvp?a.fvp:"";EBG.pluId=a.pi;EBG.dataCapture=EBG.bs=a.bs;EBG.protocol=
  247. ebPtcl;EBG.pageGUID=EBG.pageGUID?EBG.pageGUID:a.rnd;EBG.reportPageVer=a.rpv;EBG.html5Ver=a.html5v;EBG.flashPixelVer=a.vfp;EBG.intReportTimeout=EBG.isDefined(a.irt)?a.irt:null;EBG.isMSNMessenger=(-1<b.indexOf("msn messenger")||-1<b.indexOf("windows live messenger"))&&window==parent;EBG.isIMBanner=EBG.isGlobalDef("gfEbExpBanerIM")?gfEbExpBanerIM:EBG.isGlobalDef("gfEbExpBannerIM")?gfEbExpBannerIM:!1;EBG.isPreview=!!a.pr;EBG.isInWorkshop=EBG.isGlobalDef("gEbFlyLocal")?gEbFlyLocal:!1;EBG.iframeLocation=
  248. a.ifl?a.ifl:EBG.isGlobalDef("gstrEbIframeLocation")?gstrEbIframeLocation:void 0;EBG.minZIndex=a.z?a.z:EBG.isGlobalDef("gnEbMinZIndex")?gnEbMinZIndex:1E4;EBG.eyeDivRefElement=EBG.isGlobalDef("gEbEyeDivRefElement")?gEbEyeDivRefElement:!1;EBG.eventMgr=EBG.eventMgr||new EBG.Events.EventManager;EBG.ads=EBG.ads||{}},_initServingMode:function(a){var b=this._getAdClass(a);a.requiresIframeBust=b.requiresIframeBust;var c=EBGInfra.isDefined(EBG.adaptor.serving)?EBG.adaptor.serving.detectServingMode(!0):null;
  249. if(b.requiresIframeBust){if(a.innerIframe)a.ifrm=EBG.Adaptors.ServingMode.INNER_IFRAME;if(!a.ifrm||a.soi)a.ifrm=0;EBG.adaptor.initServingMode(a.ifrm,!1,c);if(EBG.adaptor.inPlacementIframe())b=new EBG.Events.EventSubscription(EBG.Events.EventNames.AIE_LOADED,this._handleAieLoad,this),b.dispatcherFilters={"_adConfig.rnd":a.rnd},b.timing=EBG.Events.EventTiming.BEFORE,EBG.eventMgr.subscribeToEvent(b),EBG.adaptor.serving.handleAieServing(a)}else if(a.ifrm=0,b!=EBG.Ads.StdBanner){EBG.adaptor.initServingMode(a.ifrm,
  250. !b.requiresIframeBust,c);if(c==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME){a.adConfig.UiVz=!1;try{document.close()}catch(d){}}if(c==EBG.Adaptors.ServingMode.SCRIPT)a.adConfig.UiVz=!1}else a.adConfig.UiVz=!1},_handleAieLoad:function(a){a.eventData.loadDefault&&a.eventData.currentResponse.tn!=EBG.adTypes.VisibilityAd&&(EBG.Initializer._initManagers(a.eventData.currentResponse),EBG.Initializer._initDisplayAd(a.eventData.currentResponse))},_callExtensionHooks:function(a){if(a.extensionHooks)for(a.adConfig.rnd=
  251. a.rnd;0!==a.extensionHooks.length;)a.extensionHooks.pop().apply(null,[a.adConfig,a])},getRichestAdaptor:function(){for(var a=[EBG.Adaptors.StdWebAdaptor,EBG.Adaptors.WebAdaptor],b=a.length-1;0<=b;b--)if(a[b])return a[b]},getRichestInteractionManager:function(){for(var a=[EBG.Interactions.StdInteractionManager,EBG.Interactions.InteractionManager],b=a.length-1;0<=b;b--)if(a[b])return a[b]},_initAdaptor:function(a){var b=this.getRichestAdaptor(),c=new EBG.Events.Event(EBG.Events.EventNames.CREATE_ADAPTOR);
  252. c.eventData={currentClass:b};c.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(c);if("undefined"==typeof EBG.adaptor||EBG.adaptor.constructor.toString()!=c.eventData.currentClass.toString())b=new c.eventData.currentClass,EBG.adaptor=b;c.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(c);EBG.adaptor.initInnerModules(a.plt,a.bt,a.bv);this._initServingMode(a);EBG.eventMgr.attachToAdaptor()},_initInteractionManager:function(){newEvent=new EBG.Events.Event(EBG.Events.EventNames.CREATE_INT_MGR);
  253. newEvent.eventData={currentClass:this.getRichestInteractionManager()};newEvent.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(newEvent);if("undefined"==typeof EBG.intMgr||EBG.intMgr.constructor.toString()!=newEvent.eventData.currentClass.toString()){var a=new newEvent.eventData.currentClass;EBG.intMgr=a}newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent)},_initAnimationManager:function(){try{if(EBG.RichModules&&EBG.RichModules.AnimationManager){newEvent=
  254. new EBG.Events.Event(EBG.Events.EventNames.CREATE_ANIM_MGR);newEvent.eventData=EBG.RichModules.AnimationManager;newEvent.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(newEvent);if(!EBG.animationMgr)EBG.animationMgr=new newEvent.eventData;newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent)}}catch(a){}},_initPositioningHelper:function(){try{if(EBG.Positioning&&EBG.Positioning.PositionManager){newEvent=new EBG.Events.Event(EBG.Events.EventNames.CREATE_POSITIONING_HELPER);
  255. newEvent.eventData=EBG.Positioning.PositionManager;newEvent.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(newEvent);if(!EBG.posHelper)EBG.posHelper=new newEvent.eventData;newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent)}}catch(a){}},_initAd:function(a){var b=this._getAdClass(a);newEvent=new EBG.Events.Event(EBG.Events.EventNames.CREATE_AD);newEvent.eventData={currentClass:b,adConfig:a.adConfig};newEvent.timing=EBG.Events.EventTiming.BEFORE;
  256. newEvent.dispatcher={_adConfig:{rnd:a.adConfig.rnd}};EBG.eventMgr.dispatchEvent(newEvent);b=new newEvent.eventData.currentClass(a.adConfig);newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent);EBG.ads[a.adConfig.uid]=b;EBG.adaptor.getDisplayWin().EBG.ads[a.adConfig.uid]||(EBG.adaptor.getDisplayWin().EBG.ads[a.adConfig.uid]=EBG.ads[a.adConfig.uid]);if(EBGInfra.isDefined(EBG.BWDetection)&&EBGInfra.isDefined(window.gEBMainWindow)&&EBGInfra.isDefined(gEBMainWindow.EBP)&&
  257. EBGInfra.isDefined(gEBMainWindow.EBP.ebBW)&&EBGInfra.isDefined(gEBMainWindow.EBP.ebBW.checked))EBG.BWDetection.speed=gEBMainWindow.EBP.ebBW.speed,EBG.BWDetection.checked=!0;if(a.adConfig.pckAssets){var b=0,c;for(c in a.adConfig.pckAssets)a.adConfig.pckAssets.hasOwnProperty(c)&&b++;if(0<b&&!EBG.BWDetection.checking&&!EBG.BWDetection.checked)a.adConfig.bwApplied=!0,EBG.BWDetection.init();a.adConfig.BWD=EBG.BWDetection}},_getAdClass:function(a){var b;switch(a.tn){case EBG.adTypes.RichBannerHtml5:b=EBG.Ads.RichBannerHtml5;
  258. break;case EBG.adTypes.SEBannerHtml5:b=EBG.Ads.SEBannerHtml5;break;case EBG.adTypes.StdBanner:b=a.IABBV||a.IABEV?EBG.Ads.StdBannerEx:EBG.Ads.StdBanner;break;case EBG.adTypes.Banner:b=EBG.Ads.RichBanner;break;case EBG.adTypes.SingleExpBanner:b=EBG.Ads.SingleExpBanner;break;case EBG.adTypes.ExpBanner:b=EBG.Ads.ExpBanner;break;case EBG.adTypes.VisibilityAd:b=EBG.Ads.VisibilityAd;break;case EBG.adTypes.FloatingAd:b=EBG.Ads.Floating;break;case EBG.adTypes.FloatingAdWithRem:b=EBG.Ads.FloatingWithReminder}return b},
  259. _updateAdConfig:function(a){a.adConfig.rnd=a.rnd;a.adConfig.uid=EBG.format("{0}_{1}",a.adConfig.adId,a.adConfig.rnd);a.adConfig.placeHolderId=a.phid;a.adConfig.sUrlTokens=a.ut;a.adConfig.actualServingMode=EBGInfra.isDefined(EBG.adaptor.serving)?EBG.adaptor.serving.detectServingMode(!0):null;if(!a.adConfig.clickTrackingUrls)a.adConfig.clickTrackingUrls=[];if(a.ncu)a.adConfig.clickTrackingUrls.push(a.ncu),a.adConfig.ncu=a.ncu;a.adConfig.ServerClickTracking=a.ServerClickTracking?1:0;if(!a.adConfig.defaultImpTrackingUrls)a.adConfig.defaultImpTrackingUrls=
  260. [],a.adConfig.defaultClickTrackingUrls=[];if(a.dctu)a.adConfig.defaultClickTrackingUrls=a.dctu;if(a.ditu)a.adConfig.defaultImpTrackingUrls=a.ditu;a.adConfig.impressionTrackingURLs=[];if(a.itu&&0<a.itu.length)a.adConfig.impressionTrackingURLs=a.itu;"undefined"!=typeof gEbBAd&&gEbBAd&&(gEbBAd.playRS&&gEbBAd.playRS.strNUrl&&a.adConfig.impressionTrackingURLs.push(gEbBAd.playRS.strNUrl),gEbBAd.strNImpUrl&&a.adConfig.impressionTrackingURLs.push(gEbBAd.strNImpUrl));if(a.soi)a.adConfig.showOnlyImage=a.soi;
  261. a.adConfig.imageOnly=!1;a.adConfig.page=a.p;a.adConfig.massVersioning={targetAudienceId:a.ta&&"-1"!=a.ta?a.ta:"",deliveryGroupId:a.dg&&"-1"!=a.dg?a.dg:"",subDeliveryGroupId:a.sdg&&"-1"!=a.sdg?a.sdg:"",adVersions:a.av?a.av:"",defaultAdVersion:a.avd?a.avd:"",adBasePath:a.abp?a.abp:"",massVersionFolderDivider:a.mvfd?a.mvfd:0};a.adConfig.reportDelayedImpression=a.rdi?a.rdi:0;a.adConfig.defaultImageReason=a.dir?a.dir:"";a.adConfig.mobileSDK=a.sdk?a.sdk:"";a.adConfig.isOfflineDemo=EBG.isOfflineDemo;if("undefined"==
  262. typeof a.adConfig.openWindow)a.adConfig.openWindow=!0;this._updateAdConfigToHandleOpenWindow(a);a.adConfig.bigSDir=unescape(ebBigS);a.adConfig.imagesDir=unescape(ebBigS)+"Res/Images"+a.imgv+"/";a.adConfig.arrOnStartDnlEvents=a.osde;a.adConfig.arrOnPlayEvents=a.ope;EBG.adaptor.optOut=a.adConfig.optOut=a.oo?a.oo:0;EBG.adaptor.histLen=a.adConfig.histLen=a.hl?a.hl:30;a.adConfig.sPublisherPlacementId=a.ppi?a.ppi:"";a.adConfig.width=a.w?a.w:"";a.adConfig.height=a.h?a.h:"";a.adConfig.shouldCollectUrl=a.cu?
  263. a.cu:0;a.adConfig.sID=a.sid?a.sid:"";a.adConfig.dlm=a.dlm?a.dlm:3;a.adConfig.testImp=a.t?!0:!1;a.adConfig.usercookie=a.usercookie?a.usercookie:"";a.adConfig.visibility={};a.adConfig.visibility.mode=EBG.VisibilityMode.DEFAULT_MODE;if(a.IABEV)a.adConfig.visibility.mode=EBG.VisibilityMode.ENHANCED_MODE;else if(a.IABBV)a.adConfig.visibility.mode=EBG.VisibilityMode.BASIC_MODE;a.adConfig.visibility.iabMinSurface=a.IABMS;a.adConfig.visibility.iabMinDuration=a.IABMD;a.adConfig.visibility.agencyMinSurface=
  264. a.AgMS?a.AgMS:a.IABMS;a.adConfig.visibility.agencyMinDuration=a.AgMD?a.AgMD:a.IABMD;a.adConfig.visibility.advertiserMinSurface=a.AdMS?a.AdMS:a.IABMS;a.adConfig.visibility.advertiserMinDuration=a.AdMD?a.AdMD:a.IABMD;if(EBGInfra.isDefined(a.adConfig.interactionsToReport)&&a.adConfig.interactionsToReport.visibility)a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_RECORDABLE]=EBG.Interactions.SystemInts.VISIBILITY_RECORDABLE,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_AGENCY_RECORDABLE]=
  265. EBG.Interactions.SystemInts.VISIBILITY_AGENCY_RECORDABLE,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_RECORDABLE]=EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_RECORDABLE,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER]=EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_AGENCY]=EBG.Interactions.SystemInts.VISIBILITY_AGENCY,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_IAB]=
  266. EBG.Interactions.SystemInts.VISIBILITY_IAB,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_DURATION]=EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_DURATION,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_AGENCY_DURATION]=EBG.Interactions.SystemInts.VISIBILITY_AGENCY_DURATION,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE]=EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE,a.adConfig.interactionsToReport[EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE]=
  267. EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE;if(EBGInfra.isDefined(a.adConfig.defaultFlashName)&&!EBGInfra.isDefined(a.adConfig.defaultFlashPath))a.adConfig.defaultFlashPath=a.adConfig.imagesDir+"BannerAssets/"+a.adConfig.defaultFlashName;a.adConfig.offsetX=a.offsetX?a.offsetX:0;a.adConfig.offsetY=a.offsetY?a.offsetY:0;a.adConfig.adChoice={};a.adConfig.adChoice.certificationProgram=a.AcCP;a.adConfig.adChoice.customUrl=a.CAcURL;a.adConfig.adChoice.includeMarker=a.adConfig.AcIncludeMarker;
  268. a.adConfig.adChoice.iconPosition=parseInt(a.adConfig.AcIconPosition);if(a.wm)a.adConfig.wmode=a.wm.toLowerCase();if(!EBGInfra.isDefined(a.adConfig.pushDownConfig)&&"none"!=a.disp)a.adConfig.display=EBGInfra.isDefined(a.disp)?a.disp:"inline";a.adConfig.disableAutoExpand=EBGInfra.isDefined(a.dex)?a.dex:0;a.adConfig.aiE=a.aiE?a.aiE:{};a.adConfig.newClickTracking=EBG.isDefined(a.nClk)?a.nClk:1;try{if("undefined"!=typeof gEbBAd&&gEbBAd){if(gEbBAd.panelsWMode)a.adConfig.panelsWMode=gEbBAd.panelsWMode;if(gEbBAd.strWmode)a.adConfig.wmode=
  269. gEbBAd.strWmode.toLowerCase()}}catch(b){}},_updateAdConfigToHandleOpenWindow:function(a){a.adConfig.bsPath=EBG.bs;a.adConfig.pluId=EBG.pluId;a.adConfig.protocol=EBG.protocol;a.adConfig.isPreview=!!a.pr}};
  270. try{var currentResponse=EBG.Initializer.initialize();if(currentResponse.adConfig.UiVz&&!currentResponse.requiresIframeBust&&"Visibility"!=currentResponse.tn){var vizClone=EBG.cloneObj(currentResponse);vizClone.tn=vizClone.adConfig.templateName="Visibility";vizClone.ifrm=2;vizClone.soi=0;ebOArr[ebOArr.length]=vizClone;var newEbSrc=ebSrc.replace(currentResponse.tn,vizClone.tn),newEbSrc=newEbSrc.replace(/ex(debug|)\.js/ig,".js"),newScript=document.createElement("SCRIPT");newScript.src=newEbSrc;var target=
  271. document.getElementById(vizClone.phid);target&&target.appendChild(newScript)}}catch(e$$55){};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement