this.DEBUG=true;
var vp_debugOutputType="";
function debugOutput(_1,_2){
if(vp_debugOutputType=="alert"){
alert(_1);
}
if(vp_debugOutputType=="firebug"){
switch(_2){
case "log":
console.log(_1);
break;
case "info":
console.info(_1);
break;
case "warn":
console.warn(_1);
break;
case "error":
console.error(_1);
break;
default:
console.log(_1);
}
}
}
Function.prototype.method=function(_3,_4){
this.prototype[_3]=_4;
return this;
};
if(typeof console!="object"||!this.DEBUG){
var n=function(){
};
console={warn:n,error:n,info:n,log:n};
}
if(typeof EmbeddedPlayerUtil=="undefined"){
EmbeddedPlayerUtil={getElementPosition:function(e){
var _6=(typeof (e)=="string")?document.getElementById(e):e;
var _7=curtop=0;
if(_6.offsetParent){
_7=_6.offsetLeft;
curtop=_6.offsetTop;
while(_6=_6.offsetParent){
_7+=_6.offsetLeft;
curtop+=_6.offsetTop;
}
}
return {x:_7,y:curtop};
}};
}
if(typeof EmbeddedPlayerManager=="undefined"){
EmbeddedPlayerManager=function(){
function Constructor(){
this.BASE_LOCATION="";
this.TRACKING_JS="";
this.COMPANION_REFERRER="";
this.METADATA_THUMB_URL="";
this.players;
this.companionReference;
this.lastPlayer;
this.fullscreenPlayer=null;
this.version=2.1;
if(!deconcept||!deconcept.SWFObject){
debugOutput("Couldn't initialize EmbeddedPlayerManager. SWFObject unavailable");
return null;
}
debugOutput("making shared instance of embeddedPlayerManager. this message should only appear once","info");
this.players=new Array();
this.initOnResize();
this.initOnScroll();
}
with(Constructor){
method("getVersion",function(){
return this.version;
});
method("embedPlayer",function(_8,_9,_a,_b,_c,_d,_e,_f,_10,_11,_12,_13,_14,_15,_16,_17){
enableFullscreen=true;
if(this.players[_8]){
return this.players[_8];
}
if(!document.getElementById(_8)){
var _18="";
}
var _19="";
var _1a=384;
var _1b=316;
if(_a){
if(typeof _a=="string"&&_a.indexOf("/")!=-1){
_19=_a;
}else{
_18=_a;
}
}
if(typeof _b=="number"&&typeof _c=="number"){
_1a=_b;
_1b=_c;
}
this.lastPlayer=new EmbeddedPlayer(this,_8,_9,_18,_19,_1a,_1b,_d,_e,_f,_10,enableFullscreen,_11,_12,_13,_14,_15,_16,_17);
this.players[_8]=this.lastPlayer;
this.lastPlayer.currentClip.dlid=_18;
return this.lastPlayer;
});
method("setCompanion",function(_1c){
this.companionReference=_1c;
});
method("getCompanionReference",function(){
return this.companionReference;
});
method("getPlayer",function(_1d){
try{
if(typeof _1d=="undefined"){
return this.lastPlayer;
}
this.lastPlayer=this.players[_1d];
return this.lastPlayer;
}
catch(e){
debugOutput("ePM.getPlayer(): "+e.message);
}
});
method("pauseAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].pause();
}
}
}
catch(e){
debugOutput("ePM.pauseAll(): "+e.message);
}
});
method("playAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].play();
}
}
}
catch(e){
debugOutput("ePM.playAll(): "+e.message);
}
});
method("muteAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].mute();
}
}
}
catch(e){
debugOutput("ePM.muteAll(): "+e.message);
}
});
method("volumeUpAll",function(_21){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].volumeUp(_21);
}
}
}
catch(e){
debugOutput("ePM.volumeUpAll(): "+e.message);
}
});
method("volumeDownAll",function(_23){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].volumeDown(_23);
}
}
}
catch(e){
debugOutput("ePM.volumeDownAll(): "+e.message);
}
});
method("setVolumeAll",function(_25){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].setVolume(_25);
}
}
}
catch(e){
debugOutput("ePM.setVolumeAll(): "+e.message);
}
});
method("rewindAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].rewind();
}
}
}
catch(e){
debugOutput("ePM.rewindAll(): "+e.message);
}
});
method("fastForwardAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].fastForward();
}
}
}
catch(e){
debugOutput("ePM.fastForwardAll(): "+e.message);
}
});
method("setBaseLocation",function(_29){
this.BASE_LOCATION=_29;
});
method("setTrackingJS",function(_2a){
this.TRACKING_JS=_2a;
});
method("setCompanionRenderer",function(_2b){
this.COMPANION_RENDERER=_2b;
});
method("setMetadataThumbURL",function(_2c){
this.METADATA_THUMB_URL=_2c;
});
method("setActivePlayer",function(_2d){
try{
if(this.isValidPlayer(_2d)==true){
this.lastPlayer=this.players[_2d];
}else{
this.lastPlayer=this.lastPlayer;
}
}
catch(e){
debugOutput("ePM.setActivePlayer(): "+e.message);
}
});
method("isValidPlayer",function(_2e){
try{
var _2f=false;
for(var i in this.players){
if(i==_2e){
_2f=true;
}
}
return _2f;
}
catch(e){
debugOutput("ePM.isValidPlayer(): "+e.message);
}
});
method("setActiveFullscreen",function(_31){
this.fullscreenPlayer=_31;
});
method("unFullscreen",function(){
this.fullscreenPlayer.fullscreen(false);
});
method("updatePositions",function(){
for(var i in this.players){
var _33=this.players[i];
if(_33.id){
var _34=EmbeddedPlayerUtil.getElementPosition("placeholder_"+_33.id);
_33.container.style.left=_34.x+"px";
_33.container.style.top=_34.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){
_33.container.style.left=parseInt(_33.container.style.left)+1+"px";
_33.container.style.top=parseInt(_33.container.style.top)+1+"px";
}
}
}
});
method("initOnResize",function(){
var _35=this;
if(typeof (window.onresize)!="function"){
window.onresize=function(){
_35.updatePositions();
};
}else{
if(!this.oldResize){
this.oldResize=window.onresize;
}
window.onresize=function(){
_35.oldResize();
_35.updatePositions();
};
}
});
method("resetOnResize",function(){
if(this.oldResize){
window.onresize=this.oldResize;
}else{
window.onresize=null;
}
this.initOnResize();
});
method("initOnScroll",function(){
var _36=this;
if(typeof (window.onscroll)!="function"){
window.onscroll=function(){
_36.updatePositions();
};
}else{
if(!this.oldScroll){
this.oldScroll=window.onscroll;
}
window.onscroll=function(){
_36.oldScroll();
_36.updatePositions();
};
}
});
method("resetOnScroll",function(){
if(this.oldScroll){
window.onscroll=this.oldScroll;
}else{
window.onscroll=null;
}
this.initOnScroll();
});
}
return new Constructor();
};
}
if(typeof EmbeddedPlayer=="undefined"){
EmbeddedPlayer=function(_37,_38,_39,_3a,_3b,_3c,_3d,_3e,_3f,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49){
function Constructor(){
this.manager=_37;
this.id=_38;
this.onMetadata;
this.onClearMetadata;
this.companion;
this.swf;
this.container;
this.trackingiframe;
this.companionDiv;
this.width=_3c;
this.height=_3d;
this.isFullscreen=false;
this.isFullscreenEnabled=(_42==true);
this.isPlayingAd=false;
this.playingAdType;
this.placeholder;
this.oldWin;
this.lastScrollPos;
this.divIDList=new Array();
this.cssPropertyList1;
this.cssPropertyList2;
this.currentClip=new Object();
this.currentClip.dlid=0;
this.metadataContainers=new MetadataContainer(this);
this.metadata=new Object();
this.playlists=new Array();
this.lastPlaylist;
this.activePlaylist;
this.runOnFullscreenStartFunction;
this.runOnFullscreenEndFunction;
this.runOnBeginFunction;
this.runOnClipStartFunction;
this.runOnClipSwitchedFunction;
this.runOnClipCompletedFunction;
this.runOnClosedFunction;
this.runOnEndFunction;
this.allowPlaylistAdvance=true;
this.inAutoplay=false;
this.onClearMetadata=function(){
this.executeRunOnEnd();
if(this.allowPlaylistAdvance==true){
this.isPlayingAd=false;
this.activePlaylist.playNext();
}
};
this.onMetadata=function(_4a){
this.executeRunOnBegin();
this.metadata.title=_4a.title;
this.metadata.subtitle=_4a.subtitle;
this.metadata.shortDescription=_4a.shortDescription;
this.metadata.airtime=_4a.airtime;
this.metadata.dlid=_4a.dlid;
this.metadata.thumbSmall=_4a.thumbSmall;
this.metadata.thumbLarge=_4a.thumbLarge;
this.metadata.thumbSmallImage="<img src=\""+embeddedPlayerManager.METADATA_THUMB_URL+""+this.metadataContainers.replaceCharsforHTML(_4a.thumbSmall)+"\" />";
this.metadata.thumbLargeImage="<img src=\""+embeddedPlayerManager.METADATA_THUMB_URL+""+this.metadataContainers.replaceCharsforHTML(_4a.thumbLarge)+"\" />";
this.metadata.folderPath=_4a.folderPath;
this.metadata.usOnly=_4a.usOnly;
this.metadata.folderid=_4a.folderid;
this.metadata.clipOrder=_4a.placement;
this.metadata.startDate=_4a.startdate;
this.metadata.endDate=_4a.enddate;
this.metadata.isThirdParty=_4a.isThirdParty;
this.metadata.longDescription=_4a.longdescription;
this.metadata.guid=_4a.guid;
this.metadata.publishDate=_4a.publishdate;
this.metadata.buyURL=_4a.buyurl;
this.metadata.buyURLtext=_4a.buyurltext;
this.metadata.relatedURL=_4a.relatedurl;
this.metadata.relatedURLtext=_4a.relatedurltext;
this.metadata.copyright=_4a.copyright;
this.metadata.thumbMezznPath=_4a.mezznimagepath;
this.metadata.fullPageConfig=_4a.fullpageconfigpath;
this.metadata.streamType=_4a.streamType;
this.metadata.permalink=_4a.permalink;
this.metadata.adPlaylist=_4a.adPlaylistDart;
this.metadata.showVideoAds=_4a.videoads;
this.currentClip=this.metadata;
if(this.metadataContainers.title!=null){
document.getElementById(this.metadataContainers.title).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.title);
}
if(this.metadataContainers.subtitle!=null){
document.getElementById(this.metadataContainers.subtitle).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.subtitle);
}
if(this.metadataContainers.shortDescription!=null){
document.getElementById(this.metadataContainers.shortDescription).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.shortDescription);
}
if(this.metadataContainers.airtime!=null){
document.getElementById(this.metadataContainers.airtime).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.airtime);
}
if(this.metadataContainers.dlid!=null){
document.getElementById(this.metadataContainers.dlid).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.dlid);
}
if(this.metadataContainers.thumbSmall!=null){
document.getElementById(this.metadataContainers.thumbSmall).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbSmall);
}
if(this.metadataContainers.thumbLarge!=null){
document.getElementById(this.metadataContainers.thumbLarge).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbLarge);
}
if(this.metadataContainers.thumbSmallImage!=null){
document.getElementById(this.metadataContainers.thumbSmallImage).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbSmallImage);
}
if(this.metadataContainers.thumbLargeImage!=null){
document.getElementById(this.metadataContainers.thumbLargeImage).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbLargeImage);
}
if(this.metadataContainers.folderPath!=null){
document.getElementById(this.metadataContainers.folderPath).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.folderPath);
}
if(this.metadataContainers.usOnly!=null){
document.getElementById(this.metadataContainers.usOnly).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.usOnly);
}
if(this.metadataContainers.folderid!=null){
document.getElementById(this.metadataContainers.folderid).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.folderid);
}
if(this.metadataContainers.clipOrder!=null){
document.getElementById(this.metadataContainers.clipOrder).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.clipOrder);
}
if(this.metadataContainers.startDate!=null){
document.getElementById(this.metadataContainers.startDate).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.startDate);
}
if(this.metadataContainers.endDate!=null){
document.getElementById(this.metadataContainers.endDate).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.endDate);
}
if(this.metadataContainers.isThirdParty!=null){
document.getElementById(this.metadataContainers.isThirdParty).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.isThirdParty);
}
if(this.metadataContainers.longDescription!=null){
document.getElementById(this.metadataContainers.longDescription).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.longDescription);
}
if(this.metadataContainers.guid!=null){
document.getElementById(this.metadataContainers.guid).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.guid);
}
if(this.metadataContainers.publishDate!=null){
document.getElementById(this.metadataContainers.publishDate).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.publishDate);
}
if(this.metadataContainers.buyURL!=null){
document.getElementById(this.metadataContainers.buyURL).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.buyURL);
}
if(this.metadataContainers.buyURLtext!=null){
document.getElementById(this.metadataContainers.buyURLtext).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.buyURLtext);
}
if(this.metadataContainers.relatedURL!=null){
document.getElementById(this.metadataContainers.relatedURL).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.relatedURL);
}
if(this.metadataContainers.relatedURLtext!=null){
document.getElementById(this.metadataContainers.relatedURLtext).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.relatedURLtext);
}
if(this.metadataContainers.copyright!=null){
document.getElementById(this.metadataContainers.copyright).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.copyright);
}
if(this.metadataContainers.thumbMezznPath!=null){
document.getElementById(this.metadataContainers.thumbMezznPath).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbMezznPath);
}
if(this.metadataContainers.fullPageConfig!=null){
document.getElementById(this.metadataContainers.fullPageConfig).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.fullPageConfig);
}
if(this.metadataContainers.streamType!=null){
document.getElementById(this.metadataContainers.streamType).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.streamType);
}
if(this.metadataContainers.permalink!=null){
document.getElementById(this.metadataContainers.permalink).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.permalink);
}
if(this.metadataContainers.adPlaylist!=null){
document.getElementById(this.metadataContainers.adPlaylist).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.adPlaylist);
}
if(this.metadataContainers.showVideoAds!=null){
document.getElementById(this.metadataContainers.showVideoAds).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.showVideoAds);
}
};
if(!document.getElementById("trackingiframe")){
debugOutput("Tracking IFrame not found, adding.","log");
var _4b=document.createElement("iframe");
with(_4b){
setAttribute("src","about:blank");
setAttribute("id","trackingiframe");
setAttribute("name","trackingiframe");
setAttribute("width","1");
setAttribute("height","1");
setAttribute("marginwidth","0");
setAttribute("frameborder","0");
style.position="absolute";
style.top="0px";
style.left="0px";
style.display="none";
}
document.body.appendChild(_4b);
}
this.trackingiframe=document.getElementById("trackingiframe");
this.companionDiv=document.getElementById(_39);
var _4c="player_"+_38;
var _4d=new deconcept.SWFObject(embeddedPlayerManager.BASE_LOCATION+"embedded.swf",_4c,null,null,"8","#000000",true);
_4d.addParam("allowScriptAccess","always");
_4d.addParam("allowFullScreen","true");
if(_3a){
_4d.addVariable("deepLinkID",_3a);
}
if(_3b){
_4d.addVariable("deepLinkPath",_3b);
}
if(_3f){
_4d.addVariable("videoControls",_3f);
}
if(_43!=undefined){
_4d.addVariable("exitFullscreenOnVideoComplete",_43);
}
if(_46){
_4d.addVariable("overrideKeyword1",_46);
}
if(_47){
_4d.addVariable("overrideKeyword2",_47);
}
if(_48){
_4d.addVariable("overrideKeyword3",_48);
}
if(_49){
_4d.addVariable("overrideClipID",_49);
}
if(_45){
_4d.addVariable("overrideRandom",_45);
}
if(_44){
_4d.addVariable("embVal",_44);
}
if(_3e){
_4d.addVariable("configLocation",_3e);
}
if(_40){
_4d.addVariable("autoStart",_40);
}
if(_41){
_4d.addVariable("initVolume",_41);
}
if(embeddedPlayerManager.BASE_LOCATION){
_4d.addVariable("BASE_LOCATION",embeddedPlayerManager.BASE_LOCATION);
}
_4d.addVariable("playerID",_38);
if(this.isFullscreenEnabled){
this.container=document.createElement("div");
var _4e="container_"+this.id;
this.container.id=_4e;
this.container.className="fullscreenPlayer";
document.body.appendChild(this.container);
with(this.container.style){
position="absolute";
width=_3c+"px";
height=_3d+"px";
margin="0";
padding="0";
backgroundColor="#000";
border="none";
}
this.placeholder=document.createElement("div");
this.placeholder.id="placeholder_"+this.id;
document.getElementById(_38).appendChild(this.placeholder);
with(this.placeholder.style){
width=_3c+"px";
height=_3d+"px";
margin="0";
padding="0";
border="none";
}
var _4f=EmbeddedPlayerUtil.getElementPosition("placeholder_"+this.id);
this.container.style.left=_4f.x+"px";
this.container.style.top=_4f.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){
this.container.style.left=parseInt(this.container.style.left)+1+"px";
this.container.style.top=parseInt(this.container.style.top)+1+"px";
}
this.container.innerHTML="empty";
_4d.setAttribute("width","100%");
_4d.setAttribute("height","100%");
_4d.write(_4e);
if(this.container.innerHTML=="empty"){
this.container.innerHTML="<div style=\"padding:10px 10px 10px 10px;\"><font style=\"font-family:Arial, Helvetica, sans-serif; font-size: .9em; color: white;\">You need the newest version of Adobe Flash Player to view this video. Download the Flash plug-in from Adobe: <a href=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\" style=\"color:#DCDCDC; font-family:Arial, Helvetica, sans-serif;\">http://www.adobe.com</a></font></div>";
}
}else{
_4d.setAttribute("width",_3c);
_4d.setAttribute("height",_3d);
_4d.write(_38);
}
this.swf=document.getElementById(_4c);
}
with(Constructor){
method("_onFullscreen",function(_50){
if(typeof _50!="boolean"){
return;
}
if(!this.isFullscreenEnabled){
debugOutput("Fullscreen not enabled for this player.","warn");
return;
}
this.isFullscreen=_50;
if(this.isFullscreen){
this.setOldWindowParameters();
window.onresize=function(){
};
this.executeRunOnFullscreenStart();
this.onEnterFullScreenCSS();
this.goFullScreenJS();
}else{
var c=this.container;
with(c.style){
top=left=right=bottom="";
}
this.placeholder.style.width=this.width+"px";
this.placeholder.style.height=this.height+"px";
var _52=EmbeddedPlayerUtil.getElementPosition("placeholder_"+this.id);
c.style.width=this.width+"px";
c.style.height=this.height+"px";
c.style.left=_52.x+"px";
c.style.top=_52.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("firefox")==-1){
if(document.documentElement){
document.documentElement.style.overflow="";
if(navigator.userAgent.toLowerCase().indexOf("safari")>-1){
document.body.style.overflow="visible";
}
}else{
document.body.style.overflow="";
}
}
window.onscroll=function(){
};
this.manager.resetOnResize();
if(!document.all){
top.window.resizeTo(this.oldWin.w,this.oldWin.h);
top.window.moveTo(this.oldWin.l,this.oldWin.t);
window.scrollTo(0,this.lastScrollPos);
}else{
top.window.resizeTo(this.oldWin.w,this.oldWin.h);
top.window.moveTo(this.oldWin.l,this.oldWin.t);
window.scrollTo(0,this.lastScrollPos);
}
this.executeRunOnFullscreenEnd();
this.onExitFullScreenCSS();
}
});
method("setFullscreenElementIDs",function(_53){
this.divIDList=_53.split(",");
});
method("onEnterFullScreenCSS",function(){
this.cssPropertyList1=new Array();
this.cssPropertyList2=new Array();
var _54="";
var _55="";
for(var i=0;i<this.divIDList.length;i++){
try{
if(_54!=""){
_54=_54+",";
}
if(_55!=""){
_55=_55+",";
}
_54=_54+this.getStyle(this.divIDList[i].toString(),"overflow");
_55=_55+this.getStyle(this.divIDList[i].toString(),"visibility");
debugOutput("ENTER-BEFORE:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"),"info");
document.getElementById(this.divIDList[i].toString()).style.overflow="hidden";
document.getElementById(this.divIDList[i].toString()).style.visibility="hidden";
debugOutput("ENTER-AFTER:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"),"info");
}
catch(e){
debugOutput("ePM.getPlayer().onEnterFullScreenCSS: "+e.message);
}
}
this.cssPropertyList1=_54.split(",");
this.cssPropertyList2=_55.split(",");
});
method("onExitFullScreenCSS",function(){
for(var i=0;i<this.divIDList.length;i++){
try{
debugOutput("EXIT-BEFORE:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"),"info");
document.getElementById(this.divIDList[i].toString()).style.overflow=this.cssPropertyList1[i].toString();
document.getElementById(this.divIDList[i].toString()).style.visibility=this.cssPropertyList2[i].toString();
debugOutput("EXIT-AFTER:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"),"info");
}
catch(e){
debugOutput("ePM.getPlayer.onExitFullScreenCSS: "+e.message);
}
}
});
method("getStyle",function(el,_59){
var x=document.getElementById(el);
if(x.currentStyle){
var y=x.currentStyle[_59];
}else{
if(window.getComputedStyle){
var y=document.defaultView.getComputedStyle(x,null).getPropertyValue(_59);
}
}
return y;
});
method("goFullScreenJS",function(){
top.window.moveTo(0,0);
if(document.all){
top.window.resizeTo(screen.availWidth,screen.availHeight);
}else{
if(document.layers||document.getElementById){
if(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight=top.screen.availHeight;
top.window.outerWidth=top.screen.availWidth;
}
}
}
if(navigator.userAgent.toLowerCase().indexOf("mac")>-1&&navigator.userAgent.toLowerCase().indexOf("netscape")>-1){
top.window.moveTo(0,0);
}
if(navigator.userAgent.toLowerCase().indexOf("safari")>-1){
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
var _5c=this.setContainer();
window.onscroll=function(){
window.scrollTo(0,_5c);
};
window.onscroll();
var _5d=this;
window.onresize=function(){
_5d.setContainer();
};
});
method("setContainer",function(){
var c=this.container;
var _5f=0;
if(navigator.userAgent.toLowerCase().indexOf("firefox")==-1){
if(document.documentElement&&document.documentElement.scrollTop){
document.documentElement.style.overflow="hidden";
_5f=document.documentElement.scrollTop;
}else{
if(document.body.scrollTop){
if(navigator.userAgent.toLowerCase().indexOf("safari")>-1){
document.body.style.overflow="visible";
}else{
document.body.style.overflow="hidden";
}
_5f=document.body.scrollTop;
}
}
if(this.lastScrollPos==null){
this.lastScrollPos=_5f;
}
}else{
if(this.lastScrollPos==null){
this.lastScrollPos=window.pageYOffset;
}
}
var ch=0;
var cw=0;
if(typeof (window.innerWidth)=="number"){
ch=window.innerHeight;
cw=window.innerWidth;
}else{
if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
ch=document.documentElement.clientHeight;
cw=document.documentElement.clientWidth;
}else{
if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
ch=document.body.clientHeight;
cw=document.body.clientWidth;
}
}
}
with(c.style){
if(document.all&&!window.opera){
height=ch+"px";
width=cw+"px";
}else{
height="100%";
width="100%";
}
left="0px";
right="0px";
bottom="0px";
top=_5f+"px";
}
return _5f;
});
method("setOldWindowParameters",function(){
this.oldWin=new Object();
this.oldWin.l=top.window.screenX||top.window.screenLeft-4;
this.oldWin.t=top.window.screenY||top.window.screenTop-104;
if(document.all){
this.oldWin.w=document.documentElement.clientWidth+30;
this.oldWin.h=document.documentElement.clientHeight+135;
}else{
this.oldWin.h=top.window.outerHeight;
this.oldWin.w=top.window.outerWidth;
}
this.lastScrollPos=null;
});
method("onPlayVideo",function(_62){
var _63=this.isPlayingAd;
this.isPlayingAd=_62.isAd;
this.playingAdType=_62.adType;
if(_63&&!this.isPlayingAd){
this.companion=embeddedPlayerManager.getCompanionReference();
if(this.companion!=""&&this.companion!=null){
}
}
});
method("onExecuteTrackingJS",function(evt){
if(typeof embeddedPlayerManager.TRACKING_JS=="string"&&evt["url"]!="undefined"&&evt["url"]!=undefined&&evt["type"]!="undefined"&&evt["type"]!=undefined){
this.trackingiframe.src=embeddedPlayerManager.TRACKING_JS+"?"+"type="+evt["type"]+"&"+"source="+escape(evt["url"]);
}
});
method("onLoadCompanion",function(evt){
var _66=this.validateCompanionParam(evt["companion"]);
var _67=this.validateCompanionParam(evt["companionURL"]);
var _68=this.validateCompanionParam(evt["companionType"]);
var _69=this.validateCompanionParam(evt["dartSite"]);
var _6a=this.validateCompanionParam(evt["dartSection"]);
var _6b=this.validateCompanionParam(evt["dartNetwork"]);
var _6c=this.validateCompanionParam(evt["keyword1"]);
var _6d=this.validateCompanionParam(evt["keyword2"]);
var _6e=this.validateCompanionParam(evt["keyword3"]);
var _6f=this.validateCompanionParam(evt["clipID"]);
var _70=this.validateCompanionParam(evt["embval"]);
var _71=this.validateCompanionParam(evt["randomNum"]);
if(_66!=""&&_67!=""){
this.writeCompanion(_68,_66,_67);
}else{
this.write300x250(_69,_6a,_6b,_6c,_6d,_6e,_6f,_70,_71);
}
});
method("writeCompanion",function(_72,_73,_74){
var _75=this.companionDiv.id.toString();
_73=_73.replace("[timestamp]",Math.round(1000000000000*Math.random()));
_74=_74.replace("[timestamp]",Math.round(1000000000000*Math.random()));
switch(_72){
case "swf":
var _76="companionSWF_"+_75;
var _77=new deconcept.SWFObject("http://video.nbcuni.com/embed/player_1-2/companion.swf",_76,"300","250","8","#000000");
_77.addParam("wmode","transparent");
_77.addParam("allowScriptAccess","always");
_77.addVariable("sourceURL",escape(_73));
_77.addVariable("linkURL",escape(_74));
_77.addVariable("clickTag",escape(_74));
_77.write(_75);
var swf=document.getElementById(_76);
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(swf);
}
break;
case "image":
document.getElementById(_75).innerHTML="<a href='"+_74+"' target='_blank'><img src='"+_73+"' border='0' /></a>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
break;
case "iframe":
document.getElementById(_75).innerHTML="<iframe src='"+_73+"' frameborder='0' width='300' height='250' scrolling='no' allowtransparency='true' /></iframe>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
break;
case "js":
document.getElementById(_75).innerHTML="<iframe id='companionAdiFrame' scrolling='no' frameborder='0' width='300' height='250' allowtransparency='true' src='"+embeddedPlayerManager.COMPANION_RENDERER+"?companionType=js&companion="+escape(_73)+"' /></iframe>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
break;
default:
document.getElementById(_75).innerHTML="<a href='"+_74+"' target='_blank'><img src='"+_73+"' border='0' /></a>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
}
});
method("write300x250",function(_79,_7a,_7b,_7c,_7d,_7e,_7f,_80,_81){
var _82=this.companionDiv.id.toString();
document.getElementById(_82).innerHTML="<iframe id='companionAdiFrame' frameborder='0' scrolling='no' width='300' height='250' src='"+embeddedPlayerManager.COMPANION_RENDERER+"?companionType=300x250&dartsite="+_79+"&dartsection="+_7a+"&dartnetwork="+_7b+"&keyword1="+_7c+"&keyword2="+_7d+"&keyword3="+_7e+"&clipid="+_7f+"&embval="+_80+"&randomnum="+_81+"' /></iframe>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
});
method("validateCompanionParam",function(_83){
if(typeof _83=="undefined"||_83=="null"||_83=="undefined"||_83==null||_83==undefined){
return "";
}else{
return _83;
}
});
method("play",function(){
try{
this.swf.playVideo();
}
catch(e){
debugOutput("ePM.getPlayer().play(): "+e.message);
}
});
method("pause",function(){
try{
this.swf.pauseVideo();
}
catch(e){
debugOutput("ePM.getPlayer().pause(): "+e.message);
}
});
method("playVideo",function(_84,_85,_86){
try{
if(this.isPlayingAd==false){
this.currentClip.dlid=_84;
if(_85==null||_85==""||typeof _85=="undefined"||typeof _85==undefined){
this.inAutoplay=false;
for(var i in this.playlists){
if(this.playlists[i].playlistID){
this.playlists[i].currentPosition=this.playlists[i].getPosition(_84);
this.playlists[i].currentDLID=_84;
this.playlists[i].nextClip=this.playlists[i].getNext();
}
}
}else{
this.playlists[_86].nextClip=this.playlists[_86].getNext();
}
this.swf.playVideoByPathID(_84);
}
}
catch(e){
debugOutput("ePM.getPlayer().playVideo(): "+e.message);
}
});
method("playVideoByPathID",function(_88){
this.playVideo(_88);
});
method("setAdOverrides",function(_89,_8a,_8b,_8c,_8d,_8e){
try{
this.swf.setAdOverrides(_89,_8a,_8b,_8c,_8d,_8e);
}
catch(e){
debugOutput("ePM.getPlayer().setAdOverrides(): "+e.message);
}
});
method("clearAdOverrides",function(){
try{
this.swf.clearAdOverides();
}
catch(e){
debugOutput("ePM.getPlayer().clearAdOverrides(): "+e.message);
}
});
method("browserWindowBeforeUnload",function(){
try{
this.swf.onBrowserWindowBeforeUnload();
}
catch(e){
debugOutput("ePM.getPlayer().browserWindowBeforeUnload(): "+e.message);
}
});
method("setMetadataContainers",function(_8f,_90,_91,_92){
this.metadataContainers.setTitle(_8f);
this.metadataContainers.setSubtitle(_90);
this.metadataContainers.setShortDescription(_91);
this.metadataContainers.setAirtime(_92);
this.metadataContainers.setContainers();
});
method("resizePlayer",function(_93,_94){
try{
this.width=_93;
this.height=_94;
var c=this.container;
with(c.style){
top=left=right=bottom="";
}
this.placeholder.style.width=this.width+"px";
this.placeholder.style.height=this.height+"px";
var _96=EmbeddedPlayerUtil.getElementPosition("placeholder_"+this.id);
c.style.width=this.width+"px";
c.style.height=this.height+"px";
c.style.left=_96.x+"px";
c.style.top=_96.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){
c.style.left=parseInt(c.style.left)+1+"px";
c.style.top=parseInt(c.style.top)+1+"px";
}
}
catch(e){
debugOutput("ePM.getPlayer().resizePlayer(): "+e.message);
}
});
method("hidePlayer",function(_97,_98,_99,_9a){
try{
if(typeof _97=="undefined"){
_97="black";
}
if(typeof _98!="undefined"){
if(typeof _99=="undefined"){
_99="repeat";
}
if(typeof _9a=="undefined"){
_9a="center";
}
document.getElementById("placeholder_"+this.id.toString()).style.backgroundImage="url("+_98+")";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundRepeat=_99;
document.getElementById("placeholder_"+this.id.toString()).style.backgroundPosition=_9a;
}else{
document.getElementById("placeholder_"+this.id.toString()).style.backgroundImage="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundRepeat="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundPosition="";
}
document.getElementById("placeholder_"+this.id.toString()).style.backgroundColor=_97;
document.getElementById("container_"+this.id.toString()).style.width="1px";
document.getElementById("container_"+this.id.toString()).style.height="1px";
}
catch(e){
debugOutput("ePM.getPlayer().hidePlayer(): "+e.message);
}
});
method("unHidePlayer",function(){
try{
document.getElementById("placeholder_"+this.id.toString()).style.backgroundColor="#000000";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundImage="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundRepeat="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundPosition="";
document.getElementById("container_"+this.id.toString()).style.width=this.width+"px";
document.getElementById("container_"+this.id.toString()).style.height=this.height+"px";
}
catch(e){
debugOutput("ePM.getPlayer().unHidePlayer: "+e.message);
}
});
method("goFullscreen",function(){
try{
this.swf.toggleFullscreen();
}
catch(e){
debugOutput("ePM.getPlayer().goFullscreen(): "+e.message);
}
});
method("toggleFullscreen",function(){
this.goFullscreen();
});
method("setRunOnBegin",function(_9b){
this.runOnBeginFunction=_9b;
});
method("executeRunOnBegin",function(){
try{
eval(this.runOnBeginFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnBegin(): "+e.message);
}
});
method("setRunOnClipStart",function(_9c){
this.runOnClipStartFunction=_9c;
});
method("executeRunOnClipStart",function(){
try{
this.isPlayingAd=false;
eval(this.runOnClipStartFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnClipStart(): "+e.message);
}
});
method("setRunOnClipSwitched",function(_9d){
this.runOnClipSwitchedFunction=_9d;
});
method("executeRunOnClipSwitched",function(){
try{
eval(this.runOnClipSwitchedFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnClipSwitched(): "+e.message);
}
});
method("setRunOnClipCompleted",function(_9e){
this.runOnClipCompletedFunction=_9e;
});
method("executeRunOnClipCompleted",function(){
try{
eval(this.runOnClipCompletedFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnCompleted(): "+e.message);
}
});
method("setRunOnClosed",function(_9f){
this.runOnClosedFunction=_9f;
});
method("executeRunOnClosed",function(){
try{
eval(this.runOnClosedFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnClosed(): "+e.message);
}
});
method("setRunOnEnd",function(_a0){
this.runOnEndFunction=_a0;
});
method("executeRunOnEnd",function(){
try{
eval(this.runOnEndFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnEnd(): "+e.message);
}
});
method("setRunOnFullscreenStart",function(_a1){
this.runOnFullscreenStartFunction=_a1;
});
method("executeRunOnFullscreenStart",function(){
try{
eval(this.runOnFullscreenStartFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnFullscreenStart(): "+e.message);
}
});
method("setRunOnFullscreenEnd",function(_a2){
this.runOnFullscreenEndFunction=_a2;
});
method("executeRunOnFullscreenEnd",function(){
try{
eval(this.runOnFullscreenEndFunction);
}
catch(e){
debugOutput("ePM.getPlayer().executeRunOnFullscreenEnd(): "+e.message);
}
});
method("createPlaylist",function(_a3,_a4,_a5,_a6,_a7){
if(typeof _a4=="undefined"){
_a4="default";
}
if(typeof _a5=="undefined"){
_a5=true;
}
if(typeof _a6=="undefined"){
_a6=0;
}
if(typeof _a7=="undefined"){
_a7=0;
}
this.lastPlaylist=new Playlist(this,_a4,_a3,this.currentClip.dlid,_a6,_a7);
this.playlists[_a4]=this.lastPlaylist;
if(_a5==true){
this.activePlaylist=this.lastPlaylist;
}
return this.lastPlaylist;
});
method("playNextClipInPlaylist",function(){
try{
if(this.activePlaylist==null||this.isValidPlaylistID(this.activePlaylist.playlistID)==false){
this.activePlaylist=this.lastPlaylist;
}
this.getPlaylist(this.activePlaylist.playlistID).playNext();
}
catch(e){
debugOutput("ePM.getPlayer().playNextClipInPlaylist(): "+e.message);
}
});
method("setActivePlaylist",function(_a8){
try{
if(this.isValidPlaylistID(_a8)==true){
this.activePlaylist=this.playlists[_a8];
}else{
this.activePlaylist=this.lastPlaylist;
}
}
catch(e){
debugOutput("ePM.getPlayer().setActivePlaylist(): "+e.message);
}
});
method("isValidPlaylistID",function(_a9){
try{
var _aa=false;
for(var i in this.playlists){
if(i==_a9){
_aa=true;
}
}
return _aa;
}
catch(e){
debugOutput("ePM.getPlayer().isValidPlaylistID(): "+e.message);
}
});
method("getPlaylist",function(_ac){
try{
if(typeof _ac=="undefined"){
return this.lastPlaylist;
}
this.lastPlaylist=this.playlists[_ac];
return this.lastPlaylist;
}
catch(e){
debugOutput("ePM.getPlayer().getPlaylist(): "+e.message);
}
});
method("seekTo",function(_ad){
try{
if(this.isPlayingAd){
debugOutput("Can't navigate during ads","warn");
return;
}
this.swf.seekToJS(_ad);
return 0;
}
catch(e){
debugOutput("ePM.getPlayer().seekTo(): "+e.message);
}
});
method("getCurrentTime",function(){
try{
return this.swf.getCurrentTimeJS("up");
}
catch(e){
debugOutput("ePM.getPlayer().getCurrentTime(): "+e.message);
}
});
method("getCurrentTimeEnd",function(){
try{
return this.swf.getCurrentTimeJS("countdown");
}
catch(e){
debugOutput("ePM.getPlayer().getCurrentTimeEnd(): "+e.message);
}
});
method("mute",function(){
try{
this.swf.muteJS();
return 0;
}
catch(e){
debugOutput("ePM.getPlayer().mute(): "+e.message);
}
});
method("getVolume",function(){
try{
return this.swf.getVolumeJS();
}
catch(e){
debugOutput("ePM.getPlayer().getVolume(): "+e.message);
}
});
method("setVolume",function(_ae){
try{
return this.swf.setVolumeJS(_ae);
}
catch(e){
debugOutput("ePM.getPlayer().setVolume(): "+e.message);
}
});
method("volumeUp",function(_af){
this.setVolume((this.getVolume()*1)+_af);
});
method("volumeDown",function(_b0){
this.setVolume((this.getVolume()*1)-_b0);
});
method("rewind",function(){
try{
this.swf.rewindJS();
return 0;
}
catch(e){
debugOutput("ePM.getPlayer().rewind(): "+e.message);
}
});
method("fastForward",function(){
try{
this.swf.fastForwardJS();
return 0;
}
catch(e){
debugOutput("ePM.getPlayer().fastForward(): "+e.message);
}
});
}
return new Constructor();
};
}
if(typeof MetadataContainer=="undefined"){
MetadataContainer=function(_b1){
function Constructor(){
this.player=_b1;
this.title;
this.subtitle;
this.shortDescription;
this.airtime;
this.dlid;
this.thumbSmall;
this.thumbSmallImage;
this.thumbLarge;
this.thumbLargeImage;
this.folderPath;
this.usOnly;
this.folderid;
this.clipOrder;
this.startDate;
this.endDate;
this.isThirdParty;
this.longDescription;
this.guid;
this.publishDate;
this.buyURL;
this.buyURLtext;
this.relatedURL;
this.relatedURLtext;
this.copyright;
this.thumbMezznPath;
this.fullPageConfig;
this.streamType;
this.permalink;
this.adPlaylist;
this.showVideoAds;
}
with(Constructor){
method("setTitle",function(_b2){
this.title=_b2.toString();
});
method("setSubtitle",function(_b3){
this.subtitle=_b3.toString();
});
method("setShortDescription",function(_b4){
this.shortDescription=_b4.toString();
});
method("setAirtime",function(_b5){
this.airtime=_b5.toString();
});
method("setDlid",function(_b6){
this.dlid=_b6.toString();
});
method("setThumbSmall",function(_b7){
this.thumbSmall=_b7.toString();
});
method("setThumbSmallImage",function(_b8){
this.thumbSmallImage=_b8.toString();
});
method("setThumbLarge",function(_b9){
this.thumbLarge=_b9.toString();
});
method("setThumbLargeImage",function(_ba){
this.thumbLargeImage=_ba.toString();
});
method("setFolderPath",function(_bb){
this.folderPath=_bb.toString();
});
method("setUsOnly",function(_bc){
this.usOnly=_bc.toString();
});
method("setFolderid",function(_bd){
this.folderid=_bd.toString();
});
method("setClipOrder",function(_be){
this.clipOrder=_be.toString();
});
method("setStartDate",function(_bf){
this.startDate=_bf.toString();
});
method("setEndDate",function(_c0){
this.endDate=_c0.toString();
});
method("setIsThirdParty",function(_c1){
this.isThirdParty=_c1.toString();
});
method("setLongDescription",function(_c2){
this.longDescription=_c2.toString();
});
method("setPublishDate",function(_c3){
this.publishDate=_c3.toString();
});
method("setBuyURL",function(_c4){
this.buyURL=_c4.toString();
});
method("setBuyURLtext",function(_c5){
this.buyURLtext=_c5.toString();
});
method("setRelatedURL",function(_c6){
this.relatedURL=_c6.toString();
});
method("setRelatedURLtext",function(_c7){
this.relatedURLtext=_c7.toString();
});
method("setCopyright",function(_c8){
this.copyright=_c8.toString();
});
method("setThumbMezznPath",function(_c9){
this.thumbMezznPath=_c9.toString();
});
method("setFullPageConfig",function(_ca){
this.fullPageConfig=_ca.toString();
});
method("setStreamType",function(_cb){
this.streamType=_cb.toString();
});
method("setPermalink",function(_cc){
this.permalink=_cc.toString();
});
method("setAdPlaylist",function(_cd){
this.adPlaylist=_cd.toString();
});
method("setShowVideoAds",function(_ce){
this.showVideoAds=_ce.toString();
});
method("setContainers",function(){
});
method("replaceCharsforHTML",function(_cf){
var _d0=new String(_cf);
_d0=_d0.replace("&","&amp;");
return _d0;
});
}
return new Constructor();
};
}
if(typeof Playlist=="undefined"){
Playlist=function(_d1,_d2,_d3,_d4,_d5,_d6){
function Constructor(){
this.player=_d1;
this.playlistID=_d2;
this.currentDLID=_d4;
this.currentPosition=-1;
this.seedDLID=null;
this.playlist=new Array();
this.nextClip=new Object();
this.delayFirstClip=_d5;
this.delayBetweenClips=_d6;
this.delayCounter=0;
this.delayToggle=false;
this.playlist=_d3.split(",");
this.nextClip=this.getNext();
}
with(Constructor){
method("seed",function(_d7){
this.seedDLID=_d7;
this.nextClip=this.getNext();
});
method("add",function(_d8){
try{
this.playlist.push(_d8);
this.nextClip=this.getNext();
}
catch(e){
debugOutput("ePM.getPlayer().getPlaylist().add(): "+e.message);
}
});
method("remove",function(_d9){
try{
this.playlist.splice(_d9,1);
this.nextClip=this.getNext();
}
catch(e){
debugOutput("ePM.getPlayer().getPlaylist().remove(): "+e.message);
}
});
method("clear",function(){
try{
this.playlist=new Array();
this.currentPosition=-1;
this.seedDLID=null;
}
catch(e){
debugOutput("ePM.getPlayer().getPlaylist().clear(): "+e.message);
}
});
method("move",function(_da,_db){
try{
_da=Number(_da);
_db=Number(_db);
if(_db>this.playlist.length-1){
_db=this.playlist.length;
}
if(_da>this.playlist.length-1){
_da=this.playlist.length-1;
}
var _dc=this.playlist[_da];
if(_da<_db){
this.playlist.splice(_db+1,0,_dc);
this.playlist.splice(_da,1);
}else{
if(_da>_db){
this.playlist.splice(_db,0,_dc);
this.playlist.splice(_da+1,1);
}else{
}
}
this.nextClip=this.getNext();
}
catch(e){
debugOutput("ePM.getPlayer().getPlaylist().move(): "+e.message);
}
});
method("playNext",function(){
try{
if(this.nextClip.atEndOfPlaylist==false&&this.player.allowPlaylistAdvance==true){
if(this.delayToggle==false){
if(this.player.inAutoplay==true){
this.delayCounter=this.delayBetweenClips;
}else{
this.delayCounter=this.delayFirstClip;
this.player.inAutoplay=true;
}
this.delayToggle=true;
}
if(this.delayCounter>0){
this.delayCounter=this.delayCounter-1;
timeoutID=window.setTimeout("embeddedPlayerManager.getPlayer('"+this.player.id+"').getPlaylist().playNext()",1000);
}else{
this.delayToggle=false;
this.currentPosition=this.nextClip.position;
this.currentDLID=this.nextClip.dlid;
this.player.playVideo(this.nextClip.dlid,1,this.playlistID);
}
}
}
catch(e){
debugOutput("ePM.getPlayer().getPlaylist().playNext(): "+e.message);
}
});
method("getPosition",function(_dd){
var _de=-1;
for(var x=0;x<=this.playlist.length-1;x++){
if(_dd.toString()===this.playlist[x].toString()){
_de=x;
}
}
return _de;
});
method("getNext",function(){
if(this.playlist.length>0){
var _e0=0;
var _e1=-1;
var _e2=true;
if(this.seedDLID!=null){
if(this.seedDLID.toString()=="0"){
_e0=this.playlist[0];
_e1=0;
}else{
_e0=this.seedDLID;
_e1=this.getPosition(_e0);
}
_e2=false;
this.seedDLID=null;
}else{
for(var x=0;x<=this.playlist.length-1;x++){
if(this.playlist[x].toString()==this.currentDLID&&(this.currentPosition==-1||x==this.currentPosition)){
if(x+1==this.playlist.length){
}else{
_e0=this.playlist[x+1];
_e1=x+1;
x=this.playlist.length-1;
_e2=false;
}
}else{
}
}
}
if(_e2==false){
this.nextClip.atEndOfPlaylist=false;
this.nextClip.position=_e1;
this.nextClip.dlid=_e0;
return this.nextClip;
}else{
this.nextClip.atEndOfPlaylist=true;
this.nextClip.position=-1;
this.nextClip.dlid=0;
return this.nextClip;
}
}
});
}
return new Constructor();
};
}
if(typeof embeddedPlayerManager=="undefined"){
embeddedPlayerManager=new EmbeddedPlayerManager();
this.onEmbeddedPlayerEvent=function(_e4,_e5,_e6){
if(typeof embeddedPlayerManager.getPlayer(_e4)=="object"&&typeof embeddedPlayerManager.getPlayer(_e4)[_e5]=="function"){
console.info("Message",_e5);
embeddedPlayerManager.getPlayer(_e4)[_e5](_e6);
}else{
console.warn("Event type %s not supported.",_e5);
}
};
this.doAfterLoad=function(f){
if(typeof f!="function"){
return;
}
var _e8=window.onload;
window.onload=function(){
if(typeof _e8=="function"){
_e8();
}
f();
};
};
}
embeddedPlayerManager.BASE_LOCATION="";
embeddedPlayerManager.TRACKING_JS="http://video.nbcuni.com/embed/common/ad_tracking.html";
embeddedPlayerManager.COMPANION_RENDERER="http://video.nbcuni.com/embed/common/companion.html";
embeddedPlayerManager.METADATA_THUMB_URL="http://video.nbcuni.com/";
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
try{
oldBeforeUnload();
executeOnUnload();
}
catch(e){
debugOutput("window.onbeforeunload: "+e.message);
}
};
}else{
window.onbeforeunload=function(){
try{
executeOnUnload();
}
catch(e){
debugOutput("window.onbeforeunload: "+e.message);
}
};
}
function executeOnUnload(){
__flash_unloadHandler=function(){
};
__flash_savedUnloadHandler=function(){
};
if(typeof window.onunload=="function"){
var _e9=window.onunload;
window.onunload=function(){
try{
embeddedPlayerManager.getPlayer().browserWindowBeforeUnload();
deconcept.SWFObjectUtil.cleanupSWFs();
_e9();
}
catch(e){
debugOutput("window.onunload: "+e.message);
}
};
}else{
try{
embeddedPlayerManager.getPlayer().browserWindowBeforeUnload();
window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;
}
catch(e){
debugOutput("window.onunload: "+e.message);
}
}
}

