var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /** * @author Brandon Aaskov (Brightcove) * @version 1.0 * @projectDescription */ var _brightcoveAd = new Object(); var _companionAds = new Object(); /** * Takes care of parsing the XML that comes back from the ad server, building the ad object, and displaying the ads in both the player and on the page. It should be noted that the ad XML that comes back from the ad server needs to be one of the supported Rich Media templates that Brightcove distributes for use with DFP and other ad serving platforms. * @param {String} pXML The XML string that gets returned from the ad server. Needs to be one of the templates supported by Brightcove. * @param {Object} pOptions An object that contains options for further customization. By default, this function will render the expanded banner (eg type: "expandedBanner") and also write out the banner to a div with the id of "expandedBanner" (eg writeTo: "expandedBanner"). For the type option, you can also choose "collapsedBanner". For the writeTo option, a user can specify the ID of any element they'd like. */ function ExternalAd(pXML, pOptions) { //pXML = this.xmlReplace(pXML); if (pOptions) { _brightcoveAd.expandedId = (pOptions.expandedId) ? pOptions.expandedId : "expandedBanner"; _brightcoveAd.collapsedId = (pOptions.collapsedId) ? pOptions.collapsedId : "collapsedBanner"; _brightcoveAd.skyScrapperId = (pOptions.skyScrapperId) ? pOptions.skyScrapperId : "skyScrapperBanner"; _brightcoveAd.type = (pOptions.type) ? pOptions.type : "expandedBanner"; } else { _brightcoveAd.expandedId = "expandedBanner"; _brightcoveAd.collapsedId = "collapsedBanner"; _brightcoveAd.skyScrapperId = "skyScrapperBanner"; _brightcoveAd.type = "expandedBanner"; } /** * Parses the XML from the ad server and builds the ad object from it. * @param {Object} pXML The XML returned from the ad server. */ this.buildAd = function(pXML) { if (pXML.ad.indexOf("\n'; objectTag += '\t\n'; objectTag += '\t\n'; objectTag += '\t\n'; objectTag += '\t\n'; objectTag += '\t\n'; objectTag += '\t\n'; objectTag += '\t\n'; objectTag += '\n'; if(document.getElementById(pId)) document.getElementById(pId).innerHTML = objectTag; } this.createImage = function(pURL, pClickThrough, pId) { if(document.getElementById(pId)) document.getElementById(pId).innerHTML = "\n"; } /** * Writes the banner out to the page, and determines wheter or not it's a swf or regular image so that the correct tags are written to the page. * @param {Object} pAd The ad object containing all of the information to display an ad in the player and render an ad on the page. */ this.createBanner = function(pAd) { var externalAds = {}; switch (_brightcoveAd.type) { case "expandedBanner": /*I used zIndex because setting the innerHTML of element that is not yet displayed causes problem crossbrowser issues*/ //document.getElementById('bc_adOverlay').style.zIndex = 99; //document.getElementById('bc_adContainer').style.zIndex = 100; //document.getElementById('bc_close').style.display = "block"; if(pAd.expandedBannerURL) externalAds["expandedBanner"] = {clickURL: pAd.expandedBannerClickURL, srcURL: pAd.expandedBannerURL, id: _brightcoveAd.expandedId, type: "expandedBanner"}; break; case "collapsedBanner": if(pAd.collapsedBannerURL) externalAds["collapsedBanner"] = {clickURL: pAd.collapsedBannerClickURL, srcURL: pAd.collapsedBannerURL, id: _brightcoveAd.collapsedId, type: "collapsedBanner"}; break; case "both": /*I used zIndex because setting the innerHTML of element that is not yet displayed causes problem crossbrowser issues*/ //document.getElementById('bc_adOverlay').style.zIndex = 99; //document.getElementById('bc_adContainer').style.zIndex = 100; //document.getElementById('bc_close').style.display = "block"; if(pAd.expandedBannerURL) externalAds["expandedBanner"] = {clickURL: pAd.expandedBannerClickURL, srcURL: pAd.expandedBannerURL, id: _brightcoveAd.expandedId, type: "expandedBanner"}; if(pAd.collapsedBannerURL) externalAds["collapsedBanner"] = {clickURL: pAd.collapsedBannerClickURL, srcURL: pAd.collapsedBannerURL, id: _brightcoveAd.collapsedId, type: "collapsedBanner"}; if(pAd.skyScrapperURL) externalAds["skyScrapperBanner"] = {clickURL: pAd.skyScrapperC, srcURL: pAd.skyScrapperURL, id: _brightcoveAd.skyScrapperId, type: "skyScrapperBanner"}; break; } for(var i in externalAds) { var banner = externalAds[i]; (banner.srcURL.indexOf('.swf') !== -1) ? this.createSwf(banner.srcURL, banner.clickURL, banner.id) : this.createImage(banner.srcURL, banner.clickURL, banner.id); } } var ad = this.buildAd(pXML); if(ad) { this.createBanner(_companionAds); } adModule.showAd(ad); } } /* FILE ARCHIVED ON 02:05:02 Jun 19, 2012 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 23:47:22 Apr 27, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.59 exclusion.robots: 0.068 exclusion.robots.policy: 0.059 cdx.remote: 0.057 esindex: 0.009 LoadShardBlock: 191.963 (3) PetaboxLoader3.datanode: 206.136 (4) PetaboxLoader3.resolve: 77.841 (2) load_resource: 133.104 */