IBSYS.using("media");IBSYS.media.videoPagePlayer={init:function(el,config){if(!config.video_coid){config.video_coid=window.location.pathname.match(/\/(\d+)\//);if(config.video_coid){config.video_coid=config.video_coid[1];}}if(!swfobject.hasFlashPlayerVersion("6.0.65")){var legacyForFlash=this.getArchiveURL(config.video_coid);el.innerHTML='<div align="center" valign="middle"><p style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#444444; line-height:1.5;">'+"To watch videos, you need a newer version of <strong>Flash.</strong><br /><br />"+"After you install Flash, you may need to restart your browser.<br />"+"Copy this URL first, so that you can find your way back to the video:<br />"+'<form><input id=thisPage name="this_page_url" type="text" size="30" maxlength="256" readonly="true" align="middle" value='+document.location.href+" /></form>"+'</p><br /><div id="FlashInstallPromptDiv"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">'+'<img src="/sh/flex3MediaPlayer/images/getflash.jpg" alt="Get Flash" border="0" /></a></div><br />'+'<p style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#444444; line-height:1.5;">If you cannot install the latest version of Flash,<br />'+"you may be able to view videos on our <strong><a href="+legacyForFlash+">legacy player page</a>.</strong></p><br /></div>";}else{if(!swfobject.hasFlashPlayerVersion("9.0.28")){document.title=document.title.slice(0,47)+" - Flash Player Installation";var legacyForFlash=this.getArchiveURL(config.video_coid);var eiSwf="/sh/flex3MediaPlayer/expressinstall_custom.swf?legacy="+legacyForFlash;var fv={MMredirectURL:window.location.href,MMplayerType:(typeof ActiveXObject=="function"?"ActiveX":"PlugIn"),MMdoctitle:document.title};var atts={id:el.id};swfobject.embedSWF(eiSwf,el.id,"640","405","6.0.65",eiSwf,fv,{},atts);}else{IBSYS.application.Application.addEventListener(this.onIBEvent,this);WT.cg_n="Interactive";this.playerType=config.playerType||"playerpage";this.loadMediaOnly=(!config.play_first_editorial_video)||true;if(config.video_coid){this.origin="direct_link";this.loadMediaOnly=false;var url=config.jsonEndPoint+"?contentId=urn:ibsys:content:"+config.video_coid;url+="&linkLevelsToResolve=1";YAHOO.util.Connect.asyncRequest("GET",url,{success:this.onContentService,scope:this});}this.ad_position=config.ad_position||"square";this.renderPlayer(el,config);}}},getArchiveURL:function(coid){var c=(coid?coid+"/":"");return window.location.protocol+"//"+window.location.host+"/video_legacy/"+c+"index.html"+window.location.search;},renderPlayer:function(el,config,coid){el=typeof el=="string"?document.getElementById(el):el;var uid=el.id.substring("component".length);var pbId="pb"+uid;var csId="cs"+uid;var mdId="md"+uid;el.style.position="relative";el.style.height="700px";var h='<div id="" style="background:transparent url(/sh/flex3MediaPlayer/images/playerWrapper.gif) no-repeat; position:relative; width:650px;height:415px;padding:5px;"> ';h+='<div id="'+pbId+'"></div>';h+='</div><div id="'+mdId+'" style="position:absolute;left:655px;top:0px;"></div>';h+='<div class="adWithTab '+this.ad_position+'" ><span class="adtab"> </span><div id="companionAd" class="adObj ad'+this.ad_position+'"> <'+"/div></div>";h+='<div id="'+csId+'" style="position:absolute;top:422px;"> <'+"/div>";h+='<div class="vidPagePlayerFooter">'+'<div class="playerFAQ">Questions about watching video? <a href="/videofaq/index.html">Click here.</a></div>'+"</div>";el.innerHTML=h;var scConfig=YAHOO.lang.merge(config,{swfUrl:config.selecterSwfUrl,width:975,height:215,wmode:"opaque"});IBSYS.media.selectContentModule.init(document.getElementById(csId),scConfig);var pbConfig=YAHOO.lang.merge(config,{swfUrl:config.playbackSwfUrl,width:640,height:405,wmode:"transparent"});IBSYS.media.vidPlayModule.init(document.getElementById(pbId),pbConfig);var mdVars={host:window.location.hostname};if(config.skin_swf_url){mdVars.skin=config.skin_swf_url;}IBSYS.media.genericFlash2.init(document.getElementById(mdId),{swfUrl:config.descriptionSwfUrl,width:config.mdWidth||320,height:config.mdHeight||140,flashVars:mdVars,preserveEl:true,wmode:"transparent"});this.mediaDescriptionSwf=mdId;},onContentService:function(r){var meta=YAHOO.lang.JSON.parse(r.responseText),scm=IBSYS.media.selectContentModule;meta.loadMediaOnly=false;meta.coidValue=meta.contentId.substring(meta.contentId.lastIndexOf(":")+1);scm.setSuppressDefault(true);scm.sortStreams(meta);},onIBEvent:function(e,attempt){switch(e.getName()){case"movieLoaded":if(e.eventData.name=="mediaDescription"){this.mediaDescriptionSwf=document.getElementById(e.eventData.uniqueId);if(this.currentVideo){this.setDescription();delete this.currentVideo;}}var alpha=document.getElementById("alpha");if(alpha){alpha.style.backgroundImage="none";}break;case"newMediaContent":var t=typeof this.mediaDescriptionSwf;if(t=="object"||t=="function"){this.setDescription(e.eventData);}else{this.currentVideo=e.eventData;}break;case"propertyChanged":if(e.getSource().propertyName=="windowLoaded"){IBSYS.ad.AdManager.registerPosition({"iframe":true,"element":"companionAd","name":this.ad_position,"width":"300","height":"250","topic":"","section":"","swSectionRoot":"","type":"DOM","getSect":""});}break;}},setDescription:function(meta){var t=typeof this.mediaDescriptionSwf;if(t=="function"||t=="object"){this.mediaDescriptionSwf.setDescription(meta.headline,(meta.teaser||""),meta.coidValue,meta.dateCreated);}}};
