var PLAYER_MODE_OPERATION_PREFIX="switchTo";PlayerMode=function(aa,ba,ca){this.type=aa;this.name=ba;this.transitionTable=ca;};PlayerMode.prototype.getName=function(){return this.name;};PlayerMode.prototype.getType=function(){return this.type;};PlayerMode.prototype.changeMode=function(da,ea,fa,ga){this.validateModeChange(da,ea,fa);da.changeState(ea,ga);};PlayerMode.prototype.invalidOperation=function(ha,ia){throw new PlayerModeError("Validating state operation.","Invalid mode operation.  The \""+this.name+"\" mode does not change or transition to a mode that supports the \""+ia.toLowerCase()+"\" operation.",this);};PlayerMode.prototype.validateModeChange=function(ja,ka,la){if(false===this.canTransition(ka)){this.invalidOperation(ja,la);}};PlayerMode.prototype.canTransition=function(ma){if(this.transitionTable===null){return false;}
for(var i=0;i<this.transitionTable.length;i++){if(this.transitionTable[i]===ma){return true;}}
return false;};PlayerMode.prototype.switchToMax=function(na){};PlayerMode.prototype.switchToMini=function(oa){};PlayerMode.prototype.switchToVideoOnly=function(pa){};PlayerMode.prototype.onPlayerReady=function(qa){};PlayerMode.prototype.onPlayerBillboardEnded=function(ra){};PlayerMode.prototype.onPlayerOvernight=function(sa){};PlayerMode.prototype.getOvernightSlate=function(ta){};PlayerMode.prototype.getConnectingSlate=function(ua){};PlayerMode.prototype.getWindowSize=function(va){};PlayerMode.prototype.transition=function(wa,xa,ya){};var PLAYER_MODE_CONTROLS="cnnVidOCRight";var HOVER="Hover";DefaultPlayerMode=function(za,Aa,Ba,Ca){DefaultPlayerMode.ctor.call(this,za,Aa,Ba);this.sliderEnabled=Ca;};xmp.DERIVE_CLASS(PlayerMode,DefaultPlayerMode);DefaultPlayerMode.prototype.switchToMax=function(Da){this.changeMode(Da,MAX_MODE,SWITCH_TO_MAX_OPERATION);};DefaultPlayerMode.prototype.switchToMini=function(Ea){this.changeMode(Ea,MINI_MODE,SWITCH_TO_MINI_OPERATION);};DefaultPlayerMode.prototype.switchToVideoOnly=function(Fa){this.changeMode(Fa,VIDEO_ONLY_MODE,SWITCH_TO_VIDEO_ONLY_OPERATION);};DefaultPlayerMode.prototype.onPlayerReady=function(Ga){Ga.initControls();if(true===this.sliderEnabled){Ga.initSlider();}};DefaultPlayerMode.prototype.handleError=function(Ha,Ia,e){var Ja=e;if(false===(Ja instanceof PlayerError)){var Ka="Delegating \""+this.name+"\" mode \""+Ia.toLowerCase()+"\" operation to player.";Ja=new PlayerError(((e.context)?e.context:Ka),((e.rawMessage)?e.rawMessage:e.message));Ja.setInnerError(e);}
throw Ja;};DefaultPlayerMode.prototype.transition=function(La,Ma,Na){if(Na&&Na.getType()!==NULL_MODE){if(true===this.sliderEnabled){La.initSlider();}}};DefaultPlayerMode.prototype.showElements=function(Oa,Pa){var Qa=Oa.length;for(var i=0;i<Qa;i++){document.getElementById(Oa[i]).style.display=Pa;}};DefaultPlayerMode.prototype.show=function(Ra){this.showElements(Ra,xmp.DISPLAY_BLOCK);};DefaultPlayerMode.prototype.hide=function(Sa){this.showElements(Sa,xmp.DISPLAY_NONE);};DefaultPlayerMode.prototype.clearClass=function(Ta){var Ua=Ta.length;for(var i=0;i<Ua;i++){this.setElementClass(Ta[i],"");}};DefaultPlayerMode.prototype.setClass=function(Va){var Wa=Va.length;for(var i=0;i<Wa;i++){var Xa=Va[i];this.setElementClass(Xa.name,Xa.value);}};DefaultPlayerMode.prototype.setElementClass=function(Ya,Za){document.getElementById(Ya).className=Za;};DefaultPlayerMode.prototype.setPlayerSize=function($a,ab,bb){document.getElementById(CNNLIVE_PLAYER).style.width=ab;document.getElementById(CNNLIVE_PLAYER).style.height=bb;if($a.getMediaPlayer()){$a.getMediaPlayer().getViewport().setSize(ab,bb);}};DefaultPlayerMode.prototype.initModeCommands=function(cb,db){var eb="<div id='modesLabel' name='modesLabel' style='display: "+((true===cb.isStartup())?xmp.DISPLAY_NONE:xmp.DISPLAY_BLOCK)+"' >";var fb=db.length;for(var i=0;i<fb;i++){eb+="<span id='"+db[i].name+"' name='"+db[i].name+"'>"+((i>0)?" | ":"")+"<input type='image' onclick='"+this.formatCommandAction(db[i])+"' src='"+cb.getImage(db[i].image)+"' onmouseover='this.src=\""+cb.getImage(db[i].image+HOVER)+"\"' onmouseout='this.src=\""+cb.getImage(db[i].image)+"\"' /></span>";}
eb+="</div>";document.getElementById(PLAYER_MODE_CONTROLS).innerHTML=eb;cb.updateCommandUIAll();};DefaultPlayerMode.prototype.formatCommandAction=function(gb){return"var player = findPlayer(CNNLIVE_PLAYER);try {"+gb.action+"} catch ( e ) { player.handleStreamError( e ); }";};StreamMode=function(hb,ib,jb){this.type=hb;this.name=ib;this.transitionTable=jb;};StreamMode.prototype.getName=function(){return this.name;};StreamMode.prototype.getType=function(){return this.type;};StreamMode.prototype.changeMode=function(kb,lb,mb,nb){this.validateModeChange(kb,lb,mb);kb.changeState(lb,nb);};StreamMode.prototype.invalidOperation=function(ob,pb){throw new StreamModeError("Validating state operation.","Invalid mode operation.  The \""+this.name+"\" mode does not change or transition to a mode that supports the \""+pb.toLowerCase()+"\" operation.",this);};StreamMode.prototype.validateModeChange=function(qb,rb,sb){if(false===this.canTransition(rb)){this.invalidOperation(qb,sb);}};StreamMode.prototype.canTransition=function(tb){if(this.transitionTable===null){return false;}
for(var i=0;i<this.transitionTable.length;i++){if(this.transitionTable[i]===tb){return true;}}
return false;};StreamMode.prototype.open=function(ub){};StreamMode.prototype.close=function(vb){};StreamMode.prototype.ended=function(wb){};StreamMode.prototype.error=function(xb,e){};StreamMode.prototype.capacityReached=function(yb){};StreamMode.prototype.block=function(zb){};StreamMode.prototype.overnight=function(Ab){};StreamMode.prototype.daytime=function(Bb){};StreamMode.prototype.available=function(Cb){};StreamMode.prototype.isAvailable=function(Db){return this.canTransition(Db);};StreamMode.prototype.isNull=function(){return false;};StreamMode.prototype.setData=function(Eb,Fb){};StreamMode.prototype.setImage=function(Gb,Hb){};StreamMode.prototype.transition=function(Ib,Jb,Kb){};StreamMode.prototype.setData=function(Lb,Mb){Lb.handleSetData(Mb);};StreamMode.prototype.setMetadata=function(Nb,Ob){Nb.handleSetMetadata(Ob);};StreamMode.prototype.setImage=function(Pb,Qb){Pb.handleSetImage(Qb);};StreamMode.prototype.handleError=function(Rb,Sb,e){var Tb=e;if(false===(Tb instanceof StreamError)){var Ub="Delegating \""+this.name+"\" mode \""+Sb.toLowerCase()+"\" operation to stream.";Tb=new StreamError(((e.context)?e.context:Ub),((e.rawMessage)?e.rawMessage:e.message),Rb);Tb.setInnerError(e);}
throw Tb;};DefaultStreamMode=function(Vb,Wb,Xb){DefaultStreamMode.ctor.call(this,Vb,Wb,Xb);};xmp.DERIVE_CLASS(StreamMode,DefaultStreamMode);DefaultStreamMode.prototype.open=function(Yb){this.changeMode(Yb,OPEN,xmp.OPEN_OPERATION);};DefaultStreamMode.prototype.close=function(Zb){this.changeMode(Zb,CLOSE,xmp.CLOSE_OPERATION);};DefaultStreamMode.prototype.ended=function($b){this.changeMode($b,xmp.ENDED,xmp.ENDED_OPERATION);};DefaultStreamMode.prototype.error=function(ac,e){this.changeMode(ac,xmp.ERRORS,xmp.ERROR_OPERATION,e);};DefaultStreamMode.prototype.capacityReached=function(bc){this.changeMode(bc,CAPACITY_MAX,CAPACITY_MAX_OPERATION);};DefaultStreamMode.prototype.available=function(dc){this.changeMode(dc,AVAILABLE,AVAILABLE_OPERATION);};DefaultStreamMode.prototype.overnight=function(ec){this.changeMode(ec,OVERNIGHT,OVERNIGHT_OPERATION);};DefaultStreamMode.prototype.daytime=function(fc){this.changeMode(fc,DAYTIME,DAYTIME_OPERATION);};DefaultStreamMode.prototype.block=function(gc){this.changeMode(gc,GEO_BLOCKING,GEO_BLOCKING_OPERATION);};function BaseNodeListener(hc,ic,jc){BaseNodeListener.ctor.call(this,hc,ic);this.disable_commands=jc;this._bnl_logger=new xmp.util.internals.CategoryLogger('BaseNodeListener');this._isBandwidthDetected=false;this.prevBytesDownloaded=0;this.prevTimeStamp=0;this.effectiveBandwidth=0;this.bandwidthDetectionNode=null;}
xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,BaseNodeListener);BaseNodeListener.prototype.handleDynamicRules=function(kc){};BaseNodeListener.prototype.handleRender=function(lc){this.getPlayer().getMediaPlayer().open(lc);};BaseNodeListener.prototype.handleOpen=function(mc){var nc=this.getPlayer().getMediaPlayer();this.getPlayer().setVolumeText(nc.getVolume(),nc.getMute());this.getPlayer().setViewportText(nc.getViewport().getType());if(true===this.disable_commands){this.getPlayer().disableAllCommands();}
this.setStatus(mc,"Opened");};BaseNodeListener.prototype.handleConnecting=function(oc){this.setStatus(oc,"Connecting");};BaseNodeListener.prototype.handleConnected=function(pc){this.setStatus(pc,"Connected");};BaseNodeListener.prototype.handlePlay=function(qc){this.setStatus(qc,"Playing");};BaseNodeListener.prototype.handlePause=function(rc){this.setStatus(rc,"Paused");};BaseNodeListener.prototype.handleStop=function(sc){this.setStatus(sc,"Stopped");};BaseNodeListener.prototype.handleRewind=function(tc){this.setStatus(tc,"Rewinding");};BaseNodeListener.prototype.handleFastForward=function(uc){this.setStatus(uc,"Fast Forwarding");};BaseNodeListener.prototype.handleSeekable=function(vc){this.setStatus(vc,"Seeking");};BaseNodeListener.prototype.handleEnded=function(wc){this.setStatus(wc,"Ended");this.getPlayer().advance();};BaseNodeListener.prototype.handleBuffering=function(xc,yc){this.setStatus(xc,yc);};BaseNodeListener.prototype.handleTimelineChange=function(zc,Ac,Bc){this.getPlayer().setTimelineText(zc,Ac,Bc);};BaseNodeListener.prototype.handleError=function(Cc,e){this.getPlayer().setErrorText(Cc,e);if(false===this.disable_commands){this.getPlayer().updateCommandUIAll();}
this._bnl_logger.warn("Dropping node: "+Cc.getBestId()+', error: '+xmp.extractErrorMessage(e));this.getPlayer().advance();};BaseNodeListener.prototype.setStatus=function(Dc,Ec){this.getPlayer().setStatusText(Dc,Ec);if(false===this.disable_commands){this.getPlayer().updateCommandUIAll();}};BaseNodeListener.prototype.loadSynchUnit=function(Fc){var Gc=Fc.getMetaResource('synch_unit');if(!Gc){return;}
if(Gc.isError()){this._bnl_logger.warn('Error loading synch unit: '+Gc.getErrorMessage());return;}
var Hc=Gc.getDataObject();if(Gc.getMetadata('played_synch_unit',false)){this._bnl_logger.info('NOT loading synch unit (already loaded) with tile ID: '+Gc.getCompanionAdId()+', url: '+Hc);return;}
Gc.setMetadata('played_synch_unit',true);this._bnl_logger.info('Loading synch unit with tile ID: '+Gc.getCompanionAdId()+', url: '+Hc);this._createBannerAd("banner_ad_iframe",Hc);};BaseNodeListener.prototype._createBannerAd=function(Ic,Jc){var Kc=document.getElementById("banner_ad_div");var Lc='<iframe hspace="0" vspace="0" marginHeight="0" marginWidth="0" src="'+Jc+'&page.allowcompete=yes&domId='+Ic+'" border="0" frameBorder="0" height="0" width="0" scrolling="no"  id="'+Ic+'" style="position: absolute; visibility: hidden;" ></iframe>';Kc.innerHTML=Lc;};function OverlayNodeListener(Mc,Nc){OverlayNodeListener.ctor.call(this,Mc,Nc,true);}
xmp.DERIVE_CLASS(BaseNodeListener,OverlayNodeListener);OverlayNodeListener.prototype.handleRender=function(Oc){this.getPlayer().getMediaPlayer().getViewport().hideOverlays(ALL_OVERLAYS);this.render(Oc);this.getPlayer().advance();};OverlayNodeListener.prototype.handleInitialize=function(Pc){};var SLATE_URL="url";function SlateNodeListener(Qc,Rc){SlateNodeListener.ctor.call(this,Qc,Rc,true);}
xmp.DERIVE_CLASS(BaseNodeListener,SlateNodeListener);SlateNodeListener.prototype.handleInitialize=function(Sc){Sc.setURI(Sc.getMetadata(SLATE_URL,""));Sc.setMimeType(xmp.DHTML_MIME_TYPE);Sc.setEndedFrame(xmp.LAST_FRAME);};SlateNodeListener.prototype._findNextContentNode=function(){var Tc=this.getPlayer().getLookAheadNodeArray();for(var i=0;i<Tc.length;i++){var Uc=Tc[i];if(Uc.isContentType()){return Uc;}}
return null;};BulletFormatter=function(){var Vc="plain";var Wc="PCARelated";var Xc="Video";var Yc="PCAPhotos";var Zc="Site Http Root";var $c="Photos";var ad={};ad["510"]={name:"510x400",width:510,height:400};ad["620"]={name:"620x430",width:620,height:430};ad["475"]={name:"475x570",width:475,height:570};ad["770x576"]={name:"770x576",width:770,height:576};ad["770x571"]={name:"770x571",width:770,height:571};return{apply:function(bd,cd){this.initSiteHttpRoot();var dd=this.getWool(cd);if(cd.type===Wc){dd+=this.getRelatedBulletHTML(bd,cd);}
else if(cd.type===Xc){dd+=this.getVideoBulletHTML(cd);}
else if(cd.type===Yc){dd+=this.getPhotosBulletHTML(bd,cd);}
else{dd+=this.getStoryBulletHTML(cd);}
return dd;},initSiteHttpRoot:function(){if(!this.siteHttpRoot){this.siteHttpRoot=xmp.util.SettingsManager.getInstance().getContextNode().getString(Zc,xmp.NO_DEFAULT_VALUE);if(this.siteHttpRoot===0){throw new xmp.InvalidArgsError("Retrieving site http root.","Missing value.");}}},getWool:function(ed){if(ed.wool&&ed.wool.length>0){return"<span style=\"color:#FFFFFF\">"+ed.wool+"</span>&nbsp;";}
return"";},getRelatedBulletHTML:function(fd,gd){var hd="";if(gd.subType===Vc){hd="javascript:window.open(\""+((gd.url.indexOf("/")===0)?(this.siteHttpRoot+gd.url):gd.url)+"\")";}
else{var jd=ad[gd.Fld2];hd="javascript:CNN_openPopup(\""+((gd.url.indexOf("/")===0)?(this.siteHttpRoot+gd.url):gd.url)+"\",\""+jd.name+"\",\"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+jd.width+",height="+jd.height+"\")";}
return this.createHyperlinkHTML(hd,gd.headline);},getVideoBulletHTML:function(kd){var ld="javascript:window.open(\""+this.siteHttpRoot+"/video/#"+kd.url+"\")";return this.createHyperlinkHTML(ld,kd.headline);},getPhotosBulletHTML:function(md,nd){var od="javascript:window.open(\""+this.siteHttpRoot+nd.url+"#cnnSTCPhoto\")";return this.createHyperlinkHTML(od,nd.headline)+"&nbsp;&nbsp;<span class='cnnLiveLinksIcon'>"+"<img src='"+md.getImage($c)+"' border='0' width='16' height='13' alt=''></span>";},getStoryBulletHTML:function(qd){var rd="";if(qd.url.indexOf("javascript:CNN_openPopup(")!==-1){var sd=qd.url.substr(27);rd="javascript:CNN_openPopup(\""+((sd.indexOf("/")===0)?(this.siteHttpRoot+sd):sd);}
else if(qd.url.indexOf("/")===0){rd="javascript:window.open(\""+this.siteHttpRoot+qd.url+"\")";}
else if(qd.url.indexOf("http")===0){rd="javascript:window.open(\""+qd.url+"\")";}
return this.createHyperlinkHTML(rd,qd.headline);},createHyperlinkHTML:function(td,ud){var vd="<span style='cursor: pointer; color: #3d75ac' onmouseover='this.style.color=\"#ca0002\"' onmouseout='this.style.color=\"#3d75ac\"'";vd+=" onmouseup='"+td+"'>"+ud+"</span>";return vd;}};}();var findPlayer=xmp.baseplayer.BasePlayer.findPlayer;var CNNLIVE_PLAYER="CNNLIVE_PLAYER";var CONNECTION_ERROR="ConnectionError";var PLUGIN_ERROR="PluginError";var UNSUPPORTED_PLATFORM_ERROR="UnsupportedPlatformError";var NOW_PLAYING_INFO="NowPlayingInfo";var YOUR_VOICE="YourVoice";var YOUR_VOICE_THANK_YOU="YourVoiceThankYou";var TEXT="text";var DOWNLOADURL="downloadUrl";var APPLICATIONEXIT="ApplicationExit";var PLUGINNAME="pluginName";var LIVE_RIGHT_INSIDE="LiveRightInside";var LIVE_BUTTONS_SLIDER="LiveButtonsSlider";var LIVE_HEADER_CONTAINER="LiveHeaderContainer";var LIVE_AD="LiveAd";var LIVE_CONTAINER="LiveContainer";var LIVE_CONTENT_CONTAINER="LiveContentContainer";var LIVE_INSIDE_BOX_TOP_CORNERS="LiveInsideBoxTopCorners";var LIVE_INSIDE_CONTAINER="LiveInsideContainer";var LIVE_INSIDE_CONTENT="LiveInsideContent";var LIVE_INSIDE_BOX_FOOT_CORNERS="LiveInsideBoxFootCorners";var LIVE_OUTSIDE_BOX_FOOTER="LiveOutsideBoxFooter";var LIVE_HELP="LiveHelp";var LIVE_CONTROLS="LiveControls";var LIVE_LEFT_INSIDE="LiveLeftInside";var LIVE_LEFT_INSIDE_CLASS="cnnLiveLeftInside";var LIVE_CONTAINER_CLASS="cnnLiveContainer";var LIVE_CONTAINER_VIDEO_ONLY_CLASS="cnnLiveContainerVideoOnly";var LIVE_CONTAINER_MINI_CLASS="cnnLiveContainerMini";var LIVE_CONTENT_CONTAINER_CLASS="cnnLiveContentContainer";var LIVE_INSIDE_BOX_TOP_CORNERS_CLASS="cnnLiveInsideBoxTopCorners";var LIVE_INSIDE_CONTAINER_CLASS="cnnLiveInsideContainer";var LIVE_INSIDE_CONTENT="LiveInsideContent";var LIVE_INSIDE_CONTENT_CLASS="cnnLiveInsideContent";var LIVE_INSIDE_CONTENT_VIDEO_ONLY_CLASS="cnnLiveInsideContentVideoOnly";var LIVE_INSIDE_CONTENT_MINI_CLASS="cnnLiveInsideContentMini";var findPlayer=xmp.baseplayer.BasePlayer.findPlayer;var LIVE_HEADER_PREFIX="Header";var LIVE_HEADER_IMAGE="LiveHeader";var FULLSCREEN_SHORT=xmp.FULLSCREEN+"Short";var LIVE_MODES_LABEL="modesLabel";var FULL_PLAYER="FullPlayer";var BIGGER="Bigger";var ON_DEMAND_VIDEO_PARAMETER="{On Demand Video}";function LivePlayer(wd,xd,yd){this.IMAGES="Images";this.STREAMS="Streams";this.SLATES="Slates";this.PROPERTIES="Properties";this.URL="url";this.MUTE_ON="MuteOn";this.MUTE_OFF="MuteOff";this.YOUR_VOICE_IMAGE="YourVoice";this.CLOSE_BUTTON_IMAGE="CloseButton";this.SEND_BUTTON_IMAGE="SendButton";this.PLAY_BUTTON_ENABLED_IMAGE="PlayButtonEnabled";this.PLAY_BUTTON_DISABLED_IMAGE="PlayButtonDisabled";this.STOP_BUTTON_ENABLED_IMAGE="StopButtonEnabled";this.STOP_BUTTON_DISABLED_IMAGE="StopButtonDisabled";this.MUTEON_BUTTON_IMAGE="MuteOnButton";this.MUTEOFF_BUTTON_IMAGE="MuteOffButton";this.THANK_YOU_BOX_TOP="ThankYouBoxTop";this.THANK_YOU_BOX_BOTTOM="ThankYouBoxBottom";this.INSIDE_BVID="InsideBVID";this.INSIDE_BOX_BOTTOM="InsideBoxBottom";this.HELP_LINK="helpLink";this.FEEDBACK_LINK="feedbackLink";this.YOUR_VOICE_FEEDBACK_FORM="yourVoiceForm";this.YOUR_VOICE_FEEDBACK_NAME="name";this.YOUR_VOICE_FEEDBACK_EMAIL="email";this.YOUR_VOICE_FEEDBACK_COMMENTS="comments";this.YOUR_VOICE_FEEDBACK_FIELD_INITIAL_VALUE="initialValue";this.YOUR_VOICE_SUBMIT_COMPLETE_IFRAME="yourVoiceSubmitComplete";this.YOUR_VOICE_IFRAME_INITIALIZED="initialized";this.INFO_AREA="infoArea";this.INIT_STREAM_STATUS_COMPLETE_CALLBACK="InitStreamStatusCompleteCallback";this.MODE_QUERY_ARGUMENT="mode";this.FULL_CONTAINER_SLATE="LiveFullBox";this.CLOCK_IMAGE="Clock";this.COMMENT_POLICY_URL="Comment Policy";this.SHIFT_STATUS_STREAM="Shift Status Stream";this.STREAM_QUERY_ARGUMENT="stream";this.YOUR_VOICE_POST_URL="Your Voice Post Url";this.HELP_URL="Help";this.ONDEMAND_VIDEO="On Demand Video";this.HELP_FAQ="Help FAQ";this.DEFAULT_VOLUME_LEVEL="Default Volume Level";this.VOLUME_BAR="VolumeBar";this.MODE_DISABLED_MESSAGE="Mode Disabled Message";this.MODE_PARAMETER="{{mode}}";this.setPlayerContext(yd);this.billboardComplete=false;this.images={};this.streams={};this.slates={};this.activeStream=null;this.commentPolicyUrl="";this.shiftStatusStream="";this.yourVoicePostUrl="";this.connectingOverlay=null;this.logger=new xmp.util.internals.CategoryLogger(CNNLIVE_PLAYER);this.initProperties();this.initImages();this.initStreams();this.initSlates();this.initCommands();this.initState();LivePlayer.ctor.call(this,CNNLIVE_PLAYER,wd,xd);}
xmp.DERIVE_CLASS(xmp.baseplayer.BasePlayer,LivePlayer);LivePlayer.prototype.handleBootstrapped=function(zd){if(!zd){return;}
try{this.initLatch();}
catch(e){this.handleError(e);}};LivePlayer.prototype.handleRegisterNodeListeners=function(){var Ad=[{object:new LiveVideoNodeListener(this),nodes:["Content"]},{object:new LiveBillboardNodeListener(this),nodes:[LIVE_BILLBOARD_NODE_TYPE]},{object:new LiveSlateNodeListener(this),nodes:[LIVE_SLATE_NODE_TYPE]}];for(var i=0;i<Ad.length;i++){this.registerNodeListener(Ad[i].object,Ad[i].nodes);}};LivePlayer.prototype.handleMediaPlayerReady=function(){var Bd=this.getMediaPlayer();Bd.setVolume(parseInt(this.defaultVolume,10));Bd.setMute(false);Bd.setViewportConfig(xmp.FLASH_MIME_TYPE,xmp.DHTML_VIEWPORT);Bd.setViewportConfig(xmp.WINDOWS_MEDIA_MIME_TYPE,xmp.DHTML_VIEWPORT);Bd.setViewportConfig(xmp.DHTML_MIME_TYPE,xmp.DHTML_VIEWPORT);};LivePlayer.prototype.handleCreateViewport=function(Cd,Dd,Ed,Fd){if(Cd===xmp.DHTML_VIEWPORT){return this.createDHTMLViewport(Cd,Dd,Ed,Fd);}
return null;};LivePlayer.prototype.handleDestroyViewport=function(Gd,Hd){var Id=document.getElementById(Hd);if(Id){var Jd=((navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1||navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1)?Id.parentElement:Id.parentNode);Jd.removeChild(Id);}};LivePlayer.prototype.handleFatalException=function(e){this.initControls();var Kd=e.getFatalErrorCode();if(Kd===xmp.XmpErrorCodes.FATAL_PLATFORM){this.openSlate(LIVE_SLATE_NODE_TYPE,UNSUPPORTED_PLATFORM_ERROR,null);}
else if(Kd===xmp.XmpErrorCodes.FATAL_PLUGIN){var Ld=[];Ld.push({name:DOWNLOADURL,value:e.plugIn.downloadUrl});Ld.push({name:PLUGINNAME,value:e.plugIn.displayName});this.openSlate(LIVE_SLATE_NODE_TYPE,PLUGIN_ERROR,Ld);}
else{this.openSlate(LIVE_SLATE_NODE_TYPE,'Error',null);}};LivePlayer.prototype.createDHTMLViewport=function(Md,Nd,Od,Pd){var Qd=document.createElement("div");Qd.setAttribute(xmp.ID_ATTRIBUTE,Nd);Qd.setAttribute(xmp.NAME_ATTRIBUTE,Nd);Qd.setAttribute(xmp.FLASH_NATIVE_PLAYER_COMPONENT,xmp.getSWFRoot()+"FlashMediaPlayer.swf");var Rd=document.getElementById(CNNLIVE_PLAYER);Qd.style.width=Rd.style.width;Qd.style.height=Rd.style.height;Qd.style.position=xmp.ABSOLUTE_POSITION;Qd.style.backgroundColor="#000000";if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1){Rd.insertAdjacentElement("afterBegin",Qd);}
else{Rd.insertBefore(Qd,null);}
return Qd;};LivePlayer.prototype.updateCommandUIAll=function(){for(var Sd in this.commands){var Td=this.commands[Sd];if(Td.updateCommandUI){Td.updateCommandUI.call(this,Td);}}};LivePlayer.prototype.onLiveStateChange=function(Ud,Vd,Wd){this.updateCommandUIAll();}
LivePlayer.prototype.open=function(Xd){this.getMediaPlayer().open(Xd);};LivePlayer.prototype.handleControlStreamError=function(e){};LivePlayer.prototype.handleControlStreamTriggerInit=function(Yd,Zd){this.getStream(Yd).setData(Zd);this.latch.called(Yd,null);};LivePlayer.prototype.handleControlStreamTrigger=function($d,ae){this.getStream($d).setData(ae);};LivePlayer.prototype.handleRetrieveImage=function(be,ce){this.getStream(be).setImage(ce);};LivePlayer.prototype.handleImageRetrieverError=function(e){};LivePlayer.prototype.select=function(de){try{if(true===this.isStartup()){this.endBillboard();}
var ee=this.getStream(de);if(true===this.canBlock(ee)){ee.block();}
else if(true===ee.isAvailable(OPEN)){ee.open();}
else if(true===ee.isEnded()){ee.ended();}}
catch(e){this.handleStreamError(e);}};LivePlayer.prototype.openStream=function(fe){this.closeStream();this.activeStream=fe;this.setCurrentPlayListPosition(this.activeStream.getUrl());};LivePlayer.prototype.initImages=function(){var ge=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath(this.IMAGES);var he=ge.retrieveKeys();var ie=he.length;if(ie===0){throw new ImageError("Validating images.","Missing images.");}
for(var i=0;i<ie;i++){var je=ge.getString(he[i],xmp.NO_DEFAULT_VALUE);if(je===0){throw new ImageError("Validating image url.","Missing url.");}
this.images[he[i]]=je;}};LivePlayer.prototype.initProperties=function(){var ke=xmp.util.SettingsManager.getInstance().getContextNode();this.shiftStatusStream=ke.getString(this.SHIFT_STATUS_STREAM,xmp.NO_DEFAULT_VALUE);if(this.shiftStatusStream.length===0){throw new xmp.InvalidArgsError("Retrieving shift status stream.","Missing stream.");}
this.commentPolicyUrl=ke.getString(this.COMMENT_POLICY_URL,xmp.NO_DEFAULT_VALUE);if(this.commentPolicyUrl.length===0){throw new xmp.InvalidArgsError("Retrieving comment policy url.","Missing url.");}
this.yourVoicePostUrl=ke.getString(this.YOUR_VOICE_POST_URL,xmp.NO_DEFAULT_VALUE);if(this.yourVoicePostUrl===0){throw new xmp.InvalidArgsError("Retrieving your voice post url.","Missing url.");}
this.onDemandVideo=ke.getString(this.ONDEMAND_VIDEO,xmp.NO_DEFAULT_VALUE);if(this.onDemandVideo===0){throw new xmp.InvalidArgsError("Retrieving on demand video.","Missing url.");}
this.helpFAQ=ke.getString(this.HELP_FAQ,xmp.NO_DEFAULT_VALUE);if(this.helpFAQ===0){throw new xmp.InvalidArgsError("Retrieving help FAQ.","Missing url.");}
this.defaultVolume=ke.getString(this.DEFAULT_VOLUME_LEVEL,xmp.NO_DEFAULT_VALUE);if(this.defaultVolume===0){throw new xmp.InvalidArgsError("Retrieving default volume.","Missing volume.");}
this.modeDisabledMessage=ke.getString(this.MODE_DISABLED_MESSAGE,xmp.NO_DEFAULT_VALUE);if(this.modeDisabledMessage.length===0){throw new xmp.InvalidArgsError("Retrieving mode disabled message.","Missing mode disabled message.");}
var le=ke.getString(this.HELP_URL,xmp.NO_DEFAULT_VALUE);if(le===0){throw new xmp.InvalidArgsError("Retrieving Help.","Missing url.");}
document.getElementById(this.HELP_LINK).href=le;};LivePlayer.prototype.initStreams=function(){var me=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath(this.STREAMS);var ne=me.retrieveKeys();var oe=ne.length;if(oe===0){throw new StreamError("Validating streams.","Missing streams.",null);}
for(var i=0;i<oe;i++){var pe=new Stream(this,me,ne[i]);this.streams[pe.getName()]=pe;}};LivePlayer.prototype.initSlates=function(){var qe=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath(this.SLATES);var re=qe.retrieveChildren();var se=re.length;if(se===0){throw new SlateError("Validating slates.","Missing slates.");}
for(var i=0;i<se;i++){var te=re[i];var ue=te.getName();var ve=te.getString(this.URL,xmp.NO_DEFAULT_VALUE);if(ve.length===0){throw new SlateError("Validating slate url.","Missing slate url.");}
var we=[];var xe=te.getNodeForPath(this.PROPERTIES);var ye=xe.retrieveKeys();var ze=ye.length;for(var j=0;j<ze;j++){var Ae=xe.getString(ye[j],xmp.NO_DEFAULT_VALUE);Ae=this.initSlatePropertyValue(Ae);we.push({name:ye[j],value:Ae});}
this.slates[ue]={name:ue,url:ve,properties:we};}};LivePlayer.prototype.getImage=function(Be){var Ce=this.images[Be];if(Ce){return Ce;}
throw new ImageError("Retrieving image.","Unable to find image \""+Be+"\".");};LivePlayer.prototype.getStream=function(De){var Ee=this.streams[De];if(Ee){return Ee;}
throw new StreamError("Retrieving stream.","Unable to find stream \""+De+"\".",null);};LivePlayer.prototype.getSlate=function(Fe){var Ge=this.slates[Fe];if(Ge){return Ge;}
throw new SlateError("Retrieving slate.","Unable to find \""+Fe+"\" slate.");};LivePlayer.prototype.getStreamByUrl=function(He){for(var Ie in this.streams){var Je=this.streams[Ie];if(He===Je.getUrl()){return Je;}}
throw new StreamError("Retrieving stream.","Unable to find stream for url \""+He+"\".",null);};LivePlayer.prototype.getNowPlayingInfoHTML=function(){var Ke="<div class='cnnLiveDescription'>";var Le=((this.activeStream)?this.activeStream.getData():null);Ke+="<div class='cnnLiveDescHead' id='nowPlayingTitle' name='nowPlayingTitle'>"+((Le)?Le.related.title:"")+"</div>";var Me=((Le)?Le.related.description:"");if(Le&&Le.affiliate){Me+="<span class='cnnLiveDescPipe'>&nbsp;|&nbsp;</span>"+BulletFormatter.apply(this,Le.affiliate);}
Ke+="<div class='cnnLiveDescTxt' id='nowPlayingDescription' name='nowPlayingDescription'>"+Me+"</div>";Ke+="</div><div id='cnnTColumns'><div id='cnnLiveT1Col'><div class='cnnLiveLinks' id='nowPlayingBullets' name='nowPlayingBullets'>";if(Le&&Le.related.bullets.length>0){var Ne=0;Ne=Le.related.bullets.length;if(Le.related.bullets.length>2){Ne=2;}
Ke+="<ul>";for(var i=0;i<Ne;i++){Ke+="<li>"+BulletFormatter.apply(this,Le.related.bullets[i])+"</li>";}
Ke+="</ul>";}
Ke+="</div></div><div id='cnnLiveT2Col'><div class='cnnLiveYourVoice'>"+"<input type='image' onclick='javascript:findPlayer(CNNLIVE_PLAYER).showInfoArea(YOUR_VOICE)' "+"src='"+this.getImage(this.YOUR_VOICE_IMAGE)+"' width='97' height='24' /></div></div>"+"<div style='clear:both;'><img src='http://i.a.cnn.net/cnn/images/1.gif' width='1' height='1' border='0' alt=''></div></div><div><img src='"+this.getImage(this.INSIDE_BVID)+"' width='464' height='6' alt='' border='0'></div>";return Ke;};LivePlayer.prototype.getYourVoiceHTML=function(){return"<div class='cnnLiveDescriptionFeedback'><div class='cnnLiveDescHead2'>"+"<input class='cnnLiveCloseBtn' type='image' "+" onclick='javascript:findPlayer(CNNLIVE_PLAYER).showInfoArea(NOW_PLAYING_INFO)' "+" src='"+this.getImage(this.CLOSE_BUTTON_IMAGE)+"' >"+"YOUR VOICE<span class='cnnLiveDescHeadComments'>"+" comments submitted may be read within our live programming</span><form id='yourVoiceForm' "+" name='yourVoiceForm' method='POST' action='"+this.yourVoicePostUrl+"' "+" target='yourVoiceSubmitComplete' onsubmit='return(findPlayer(CNNLIVE_PLAYER).validateYourVoiceFeedback());'><span class='cnnLiveFeedbackYes'>Yes, my name<br />"+"can be used<br />on CNN Live</span>"+"<input type='text' value='Full Name' id='name' name='name' initialValue='Full Name' onFocus='cnnLiveTxtFocus(this,\"Full Name\")' "+"class='cnnLiveFeedbackInput' /><input type='text' value='E-mail address' id='email' name='email' initialValue='E-mail address'"+"onFocus='cnnLiveTxtFocus(this,\"E-mail address\")' class='cnnLiveFeedbackInput2' />"+"<input type='checkbox' name='permission' checked='checked'/><br/><textarea id='comments' name='comments' initialValue='Feedback' cols='20' rows='3' class='cnnLiveFeedbackTextarea' "+"onFocus='cnnLiveTxtFocus(this,\"Feedback\")'>Feedback</textarea><input type='image' "+"class='cnnLiveSendBtn' src='"+this.getImage(this.SEND_BUTTON_IMAGE)+"' alt='Send' />"+"<div class='clear'></div></form></div></div></div>"+"<img src='"+this.getImage(this.INSIDE_BOX_BOTTOM)+"' width='464' height='6' alt='' border='0'></div></div></div></div><iframe style='visibility: hidden' width='0px' height='0px' id='yourVoiceSubmitComplete' name='yourVoiceSubmitComplete' ></iframe>";};LivePlayer.prototype.getYourVoiceThankYouHTML=function(){return"<div class='cnnLiveDescriptionFeedback'><div class='cnnLiveDescHead3'>"+"<input class='cnnLiveCloseBtn' type='image' "+"onclick='javascript:findPlayer(CNNLIVE_PLAYER).showInfoArea(NOW_PLAYING_INFO)' "+"src='"+this.getImage(this.CLOSE_BUTTON_IMAGE)+"' />"+"YOUR VOICE <span class='cnnLiveDescHeadComments'>"+"comments submitted may be read within our live programming</span><div class='cnnPad12T9BR'>"+"<div><div><img src='"+this.getImage(this.THANK_YOU_BOX_TOP)+"' width='444' height='5' alt='' border='0'></div><div class='cnnRRTVBoxContent'>"+"<div class='cnnLiveThankYou'>"+"<span id='cnnLiveThankYouText' name='cnnLiveThankYouText'>Thank you</span> for sharing your thoughts with CNN Live.<br />"+"Stay tuned - your feedback may be read within CNN Live programs.<br /><a href='"+this.commentPolicyUrl+"' target='livecomments'><b>CNN Comment Policy</b></a>"+"<b class='cnnVerticalBarBlk'>|</b><span id='cnnLiveSendAnotherText' name='cnnLiveSendAnotherText' style='cursor: pointer; color: "+"#3d75ac' onmouseover='this.style.color=\"#ca0002\"' onmouseout='this.style.color=\"#3d75ac\"' "+" onmouseup='javascript:findPlayer(CNNLIVE_PLAYER).showInfoArea(YOUR_VOICE)'>"+" Send another comment</span></div>"+"</div><div><img src='"+this.getImage(this.THANK_YOU_BOX_BOTTOM)+"' width='444' height='5' alt='' border='0'></div></div></div></div></div></div>"+"<img src='"+this.getImage(this.INSIDE_BOX_BOTTOM)+"' width='464' height='6' alt='' border='0'></div></div></div></div>";};LivePlayer.prototype.showInfoArea=function(Oe){try{var Pe=document.getElementById(this.INFO_AREA);if(!Oe){Pe.style.display=xmp.DISPLAY_BLOCK;return;}
var Qe="";if(Oe===NOW_PLAYING_INFO){Qe=this.getNowPlayingInfoHTML();}
else if(Oe===YOUR_VOICE){Qe=this.getYourVoiceHTML();}
else if(Oe===YOUR_VOICE_THANK_YOU){Qe=this.getYourVoiceThankYouHTML();}
Pe.innerHTML=Qe;Pe.setAttribute(xmp.TYPE,Oe);Pe.style.display=xmp.DISPLAY_BLOCK;}
catch(e){this.handleError(e);}};LivePlayer.prototype.getInfoAreaType=function(){return document.getElementById(this.INFO_AREA).getAttribute(xmp.TYPE);};LivePlayer.prototype.hideInfoArea=function(){document.getElementById(this.INFO_AREA).style.display=xmp.DISPLAY_NONE;};LivePlayer.prototype.onYourVoiceSubmitComplete=function(){var Re=findPlayer(CNNLIVE_PLAYER);try{Re.showInfoArea(YOUR_VOICE_THANK_YOU);}
catch(e){Re.handleError(e);}};LivePlayer.prototype.openSlate=function(Se,Te,Ue){this.closeStream();var Ve=this.getSlate(Te);var i=0;var j=0;var We=[];var Xe=false;for(i=0;i<Ve.properties.length;i++){We.push(Ve.properties[i]);}
if(Ue){for(i=0;i<Ue.length;i++){Xe=false;for(j=0;j<We.length;j++){if(We[j].name===Ue[i].name){We[j].value=Ue[i].value;Xe=true;break;}}
if(!Xe){We.push(Ue[i]);}}}
this.loadItem(Se,{url:Ve.url,metadata:null},We);};LivePlayer.prototype.controlsShiftStatus=function(Ye){return(this.shiftStatusStream===Ye.getName());};LivePlayer.prototype.setOvernight=function(){for(var Ze in this.streams){var $e=this.streams[Ze];if(true===this.controlsShiftStatus($e)){continue;}
$e.overnight();}
if(this.getMediaPlayer()){this.getMediaPlayer().close();}
this.showOvernightSlate(true);this.state.onPlayerOvernight(this);};LivePlayer.prototype.setDaytime=function(af){for(var bf in this.streams){var cf=this.streams[bf];if(true===this.controlsShiftStatus(cf)){continue;}
cf.daytime();}
this.showOvernightSlate(false);};LivePlayer.prototype.handleStreamError=function(e){try{if(this.getMediaPlayer()){this.getMediaPlayer().getViewport().hideOverlays(xmp.ALL_OVERLAYS);}
if(this.activeStream){this.activeStream.error(e);this.activeStream=null;}}
catch(tempE){xmp.handleFatalError(tempE);}};LivePlayer.prototype.handleError=function(e){this.logger.warn(e.message);};LivePlayer.prototype.getActiveStream=function(){return this.activeStream;};LivePlayer.prototype.findCommand=function(df){return this.commands[df];};LivePlayer.prototype.initCommands=function(ef){this.commands={};this.commands[xmp.PLAY]={type:xmp.PLAY,button:"playStopButton",updateCommandUI:this.updatePlayCommandUI,handler:this.commandPlay,enabledImage:this.getImage(this.PLAY_BUTTON_ENABLED_IMAGE),disabledImage:this.getImage(this.PLAY_BUTTON_DISABLED_IMAGE)};this.commands[xmp.STOP]={type:xmp.STOP,button:"playStopButton",updateCommandUI:null,handler:this.commandStop,enabledImage:this.getImage(this.STOP_BUTTON_ENABLED_IMAGE),disabledImage:this.getImage(this.STOP_BUTTON_DISABLED_IMAGE)};this.commands[xmp.FULLSCREEN]={type:xmp.FULLSCREEN,button:xmp.FULLSCREEN,updateCommandUI:this.updateFullscreenCommandUI,handler:this.commandFullscreen,enabledImage:"",disabledImage:""};this.commands[xmp.MUTE]={type:xmp.MUTE,button:"muteOnOffButton",updateCommandUI:this.updateMuteCommandUI,handler:this.commandMute,enabledImage:this.getImage(this.MUTEON_BUTTON_IMAGE),disabledImage:this.getImage(this.MUTEOFF_BUTTON_IMAGE)};};LivePlayer.prototype.updatePlayCommandUI=function(ff){var gf=this.findCommand(xmp.PLAY);var hf=((this.getMediaPlayer())?this.getMediaPlayer().isAvailable(xmp.PLAY):false);var jf=((this.getMediaPlayer())?this.getMediaPlayer().isAvailable(xmp.STOP)&&(true===this.billboardComplete):false);var kf=document.getElementById(gf.button);if(false===hf&&false===jf){kf.disabled=true;kf.src=gf.disabledImage;}
else{kf.disabled=false;if(true===hf){kf.src=gf.enabledImage;kf.onclick=gf.handler;}
else if(true===jf){gf=this.findCommand(xmp.STOP);kf.src=gf.enabledImage;kf.onclick=gf.handler;}}};LivePlayer.prototype.updateFullscreenCommandUI=function(lf){var mf=this.findCommand(xmp.FULLSCREEN);var nf=((this.getMediaPlayer())?this.getMediaPlayer().isAvailable(xmp.FULLSCREEN):false);var of=document.getElementById(mf.button);of.style.display=((nf===true)?xmp.DISPLAY_INLINE:xmp.DISPLAY_NONE);};LivePlayer.prototype.updateMuteCommandUI=function(pf){var qf=this.findCommand(xmp.MUTE);var rf=document.getElementById(qf.button);rf.src=((this.getMediaPlayer()&&true===this.getMediaPlayer().getMute())?qf.enabledImage:qf.disabledImage);rf.onclick=qf.handler;};LivePlayer.prototype.commandPlay=function(){var sf=findPlayer(CNNLIVE_PLAYER);try{sf.getMediaPlayer().play();}
catch(e){sf.handleStreamError(e);}};LivePlayer.prototype.commandStop=function(){var tf=findPlayer(CNNLIVE_PLAYER);try{tf.getMediaPlayer().stop();}
catch(e){tf.handleStreamError(e);}};LivePlayer.prototype.commandFullscreen=function(){var uf=findPlayer(CNNLIVE_PLAYER);try{uf.getMediaPlayer().setFullscreen(true);}
catch(e){uf.handleStreamError(e);}};LivePlayer.prototype.commandMute=function(){var vf=findPlayer(CNNLIVE_PLAYER);try{vf.getMediaPlayer().setMute(((true===vf.getMediaPlayer().getMute())?false:true));}
catch(e){vf.handleStreamError(e);}
vf.updateMuteCommandUI();};LivePlayer.prototype.closeStream=function(){if(this.activeStream){this.activeStream.close();this.activeStream=null;}
if(this.getMediaPlayer()){this.getMediaPlayer().getViewport().hideOverlays(xmp.ALL_OVERLAYS);}};LivePlayer.prototype.initLatch=function(){var wf=new xmp.util.Callback(this.INIT_STREAM_STATUS_COMPLETE_CALLBACK,this.initStreamStatusComplete,this);var xf=[];for(var yf in this.streams){xf.push(this.streams[yf].getName());}
this.latch=new xmp.util.Latch(xf,wf);};LivePlayer.prototype.initStreamStatusComplete=function(zf){try{this.state.onPlayerReady(this);this.createPlayListContext(LIVE_CONTEXT);var Af=[];for(var Bf in this.streams){Af.push(this.streams[Bf].getUrl());}
this.loadContent(Af,"");}
catch(e){this.handleError(e);}};LivePlayer.prototype.initSlider=function(){var Cf=["sliderBackground","sliderTrack","sliderThumb"];var Df=Cf.length;for(var i=0;i<Df;i++){var Ef=document.getElementById(Cf[i]);if(!Ef){continue;}
var Ff=((navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1||navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1)?Ef.parentElement:Ef.parentNode);Ff.removeChild(Ef);}
document.getElementById(LIVE_BUTTONS_SLIDER).innerHTML="<img id='sliderBackground' name='sliderBackground' class='sliderBackground' src='"+this.getImage(this.VOLUME_BAR)+"' /><div id='sliderTrack' name='sliderTrack' class='sliderTrack'><span id='sliderThumb' name='sliderThumb' class='sliderThumb'></span></div>";if(this.slider){this.slider.fini();this.slider=null;}
var Gf=((this.getMediaPlayer())?this.getMediaPlayer().getVolume():this.defaultVolume);this.slider=new slider({min:0,max:100,value:Gf,track:"sliderTrack",thumb:"sliderThumb",onchange:this.onVolumeChange,onslide:function(Hf){}});};LivePlayer.prototype.onVolumeChange=function(If){var Jf=findPlayer(CNNLIVE_PLAYER);try{Jf.getMediaPlayer().setVolume(If);Jf.updateMuteCommandUI();}
catch(e){Jf.handleStreamError(e);}};LivePlayer.prototype.canBlock=function(Kf){var cc='';if(xmp.util.Cookie.canUse()){var Lf=xmp.util.Cookie.read('adDEmas');if(xmp.isNonEmptyString(Lf)){var Mf=Lf.split('&');if(Mf.length>=5){cc=Mf[4];}}}
if(cc.length>0){var Nf=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('GeoBlocking');var Of=Nf.getString(Kf.name,'');if(Of.length>0){var Pf=Of.split(',');for(var i=0;i<Pf.length;i++){if(Pf[i]==cc){this.logger.info('GeoBlocking stream '+Kf.name+' for county code '+cc);return true;}}}}
return false;};LivePlayer.prototype.showPlayerContainer=function(Qf){document.getElementById(LIVE_INSIDE_CONTENT).style.display=((Qf===true)?xmp.DISPLAY_BLOCK:xmp.DISPLAY_NONE);};LivePlayer.prototype.showOvernightSlate=function(Rf){this.showPlayerContainer(!Rf);var Sf=null;if(true===Rf){Sf=document.createElement("div");Sf.setAttribute(xmp.ID_ATTRIBUTE,this.FULL_CONTAINER_SLATE);Sf.setAttribute(xmp.NAME_ATTRIBUTE,this.FULL_CONTAINER_SLATE);var Tf=this.state.getOvernightSlate();Sf.className=Tf.containerClass;var Uf=Tf.html.replace(ON_DEMAND_VIDEO_PARAMETER,this.onDemandVideo);Sf.innerHTML=Uf;var Vf=document.getElementById(LIVE_INSIDE_CONTAINER);if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1){Vf.insertAdjacentElement("afterBegin",Sf);}
else{Vf.insertBefore(Sf,document.getElementById(LIVE_INSIDE_CONTENT));}}
else{Sf=document.getElementById(this.FULL_CONTAINER_SLATE);if(Sf){var Wf=((navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1||navigator.appName.indexOf(xmp.OPERA_BROWSER)!==-1)?Sf.parentElement:Sf.parentNode);Wf.removeChild(Sf);}}};LivePlayer.prototype.initSlatePropertyValue=function(Xf){var Yf=[{name:this.ONDEMAND_VIDEO,value:this.onDemandVideo},{name:this.HELP_FAQ,value:this.helpFAQ}];var Zf;var $f=Yf.length;for(var i=0;i<$f;i++){parameter=Yf[i];Zf="{"+Yf[i].name+"}";if(Xf===Zf){return parameter.value;}}
Zf=this.IMAGES+"/";var ag=Xf.indexOf(Zf);if(ag===0){var bg=Zf.length+1;var cg=Xf.substr(bg,(Xf.length-(Zf.length+2)));return this.getImage(cg);}
return Xf;};LivePlayer.prototype.validateYourVoiceFeedback=function(){var dg=findPlayer(CNNLIVE_PLAYER);try{var eg=xmp.trimString(document.getElementById(dg.YOUR_VOICE_FEEDBACK_NAME).value);var fg=document.getElementById(dg.YOUR_VOICE_FEEDBACK_NAME).getAttribute(this.YOUR_VOICE_FEEDBACK_FIELD_INITIAL_VALUE);if(eg.length===0||eg===fg){alert("Missing name.");return false;}
var gg=xmp.trimString(document.getElementById(dg.YOUR_VOICE_FEEDBACK_EMAIL).value);fg=document.getElementById(dg.YOUR_VOICE_FEEDBACK_EMAIL).getAttribute(this.YOUR_VOICE_FEEDBACK_FIELD_INITIAL_VALUE);if(gg.length===0||gg===fg){alert("Missing email.");return false;}
if(gg.indexOf("@")===-1){alert("Missing email @ character symbol.");return false;}
var hg=xmp.trimString(document.getElementById(dg.YOUR_VOICE_FEEDBACK_COMMENTS).value);fg=document.getElementById(dg.YOUR_VOICE_FEEDBACK_COMMENTS).getAttribute(this.YOUR_VOICE_FEEDBACK_FIELD_INITIAL_VALUE);if(hg.length===0||hg===fg){alert("Missing comments.");return false;}}
catch(e){dg.handleError(e);return false;}
return true;};LivePlayer.prototype.initControls=function(){document.getElementById(LIVE_CONTROLS).style.display=xmp.DISPLAY_BLOCK;};LivePlayer.prototype.initState=function(){this.modes=[];var ig=[new NullPlayerMode(),new MaxPlayerMode(),new VideoOnlyPlayerMode(),new MiniPlayerMode()];for(var i=0;i<ig.length;i++){var jg=ig[i];this.modes[jg.type]=jg;}
this.state=this.findMode(NULL_MODE);this.switchMode(MAX_MODE,false);};LivePlayer.prototype.findMode=function(kg){var lg=this.modes[kg];if(lg!==null){return lg;}
return null;};LivePlayer.prototype.changeState=function(mg,ng){var og=this.state;this.state=this.findMode(mg);this.state.transition(this,ng,og);this.logger.debug("Changed/transitioned live player to \""+this.state.getName()+"\" mode....");};LivePlayer.prototype.switchMode=function(pg,qg){var rg=this.findMode(pg).getWindowSize();if(false===this.initModeWindow(pg,rg,qg)&&true===qg){return;}
var sg=PLAYER_MODE_OPERATION_PREFIX+pg;this.state[sg].call(this.state,this);this.updateConnectingOverlay();};LivePlayer.prototype.initModeWindow=function(tg,ug,vg){try{var wg=this.getWindowPosition();var xg=wg.x+ug.width+10;var yg=wg.y+ug.height+63;if(xg>screen.width||yg>screen.height){var x=((xg>screen.width)?(-(xg-screen.width))-10:0);var y=((yg>screen.height)?(-(yg-screen.height))-63:0);window.moveBy(x,y);}
var zg=this.getWindowSize();window.resizeTo((zg.width-5),zg.height);testSize=this.getWindowSize();if(testSize.width===zg.width){if(true===vg){var Ag=this.modeDisabledMessage.replace(this.MODE_PARAMETER,tg);alert(Ag);}
return false;}
this.setWindowSize(ug);}
catch(e){}
return true;};LivePlayer.prototype.showConnectingOverlay=function(){if(!this.connectingOverlay){this.connectingOverlay=this.getMediaPlayer().getViewport().createOverlay(LIVE_VIDEO_OVERLAY_GROUP,xmp.SLATE_OVERLAY,CONNECTING_OVERLAY);this.updateConnectingOverlay();}
this.connectingOverlay.show();};LivePlayer.prototype.hideConnectingOverlay=function(){if(this.connectingOverlay){this.connectingOverlay.hide();}};LivePlayer.prototype.updateConnectingOverlay=function(){if(this.connectingOverlay){this.connectingOverlay.setHTML("<div><img src='"+this.getImage(this.state.getConnectingSlate())+"' width='{{width}}' height='{{height}}' 'alt='' border='0' /></div>");}};LivePlayer.prototype.getMode=function(){return this.state.getType();};LivePlayer.prototype.enableModes=function(Bg){document.getElementById(LIVE_MODES_LABEL).style.display=((Bg===true)?xmp.DISPLAY_BLOCK:xmp.DISPLAY_NONE);};LivePlayer.prototype.handleBillboardEnded=function(){this.endBillboard();var Cg=getQueryArg(this.STREAM_QUERY_ARGUMENT);if(Cg.length===0){return;}
this.select(Cg);};LivePlayer.prototype.isStartup=function(){return(false===this.billboardComplete);};LivePlayer.prototype.endBillboard=function(){this.getMediaPlayer().close();this.enableModes(true);this.billboardComplete=true;this.state.onPlayerBillboardEnded(this);};LivePlayer.prototype.isOvernight=function(){for(var Dg in this.streams){var Eg=this.streams[Dg];if(true===this.controlsShiftStatus(Eg)){return(Eg.getMode()===OVERNIGHT);}}
return false;};LivePlayer.prototype.setWindowSize=function(Fg){window.resizeTo(Fg.width,Fg.height);var Gg=this.getWindowSize();if((Gg.height<Fg.height)||(Gg.width<Fg.width)){window.resizeBy((Fg.width-Gg.width),(Fg.height-Gg.height));}};LivePlayer.prototype.getWindowSize=function(){var Hg={width:0,height:0};if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1){Hg.width=document.documentElement.clientWidth;Hg.height=document.documentElement.clientHeight;}
else{Hg.width=window.innerWidth;Hg.height=window.innerHeight;}
return Hg;};LivePlayer.prototype.getWindowPosition=function(){var Ig={x:0,y:0};Ig.x=((window.screenLeft)?window.screenLeft:window.screenX);Ig.y=((window.screenTop)?window.screenTop:window.screenY);return Ig;};var LIVE_SLATE_NODE_TYPE="LiveSlate";var LIVE_AVAIL_CHOICE_CLASS_NAME="cnnAvailLiveChoice";var LIVE_NOW_PLAYING_CLASS_NAME="cnnNowPlaying";var BLANK_IMAGE="Blank";var NOW_PLAYING_BUTTON_IMAGE="NowPlayingButton";var PREVIEW_LIVE_BACKGROUND_IMAGE="PreviewBackgroundLive";var PREVIEW_NORMAL_BACKGROUND_IMAGE="PreviewBackgroundNormal";var LIVE_STREAM="LiveStream";var START_STREAM_COMMAND="start";var STOP_STREAM_COMMAND="stop";var LIVE_LABEL="Live";var OVERNIGHT_SHIFT_STATUS="overnight";var DAYTIME_SHIFT_STATUS="daytime";var AFFILIATE="CNN AFFILIATE:";Stream=function(Jg,Kg,Lg){this.player=Jg;this.name=Lg;this.url=Kg.getString(this.name,xmp.NO_DEFAULT_VALUE);if(this.url.length===0){throw new StreamError("Validating stream.","Missing stream url.",this);}
this.data=null;this.metadata=null;this.image=this.player.getImage(BLANK_IMAGE);this.logger=new xmp.util.internals.CategoryLogger(LIVE_STREAM);this.initState();this.setupPreviewUI();};Stream.prototype.getUrl=function(){return this.url;};Stream.prototype.getName=function(){return this.name;};Stream.prototype.getData=function(){return this.data;};Stream.prototype.getMode=function(){return this.state.getType();};Stream.prototype.open=function(){this.state.open(this);};Stream.prototype.close=function(){this.state.close(this);};Stream.prototype.ended=function(){this.state.ended(this);};Stream.prototype.error=function(e){this.state.error(this,e);};Stream.prototype.capacityReached=function(){this.state.capacityReached(this);};Stream.prototype.block=function(){this.state.block(this);};Stream.prototype.overnight=function(){this.state.overnight(this);};Stream.prototype.daytime=function(){this.state.daytime(this);};Stream.prototype.available=function(){this.state.available(this);};Stream.prototype.isAvailable=function(Mg){return this.state.isAvailable(this,Mg);};Stream.prototype.isNull=function(){return this.state.isNull(this);};Stream.prototype.setData=function(Ng){this.state.setData(this,Ng);this.updateState();};Stream.prototype.setImage=function(Og){this.state.setImage(this,Og);};Stream.prototype.changeState=function(Pg,Qg){var Rg=this.findMode(Pg);this.transitionState(Rg,Qg);this.logger.debug("Changed/transitioned stream \""+this.name+"\" state to \""+Rg.name+"\" mode....");this.state=Rg;};Stream.prototype.transitionState=function(Sg,Tg){return Sg.transition(this,Tg,this.state);};Stream.prototype.handleOpen=function(){this.showPreviewUI();this.player.openStream(this);this.showMainUI();};Stream.prototype.handleClose=function(){this.setupPreviewUI();};Stream.prototype.handleEnded=function(){this.player.openSlate(LIVE_SLATE_NODE_TYPE,xmp.ENDED,null);};Stream.prototype.handleCapacityReached=function(){this.player.openSlate(LIVE_SLATE_NODE_TYPE,CAPACITY_MAX,null);};Stream.prototype.handleBlock=function(){this.player.openSlate(LIVE_SLATE_NODE_TYPE,GEO_BLOCKING,null);};Stream.prototype.handleOvernight=function(){this.setupPreviewUI();this.hidePreviewUI();if(true===this.player.controlsShiftStatus(this)){this.player.setOvernight(this);}};Stream.prototype.handleDaytime=function(){if(true===this.isAvailable()){this.showPreviewUI();}
if(true===this.player.controlsShiftStatus(this)){this.player.setDaytime(this);}};Stream.prototype.handleAvailable=function(){this.showPreviewUI();if(true===this.isPlaying()){return;}
this.setupPreviewUI();};Stream.prototype.handleError=function(e){if(false===this.isPlaying()){return;}
this.setupPreviewUI();if(e instanceof xmp.NativePlayerConnectionError){this.player.openSlate(LIVE_SLATE_NODE_TYPE,CONNECTION_ERROR,null);}
else{this.player.openSlate(LIVE_SLATE_NODE_TYPE,xmp.ERRORS,null);}};Stream.prototype.handleSetData=function(Ug){this.data=Ug;this.setAffiliate();this.updatePreviewUI();};Stream.prototype.handleSetImage=function(Vg){this.image=Vg;if(true===this.isPlaying()){var Wg=document.getElementById(this.name+"NowPlayingTable");if(Wg){Wg.style.backgroundImage="url("+this.image+")";Wg.style.backgroundRepeat="no-repeat";}}
else{document.getElementById(this.name+"Image").src=this.image;}};Stream.prototype.initState=function(){this.modes=[];var Xg=[new NullStreamMode(this),new OpenStreamMode(this),new CloseStreamMode(this),new EndedStreamMode(this),new ErrorStreamMode(this),new AvailableStreamMode(this),new CapacityMaxStreamMode(this),new DaytimeStreamMode(this),new OvernightStreamMode(this),new GeoBlockingStreamMode(this)];for(var i=0;i<Xg.length;i++){this.addMode(Xg[i]);}
this.state=this.findMode(NULL);}
Stream.prototype.addMode=function(Yg){this.modes[Yg.type]=Yg;};Stream.prototype.findMode=function(Zg){var $g=this.modes[Zg];if($g!==null){return $g;}
throw new xmp.StreamModeError("Finding stream mode.","Unable to find stream mode \""+Zg+"\".",null);};Stream.prototype.getStatusHTML=function(){return((true===this.isLive())?"<span class='cnnLiveRed'>LIVE:&nbsp;&nbsp;</span>":"");};Stream.prototype.getTitleHTML=function(){return this.getStatusHTML()+((this.data)?this.data.related.title:"");};Stream.prototype.isEnded=function(){return(false===this.isOvernight()&&this.data&&this.data.command.name===STOP_STREAM_COMMAND);};Stream.prototype.isAvailable=function(){return(false===this.isOvernight()&&this.data&&this.data.command.name===START_STREAM_COMMAND);};Stream.prototype.isDaytime=function(){return(true===this.player.controlsShiftStatus(this)&&this.data&&this.data.shiftStatus.status===DAYTIME_SHIFT_STATUS);};Stream.prototype.isOvernight=function(){return(true===this.player.controlsShiftStatus(this)&&this.data&&this.data.shiftStatus.status===OVERNIGHT_SHIFT_STATUS);};Stream.prototype.isLive=function(){return((this.data&&this.data.related.label===LIVE_LABEL)?true:false);};Stream.prototype.showMainUI=function(){var ah=document.getElementById(this.name);var bh=this.name+"Title";var ch=this.name+"NowPlayingTable";ah.className=LIVE_NOW_PLAYING_CLASS_NAME;ah.style.backgroundImage="";ah.style.backgroundRepeat="";ah.innerHTML="<table id='"+ch+"' name='"+ch+"' class='cnnNowPlayingTable' style='background: url("+this.image+") no-repeat;' cellpadding='0' cellspacing='0' border='0'><tr><td><img src='"+this.player.getImage(NOW_PLAYING_BUTTON_IMAGE)+"' border='0' width='34' height='23' alt='' /></td></tr></table><div class='cnnAvailLiveChoiceNowPlaying'>NOW PLAYING</div><div class='cnnAvailLiveChoiceTxt' style='display: none' id='"+bh+"' name='"+bh+"'>"+this.getTitleHTML()+"</div>";this.updateMainUI();};Stream.prototype.setupPreviewUI=function(){var dh=document.getElementById(this.name);var eh=this.name+"Image";var fh=this.name+"Title";dh.className=LIVE_AVAIL_CHOICE_CLASS_NAME;dh.innerHTML="<input id='"+eh+"' name='"+eh+"' type='image' onclick='javascript:findPlayer(\""+CNNLIVE_PLAYER+"\").select(\""+this.name+"\")' src='"+this.image+"' ><div class='cnnAvailLiveChoiceTxt' id='"+fh+"' name='"+fh+"'>"+this.getTitleHTML()+"</div>";this.setPreviewBackground(dh);};Stream.prototype.updatePreviewUI=function(){var gh=document.getElementById(this.name+"Title");gh.innerHTML=this.getTitleHTML();if(true===this.isPlaying()){return;}
this.setPreviewBackground(document.getElementById(this.name));}
Stream.prototype.updateMainUI=function(){if(this.player.getInfoAreaType()!==NOW_PLAYING_INFO){return;}
document.getElementById("nowPlayingTitle").innerHTML=((this.data)?this.data.related.title:"");var hh=((this.data)?this.data.related.description:"");if(this.data&&this.data.affiliate){hh+="<span class='cnnLiveDescPipe'>&nbsp;|&nbsp;</span>"+BulletFormatter.apply(this.player,this.data.affiliate);}
document.getElementById("nowPlayingDescription").innerHTML=hh;var ih=document.getElementById("nowPlayingBullets");ih.innerHTML="";if(this.data&&this.data.related.bullets.length>0){var jh=0;jh=this.data.related.bullets.length;if(this.data.related.bullets.length>2){jh=2;}
var kh=document.createElement("ul");for(var i=0;i<jh;i++){var lh=document.createElement("li");lh.innerHTML=BulletFormatter.apply(this.player,this.data.related.bullets[i]);if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1){kh.insertAdjacentElement("beforeEnd",lh);}
else{kh.insertBefore(lh,null);}}
if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1){ih.insertAdjacentElement("afterBegin",kh);}
else{ih.insertBefore(kh,null);}}};Stream.prototype.isPlaying=function(){var mh=this.player.getActiveStream();return((mh&&mh.getName()===this.name)?true:false);};Stream.prototype.showPreviewUI=function(){document.getElementById(this.name).style.display=xmp.DISPLAY_BLOCK;};Stream.prototype.hidePreviewUI=function(){document.getElementById(this.name).style.display=xmp.DISPLAY_NONE;};Stream.prototype.updateState=function(){var nh=[{type:DAYTIME,canUpdate:this.isDaytime,operation:this.state.daytime},{type:OVERNIGHT,canUpdate:this.isOvernight,operation:this.state.overnight},{type:xmp.ENDED,canUpdate:this.isEnded,operation:this.state.ended},{type:AVAILABLE,canUpdate:this.isAvailable,operation:this.state.available}];var oh=nh.length;for(var i=0;i<oh;i++){if(true===nh[i].canUpdate.call(this)){try{if(false===this.state.isAvailable(nh[i].type)){continue;}
nh[i].operation.call(this.state,this);}
catch(e){this.player.handleStreamError(e);}
break;}}};Stream.prototype.setPreviewBackground=function(ph){var qh=((true===this.isLive())?PREVIEW_LIVE_BACKGROUND_IMAGE:PREVIEW_NORMAL_BACKGROUND_IMAGE);ph.style.backgroundImage="url("+this.player.getImage(qh)+")";ph.style.backgroundRepeat="no-repeat";};Stream.prototype.setAffiliate=function(){if(this.data&&this.data.related.bullets.length>0){var rh=this.data.related.bullets[0];var sh=rh.headline.indexOf(AFFILIATE);if(sh!==-1){this.data.affiliate=rh;this.data.affiliate.headline=xmp.trimString(this.data.affiliate.headline.substr(sh+AFFILIATE.length));this.data.related.bullets.splice(0,1);}}};ImageError=function(th,uh){ImageError.ctor.call(this,"ImageError",th,uh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,ImageError);PlayerError=function(vh,wh){PlayerError.ctor.call(this,"PlayerError",vh,wh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,PlayerError);PlayerModeError=function(xh,yh,zh){var Ah=[{label:"Player Mode",text:((zh)?zh.getName():"")}];PlayerModeError.ctor.call(this,"PlayerModeError",xh,yh,Ah);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,PlayerModeError);SlateError=function(Bh,Ch){SlateError.ctor.call(this,"SlateError",Bh,Ch);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,SlateError);StreamError=function(Dh,Eh,Fh){var Gh=[{label:"Stream Name",text:((Fh)?Fh.getName():"")}];StreamError.ctor.call(this,"StreamError",Dh,Eh,Gh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,StreamError);StreamModeError=function(Hh,Ih,Jh){var Kh=[{label:"Stream Mode",text:((Jh)?Jh.getName():"")}];StreamModeError.ctor.call(this,"StreamModeError",Hh,Ih,Kh);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,StreamModeError);function BaseLiveNodeListener(Lh,Mh){BaseLiveNodeListener.ctor.call(this,Lh,Mh);}
xmp.DERIVE_CLASS(xmp.baseplayer.listeners.AbstractNodeListener,BaseLiveNodeListener);BaseLiveNodeListener.prototype.handleDynamicRules=function(Nh){};BaseLiveNodeListener.prototype.handleRender=function(Oh){this.getPlayer().getMediaPlayer().open(Oh);};BaseLiveNodeListener.prototype.handleOpen=function(Ph){this.getPlayer().onLiveStateChange(Ph,xmp.OPEN);};BaseLiveNodeListener.prototype.handleConnecting=function(Qh){this.getPlayer().onLiveStateChange(Qh,xmp.CONNECTING);};BaseLiveNodeListener.prototype.handleConnected=function(Rh){this.getPlayer().onLiveStateChange(Rh,xmp.CONNECTED);};BaseLiveNodeListener.prototype.handlePlay=function(Sh){this.getPlayer().onLiveStateChange(Sh,xmp.PLAY);};BaseLiveNodeListener.prototype.handlePause=function(Th){this.getPlayer().onLiveStateChange(Th,xmp.PAUSE);};BaseLiveNodeListener.prototype.handleStop=function(Uh){this.getPlayer().onLiveStateChange(Uh,xmp.STOP);};BaseLiveNodeListener.prototype.handleRewind=function(Vh){this.getPlayer().onLiveStateChange(Vh,xmp.REWIND);};BaseLiveNodeListener.prototype.handleFastForward=function(Wh){this.getPlayer().onLiveStateChange(Wh,xmp.FAST_FORWARD);};BaseLiveNodeListener.prototype.handleSeekable=function(Xh){this.getPlayer().onLiveStateChange(Xh,xmp.SEEKABLE);};BaseLiveNodeListener.prototype.handleEnded=function(Yh){this.getPlayer().onLiveStateChange(Yh,xmp.ENDED);};BaseLiveNodeListener.prototype.handleBuffering=function(Zh,$h){this.getPlayer().onLiveStateChange(Zh,xmp.BUFFERING,$h);};BaseLiveNodeListener.prototype.handleError=function(ai,e){this.getPlayer().handleError(e);};var LIVE_BILLBOARD_NODE_TYPE="Billboard";function LiveBillboardNodeListener(bi){this._logger=new xmp.util.internals.CategoryLogger('LiveBillboardNodeListener');LiveBillboardNodeListener.ctor.call(this,LIVE_BILLBOARD_NODE_TYPE,bi);}
xmp.DERIVE_CLASS(BaseLiveNodeListener,LiveBillboardNodeListener);LiveBillboardNodeListener.prototype.canUserControl=function(ci){var di=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer').getBoolean('user can control ad',false);return di;};LiveBillboardNodeListener.prototype.handleComplete=function(ei){var fi=ei.getPlayableData();ei.setURI(fi.getPlayableId());ei.setMimeTypes(fi.getMimeTypeArray());ei.setStreamingMode(xmp.AD_STREAMING_MODE);ei.setEndedFrame(xmp.LAST_FRAME);this.loadSynchUnit(ei);};LiveBillboardNodeListener.prototype.handleRender=function(gi){if(true===this.getPlayer().isOvernight()){return;}
this.getPlayer().enableModes(false);LiveBillboardNodeListener.base.handleRender.call(this,gi);};LiveBillboardNodeListener.prototype.handleFirstFrameRendered=function(hi){LiveBillboardNodeListener.base.handleFirstFrameRendered.call(this,hi);};LiveBillboardNodeListener.prototype.handleEnded=function(ii){this.getPlayer().handleBillboardEnded();};LiveBillboardNodeListener.prototype.handleError=function(ji,e){this.getPlayer().handleBillboardEnded();};LiveBillboardNodeListener.prototype.loadSynchUnit=function(ki){var li=ki.getMetaResource('synch_unit');if(!li){return;}
if(li.isError()){this._logger.warn('Error loading synch unit: '+li.getErrorMessage());return;}
var mi=li.getDataObject();if(li.getMetadata('played_synch_unit',false)){this._logger.info('NOT loading synch unit (already loaded) with tile ID: '+li.getCompanionAdId()+', url: '+mi);return;}
li.setMetadata('played_synch_unit',true);this._logger.info('Loading synch unit with tile ID: '+li.getCompanionAdId()+', url: '+mi);this._createBannerAd("banner_ad_iframe",mi);};LiveBillboardNodeListener.prototype._createBannerAd=function(ni,oi){var pi=document.getElementById(LIVE_AD);var qi='<iframe hspace="0" vspace="0" marginHeight="0" marginWidth="0" src="'+oi+'&page.allowcompete=yes&domId='+ni+'" border="0" frameBorder="0" height="0" width="0" scrolling="no"  id="'+ni+'" style="position: absolute; visibility: hidden;" ></iframe>';pi.innerHTML=qi;};var LIVE_SLATE_NODE_LISTENER="LiveSlate";function LiveSlateNodeListener(ri){LiveSlateNodeListener.ctor.call(this,LIVE_SLATE_NODE_LISTENER,ri);}
xmp.DERIVE_CLASS(BaseLiveNodeListener,LiveSlateNodeListener);LiveSlateNodeListener.prototype.handleInitialize=function(si){si.setMimeType(xmp.DHTML_MIME_TYPE);si.setEndedFrame(xmp.LAST_FRAME);};var LIVE_VIDEO_NODE_LISTENER="LiveVideo";var LIVE_VIDEO_OVERLAY_GROUP="LiveVideo";var CONNECTING_OVERLAY="Connecting";var CONNECTING_OVERLAY_IMAGE="Connecting";function LiveVideoNodeListener(ti){LiveVideoNodeListener.ctor.call(this,LIVE_VIDEO_NODE_LISTENER,ti);}
xmp.DERIVE_CLASS(BaseLiveNodeListener,LiveVideoNodeListener);LiveVideoNodeListener.prototype.handleInitialize=function(ui){var vi=ui.getPlayableData();ui.setMimeTypes(vi.getMimeTypeArray());ui.setURI(vi.getDataObject().location);ui.setStreamingMode(vi.getDataObject().streamingMode);ui.setEndedFrame(xmp.LAST_FRAME);};LiveVideoNodeListener.prototype.handleRender=function(wi){this.getPlayer().showConnectingOverlay();LiveVideoNodeListener.base.handleRender.call(this,wi);};LiveVideoNodeListener.prototype.handleFirstFrameRendered=function(xi){this.getPlayer().hideConnectingOverlay();LiveVideoNodeListener.base.handleFirstFrameRendered.call(this,xi);};LiveVideoNodeListener.prototype.handleError=function(yi,e){this.getPlayer().handleStreamError(e);};LiveVideoNodeListener.prototype.handleEnded=function(zi){this.getPlayer().handleStreamError(new StreamError("Handling stream ended.","ENDED is not a valid stream state change.",null));};var driver=null;var logListener=null;var queryArgs={};var LIVE_CONTEXT="Live";var DEBUG_QUERY_ARGUMENT="debug";function init(){var Ai='';if(location.hostname.indexOf('cnn.com')>0){Ai='cnn.com';}
if(location.hostname.indexOf('turner.com')>0){if(document.layers){Ai='turner.com:'+location.port;}else{Ai='turner.com';}}
if(Ai){document.domain=Ai;}
initAdServerCookies(Ai);initQueryArgs();driver=new LivePlayerDriver();driver.init();}
function initAdServerCookies(Bi){if(xmp.util.Cookie.canUse()){var Ci=xmp.util.Cookie.read('adDEon');if(!Ci){var Di='http://gdyn.'+Bi+'/1.1/1.gif';window.top.document.images['cookieCrumb'].src=Di;}}}
function fini(){if(logListener!==null){logListener.fini();}
driver.fini();}
function getQueryArg(Ei){var Fi=queryArgs[Ei];return((Fi)?Fi:"");};function initQueryArgs(){var Gi=window.location.search.substring(1);var Hi=Gi.split("&");for(var i=0;i<Hi.length;i++){var Ii=Hi[i].indexOf('=');if(Ii>0){var Ji=Hi[i].substring(0,Ii);var Ki=Hi[i].substring(Ii+1);queryArgs[Ji]=Ki;}}};function LivePlayerDriver(){this.player=null;this._logger=new xmp.util.internals.CategoryLogger('LivePlayerDriver');}
LivePlayerDriver.prototype.init=function(){var Li=xmp.util.SettingsManager.getInstance();if(location.hostname.indexOf('edition.') > -1){Li.init(cnnXmpPrimaryJsonObjIntl);}else{Li.init(cnnXmpPrimaryJsonObj);}var Mi=xmp.util.LogLevels.NONE;var Ni=(getQueryArg(DEBUG_QUERY_ARGUMENT)===xmp.TRUE);if(Ni){Mi=xmp.util.LogLevels.DEBUG;document.getElementById("DebugConsole").style.display=xmp.DISPLAY_BLOCK;}
logListener=new SampleXmpLogListener(Mi,[]);var Oi={services:[xmp.CONTROL_STREAM_SERVICE,xmp.IMAGE_RETRIEVER_SERVICE]};this.player=new LivePlayer(Oi,[],LIVE_CONTEXT);this.player.bootStrap();};LivePlayerDriver.prototype.fini=function(){this.player.fini();};var cnnad_tileID=cnnad_getID();var cnnad_enabled=true;function cnnad_getID(){return(new Date().getTime());}
function cnnad_renderAd(Pi){if(cnnad_enabled==true){document.write("<script type=\"text/javascript\"");document.write(" src=\""+Pi+"&tile="+cnnad_tileID+"&page.allowcompete=yes\"></scr");document.write("ipt>");}}
function cnnad_createAd(Qi,Ri,Si,Ti){document.write('<iframe hspace="0" vspace="0" marginHeight="0" marginWidth="0" src="'+Ri+'&tile='+cnnad_tileID+'&page.allowcompete=yes&domId='+Qi+'" border="0" frameBorder="0" height="0" width="0" scrolling="no"  id="'+Qi+'" style="position: absolute; visibility: hidden;" ></iframe>');}
function cnnad_writeAd(Ui,Vi){if(cnnad_enabled==true){document.write("<script id=\""+Ui+"\" type=\"text/javascript\" onload=\"cnnSendData();\"");document.write(" src=\""+Vi+"&tile="+cnnad_tileID+"\"></scr");document.write("ipt>");}}
function cnnad_showAd(Wi){if(document.getElementById(Wi)){document.getElementById(Wi).style.position='relative';document.getElementById(Wi).style.visibility='visible';}else{}}
function cnnad_setAdSize(Xi,Yi,Zi){if(document.getElementById(Xi)){document.getElementById(Xi).height=Yi;document.getElementById(Xi).width=Zi;}}
function SampleXmpLogListener($i,aj){SampleXmpLogListener.ctor.call(this,$i);var bj=xmp.util.Logger.getInstance();bj.addListener(this);bj.setCategoryFilterArray(aj);this._logAreaVisible=true;}
xmp.DERIVE_CLASS(xmp.util.AbstractLoggerListener,SampleXmpLogListener);SampleXmpLogListener.prototype.fini=function(){this.initialize();}
SampleXmpLogListener.prototype.initialize=function(){try{this.clearLogOutput();}
catch(e){alert('Error in SampleXmpLogListener.initialize:'+xmp.extractErrorMessage(e));}};SampleXmpLogListener.prototype.clearLogOutput=function(){var cj=window.document.getElementById('log_output_area');if(cj){cj.innerHTML='';}};SampleXmpLogListener.prototype.toggleLogOutput=function(){var dj=window.document.getElementById('log_output_area_scroll_clip');if(dj){this._logAreaVisible=!this._logAreaVisible;dj.style.display=this._logAreaVisible?'block':'none';}};SampleXmpLogListener.prototype.handleLogMessage=function(ej,fj,gj){try{var hj=window.document.getElementById('log_output_area');if(hj){var p=window.document.createElement("P");p.innerHTML='<span class="'+xmp.util.LogLevels.stringify(ej)+'_message">'+fj+': '+xmp.escapeHtml(gj,true,true)+'</span>';hj.appendChild(p);var ij=window.document.getElementById('log_output_area_scroll_clip');if(ij){ij.scrollTop=ij.scrollHeight;}}}
catch(e){alert('Error in SampleXmpLogListener.handleLogMessage:'+xmp.extractErrorMessage(e));}};xmp.createNamespace("CNN");CNN.LiveVideoOmnitureTriggerCommand=function(){this._logger=new xmp.util.internals.CategoryLogger('LiveVideoOmnitureTriggerCommand');};CNN.LiveVideoOmnitureTriggerCommand.prototype._getLogger=function(){return this._logger;};CNN.LiveVideoOmnitureTriggerCommand.prototype.doCommand=function(jj){switch(jj.getTriggerType()){case'start':this._doStartCommand(jj);break;default:break;}};CNN.LiveVideoOmnitureTriggerCommand.prototype._doStartCommand=function(kj){var s=this._createReportingObject(kj);if(s!==null){this._reportSpecificStartValues(kj,s);this._postReportingObject(kj,s,true,'Start');}};CNN.LiveVideoOmnitureTriggerCommand.prototype._createReportingObject=function(lj){if(typeof(xmp.getGlobalNamespace().s_gi)==='undefined'){this._getLogger().warn("Failed to create omniture report. Is live.html pointing to right s_code file?");return null;}
else{var s=xmp.getGlobalNamespace().s_gi(this._getOmnitureAccount());return s;}};CNN.LiveVideoOmnitureTriggerCommand.prototype._getOmnitureAccount=function(){return xmp.util.SettingsManager.getInstance().getContextNode().getString('omniture account','');};CNN.LiveVideoOmnitureTriggerCommand.prototype._reportSpecificStartValues=function(mj,s){var nj=this._getStreamDescription(mj);s.pageName=nj;s.eVar1=nj;s.prop11=nj;s.prop22=nj;s.eVar20=nj;s.channel="Video";s.eVar2="Video";s.server="Live Video";s.eVar3="Live Video";var d=new Date();if(typeof(xmp.getGlobalNamespace().cnnOmniTime)!='undefined'){s.prop9=xmp.getGlobalNamespace().cnnOmniTime;}
else{s.prop9=d.getTime();}
if(typeof(xmp.getGlobalNamespace().cnnCurrDay)!='undefined'){s.prop10=xmp.getGlobalNamespace().cnnCurrDay;}
else{s.prop10=d.getDay();}};CNN.LiveVideoOmnitureTriggerCommand.prototype._getStreamDescription=function(oj,s){var pj=oj.getMetadata('nodeListener',{});var qj=pj.getPlayer();var rj=qj.getActiveStream();var sj=rj.getName();return xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('omniture stream descriptions').getString(sj,'');};CNN.LiveVideoOmnitureTriggerCommand.prototype._postReportingObject=function(tj,s,uj,vj){this._dumpReportingObject(tj,s);if(uj){s.t();}
else{s.tl(xmp.getGlobalNamespace(),'o',this._getCustomTriggerPrefix()+vj);}};CNN.LiveVideoOmnitureTriggerCommand.prototype._getCustomTriggerPrefix=function(){return'CNN LIVE: ';};CNN.LiveVideoOmnitureTriggerCommand.prototype._dumpReportingObject=function(wj,s){if(this._getLogger().isDebugEnabled()){var xj='OMNITURE REPORT FOR '+wj.getTriggerType();var yj=CNN.LiveVideoOmnitureTriggerCommand.dumpObjectValues(s);var zj=['vpm_','vl_'];for(var i=0;i<yj.length;i++){var pd=yj[i];if(!(pd.t==='s'||pd.t==='n'||pd.t==='b')){continue;}
var Aj=false;for(var j=0;j<zj.length;j++){if(pd.n.indexOf(zj[j])===0){Aj=true;break;}}
if(Aj){continue;}
xj+=('\n'+pd.n+': '+pd.v);}
this._getLogger().debug(xj);}};CNN.LiveVideoOmnitureTriggerCommand.dumpObjectValues=function(Bj){if(!Bj){return[];}
var Cj=[];var Dj='';for(Dj in Bj)if(Bj.hasOwnProperty(Dj)){Cj.push(Dj);}
Cj.sort();var Ej=[];for(var i=0;i<Cj.length;i++){var pd={t:'',n:Cj[i],v:''};var pv=Bj[pd.n];pd.t=(typeof(pv)).charAt(0);if(!(pd.t==='o'||pd.t==='f'||pd.t==='u')){pd.v=pv.toString();}
Ej.push(pd);}
return Ej;};CNN.LiveVideoCookieTriggerCommand=function(){this._logger=new xmp.util.internals.CategoryLogger('LiveVideoCookieTriggerCommand');};CNN.LiveVideoCookieTriggerCommand.prototype._getLogger=function(){return this._logger;};CNN.LiveVideoCookieTriggerCommand.prototype.doCommand=function(Fj){switch(Fj.getTriggerType()){case'start':this._doStartCommand(Fj);break;default:break;}};CNN.LiveVideoCookieTriggerCommand.prototype._doStartCommand=function(Gj){var Hj=false;if(location.hostname.indexOf('turner.com')>0){Hj=true;}
if(!Hj){this._getLogger().debug('Setting breadcrumb cookie');var Ij='';var Jj=escape(Gj.getPlayableNode().getPlayableData().getDataObject().headline);var Kj=Math.ceil(Math.random()*1000000000);Ij+='http://secure-us.imrworldwide.com/cgi-bin/m?ci=us-100120';Ij+='&tl=dav0-'+Jj;Ij+='&c6=vc,b01';Ij+='&cc=1';Ij+='&rnd='+Kj;document.images['cookieCrumb'].src=Ij;}};MAX_MODE_PLAYER_STATE="Max";MAX_MODE="Max";SWITCH_TO_MAX_OPERATION="switchToMax";MAX_MODE_WINDOW_WIDTH=668;MAX_MODE_WINDOW_HEIGHT=533;MAX_MODE_PLAYER_WIDTH="464px";MAX_MODE_PLAYER_HEIGHT="260px";MAX_MODE_CONTROLS_WIDTH="462px";MAX_MODE_CONNECTING_SLATE="Connecting";var MAX_MODE_OVERNIGHT_SLATE_CONTAINER_CLASS="cnnLiveFullBox";MaxPlayerMode=function(){MaxPlayerMode.ctor.call(this,MAX_MODE,MAX_MODE_PLAYER_STATE,[MINI_MODE,VIDEO_ONLY_MODE],true);};xmp.DERIVE_CLASS(DefaultPlayerMode,MaxPlayerMode);MaxPlayerMode.prototype.transition=function(Lj,Mj,Nj){this.switchToMax(Lj);if(Nj&&Nj.getType()!==NULL_MODE){var Oj=((Lj.getInfoAreaType().length>0)?"":NOW_PLAYING_INFO);Lj.showInfoArea(Oj);}
MaxPlayerMode.base.transition.call(this,Lj,Mj,Nj);};MaxPlayerMode.prototype.switchToMax=function(Pj){try{document.getElementById(LIVE_HEADER_IMAGE).innerHTML="<img src='"+Pj.getImage(LIVE_HEADER_PREFIX+this.getType())+"'>";this.show([LIVE_RIGHT_INSIDE,LIVE_BUTTONS_SLIDER,LIVE_INSIDE_BOX_FOOT_CORNERS,LIVE_OUTSIDE_BOX_FOOTER,LIVE_HELP]);this.setClass([{name:LIVE_CONTAINER,value:LIVE_CONTAINER_CLASS},{name:LIVE_CONTENT_CONTAINER,value:LIVE_CONTENT_CONTAINER_CLASS},{name:LIVE_INSIDE_BOX_TOP_CORNERS,value:LIVE_INSIDE_BOX_TOP_CORNERS_CLASS},{name:LIVE_INSIDE_CONTAINER,value:LIVE_INSIDE_CONTAINER_CLASS},{name:LIVE_LEFT_INSIDE,value:LIVE_LEFT_INSIDE_CLASS},{name:LIVE_INSIDE_CONTENT,value:LIVE_INSIDE_CONTENT_CLASS}]);var Qj=[{name:VIDEO_ONLY_MODE,image:VIDEO_ONLY_MODE,action:"player.switchMode(VIDEO_ONLY_MODE, true);"},{name:MINI_MODE,image:MINI_MODE,action:"player.switchMode(MINI_MODE, true);"},{name:xmp.FULLSCREEN,image:xmp.FULLSCREEN,action:"player.commandFullscreen();"}];this.initModeCommands(Pj,Qj);document.getElementById(LIVE_CONTROLS).style.width=MAX_MODE_CONTROLS_WIDTH;document.getElementById(LIVE_LEFT_INSIDE).style.width=MAX_MODE_PLAYER_WIDTH;this.setPlayerSize(Pj,MAX_MODE_PLAYER_WIDTH,MAX_MODE_PLAYER_HEIGHT);}
catch(e){this.handleError(Pj,SWITCH_TO_MAX_OPERATION,e);}};MaxPlayerMode.prototype.onPlayerBillboardEnded=function(Rj){Rj.showInfoArea(NOW_PLAYING_INFO);};MaxPlayerMode.prototype.onPlayerOvernight=function(Sj){if(Sj.getInfoAreaType()===NOW_PLAYING_INFO){Sj.showInfoArea(NOW_PLAYING_INFO);}};MaxPlayerMode.prototype.getOvernightSlate=function(Tj){return{containerClass:MAX_MODE_OVERNIGHT_SLATE_CONTAINER_CLASS,html:"<div class='hdr' style='padding-top:180px;'>Live Video News is currently unavailable.</div>In the meantime, Check out an <a href='{On Demand Video}' target='ondemand'>on-demand video</a>."};};MaxPlayerMode.prototype.getConnectingSlate=function(Uj){return MAX_MODE_CONNECTING_SLATE;};MaxPlayerMode.prototype.getWindowSize=function(Vj){return{width:MAX_MODE_WINDOW_WIDTH,height:MAX_MODE_WINDOW_HEIGHT};};MINI_MODE_PLAYER_STATE="Mini";MINI_MODE="Mini";SWITCH_TO_MINI_OPERATION="switchToMini";MINI_MODE_WINDOW_WIDTH=243;MINI_MODE_WINDOW_HEIGHT=213;MINI_MODE_PLAYER_WIDTH="233px";MINI_MODE_PLAYER_HEIGHT="130px";MINI_MODE_CONTROLS_WIDTH="230px";MINI_MODE_CONNECTING_SLATE="ConnectingMini";var MINI_MODE_OVERNIGHT_SLATE_CONTAINER_CLASS="cnnLiveFullBoxMini";MiniPlayerMode=function(){MiniPlayerMode.ctor.call(this,MINI_MODE,MINI_MODE_PLAYER_STATE,[MAX_MODE,VIDEO_ONLY_MODE],false);};xmp.DERIVE_CLASS(DefaultPlayerMode,MiniPlayerMode);MiniPlayerMode.prototype.transition=function(Wj,Xj,Yj){this.switchToMini(Wj);MiniPlayerMode.base.transition.call(this,Wj,Xj,Yj);};MiniPlayerMode.prototype.switchToMini=function(Zj){try{document.getElementById(LIVE_HEADER_IMAGE).innerHTML="<img src='"+Zj.getImage(LIVE_HEADER_PREFIX+this.getType())+"'>";Zj.hideInfoArea();this.hide([LIVE_RIGHT_INSIDE,LIVE_BUTTONS_SLIDER,LIVE_INSIDE_BOX_FOOT_CORNERS,LIVE_OUTSIDE_BOX_FOOTER,LIVE_HELP]);var $j=[{name:MAX_MODE,image:FULL_PLAYER,action:"player.switchMode(MAX_MODE, true);"},{name:VIDEO_ONLY_MODE,image:BIGGER,action:"player.switchMode(VIDEO_ONLY_MODE, true);"},{name:xmp.FULLSCREEN,image:FULLSCREEN_SHORT,action:"player.commandFullscreen();"}];this.initModeCommands(Zj,$j);this.clearClass([LIVE_CONTENT_CONTAINER,LIVE_INSIDE_BOX_TOP_CORNERS,LIVE_INSIDE_CONTAINER,LIVE_LEFT_INSIDE]);this.setClass([{name:LIVE_CONTAINER,value:LIVE_CONTAINER_MINI_CLASS},{name:LIVE_INSIDE_CONTENT,value:LIVE_INSIDE_CONTENT_MINI_CLASS}]);document.getElementById(LIVE_CONTROLS).style.width=MINI_MODE_CONTROLS_WIDTH;document.getElementById(LIVE_LEFT_INSIDE).style.width=MINI_MODE_PLAYER_WIDTH;this.setPlayerSize(Zj,MINI_MODE_PLAYER_WIDTH,MINI_MODE_PLAYER_HEIGHT);}
catch(e){this.handleError(Zj,SWITCH_TO_MINI_OPERATION,e);}};MiniPlayerMode.prototype.getOvernightSlate=function(ak){return{containerClass:MINI_MODE_OVERNIGHT_SLATE_CONTAINER_CLASS,html:"<div class='cnnLiveMsg' style='font-weight:normal;'><div style='padding-top:60px;'>Live Video News is currently unavailable.</div><div>In the meantime, Check out an <a href='{On Demand Video}' target='ondemand'>on-demand video</a></div></div>"};};MiniPlayerMode.prototype.getConnectingSlate=function(bk){return MINI_MODE_CONNECTING_SLATE;};MiniPlayerMode.prototype.getWindowSize=function(ck){return{width:MINI_MODE_WINDOW_WIDTH,height:MINI_MODE_WINDOW_HEIGHT};};NULL_MODE_PLAYER_STATE="Null";NULL_MODE="NullMode";NullPlayerMode=function(){NullPlayerMode.ctor.call(this,NULL_MODE,NULL_MODE_PLAYER_STATE,[MAX_MODE,MINI_MODE,VIDEO_ONLY_MODE],false);};xmp.DERIVE_CLASS(DefaultPlayerMode,NullPlayerMode);VIDEO_ONLY_MODE_PLAYER_STATE="VideoOnly";VIDEO_ONLY_MODE="VideoOnly";SWITCH_TO_VIDEO_ONLY_OPERATION="switchToVideoOnly";VIDEO_ONLY_MODE_WINDOW_WIDTH=475;VIDEO_ONLY_MODE_WINDOW_HEIGHT=345;VIDEO_ONLY_MODE_PLAYER_WIDTH="464px";VIDEO_ONLY_MODE_PLAYER_HEIGHT="260px";VIDEO_ONLY_MODE_CONTROLS_WIDTH="462px";VIDEO_ONLY_MODE_CONNECTING_SLATE="Connecting";var VIDEO_ONLY_OVERNIGHT_SLATE_CONTAINER_CLASS="cnnLiveFullBoxVideoOnly";VideoOnlyPlayerMode=function(){VideoOnlyPlayerMode.ctor.call(this,VIDEO_ONLY_MODE,VIDEO_ONLY_MODE_PLAYER_STATE,[MAX_MODE,MINI_MODE],true);};xmp.DERIVE_CLASS(DefaultPlayerMode,VideoOnlyPlayerMode);VideoOnlyPlayerMode.prototype.transition=function(dk,ek,fk){this.switchToVideoOnly(dk);VideoOnlyPlayerMode.base.transition.call(this,dk,ek,fk);};VideoOnlyPlayerMode.prototype.switchToVideoOnly=function(gk){try{document.getElementById(LIVE_HEADER_IMAGE).innerHTML="<img src='"+gk.getImage(LIVE_HEADER_PREFIX+this.getType())+"'>";gk.hideInfoArea();this.show([LIVE_BUTTONS_SLIDER]);var hk=[{name:MAX_MODE,image:FULL_PLAYER,action:"player.switchMode(MAX_MODE, true);"},{name:MINI_MODE,image:MINI_MODE,action:"player.switchMode(MINI_MODE, true);"},{name:xmp.FULLSCREEN,image:xmp.FULLSCREEN,action:"player.commandFullscreen();"}];this.initModeCommands(gk,hk);this.hide([LIVE_RIGHT_INSIDE,LIVE_INSIDE_BOX_FOOT_CORNERS,LIVE_OUTSIDE_BOX_FOOTER,LIVE_HELP]);this.clearClass([LIVE_CONTENT_CONTAINER,LIVE_INSIDE_BOX_TOP_CORNERS,LIVE_INSIDE_CONTAINER,LIVE_LEFT_INSIDE]);this.setClass([{name:LIVE_CONTAINER,value:LIVE_CONTAINER_VIDEO_ONLY_CLASS},{name:LIVE_INSIDE_CONTENT,value:LIVE_INSIDE_CONTENT_VIDEO_ONLY_CLASS}]);document.getElementById(LIVE_CONTROLS).style.width=VIDEO_ONLY_MODE_CONTROLS_WIDTH;document.getElementById(LIVE_LEFT_INSIDE).style.width=VIDEO_ONLY_MODE_PLAYER_WIDTH;this.setPlayerSize(gk,VIDEO_ONLY_MODE_PLAYER_WIDTH,VIDEO_ONLY_MODE_PLAYER_HEIGHT);}
catch(e){this.handleError(gk,SWITCH_TO_VIDEO_ONLY_OPERATION,e);}};VideoOnlyPlayerMode.prototype.getOvernightSlate=function(ik){return{containerClass:VIDEO_ONLY_OVERNIGHT_SLATE_CONTAINER_CLASS,html:"<div class='cnnLiveVOMsg'><div style='padding-top:134px;font-size:14px;'>Live Video News is currently unavailable.</div><div style='font-size:14px;'>In the meantime, Check out an <a href='{On Demand Video}' target='ondemand'>on-demand video</a></div></div>"};};VideoOnlyPlayerMode.prototype.getConnectingSlate=function(jk){return VIDEO_ONLY_MODE_CONNECTING_SLATE;};VideoOnlyPlayerMode.prototype.getWindowSize=function(kk){return{width:VIDEO_ONLY_MODE_WINDOW_WIDTH,height:VIDEO_ONLY_MODE_WINDOW_HEIGHT};};function slider(lk){var mk=lk.min;var nk=lk.max;var ok=lk.value;var pk=lk.track;var qk=lk.onslide;var rk=lk.onchange;var pk=document.getElementById(lk.track);var sk=document.getElementById(lk.thumb);var tk;var uk;var vk;var wk;var xk;var yk;var zk=nk-mk;this.init=function(){tk=findPos(pk)[0];sk.style.position='absolute';sk.style.left='0px';wk=findPos(sk)[0];vk=pk.clientWidth-sk.clientWidth;uk=sk.clientWidth/2;yk=pk.clientWidth-uk;xk=tk-wk;sk.style.left=xk+'px';if(ok!=null)this.setValue(ok);}
this.fini=function(){removeEvent(sk,"mousedown",function(e){attachMouseUp();document.onmousemove=mouseMove;});removeEvent(sk,"mouseup",function(e){rk(ok);});removeEvent(pk,"mousedown",function(e){trackClicked(e);});}
function trackClicked(e){e=e||window.event;setHandle(e.clientX-tk);attachMouseUp();document.onmousemove=mouseMove;}
function mouseMove(e){e=e||window.event;setHandle(e.clientX-tk);qk(ok);}
function setHandle(Ak){if(Ak>=uk&&Ak<=yk){sk.style.left=(Ak-uk+xk)+"px";ok=(zk*(Ak-uk)/vk)+mk;}else if(Ak<uk){sk.style.left=xk+"px";ok=mk;}else if(Ak>vk){sk.style.left=(vk+xk)+"px";ok=nk;}}
this.setValue=function(Bk){if(Bk>=mk&&Bk<=nk)ok=Bk;else if(Bk<mk)ok=mk;else if(Bk>nk)ok=nk;sk.style.left=xk+(((ok-mk)/zk)*vk)+"px";}
this.getValue=function(){return ok;}
function attachMouseUp(){attachEvent(document,"mouseup",function(){rk(ok);document.onmousemove=null;});}
function findPos(Ck){var Dk=curtop=0;if(Ck.offsetParent){Dk=Ck.offsetLeft;curtop=Ck.offsetTop;while(Ck=Ck.offsetParent){Dk+=Ck.offsetLeft;curtop+=Ck.offsetTop;}}
return[Dk,curtop];}
function attachEvent(Ek,Fk,Gk){if(Ek.attachEvent){Ek.attachEvent('on'+Fk,Gk);}
else{Ek.addEventListener(Fk,Gk,false);}}
function removeEvent(Hk,Ik,Jk){if(Hk.attachEvent){Hk.detachEvent('on'+Ik,Jk);}
else{Hk.removeEventListener(Ik,Jk,false);}}
this.init();attachEvent(sk,"mousedown",function(e){attachMouseUp();document.onmousemove=mouseMove;});attachEvent(sk,"mouseup",function(e){rk(ok);});attachEvent(pk,"mousedown",function(e){trackClicked(e);});}
AVAILABLE_STREAM_STATE="Available";AVAILABLE="Available";AVAILABLE_OPERATION="Available";AvailableStreamMode=function(){AvailableStreamMode.ctor.call(this,AVAILABLE,AVAILABLE_STREAM_STATE,[OPEN,CLOSE,xmp.ENDED,CAPACITY_MAX,OVERNIGHT,GEO_BLOCKING,xmp.ERRORS]);};xmp.DERIVE_CLASS(DefaultStreamMode,AvailableStreamMode);AvailableStreamMode.prototype.transition=function(Kk,Lk,Mk){this.available(Kk);};AvailableStreamMode.prototype.available=function(Nk){try{Nk.handleAvailable();}
catch(e){this.handleError(Nk,AVAILABLE_OPERATION,e);}};CAPACITY_MAX_STREAM_STATE="CapacityMax";CAPACITY_MAX="CapacityMax";CAPACITY_MAX_OPERATION="CapacityReached";CapacityMaxStreamMode=function(){CapacityMaxStreamMode.ctor.call(this,CAPACITY_MAX,CAPACITY_MAX_STREAM_STATE,[CLOSE,xmp.ENDED,AVAILABLE,OVERNIGHT,xmp.ERRORS]);};xmp.DERIVE_CLASS(DefaultStreamMode,CapacityMaxStreamMode);CapacityMaxStreamMode.prototype.transition=function(Ok,Pk,Qk){this.capacityReached(Ok);};CapacityMaxStreamMode.prototype.capacityReached=function(Rk){try{Rk.handleCapacityReached();}
catch(e){this.handleError(Rk,CAPACITY_MAX_OPERATION,e);}};CLOSE_STREAM_STATE="Close";CLOSE="Close";CloseStreamMode=function(){CloseStreamMode.ctor.call(this,CLOSE,CLOSE_STREAM_STATE,[OPEN,xmp.ENDED,CAPACITY_MAX,OVERNIGHT,xmp.ERRORS]);};xmp.DERIVE_CLASS(DefaultStreamMode,CloseStreamMode);CloseStreamMode.prototype.transition=function(Sk,Tk,Uk){this.close(Sk);};CloseStreamMode.prototype.close=function(Vk){try{Vk.handleClose();}
catch(e){this.handleError(Vk,xmp.CLOSE_OPERATION,e);}};DAYTIME_STREAM_STATE="Daytime";DAYTIME="Daytime";DAYTIME_OPERATION="Daytime";DaytimeStreamMode=function(){DaytimeStreamMode.ctor.call(this,DAYTIME,DAYTIME_STREAM_STATE,[OPEN,CLOSE,xmp.ENDED,GEO_BLOCKING,xmp.ERRORS,AVAILABLE,CAPACITY_MAX,OVERNIGHT]);};xmp.DERIVE_CLASS(DefaultStreamMode,DaytimeStreamMode);DaytimeStreamMode.prototype.transition=function(Wk,Xk,Yk){this.daytime(Wk);};DaytimeStreamMode.prototype.daytime=function(Zk){try{Zk.handleDaytime();}
catch(e){this.handleError(Zk,DAYTIME_OPERATION,e);}};ENDED_STREAM_STATE="Ended";EndedStreamMode=function(){EndedStreamMode.ctor.call(this,xmp.ENDED,ENDED_STREAM_STATE,[CLOSE,AVAILABLE,CAPACITY_MAX,OVERNIGHT,GEO_BLOCKING,xmp.ERRORS]);};xmp.DERIVE_CLASS(DefaultStreamMode,EndedStreamMode);EndedStreamMode.prototype.transition=function($k,al,bl){$k.hidePreviewUI();if(false===$k.isPlaying()){return;}
this.ended($k);};EndedStreamMode.prototype.ended=function(cl){try{cl.handleEnded();}
catch(e){this.handleError(cl,xmp.ENDED_OPERATION,e);}};ERROR_STREAM_STATE="Error";ErrorStreamMode=function(){ErrorStreamMode.ctor.call(this,xmp.ERRORS,ERROR_STREAM_STATE,[OPEN,CLOSE,xmp.ENDED,CAPACITY_MAX,OVERNIGHT]);};xmp.DERIVE_CLASS(DefaultStreamMode,ErrorStreamMode);ErrorStreamMode.prototype.transition=function(dl,el,fl){this.error(dl,el);};ErrorStreamMode.prototype.error=function(gl,e){try{gl.handleError(e);}
catch(e){this.handleError(gl,xmp.ERROR_OPERATION,e);}};GEO_BLOCKING_STREAM_STATE="GeoBlocking";GEO_BLOCKING="GeoBlocking";GEO_BLOCKING_OPERATION="Block";GeoBlockingStreamMode=function(){GeoBlockingStreamMode.ctor.call(this,GEO_BLOCKING,GEO_BLOCKING_STREAM_STATE,[xmp.ERRORS]);};xmp.DERIVE_CLASS(DefaultStreamMode,GeoBlockingStreamMode);GeoBlockingStreamMode.prototype.transition=function(hl,il,jl){this.block(hl);};GeoBlockingStreamMode.prototype.block=function(kl){try{kl.handleBlock();}
catch(e){this.handleError(kl,GEO_BLOCKING_OPERATION,e);}};NULL_STREAM_STATE="Null";NULL="Null";NullStreamMode=function(){NullStreamMode.ctor.call(this,NULL,NULL_STREAM_STATE,[xmp.ENDED,xmp.ERRORS,AVAILABLE,OVERNIGHT,GEO_BLOCKING]);};xmp.DERIVE_CLASS(DefaultStreamMode,NullStreamMode);NullStreamMode.prototype.isNull=function(){return true;};OPEN_STREAM_STATE="Open";OPEN="Open";OpenStreamMode=function(){OpenStreamMode.ctor.call(this,OPEN,OPEN_STREAM_STATE,[CLOSE,xmp.ERRORS,xmp.ENDED,CAPACITY_MAX,OVERNIGHT]);};xmp.DERIVE_CLASS(DefaultStreamMode,OpenStreamMode);OpenStreamMode.prototype.transition=function(ll,ml,nl){this.open(ll);};OpenStreamMode.prototype.open=function(ol){try{ol.handleOpen();}
catch(e){this.handleError(ol,xmp.OPEN_OPERATION,e);}};OpenStreamMode.prototype.setData=function(pl,ql){OpenStreamMode.base.setData.call(this,pl,ql);pl.updateMainUI();};OVERNIGHT_STREAM_STATE="Overnight";OVERNIGHT="Overnight";OVERNIGHT_OPERATION="Overnight";OvernightStreamMode=function(){OvernightStreamMode.ctor.call(this,OVERNIGHT,OVERNIGHT_STREAM_STATE,[DAYTIME,GEO_BLOCKING,xmp.ERRORS]);};xmp.DERIVE_CLASS(DefaultStreamMode,OvernightStreamMode);OvernightStreamMode.prototype.transition=function(rl,sl,ul){this.overnight(rl);};OvernightStreamMode.prototype.overnight=function(vl){try{vl.handleOvernight();}
catch(e){this.handleError(vl,OVERNIGHT_OPERATION,e);}};var AD_NODE_LISTENER="Ad";function AdNodeListener(wl){AdNodeListener.ctor.call(this,AD_NODE_LISTENER,wl,true);this._logger=new xmp.util.internals.CategoryLogger('AdNodeListener');this.PreRollFound=false;}
xmp.DERIVE_CLASS(BaseNodeListener,AdNodeListener);AdNodeListener.prototype.canUserControl=function(xl){var yl=xmp.util.SettingsManager.getInstance().getContextNode().getNodeForPath('BasePlayer').getBoolean('user can control ad',false);return yl;};AdNodeListener.prototype.handleInitialize=function(zl){};AdNodeListener.prototype.handleComplete=function(Al){var Bl=Al.getPlayableData();var Cl=Bl.getMimeTypeArray()[0];var Dl=".flv";if(Cl==='video/x-ms-wmv'){Dl=".wmv";}
var El=Bl.getPlayableId()+Dl;Al.setURI(this.getPlayer().getAbsoluteURI(El,'adVideo'));Al.setMimeTypes([Cl]);Al.setStreamingMode(xmp.AD_STREAMING_MODE);Al.setEndedFrame(xmp.LAST_FRAME);this.loadSynchUnit(Al);};AdNodeListener.prototype.handleRender=function(Fl){var Gl=Fl.getMetaResource('primary');if(Gl!==null){this._logger.info('Playing ad with tile ID: '+Gl.getCompanionAdId());}
AdNodeListener.base.handleRender.call(this,Fl);};AdNodeListener.prototype.handleDynamicRules=function(Hl){var Il=Hl.getNodeTypeId();if((Il==='PreRoll')&&!this.PreRollFound){this.PreRollFound=true;if(CNNRules.DontPlayRule.isActive()){var Jl=null;this.getPlayer().registerRuleClass("DontPlayRule","CNNRules.DontPlayRule");Jl=xmp.playlistapi.RuleContext.createDynamic("DontPlayRule",null);Hl.addRule(Jl);}}};AdNodeListener.prototype.handleOverrideAdResources=function(Kl,Ll){var Ml=Ll.expandString('${player.context_name}');var Nl=Kl.getNodeTypeId();if(Ml.indexOf('Mosaic')!==-1){if(Nl==='PreRoll'){Ll.getResource('primary').setId('/world/intg_story/video.preroll_lg.ad');Ll.getResource('synch_unit').setId('/world/intg_story/video.336x280_sync.ad');}}};var END_OVERLAY_NODE_LISTENER="EndOverlay";var END_OVERLAY_OPTIONS_GROUP="End";var END_REPLAY_OVERLAY="EndReplay";var END_EMAIL_OVERLAY="EndEmail";var END_RELATED_OVERLAY="EndRelated";var END_REPLAY_IMAGE_SRC="replay.jpg";var END_EMAIL_IMAGE_SRC="email.jpg";function EndOverlayNodeListener(Ol){EndOverlayNodeListener.ctor.call(this,END_OVERLAY_NODE_LISTENER,Ol);}
xmp.DERIVE_CLASS(OverlayNodeListener,EndOverlayNodeListener);EndOverlayNodeListener.prototype.createOverlays=function(){if(this.getPlayer().getMediaPlayer().getViewport().getOverlay(END_REPLAY_OVERLAY)==null){this.createOverlay(END_REPLAY_OVERLAY,{left:"160px",top:"100px",width:"132px",height:"67px"},"<img style='cursor: pointer' src='"+END_REPLAY_IMAGE_SRC+"' width='132' "+"height='67' onclick='findPlayer(\""+this.getPlayer().getId()+"\").replay()' />");}
if(this.getPlayer().getMediaPlayer().getViewport().getOverlay(END_EMAIL_OVERLAY)==null){this.createOverlay(END_EMAIL_OVERLAY,{left:"330px",top:"100px",width:"132px",height:"67px"},"<img style='cursor: pointer' src='"+END_EMAIL_IMAGE_SRC+"' width='132' "+" height='67' onclick='findPlayer(\""+this.getPlayer().getId()+"\").email()' />");}
if(this.getPlayer().getMediaPlayer().getViewport().getOverlay(END_RELATED_OVERLAY)==null){this.createOverlay(END_RELATED_OVERLAY,{left:"10px",top:"230px",width:"132px",height:"67px"},"");}};EndOverlayNodeListener.prototype.createOverlay=function(Pl,Ql,Rl){var Sl=this.getPlayer().getMediaPlayer().getViewport().createOverlay(END_OVERLAY_OPTIONS_GROUP,Pl);Sl.moveTo(Ql.left,Ql.top,Ql.width,Ql.height);Sl.setHTML(Rl);};EndOverlayNodeListener.prototype.render=function(Tl){var Ul="&nbsp;&nbsp;<table style='background-color: #000000; width: 555px; "+"margin-top: 5px;margin-left: 5px'><tr><td width='60'>"+"<img style='cursor: pointer' src='related_1.jpg' width='58' height='42' onclick='findPlayer(\""+this.getPlayer().getId()+"\").openRelated(0)' /></td>"+"<td width='120' valign='center' align='left' style='color: #6495ED; font-size: 8pt; "+"font-family: arial'><span>Australian wheat<br>scandal<br><span style='color: #FFFFFF'>2:34</span>"+"</span></td><td width='60'><img style='cursor: pointer' src='related_2.jpg' width='58' height='42' "+"onclick='findPlayer(\""+this.getPlayer().getId()+"\").openRelated(1)' /></td><td width='120' valign='center' align='left' "+"style='color: #6495ED; font-size: 8pt; font-family: arial'>"+"<span>Deadly sectarian<br>violence in Iraq<br><span style='color: #FFFFFF'>4:32</span></span></td>"+"<td width='60'><img style='cursor: pointer' src='related_3.jpg' width='58' height='42' onclick='findPlayer(\""+this.getPlayer().getId()+"\").openRelated(2)' />"+"</td><td valign='top' align='left' style='color: #6495ED; font-size: 8pt; font-family: arial'>"+"<span>Runner fails gender<br>test<br><span style='color: #FFFFFF'>1:42</span></span></td></tr></table>";this.getPlayer().getMediaPlayer().getViewport().getOverlay(END_RELATED_OVERLAY).setHTML(Ul);this.getPlayer().getMediaPlayer().getViewport().showOverlays(END_OVERLAY_OPTIONS_GROUP);};EndOverlayNodeListener.prototype.handleComplete=function(Vl){this.createOverlays();};var IMAGE_NODE_LISTENER="Image";function ImageNodeListener(Wl){ImageNodeListener.ctor.call(this,IMAGE_NODE_LISTENER,Wl,true);}
xmp.DERIVE_CLASS(BaseNodeListener,ImageNodeListener);ImageNodeListener.prototype.handleInitialize=function(Xl){var Yl=this._getImageRelativeURL('vs');Yl='/image_3.jpg';Xl.setURI(this.getPlayer().getAbsoluteURI(Yl,'videoImage'));Xl.setMimeType("image/jpg");Xl.setEndedFrame(xmp.LAST_FRAME);};ImageNodeListener.prototype._getImageRelativeURL=function(Zl){var $l=this._findContentNode();if($l!==null){var am=$l.getPlayableData().getDataObject().images;if(typeof am==='object'){for(var i=0;i<am.length;i++){var bm=am[i];if(bm.type===Zl){return bm.resource;}}}}
return"/some_default_image.jpg";};ImageNodeListener.prototype._findContentNode=function(){var cm=this.getPlayer().getLookAheadNodeArray();for(var i=0;i<cm.length;i++){var dm=cm[i];if(dm.isContentType()){return dm;}}
return null;};ImageNodeListener.prototype.handleComplete=function(em){};ImageNodeListener.prototype.handlePlay=function(fm){ImageNodeListener.base.handlePlay.call(this,fm);};var START_SLATE_NODE_LISTENER="LowBandwidth";var IMAGE="image";function LowBandwidthNodeListener(gm){LowBandwidthNodeListener.ctor.call(this,START_SLATE_NODE_LISTENER,gm);}
xmp.DERIVE_CLASS(SlateNodeListener,LowBandwidthNodeListener);LowBandwidthNodeListener.prototype.handleInitialize=function(hm){hm.setMimeType(xmp.DHTML_MIME_TYPE);hm.setEndedFrame(xmp.LAST_FRAME);};var NEXTUP_SLATE_NODE_LISTENER="NextUpSlate";var HEADLINE="headline";function NextUpSlateNodeListener(im){NextUpSlateNodeListener.ctor.call(this,NEXTUP_SLATE_NODE_LISTENER,im);}
xmp.DERIVE_CLASS(SlateNodeListener,NextUpSlateNodeListener);NextUpSlateNodeListener.prototype.handleComplete=function(jm){NextUpSlateNodeListener.base.handleComplete.call(this,jm);jm.setMetadata(HEADLINE,this._findNextContentNode().getPlayableData().getDataObject().headline);};var PROMO_NODE_LISTENER="Promo";function PromoNodeListener(km){PromoNodeListener.ctor.call(this,PROMO_NODE_LISTENER,km,false);}
xmp.DERIVE_CLASS(BaseNodeListener,PromoNodeListener);PromoNodeListener.prototype.handleComplete=function(lm){var mm=lm.getPlayableData();lm.setMimeTypes(mm.getMimeTypeArray());lm.setSizes(mm.getDataObject().sizes);lm.setURI(mm.getDataObject().location);lm.setStreamingMode(mm.getDataObject().streamingMode);lm.setEndedFrame(xmp.LAST_FRAME);};PromoNodeListener.prototype.handleError=function(nm,e){if(e instanceof xmp.util.LoadableDataException){alert('PromoNodeListener: Failed to load promo video:\n'+xmp.extractErrorMessage(e));}
PromoNodeListener.base.handleError.call(this,nm,e);};var START_SLATE_NODE_LISTENER="StartSlate";var IMAGE="image";function StartSlateNodeListener(om){StartSlateNodeListener.ctor.call(this,START_SLATE_NODE_LISTENER,om);}
xmp.DERIVE_CLASS(SlateNodeListener,StartSlateNodeListener);StartSlateNodeListener.prototype.handleComplete=function(pm){StartSlateNodeListener.base.handleComplete.call(this,pm);var qm=this._findNextContentNode().getPlayableData().getDataObject().images;var rm=qm.length;var sm=[];var tm={};for(var i=0;i<rm;i++){sm.push(qm[i].id);tm[qm[i].id]=qm[i].resource;}
pm.setMetadata(IMAGE,tm[xmp.PlayerPolicy.getSizeFromPlayer(sm)]);this.loadSynchUnit(pm);};StartSlateNodeListener.prototype.handleOverrideAdResources=function(um,vm){var wm=this.getPlayer().getLookAheadNodeArray();for(var i=0;i<wm.length;i++){var xm=wm[i];if(xm.getNodeTypeName()==='PreRoll'){vm.copyMetaResourceBundleRefFrom(xm);break;}}};var VIDEO_NODE_LISTENER="Video";function VideoNodeListener(ym){VideoNodeListener.ctor.call(this,VIDEO_NODE_LISTENER,ym,false);}
xmp.DERIVE_CLASS(BaseNodeListener,VideoNodeListener);VideoNodeListener.prototype.handleInitialize=function(zm){var Am=zm.getPlayableData();zm.setMimeTypes(Am.getMimeTypeArray());zm.setSizes(Am.getDataObject().sizes);zm.setURI(Am.getDataObject().location);zm.setStreamingMode(Am.getDataObject().streamingMode);zm.setEndedFrame(xmp.LAST_FRAME);};VideoNodeListener.prototype.handleComplete=function(Bm){};VideoNodeListener.prototype.handleError=function(Cm,e){if(e instanceof xmp.util.LoadableDataException){alert('VideoNodeListener: Failed to load content video:\n'+xmp.extractErrorMessage(e));}
VideoNodeListener.base.handleError.call(this,Cm,e);};

