// Turner XMP, Release Build, © 2007 Turner Broadcasting System, Inc. A Time Warner Company.  Version: 0.1.633.2120
// xmp_util, xmp_util_0_1_633_2120.js
xmp.createNamespace("xmp.util.internals");xmp.util.internals.XMPError=function(aa,ba,ca,da){xmp.util.internals.XMPError.ctor.call(this);this.name=aa;this.context=ba;this.rawMessage=ca;this.extendedInfo=da;this.innerError=null;this.setMessage();};xmp.DERIVE_CLASS(Error,xmp.util.internals.XMPError);xmp.util.internals.XMPError.prototype.setInnerError=function(e){this.innerError=e;this.setMessage();};xmp.util.internals.XMPError.prototype.setMessage=function(){this.message="Error Type:  "+this.name+((this.context)?"\n\nOccured While:  "+this.context:"")+((this.innerError)?"\n\nInner/Nested Error Type:  "+this.innerError.name:"")+"\n\nError Text:  "+this.rawMessage;var i=0;var ea=0;if(this.extendedInfo){ea=this.extendedInfo.length;for(i=0;i<ea;i++){this.message+="\n\n"+this.extendedInfo[i].label+":  "+this.extendedInfo[i].text;}}
if(this.innerError&&this.innerError.extendedInfo){ea=this.innerError.extendedInfo.length;for(i=0;i<ea;i++){this.message+="\n\n"+this.innerError.extendedInfo[i].label+":  "+this.innerError.extendedInfo[i].text;}}
var fa=((this.innerError)?this.innerError:this);if(fa.number){this.message+="\n\nError Number:  "+fa.number;}
if(fa.lineNumber){this.message+="\n\nLine Number:  "+fa.lineNumber;}
if(fa.fileName){this.message+="\n\nFile Name:  "+fa.fileName;}
if(fa.stack){this.message+="\n\nStack Trace:\n\n"+fa.stack;}};xmp.util.internals.XMPError.prototype.addExtendedInfo=function(ga){if(!this.extendedInfo){this.extendedInfo=[];}
this.extendedInfo.push(ga);this.setMessage();};xmp.util.internals.XMPError.prototype.getInnerError=function(){return this.innerError;};xmp.util.internals.XMPError.prototype.getMessage=function(){return this.message;};xmp.util.internals.XMPError.prototype.getContext=function(){return this.context;};xmp.util.internals.XMPError.prototype.getExtendedInfo=function(){return this.extendedInfo;};xmp.createNamespace("xmp.util");xmp.util.PlayableNode=function(){this.p_instanceNumber=xmp.util.PlayableNode.p_instanceNumberCounter;xmp.util.PlayableNode.p_instanceNumberCounter++;this.p_valid=false;this._init();};xmp.util.PlayableNode.p_instanceNumberCounter=0;xmp.util.PlayableNode.p_nodeOfTypeCounterMap={};xmp.util.PlayableNode.i_staticInit=function(){xmp.util.PlayableNode.p_nodeOfTypeCounterMap={};};xmp.util.PlayableNode.prototype._init=function(){this.p_internalId='';this.p_mime_type='';this.p_uri='';this.p_isUriAbsolute=false;this.p_timeLimitInSeconds=-1;this.p_endedFrame='';this.p_streamingMode='';this.p_mimeTypes=[];this.p_sizes=[];this.p_rules=[];this.p_nodeOwnsRules=true;this.p_nodeType=null;this.p_patternAddress=null;this.p_emptySlot=false;this.p_data=null;this.p_metadataMap=null;this.p_nodeOwnsMetadataMap=false;this.p_metaResourceBundle=null;this.p_valid=true;};xmp.util.PlayableNode.prototype._clear=function(){var ha=xmp.MapIterator.extractKeys(this.p_children);for(var i=0;i<ha.length;i++){var ia=ha[i];if(ia==='_instanceNumber'||ia==='_valid'){continue;}
if(typeof this[ia]==='function'){continue;}
delete this[ia];}
this.p_valid=false;};xmp.util.PlayableNode.prototype.isValid=function(){return this.p_valid;};xmp.util.PlayableNode.prototype.getNodeTypeName=function(){return this.getNodeType().getTypeName();};xmp.util.PlayableNode.prototype.getNodeTypeId=function(){return this.getNodeType().getId();};xmp.util.PlayableNode.prototype.isContentType=function(){return this.getNodeType().isContentType();};xmp.util.PlayableNode.prototype.isAdType=function(){return this.getNodeType().isAdType();};xmp.util.PlayableNode.prototype.isPromoType=function(){return this.getNodeType().isPromoType();};xmp.util.PlayableNode.prototype.getMetadata=function(ja,ka){if(this.p_metadataMap===null){return ka;}
return this.p_metadataMap.i_get(ja,ka);};xmp.util.PlayableNode.prototype.setMetadata=function(la,ma){this.p_swivelMetadataMapReferenceBeforeModification();this.p_metadataMap.i_set(la,ma);};xmp.util.PlayableNode.prototype.i_getPrimaryMetaResource=function(na){var oa=xmp.playlistapi.ResouceBundle.i_filterByRenderer(this.i_getAssociatedResourceBundleTypes(),'node');if(oa.length!==1){if(na){throw new Error('One and only one associated resource type for the node must have a renderer of "node".');}
return null;}
return this.p_metaResourceBundle.i_getMetaResource(oa[0]);};xmp.util.PlayableNode.prototype.getMetaResource=function(pa){return this.p_metaResourceBundle.i_getMetaResource(pa);};xmp.util.PlayableNode.prototype.i_setMetaResource=function(qa){this.p_metaResourceBundle.i_setMetaResource(qa);this.i_setAssociatedResourceBundleTypes([qa.getType()]);};xmp.util.PlayableNode.prototype.i_getMetaResourceBundle=function(){return this.p_metaResourceBundle;};xmp.util.PlayableNode.prototype.i_reSetMetaResourceBundle=function(ra){this.p_metaResourceBundle=ra;};xmp.util.PlayableNode.prototype.getPlayableData=function(){return this.p_data;};xmp.util.PlayableNode.prototype.getBestId=function(){var id=this.getPlayableData().getMetaResourceId();if(id.length===0){id=this.getPlayableData().getCompositeMetaResourceId();}
if(id.length===0){id=this.p_getInternalId();}
return id;};xmp.util.PlayableNode.safeGetBestId=function(sa){try{if(!sa){return"NULL/UNDEFINED";}
return sa.getBestId();}
catch(e){return"UNKNOWN/ERROR";}};xmp.util.PlayableNode.prototype.getUniqueId=function(){return this.p_getHashKey();};xmp.util.PlayableNode.prototype.getMimeType=function(){return this.p_mime_type;};xmp.util.PlayableNode.prototype.setMimeType=function(ta){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE],"PlayableNode.setMimeType");if(ta===null||ta.length===0){throw new xmp.util.internals.InvalidArgsError("Invalid playable node mime type (null or empty).");}
this.p_mime_type=ta;};xmp.util.PlayableNode.prototype.getURI=function(){return this.p_uri;};xmp.util.PlayableNode.prototype.setURI=function(ua){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE],"PlayableNode.setURI");if(ua===null||ua.length===0){throw new xmp.util.internals.InvalidArgsError("Invalid playable node uri (null or empty).");}
this.p_uri=ua;};xmp.util.PlayableNode.prototype.setUriAbsolute=function(va){this.p_isUriAbsolute=va;};xmp.util.PlayableNode.prototype.isUriAbsolute=function(){return this.p_isUriAbsolute;};xmp.util.PlayableNode.prototype.getTimeLimitInSeconds=function(){return this.p_timeLimitInSeconds;};xmp.util.PlayableNode.prototype.setTimeLimitInSeconds=function(wa){xmp.validateArguments(arguments,[xmp.i_NUMBER_TYPE],"PlayableNode.setTimeLimitInSeconds");if(wa<-1){throw new xmp.util.internals.InvalidArgsError("Invalid time limit (cannot be less than -1).");}
this.p_timeLimitInSeconds=wa;};xmp.util.PlayableNode.prototype.getNodeType=function(){return this.p_nodeType;};xmp.util.PlayableNode.prototype.getRuleCount=function(){return this.p_rules.length;};xmp.util.PlayableNode.prototype.getRule=function(xa){xmp.validateArguments(arguments,[xmp.i_NUMBER_TYPE],"PlayableNode.getChild");return this.p_rules[xa];};xmp.util.PlayableNode.prototype.addRule=function(ya){xmp.validateArguments(arguments,[xmp.i_OBJECT_TYPE],"PlayableNode.addRule");if(ya===null){throw new xmp.util.internals.InvalidArgsError("Invalid rule context (null).");}
this.p_swivelRuleArrayReferenceBeforeModification();return this.p_rules.push(ya);};xmp.util.PlayableNode.prototype.insertRule=function(za,Aa){xmp.validateArguments(arguments,[xmp.i_OBJECT_TYPE,xmp.i_NUMBER_TYPE],"PlayableNode.insertRule");if(za===null){throw new xmp.util.internals.InvalidArgsError("Invalid rule context (null).");}
this.p_swivelRuleArrayReferenceBeforeModification();this.p_rules.splice(Aa,0,za);return this.p_rules.length;};xmp.util.PlayableNode.prototype.removeRule=function(Ba){xmp.validateArguments(arguments,[xmp.i_NUMBER_TYPE],"PlayableNode.removeRule");this.p_swivelRuleArrayReferenceBeforeModification();this.p_rules.splice(Ba,1);return this.p_rules.length;};xmp.util.PlayableNode.prototype.i_getRuleArrayReference=function(){return this.p_rules;};xmp.util.PlayableNode.prototype.p_swivelRuleArrayReferenceBeforeModification=function(){if(!this.p_nodeOwnsRules){this.p_nodeOwnsRules=true;this.p_rules=[];if(this.getNodeType()!==null){this.p_rules=this.p_rules.concat(this.getNodeType()._getRuleContextArray());}}};xmp.util.PlayableNode.prototype.p_swivelMetadataMapReferenceBeforeModification=function(){if(!this.p_nodeOwnsMetadataMap){this.p_nodeOwnsMetadataMap=true;var Ca=this.p_metadataMap;this.p_metadataMap=new xmp.util.internals.MetadataMap(false);if(Ca!==null){this.p_metadataMap.i_reInitialize(Ca.i_getClonedWrappedMetadata());}}};xmp.util.PlayableNode.prototype.i_setNodeType=function(Da){this.p_internalId=this.p_makeInternalId(Da);this.p_nodeType=Da;this.p_rules=this.getNodeType()._getRuleContextArray();this.p_nodeOwnsRules=false;this.p_metadataMap=this.getNodeType()._getMetadataMapRef();this.p_nodeOwnsMetadataMap=false;this.p_metaResourceBundle=this.getNodeType().i_getMetaResourceBundle().clone();this.i_setAssociatedResourceBundleTypes(['primary','synch_unit']);};xmp.util.PlayableNode.prototype.p_getInstanceNumber=function(){return this.p_instanceNumber;};xmp.util.PlayableNode.prototype.p_getHashKey=function(){return('PlayableNode_'+this.p_instanceNumber);};xmp.util.PlayableNode.prototype.i_getPatternAddress=function(){return this.p_patternAddress;};xmp.util.PlayableNode.prototype.i_setPatternAddress=function(id){this.p_patternAddress=id;};xmp.util.PlayableNode.prototype.i_isEmptySlot=function(){return this.p_emptySlot;};xmp.util.PlayableNode.prototype.i_mutateEmptySlot=function(Ea){this.p_emptySlot=Ea;};xmp.util.PlayableNode.prototype.p_getInternalId=function(){return this.p_internalId;};xmp.util.PlayableNode.prototype.i_linkData=function(Fa,Ga){this.p_data=Fa.getPlayableData(Ga);};xmp.util.PlayableNode.prototype.i_setData=function(Ha){this.p_data=Ha;};xmp.util.PlayableNode.prototype.p_makeInternalId=function(Ia){var Ja=xmp.util.PlayableNode.p_getNodeOfTypeCount(Ia.getTypeName());var Ka=8;var id=Ia.getTypeName()+'_'+xmp.zeroPad(Ja,Ka);return id;};xmp.util.PlayableNode.p_getNodeOfTypeCount=function(La){var Ma=xmp.util.PlayableNode.p_nodeOfTypeCounterMap[La];if(typeof Ma==='undefined'){Ma=0;}
else{Ma++;}
xmp.util.PlayableNode.p_nodeOfTypeCounterMap[La]=Ma;return Ma;};xmp.util.PlayableNode.prototype.i_getStreamingMode=function(){return this.p_streamingMode;};xmp.util.PlayableNode.prototype.setStreamingMode=function(Na){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE],"PlayableNode.setStreamingMode");var Oa=xmp.PlayerPolicy.i_getStreamingModes();var Pa=Oa.length;for(var i=0;i<Pa;i++){if(Oa[i]===Na){this.p_streamingMode=Na;return;}}
throw new xmp.util.internals.InvalidArgsError("Invalid playable node streaming mode \""+Na+"\".  Expected "+Oa.join(", ")+".");};xmp.util.PlayableNode.prototype.i_getMimeTypes=function(){return this.p_mimeTypes;};xmp.util.PlayableNode.prototype.setMimeTypes=function(Qa){xmp.validateArguments(arguments,[xmp.i_OBJECT_TYPE],"PlayableNode.setMimeTypes");if(Qa.length===0){throw new xmp.util.internals.InvalidArgsError("Invalid playable node mime types.  Expeced at least 1 mime type.");}
this.p_mimeTypes=Qa;};xmp.util.PlayableNode.prototype.i_getSizes=function(){return this.p_sizes;};xmp.util.PlayableNode.prototype.i_setSizes=function(Ra){xmp.validateArguments(arguments,[xmp.i_OBJECT_TYPE],"PlayableNode.i_setSizes");if(Ra.length===0){throw new xmp.util.internals.InvalidArgsError("Invalid playable node mime types.  Expeced at least 1 size.");}
this.p_sizes=Ra;};xmp.util.PlayableNode.prototype.i_getAssociatedResourceBundleTypes=function(){return this.p_metaResourceBundle.i_getAssociatedResourceBundleTypes(this.p_getInstanceNumber());};xmp.util.PlayableNode.prototype.i_setAssociatedResourceBundleTypes=function(Sa){this.p_metaResourceBundle.i_setAssociatedResourceBundleTypes(this.p_getInstanceNumber(),Sa);};xmp.createNamespace("xmp.util.internals");xmp.util.internals.InvalidArgsError=function(Ta){xmp.util.internals.InvalidArgsError.ctor.call(this,"InvalidArgsError",null,Ta);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.util.internals.InvalidArgsError);xmp.createNamespace("xmp.util");xmp.util.AbstractLoggerListener=function(Ua){this.p_setLogLevel(Ua);};xmp.util.AbstractLoggerListener.prototype.i_handleLog=function(Va,Wa,Xa,Ya){if(Va<=this.getLogLevel()){if(typeof Ya!=='undefined'){Xa+=(" -- Error: "+xmp.extractErrorMessage(Ya));}
this.handleLogMessage(Va,Wa,Xa);}};xmp.util.AbstractLoggerListener.prototype.handleLogMessage=function(Za,$a,ab){throw new Error("Subclass must implement handleLogMessage");};xmp.util.AbstractLoggerListener.prototype.getLogLevel=function(){return this.p_logLevel;};xmp.util.AbstractLoggerListener.prototype.p_setLogLevel=function(bb){var db=xmp.util.LogLevels.i_calc(bb);this.p_logLevel=db;xmp.util.Logger.getInstance().i_listenerChanged();};xmp.createNamespace("xmp.util");xmp.util.Callback=function(id,eb,fb){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE,xmp.i_FUNCTION_TYPE,xmp.i_OBJECT_TYPE],"Callback.ctor");if(id===null||id.length===0||eb===null){throw new xmp.util.internals.InvalidArgsError("The 'id' argument must be non-empty, and the 'theMethod' argument must be non-null.");}
this.p_id=id;this.p_theMethod=eb;this.p_theContextObject=(!fb)?null:fb;this.p_metadataMap=new xmp.util.internals.MetadataMap(false);this.p_addThisToCallback=true;};xmp.util.Callback.prototype.i_setAddThisToCallback=function(gb){this.p_addThisToCallback=gb;};xmp.util.Callback.prototype.i_getId=function(){return this.p_id;};xmp.util.Callback.prototype.call=function(){this.p_callCore(this.p_copyIntrinsicArgs(arguments));};xmp.util.Callback.prototype.i_callAsynch=function(hb){this.i_callAsynchEx(5,hb);};xmp.util.Callback.prototype.i_callAsynchEx=function(ib,jb){var kb=new xmp.util.Callback('Callback.i_callAsynchEx',this.p_handleAsynchCallTimer,this);kb.setMetadata('relayCb',this);kb.setMetadata('args',jb);xmp.util.Timer.i_doSimpleCallbackEx(ib,kb);};xmp.util.Callback.prototype.getMetadata=function(lb,mb){return this.p_metadataMap.i_get(lb,mb);};xmp.util.Callback.prototype.setMetadata=function(nb,ob){this.p_metadataMap.i_set(nb,ob);};xmp.util.Callback.prototype.p_copyIntrinsicArgs=function(pb){var qb=[];for(var i=0;i<pb.length;i++){qb.push(pb[i]);}
return qb;};xmp.util.Callback.prototype.p_callCore=function(rb){var sb=[];if(this.p_addThisToCallback){sb.push(this);}
sb=sb.concat(rb);this.p_theMethod.apply(this.p_theContextObject,sb);};xmp.util.Callback.prototype.p_handleAsynchCallTimer=function(tb){var ub=tb.getMetadata('relayCb',xmp.util.internals.MetadataMap.defaultObj);var vb=tb.getMetadata('args',xmp.util.internals.MetadataMap.defaultObj);ub.p_callCore(vb);};xmp.createNamespace("xmp.util");xmp.util.Cookie=function(){};xmp.util.Cookie.p_getCookieDomain=function(){return window.location.hostname;};xmp.util.Cookie.p_getTopLevelCookieDomain=function(){var wb=xmp.util.Cookie.p_getCookieDomain();var xb=wb.indexOf('.');if(xb>-1){wb=wb.substr(xb);}
return wb;};xmp.util.Cookie.canUse=function(){var yb=false;if(document.cookie===''){document.cookie='WM_acceptsCookies=yes';if(document.cookie.indexOf('WM_acceptsCookies=yes')!==-1){yb=true;}}
else{yb=true;}
return(yb);};xmp.util.Cookie.p_write=function(zb,Ab,Bb,Cb,Db,Eb){if(xmp.util.Cookie.canUse()){var Fb=0;var Gb=(navigator&&navigator.appName&&(navigator.appName==='Netscape')&&navigator.appVersion&&(parseInt(navigator.appVersion,0)===2))?false:true;if(Bb&&Gb){if((typeof(Bb)==='string')&&Date.parse(Bb)){Fb=Bb;}
else if(typeof(Bb)==='number'){Fb=(new Date((new Date()).getTime()+Bb*3600000)).toGMTString();}}
document.cookie=zb+'='+escape(Ab)+((Fb)?(';expires='+Fb):'')+((Cb)?';path='+path:'')+((Db)?';domain='+domain:'')+((Eb&&(Eb===true))?'; secure':'');}};xmp.util.Cookie.read=function(Hb){if(document.cookie===''){return false;}
else{var Ib,lastChar;var Jb=document.cookie;Ib=Jb.indexOf(Hb);var Kb=Ib+Hb.length;if((Ib!==-1)&&(Jb.charAt(Kb)==='=')){Ib+=Hb.length+1;lastChar=Jb.indexOf(';',Ib);if(lastChar===-1){lastChar=Jb.length;}
return unescape(Jb.substring(Ib,lastChar));}
else{return false;}}};xmp.util.Cookie.p_kill=function(Lb,Mb,Nb){var Ob=xmp.util.Cookie.read(Lb);if(Ob){document.cookie=Lb+'='+Ob+'; expires=Fri, 13-Apr-1970 00:00:00 GMT'+((Mb)?';path='+path:'')+((Nb)?';domain='+domain:'');}};xmp.CriticalException=function(Pb,Qb,Rb,Sb,Tb){this._code=xmp.XmpErrorCodes.i_calc(Pb);var Ub=Sb+" CRTICAL ERROR CODE: "+this.getCriticalErrorCode().toString()+": "+this.getCriticalErrorCodeString();xmp.CriticalException.ctor.call(this,Qb,Rb,Ub,Tb);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.CriticalException);xmp.CriticalException.prototype.getCriticalErrorCode=function(){return this._code;};xmp.CriticalException.prototype.getCriticalErrorCodeString=function(){return xmp.XmpErrorCodes.i_stringify(this._code);};xmp.CriticalException.createCriticalException=function(Vb,Wb,Xb){return new xmp.CriticalException(Vb,'CriticalException',Wb,Xb);};xmp.FatalException=function(Yb,Zb,$b,ac){this.p_code=xmp.XmpErrorCodes.i_calc(Yb);var bc=ac+" FATAL ERROR CODE: "+this.getFatalErrorCode().toString()+": "+this.getFatalErrorCodeString();xmp.FatalException.ctor.call(this,Zb,$b,bc);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.FatalException);xmp.FatalException.prototype.getFatalErrorCode=function(){return this.p_code;};xmp.FatalException.prototype.getFatalErrorCodeString=function(){return xmp.XmpErrorCodes.i_stringify(this.p_code);};xmp.FatalException.createFatalException=function(cc,dc,ec){return new xmp.FatalException(cc,'FatalException',dc,ec);};xmp.createNamespace("xmp.util");xmp.util.FlashUtility=function(){};xmp.util.FlashUtility.i_buildFSCommandScript=function(fc,gc,hc){var ic=document.createElement('script');var jc='';if(xmp.isIEBrowser()){ic.defer=true;ic.event='FSCommand(command,args)';ic.htmlFor=gc;jc=hc;ic.text=jc;fc.insertBefore(ic,null);}
else{jc="function "+gc+"_DoFSCommand(command, args) { "+hc+" }";ic.innerHTML=jc;fc.insertBefore(ic,null);}};xmp.util.FlashUtility.i_normalizeCommand=function(kc){var re=/^FSCommand:(.*)/;if(kc!==null&&xmp.isDefined(kc)&&re.test(kc)===true){kc=kc.match(re)[1];}
return kc;};xmp.util.FlashUtility.i_splitFSCommandData=function(lc,mc){if(mc<1){throw new xmp.util.internals.InvalidArgsError('Must call fn with "count" >= 1');}
if(mc===1){return[lc];}
var nc=lc.split(xmp.i_DELIMITER);if(nc.length===mc){return nc;}
if(nc.length<mc){throw new xmp.util.internals.InvalidArgsError('Expected '+mc.toString()+' arguments, got '+nc.length.toString());}
var oc=nc.slice(0,mc-1);var pc=nc.slice(mc-1);var qc=pc.join(xmp.i_DELIMITER);oc.push(qc);return oc;};xmp.util.FlashUtility.i_externalInterfaceDecode=function(rc){if(rc.indexOf('&xmp_')===-1){return rc;}
var sc=rc;sc=sc.replace(/&xmp_custom_lt;/g,'<');sc=sc.replace(/&xmp_custom_gt;/g,'>');sc=sc.replace(/&xmp_lit_lf;/g,'\\n');sc=sc.replace(/&xmp_lit_cr;/g,'\\r');sc=sc.replace(/&xmp_lit_tab;/g,'\\t');sc=sc.replace(/&xmp_lit_bs;/g,'\\\\');sc=sc.replace(/&xmp_lit_apos;/g,'\\\'');sc=sc.replace(/&xmp_lit_quot;/g,'\\\"');return sc;};xmp.Base64={p_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i_encode:function(tc){var uc="";var vc,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;tc=xmp.Base64.p_utf8_encode(tc);while(i<tc.length){vc=tc.charCodeAt(i);i++;chr2=tc.charCodeAt(i);i++;chr3=tc.charCodeAt(i);i++;enc1=vc>>2;enc2=((vc&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}
else if(isNaN(chr3)){enc4=64;}
uc=uc+this.p_keyStr.charAt(enc1)+this.p_keyStr.charAt(enc2)+this.p_keyStr.charAt(enc3)+this.p_keyStr.charAt(enc4);}
return uc;},i_decode:function(wc){var xc="";var yc,chr2,chr3;var zc,enc2,enc3,enc4;var i=0;wc=wc.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<wc.length){zc=this.p_keyStr.indexOf(wc.charAt(i));i++;enc2=this.p_keyStr.indexOf(wc.charAt(i));i++;enc3=this.p_keyStr.indexOf(wc.charAt(i));i++;enc4=this.p_keyStr.indexOf(wc.charAt(i));i++;yc=(zc<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;xc=xc+String.fromCharCode(yc);if(enc3!==64){xc=xc+String.fromCharCode(chr2);}
if(enc4!==64){xc=xc+String.fromCharCode(chr3);}}
xc=xmp.Base64.p_utf8_decode(xc);return xc;},p_utf8_encode:function(Ac){Ac=Ac.replace(/\r\n/g,"\n");var Bc="";for(var n=0;n<Ac.length;n++){var c=Ac.charCodeAt(n);if(c<128){Bc+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){Bc+=String.fromCharCode((c>>6)|192);Bc+=String.fromCharCode((c&63)|128);}
else{Bc+=String.fromCharCode((c>>12)|224);Bc+=String.fromCharCode(((c>>6)&63)|128);Bc+=String.fromCharCode((c&63)|128);}}
return Bc;},p_utf8_decode:function(Cc){var Dc="";var i=0;var c=0;var c1=0;var c2=0;var c3=0;while(i<Cc.length){c=Cc.charCodeAt(i);if(c<128){Dc+=String.fromCharCode(c);i++;}
else if((c>191)&&(c<224)){c2=Cc.charCodeAt(i+1);Dc+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
else{c2=Cc.charCodeAt(i+1);c3=Cc.charCodeAt(i+2);Dc+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return Dc;}};xmp.createNamespace("xmp.util.internals");xmp.util.internals.BrowserDetect={p_init:function(){if(!xmp.isBrowserEnvironment()){return;}
this.p_buildData();this.browser=this.p_searchString(this.p_dataBrowser)||"An unknown browser";this.version=this.p_searchVersion(navigator.userAgent)||this.p_searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.p_searchString(this.p_dataOS)||"an unknown OS";},p_searchString:function(Ec){for(var i=0;i<Ec.length;i++){var Fc=Ec[i].string;var Gc=Ec[i].prop;this.p_versionSearchString=Ec[i].versionSearch||Ec[i].identity;if(Fc){if(Fc.indexOf(Ec[i].subString)!==-1){return Ec[i].identity;}}
else if(Gc){return Ec[i].identity;}}
return"";},p_searchVersion:function(Hc){var Ic=Hc.indexOf(this.p_versionSearchString);if(Ic===-1){return"";}
return parseFloat(Hc.substring(Ic+this.p_versionSearchString.length+1));},p_buildData:function(){this.p_dataBrowser=[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"SeaMonkey",identity:"SeaMonkey"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}];this.p_dataOS=[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}];}};xmp.util.internals.BrowserDetect.p_init();xmp.createNamespace("xmp.util.internals");xmp.util.internals.CategoryLogger=function(Jc){this.p_logger=xmp.util.Logger.getInstance();this.p_category=(Jc&&Jc.length>0)?Jc:"NULL CATEGORY";};xmp.util.internals.CategoryLogger.i_create=function(Kc){return new xmp.util.internals.CategoryLogger(Kc);};xmp.util.internals.CategoryLogger.prototype.i_fatal=function(Lc,Mc){this.p_logger.i_fatal(this.p_category,Lc,Mc);};xmp.util.internals.CategoryLogger.prototype.i_critical=function(Nc,Oc){this.p_logger.i_critical(this.p_category,Nc,Oc);};xmp.util.internals.CategoryLogger.prototype.warn=function(Pc,Qc){this.p_logger.warn(this.p_category,Pc,Qc);};xmp.util.internals.CategoryLogger.prototype.info=function(Rc,Sc){this.p_logger.info(this.p_category,Rc,Sc);};xmp.util.internals.CategoryLogger.prototype.debug=function(Tc,Uc){this.p_logger.debug(this.p_category,Tc,Uc);};xmp.util.internals.CategoryLogger.prototype.isWarnEnabled=function(){return this.p_logger.isWarnEnabled(this.p_category);};xmp.util.internals.CategoryLogger.prototype.isInfoEnabled=function(){return this.p_logger.isInfoEnabled(this.p_category);};xmp.util.internals.CategoryLogger.prototype.isDebugEnabled=function(){return this.p_logger.isDebugEnabled(this.p_category);};xmp.createNamespace("xmp.util.internals");xmp.util.internals.GuardedFunctions=function(){};xmp.util.internals.GuardedFunctions.i_execute=function(Vc,Wc,Xc){var Yc={};try{Yc.returnValue=Wc.apply(Vc,Xc);}
catch(e){Yc.exception=e;}
return Yc;};xmp.util.internals.GuardedFunctions.i_logError=function(Zc,$c,ad,bd){if(!$c){$c=xmp.util.LogLevels.i_CRITICAL;}
try{if($c===xmp.util.LogLevels.i_FATAL){Zc.warn(ad,bd);xmp.handleFatalError(bd);}
else if($c===xmp.util.LogLevels.i_CRITICAL){Zc.i_critical(ad,bd);}
else{Zc.warn(ad,bd);}}
catch(e){}};xmp.createNamespace("xmp.util.internals");xmp.util.internals.MetadataMap=function(cd){xmp.validateArguments(arguments,[xmp.i_BOOLEAN_TYPE],"MetadataMap.ctor");this._readOnly=cd;this._wrappedMetadata={};};xmp.util.internals.MetadataMap.defaultObj={};xmp.util.internals.MetadataMap.prototype.p_isReadOnly=function(){return this._readOnly;};xmp.util.internals.MetadataMap.prototype.i_get=function(dd,ed){if(!((arguments.length===2)&&xmp.isNonEmptyString(dd))){throw new xmp.util.internals.InvalidArgsError("Invalid 'key' (undefined, null, or empty).");}
var fd=this._wrappedMetadata[dd];return xmp.chooseValueOrDefault(fd,ed);};xmp.util.internals.MetadataMap.prototype.i_set=function(gd,hd){if(this._readOnly){throw new xmp.playlistapi.internals.PlayListError("Cannot modify readonly MetadataMap");}
if(!xmp.isNonEmptyString(gd)||typeof hd==="undefined"){throw new xmp.util.internals.InvalidArgsError("Invalid key (null or empty) or invalid value (undefined)");}
this._wrappedMetadata[gd]=hd;};xmp.util.internals.MetadataMap.prototype.i_remove=function(jd){if(!xmp.isNonEmptyString(jd)){throw new xmp.util.internals.InvalidArgsError("Invalid key (null or empty)");}
if(typeof(this._wrappedMetadata[jd])!=='undefined'){delete this._wrappedMetadata[jd];}};xmp.util.internals.MetadataMap.prototype.i_reInitialize=function(kd){this._wrappedMetadata=kd;};xmp.util.internals.MetadataMap.prototype.i_getClonedWrappedMetadata=function(){return xmp.MapIterator.create(this._wrappedMetadata).cloneMap();};xmp.createNamespace("xmp.util.internals");xmp.i_MOCK_TEST_MODE_ROOTURLMAP_PATH="/PlayerContexts/Global/rootUrlMap/";xmp.i_MOCK_TEST_MODE_MEDIATYPE_PATH="/PlayerContexts/Global/PlayingPolicy/MediaTypes/";xmp.SAFE_REAL_PLAY_TIME_PER_NODE=500;xmp.FAST_REAL_PLAY_TIME_PER_NODE=50;xmp.util.internals.MockTestMode=function(){this.p_isActive=false;this.p_realPlayTimePerNode=xmp.SAFE_REAL_PLAY_TIME_PER_NODE;};xmp.util.internals.MockTestMode.p_singeltonInstance=null;xmp.util.internals.MockTestMode.p_playbleNodeTypes=["PreRoll","PostRoll","SponsoredAd","HouseAd","AdInsertNotForSale","Promo","Content","NextUpSlate","StartSlate","CustomSlate"];xmp.util.internals.MockTestMode.getInstance=function(){if(xmp.util.internals.MockTestMode.p_singeltonInstance===null){xmp.util.internals.MockTestMode.p_singeltonInstance=new xmp.util.internals.MockTestMode();}
return xmp.util.internals.MockTestMode.p_singeltonInstance;};xmp.util.internals.MockTestMode.prototype.isActive=function(){return this.p_isActive;};xmp.util.internals.MockTestMode.prototype.setActive=function(ld){this.p_isActive=ld;};xmp.util.internals.MockTestMode.prototype.getRealPlayTimePerNode=function(){return this.p_realPlayTimePerNode;};xmp.util.internals.MockTestMode.prototype.setRealPlayTimePerNode=function(md){this.p_realPlayTimePerNode=md;};xmp.util.internals.MockTestMode.prototype.overrideMimeType=function(nd){if((nd.getMimeType()!==xmp.MOCK_MIME_TYPE||nd.i_getMimeTypes()!==[xmp.MOCK_MIME_TYPE])&&this.p_shouldOverrideMimeType(nd)){nd.setMimeType(xmp.MOCK_MIME_TYPE);nd.setMimeTypes([xmp.MOCK_MIME_TYPE]);}};xmp.util.internals.MockTestMode.prototype.p_shouldOverrideMimeType=function(od){for(var i=0;i<xmp.util.internals.MockTestMode.p_playbleNodeTypes.length;i++){var pd=od.getNodeTypeName();if(pd===xmp.util.internals.MockTestMode.p_playbleNodeTypes[i]){return true;}}
return false;};xmp.util.internals.MockTestMode.prototype.configure=function(){var qd=['videoContentMeta','videoPromoMeta','adPolicy','ruleClasses','adMan','dhtmlObject','adServer','adCompositor'];for(var i=0;i<qd.length;i++){var rd=xmp.i_MOCK_TEST_MODE_ROOTURLMAP_PATH+qd[i];var sd=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(rd);sd.i_addValue('transportType','mock');}
var td=['Flash','WindowsMedia'];for(var j=0;j<td.length;j++){var ud=xmp.i_MOCK_TEST_MODE_MEDIATYPE_PATH+td[j];var vd=xmp.util.SettingsManager.getInstance().getGlobalContextNode().getNodeForPath(ud);vd.i_addValue('mime-type',xmp.MOCK_MIME_TYPE);}};xmp.util.internals.MockTestMode.prototype.addMockTestModeLoggerListener=function(wd,xd){var ll=new xmp.util.internals.MockTestModeLoggerListener(wd,xd);var yd=xmp.util.Logger.getInstance();yd.addListener(ll);};xmp.util.internals.MockTestModeLoggerListener=function(zd,Ad){xmp.util.internals.MockTestModeLoggerListener.ctor.call(this,zd);this.p_jsUnitNamespace=Ad;};xmp.DERIVE_CLASS(xmp.util.AbstractLoggerListener,xmp.util.internals.MockTestModeLoggerListener);xmp.util.internals.MockTestModeLoggerListener.prototype.handleLogMessage=function(Bd,Cd,Dd){var Ed=Cd+': '+xmp.escapeHtml(Dd,true,true);switch(Bd){case xmp.util.LogLevels.i_NONE:break;case xmp.util.LogLevels.i_FATAL:case xmp.util.LogLevels.i_CRITICAL:case xmp.util.LogLevels.WARN:this.p_jsUnitNamespace.warn(Ed);break;case xmp.util.LogLevels.INFO:this.p_jsUnitNamespace.info(Ed);break;case xmp.util.LogLevels.DEBUG:this.p_jsUnitNamespace.debug(Ed);break;default:break;}};xmp.createNamespace("xmp.util.internals");xmp.util.internals.NullLoggerListener=function(){};xmp.util.internals.NullLoggerListener.prototype.handleLogMessage=function(Fd,Gd,Hd){};xmp.createNamespace("xmp.util.internals");xmp.util.internals.UnsupportedOperationError=function(Id){xmp.util.internals.UnsupportedOperationError.ctor.call(this,"UnsupportedOperationError",null,Id);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.util.internals.UnsupportedOperationError);xmp.createNamespace("xmp.util");xmp.util.JsonPath=function(Jd,Kd){this.p_nextObj=Jd;this.p_nextPath=Kd;this.p_keepEvaluating=true;};xmp.util.JsonPath.evaluate=function(Ld,Md){var Nd=new xmp.util.JsonPath(Ld,Md);Nd.p_evalInternal();return Nd.p_getResult();};xmp.util.JsonPath.prototype.p_getResult=function(){if(!this.p_keepEvaluating||!this.p_isSNB(this.p_nextObj)){return null;}
return this.p_nextObj.toString();};xmp.util.JsonPath.prototype.p_calcNextObj=function(Od){if(typeof this.p_nextObj[Od]==='undefined'){this.p_keepEvaluating=false;return;}
this.p_nextObj=this.p_nextObj[Od];};xmp.util.JsonPath.prototype.p_evalInternal=function(){while(this.p_keepEvaluating&&this.p_nextPath.length>0){var Pd='';for(var i=0;i<this.p_nextPath.length;i++){var c=this.p_nextPath.charAt(i);if(c==='.'){this.p_calcNextObj(Pd);this.p_calcNextPath(Pd);break;}
else if(c==='['){if(Pd.length>0){this.p_calcNextObj(Pd);this.p_calcNextPath(Pd);break;}
var Qd=this.p_getBracketExpression();if(Qd.charAt(0)==='@'){this.p_doArrayMatch(Qd.substr(1));}
else if(xmp.isNumber(Qd,false)){var Rd=parseInt(Qd,0);if(Rd>=this.p_nextObj.length){this.p_keepEvaluating=false;break;}
this.p_nextObj=this.p_nextObj[Rd];}
else{this.p_calcNextObj(this.p_unQuote(Qd));}
break;}
else{Pd+=c;if(i===(this.p_nextPath.length-1)){this.p_calcNextObj(Pd);this.p_calcNextPath(Pd);}}}}};xmp.util.JsonPath.prototype.p_unQuote=function(Sd){if(Sd.length>1){if(Sd.charAt(0)==='\''||Sd.charAt(0)==='\"'){return this.p_stripFirstAndLast(Sd);}}
return Sd;};xmp.util.JsonPath.prototype.p_stripFirstAndLast=function(Td){var Ud=Td.substr(1);Ud=Ud.substr(0,Ud.length-1);return Ud;};xmp.util.JsonPath.prototype.p_getBracketExpression=function(){var be='';for(var i=0;i<this.p_nextPath.length;i++){var cb=this.p_nextPath.charAt(i);be+=cb;if(cb===']'){break;}}
this.p_calcNextPath(be);return this.p_stripFirstAndLast(be);};xmp.util.JsonPath.prototype.p_doArrayMatch=function(Vd){var Wd=Vd.split('=');var Xd=Wd[0];var Yd=this.p_unQuote(Wd[1]);var Zd=false;for(var i=0;i<this.p_nextObj.length;i++){var $d=this.p_nextObj[i];if(typeof $d[Xd]==='undefined'){continue;}
if(!this.p_isSNB($d[Xd])){this.p_keepEvaluating=false;break;}
if($d[Xd].toString()===Yd){this.p_nextObj=$d;Zd=true;break;}}
if(!Zd){this.p_keepEvaluating=false;}};xmp.util.JsonPath.prototype.p_isSNB=function(ae){var ce=(typeof ae);return(ce==='string'||ce==='boolean'||ce==='number');};xmp.util.JsonPath.prototype.p_calcNextPath=function(de){if(de.length===this.p_nextPath.length){this.p_nextPath='';}
else{this.p_nextPath=this.p_nextPath.substr(de.length);if(this.p_nextPath.indexOf('.')===0){this.p_nextPath=this.p_nextPath.substr(1);}}};xmp.createNamespace("xmp.util");xmp.util.Latch=function(ee,fe){this.cbState={};this.cbComplete={};for(var i=0;i<ee.length;i++){this.cbComplete[ee[i]]=false;}
this.completionCb=fe;};xmp.util.Latch.prototype.called=function(ge,he){this.cbComplete[ge]=true;if(typeof(he)!=="undefined"&&he!==null){this.cbState[ge]=he;}
var ie=true;var je=null;for(je=xmp.MapIterator.create(this.cbComplete);je.hasNext();je.next()){ie=ie&&je.currentValue();if(!ie){break;}}
if(ie){for(je=xmp.MapIterator.create(this.cbState);je.hasNext();je.next()){this.completionCb.setMetadata(je.currentKey(),je.currentValue());}
this.completionCb.call();}};xmp.util.Latch.prototype.p_clear=function(){for(var ke=xmp.MapIterator.create(this.cbComplete);ke.hasNext();ke.next()){ke.updateCurrentValue(false);}
delete this.cbState;this.cbState={};};xmp.util.Latch.prototype.i_addCbName=function(le){this.cbComplete[le]=false;};xmp.createNamespace("xmp.util");xmp.util.Loadable=function(){this.p_loaded=false;this.p_rawData=null;this.p_errorMessage=null;};xmp.util.Loadable.prototype._setRawData=function(me){this.p_rawData=me;this.p_loaded=true;};xmp.util.Loadable.prototype.i_setErrorMessage=function(ne){this.p_errorMessage=ne;this.p_loaded=false;};xmp.util.Loadable.prototype.isLoaded=function(){return this.p_loaded;};xmp.util.Loadable.prototype.isError=function(){return(this.p_errorMessage!==null);};xmp.util.Loadable.prototype.getErrorMessage=function(){return this.p_errorMessage;};xmp.util.Loadable.prototype.i_getError=function(){return(new xmp.util.LoadableDataException(this.isError()?this.p_errorMessage:'NO ERROR'));};xmp.util.Loadable.prototype.getDataObject=function(){if(this.p_rawData===null||!this.isLoaded()){throw new Error("Loadable not loaded yet for node: "+this.i_getLoadableId());}
return this.p_rawData;};xmp.util.Loadable.prototype.i_getLoadableId=function(){throw new Error('Subclass must override!');};xmp.util.LoadableDataException=function(oe){xmp.util.LoadableDataException.ctor.call(this,"LoadableDataException",null,oe);};xmp.DERIVE_CLASS(xmp.util.internals.XMPError,xmp.util.LoadableDataException);xmp.createNamespace("xmp.util");xmp.util.Loader=function(){this.loadedUris=[];};xmp.util.Loader.p_instance=null;xmp.util.Loader.getInstance=function(){if(xmp.util.Loader.p_instance===null){xmp.util.Loader.p_instance=new xmp.util.Loader();}
return xmp.util.Loader.p_instance;};xmp.util.Loader.prototype.p_loadModule=function(pe,cb){if(!pe){return;}
var qe=pe.replace(/\./g,"/")+".js";this.p_loadUri(qe,pe,cb);};xmp.util.Loader.prototype.p_loadUri=function(se,te,cb){if(!this.loadedUris[se]){var ue=xmp.net.AjaxRequestManager.getInstance();var ve=new xmp.util.Callback('loader.getText',this.i_callback,this);ve.setMetadata("cb",cb);ve.setMetadata("uri",se);ue.request(se,ve,te,se,xmp.net.ContentTypes.TEXT);}else{cb(se,true);}};xmp.util.Loader.prototype.i_callback=function(we,xe){var ye=xmp.net.AjaxRequestManager.getInstance();ye.i_parseJavaScript(xe.getText());var ze=we.getMetadata("uri",'');var cb=we.getMetadata("cb",function(ze){});if(ze===''||cb===function(ze){}){throw new xmp.util.LoadException("uri: "+ze+" cb: "+cb);}
this.loadedUris[ze]=true;cb(ze,false);};xmp.util.Loader.prototype.p_flushCache=function(){this.loadedUris=[];};xmp.util.LoadException=function(Ae){this.name="LoadException";this.message=Ae;};xmp.DERIVE_CLASS(Error,xmp.util.LoadException);xmp.createNamespace("xmp.util");xmp.util.LogConfigurator=function(){};xmp.util.LogConfigurator.p_commonExcludedCategories=['AjaxRequestManager_adPolicy','AjaxRequestManager_ruleClasses','AjaxRequestManager_dhtmlObject','AjaxRequestManager_videoContentMeta','FileRequestHandle','BVPOmnitureTriggerCommand','NullTrigger','PlayerPolicy','MediaPlayer','ContextualUrlStrategy','BandwidthRecorder','SetImageTriggerCommand','AdServerPageController'];xmp.util.LogConfigurator.getCommonExcludedCategories=function(){return xmp.util.LogConfigurator.p_commonExcludedCategories;};xmp.util.LogConfigurator.encodeExcludedCategories=function(Be){var Ce='[';for(var i=0;i<Be.length;i++){Ce+='\''+Be[i]+'\'';if(i!==(Be-1)){Ce+=',';}}
Ce+=']';return xmp.Base64.i_encode("{ 'Embedded' : { exCats: "+Ce+" } }");};xmp.util.LogConfigurator.p_cfg={'Embedded':{clazz:'xmp.baseplayer.EmbeddedConsoleLoggerListener',exCats:[],h:400,w:1000,cId:null}};xmp.util.LogConfigurator.p_configured=false;xmp.util.LogConfigurator.configure=function(De){if(xmp.util.LogConfigurator.p_configured){return;}
xmp.util.LogConfigurator.p_configured=true;De=(De)?De:null;if(De!==null){xmp.util.LogConfigurator.p_merge(De,xmp.util.LogConfigurator.p_cfg);}
var Ee=xmp.getQueryArg('xmpLogCfg');if(Ee!==null){var Fe=xmp.net.AjaxRequestManager.getInstance().i_parseJson(xmp.Base64.i_decode(Ee));xmp.util.LogConfigurator.p_merge(Fe,xmp.util.LogConfigurator.p_cfg);}
var Ge=xmp.MapIterator.extractKeys(xmp.util.LogConfigurator.p_cfg);for(var i=0;i<Ge.length;i++){var He=Ge[i];var Ie=xmp.util.LogConfigurator.p_cfg[He];var Je=xmp.getNamespacedMethod(Ie.clazz+'.create');Je(Ie);}};xmp.util.LogConfigurator.p_merge=function(Ke,Le){var Me=xmp.trueTypeOf(Ke);if(!(Me==='Object')){throw new Error('Invalid top-level merge type');}
var Ne=xmp.MapIterator.extractKeys(Ke);for(var i=0;i<Ne.length;i++){var Oe=Ne[i];var Pe=Ke[Oe];var Qe=xmp.trueTypeOf(Pe);if(!(Qe==='Null'||Qe==='String'||Qe==='Boolean'||Qe==='Number'||Qe==='Object'||Qe==='Array')){throw new Error('Invalid merge type');}
var Re=xmp.trueTypeOf(Le[Oe]);if(Re!=='Undefined'&&Re!==Qe){throw new Error('Mismatched types during merge');}
if(Qe==='Object'){if(Re==='Undefined'){Le[Oe]={};}
xmp.util.LogConfigurator.p_merge(Pe,Le[Oe]);}
else{Le[Oe]=Pe;}}};xmp.createNamespace("xmp.util");xmp.util.LogLevels=function(){};xmp.util.LogLevels.i_NONE=0;xmp.util.LogLevels.i_FATAL=1;xmp.util.LogLevels.i_CRITICAL=2;xmp.util.LogLevels.WARN=3;xmp.util.LogLevels.INFO=4;xmp.util.LogLevels.DEBUG=5;xmp.util.LogLevels.p_BEGIN=0;xmp.util.LogLevels.p_END=5;xmp.util.LogLevels.i_calc=function(Se){var Te=xmp.util.LogLevels;if((typeof Se!=='number')||(Se<Te.p_BEGIN)||(Se>Te.p_END)){return Te.p_BEGIN;}
return Se;};xmp.util.LogLevels.i_stringify=function(Ue){var Ve=xmp.util.LogLevels;var We=Ve.i_calc(Ue);switch(We){case Ve.i_NONE:return'none';case Ve.i_FATAL:return'fatal';case Ve.i_CRITICAL:return'critical';case Ve.WARN:return'warn';case Ve.INFO:return'info';case Ve.DEBUG:return'debug';default:return'none';}};xmp.util.LogLevels.i_fromString=function(Xe){var Ye=xmp.util.LogLevels;switch(Xe){case'none':return Ye.i_NONE;case'fatal':return Ye.i_FATAL;case'critical':return Ye.i_CRITICAL;case'warn':return Ye.WARN;case'info':return Ye.INFO;case'debug':return Ye.DEBUG;default:return Ye.i_NONE;}};xmp.util.Logger=function(){this.p_levelRef=xmp.util.LogLevels;this.p_commonLogLevel=this.p_levelRef.i_NONE;this.p_listeners=[];this.p_filteredCategoryMap={};};xmp.util.Logger.p_singeltonInstance=null;xmp.util.Logger.getInstance=function(){if(xmp.util.Logger.p_singeltonInstance===null){xmp.util.Logger.p_singeltonInstance=new xmp.util.Logger();}
return xmp.util.Logger.p_singeltonInstance;};xmp.util.Logger.prototype.addListener=function(Ze){if(Ze){for(var i=0;i<this.p_listeners.length;i++){if(this.p_listeners[i]===Ze){return;}}
this.p_listeners.push(Ze);this.i_listenerChanged();}};xmp.util.Logger.prototype.i_setCategoryFilterArray=function($e){this.p_filteredCategoryMap={};for(var i=0;i<$e.length;i++){var af=$e[i];this.p_filteredCategoryMap[af]='true';}};xmp.util.Logger.prototype.i_fatal=function(bf,cf,df){this.p_logCore(this.p_levelRef.FATAL,bf,cf,df);};xmp.util.Logger.prototype.i_critical=function(ef,ff,gf){this.p_logCore(this.p_levelRef.CRITICAL,ef,ff,gf);};xmp.util.Logger.prototype.warn=function(hf,jf,kf){this.p_logCore(this.p_levelRef.WARN,hf,jf,kf);};xmp.util.Logger.prototype.info=function(lf,mf,nf){this.p_logCore(this.p_levelRef.INFO,lf,mf,nf);};xmp.util.Logger.prototype.debug=function(of,pf,qf){this.p_logCore(this.p_levelRef.DEBUG,of,pf,qf);};xmp.util.Logger.prototype.i_isFatalEnabled=function(rf){return(this.p_commonLogLevel>=this.p_levelRef.FATAL&&!this.p_isFilteredOut(rf));};xmp.util.Logger.prototype.i_isCriticalEnabled=function(sf){return(this.p_commonLogLevel>=this.p_levelRef.CRITICAL&&!this.p_isFilteredOut(sf));};xmp.util.Logger.prototype.isWarnEnabled=function(tf){return(this.p_commonLogLevel>=this.p_levelRef.WARN&&!this.p_isFilteredOut(tf));};xmp.util.Logger.prototype.isInfoEnabled=function(uf){return(this.p_commonLogLevel>=this.p_levelRef.INFO&&!this.p_isFilteredOut(uf));};xmp.util.Logger.prototype.isDebugEnabled=function(vf){return(this.p_commonLogLevel>=this.p_levelRef.DEBUG&&!this.p_isFilteredOut(vf));};xmp.util.Logger.prototype.p_logCore=function(wf,xf,yf,zf){if(this.p_commonLogLevel>=wf&&!this.p_isFilteredOut(xf)){try{for(var i=0;i<this.p_listeners.length;i++){this.p_listeners[i].i_handleLog(wf,xf,yf,zf);}}
catch(e){xmp.showFatalErrorMessage('Exception occurred while calling LoggerListener.handleLogMessage, disconnecting logging: .'+xmp.extractErrorMessage(e));this.p_commonLogLevel=this.p_levelRef.i_NONE;}}};xmp.util.Logger.prototype.p_isFilteredOut=function(Af){return(this.p_filteredCategoryMap[Af]==='true');};xmp.util.Logger.prototype.i_listenerChanged=function(){this.p_recalcCommonLogLevel();};xmp.util.Logger.prototype.p_recalcCommonLogLevel=function(){this.p_commonLogLevel=this.p_levelRef.i_NONE;for(var i=0;i<this.p_listeners.length;i++){var Bf=this.p_listeners[i].getLogLevel();if(Bf>this.p_commonLogLevel){this.p_commonLogLevel=Bf;}}};xmp.createNamespace("xmp.util");xmp.util.PlayableData=function(Cf){xmp.util.PlayableData.ctor.call(this);if(typeof Cf!=='string'){throw new xmp.util.internals.InvalidArgsError("Argument 'metaResourceId' must be a string.");}
this.p_metaResourceId=Cf;this.p_compositeMetaResourceId='';this.p_metadataMap=new xmp.util.internals.MetadataMap(false);};xmp.DERIVE_CLASS(xmp.util.Loadable,xmp.util.PlayableData);xmp.util.PlayableData.prototype.i_setCompositeMetaResourceId=function(Df){this.p_compositeMetaResourceId=Df;};xmp.util.PlayableData.prototype.getPlayableId=function(){return this.getDataObject().id;};xmp.util.PlayableData.prototype.getMimeTypeArray=function(){return this.getDataObject().mimeTypes;};xmp.util.PlayableData.prototype.getTotalRunTime=function(){return this.getDataObject().trt;};xmp.util.PlayableData.prototype.getMetaResourceId=function(){return this.p_metaResourceId;};xmp.util.PlayableData.prototype.getCompositeMetaResourceId=function(){return this.p_compositeMetaResourceId;};xmp.util.PlayableData.prototype.getRuntimeMetadata=function(Ef,Ff){return this.p_metadataMap.i_get(Ef,Ff);};xmp.util.PlayableData.prototype.setRuntimeMetadata=function(Gf,Hf){this.p_metadataMap.i_set(Gf,Hf);};xmp.util.PlayableData.prototype.i_reInitRuntimeMetadata=function(){this.p_metadataMap.i_reInitialize({});};xmp.util.PlayableData.prototype.i_getLoadableId=function(){return this.getMetaResourceId();};xmp.createNamespace("xmp.util");xmp.util.PlayerStats=function(){this.p_array=[];this.p_map={};this.p_packCommon();};xmp.util.PlayerStats.p_singeltonInstance=null;xmp.util.PlayerStats.getInstance=function(){if(xmp.util.PlayerStats.p_singeltonInstance===null){xmp.util.PlayerStats.p_singeltonInstance=new xmp.util.PlayerStats();}
return xmp.util.PlayerStats.p_singeltonInstance;};xmp.util.PlayerStats.prototype.i_setValue=function(If,Jf){var Kf=If.toString();if(typeof(this.p_map[Kf])==='undefined'){this.p_array.push(Kf);}
this.p_map[Kf]=Jf.toString();};xmp.util.PlayerStats.prototype.i_getValue=function(Lf){var Mf=Lf.toString();var Nf=this.p_map[Mf];if(typeof(Nf)==='undefined'){return'';}
return Nf;};xmp.util.PlayerStats.prototype.i_getKeys=function(){var Of=[];for(var i=0;i<this.p_array.length;i++){Of.push(this.p_array[i]);}
return Of;};xmp.util.PlayerStats.prototype.p_packCommon=function(){this.i_setValue('sessionId',((new Date()).getTime()).toString());this.i_setValue('userId',xmp.util.Cookie.read('CNNid'));this.i_setValue('geoId',xmp.util.Cookie.read('adDEmas'));};xmp.createNamespace("xmp.util");xmp.util.PreferenceNode=function(Pf,Qf,Rf){this.p_parent=null;this.p_root=null;this.p_isSystemNode=false;this.p_name='';this.p_absolutePath='';this.p_children={};this.p_map={};if(typeof Qf!=='string'){throw new xmp.util.internals.InvalidArgsError("Argument 'name' must be a non-null string.");}
if(Pf===null){if(Qf.length>0){throw new xmp.util.internals.InvalidArgsError("Root node cannot have a name.");}
this.p_root=this;this.p_absolutePath=xmp.util.PreferenceNode.p_PATH_SEPARATOR;}
else{if(Qf.length===0){throw new xmp.util.internals.InvalidArgsError("Non-root node cannot have an empty name.");}
this.p_root=Pf.i_getRoot();if(Pf===this.p_root){this.p_absolutePath=Pf.getAbsolutePath()+Qf;}
else{this.p_absolutePath=Pf.getAbsolutePath()+xmp.util.PreferenceNode.p_PATH_SEPARATOR+Qf;}
Pf.p_addChild(Qf,this);}
this.p_isSystemNode=Rf;this.p_parent=Pf;this.p_name=Qf;};xmp.util.PreferenceNode.p_PATH_SEPARATOR='/';xmp.util.PreferenceNode.prototype.getAbsolutePath=function(){return this.p_absolutePath;};xmp.util.PreferenceNode.prototype.retrieveChildrenNames=function(){return xmp.MapIterator.extractKeysSorted(this.p_children);};xmp.util.PreferenceNode.prototype.retrieveChildren=function(){var Sf=this.retrieveChildrenNames();var Tf=[];for(var i=0;i<Sf.length;i++){var Uf=this.p_getChild(Sf[i]);Tf.push(Uf);}
return Tf;};xmp.util.PreferenceNode.prototype.retrieveKeys=function(){return xmp.MapIterator.extractKeysSorted(this.p_map);};xmp.util.PreferenceNode.prototype.cloneKeyValueMap=function(){return xmp.MapIterator.create(this.p_map).cloneMap();};xmp.util.PreferenceNode.prototype.getName=function(){return this.p_name;};xmp.util.PreferenceNode.prototype.getParent=function(){return this.p_parent;};xmp.util.PreferenceNode.prototype.i_getRoot=function(){return this.p_root;};xmp.util.PreferenceNode.prototype.getNodeForPath=function(Vf){try{var Wf=this.p_splitPathAndReturnStartingNode(Vf);return this.p_getNodeForPathRecursive(Wf[0],Wf[1]);}
catch(e){throw new Error("Error calling getNodeForPath: "+xmp.extractErrorMessage(e));}};xmp.util.PreferenceNode.prototype.nodeExists=function(Xf){if(Xf===xmp.util.PreferenceNode.p_PATH_SEPARATOR){return true;}
var Yf=this.p_splitPathAndReturnStartingNode(Xf);var Zf=Yf[0];var $f=Yf[1];for(var i=0;i<$f.length;i++){var ag=$f[i];Zf=Zf.p_getChild(ag);if(!Zf){return false;}}
return true;};xmp.util.PreferenceNode.prototype.getString=function(bg,cg){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE,xmp.i_STRING_TYPE],"PreferenceNode.getString");var dg=this.p_get(bg);if(!dg){return cg;}
if(typeof dg!=='string'){throw new Error("Found value, but was not a string.");}
return dg;};xmp.util.PreferenceNode.prototype.getBoolean=function(eg,fg){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE,xmp.i_BOOLEAN_TYPE],"PreferenceNode.getBoolean");var gg=this.p_get(eg);if(!gg){return fg;}
gg=gg.toLowerCase();if(gg==='false'){return false;}
if(gg==='true'){return true;}
throw new Error("Found value, but was not a boolean.");};xmp.util.PreferenceNode.prototype.getInt=function(hg,ig){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE,xmp.i_NUMBER_TYPE],"PreferenceNode.getInt");if(ig!==Math.floor(ig)){throw new xmp.util.internals.InvalidArgsError("The 'defaultValue' argument must be an integer.");}
var jg=this.p_get(hg);if(!jg){return ig;}
if(!this.p_isNumber(jg,false)){throw new Error("Found value, but was not an integer.");}
return parseInt(jg,0);};xmp.util.PreferenceNode.prototype.getFloat=function(kg,lg){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE,xmp.i_NUMBER_TYPE],"PreferenceNode.getFloat");var mg=this.p_get(kg);if(!mg){return lg;}
if(!this.p_isNumber(mg,true)){throw new Error("Found value, but was not a float.");}
return parseFloat(mg,0);};xmp.util.PreferenceNode.prototype.p_addChild=function(ng,og){this.p_children[ng]=og;};xmp.util.PreferenceNode.prototype.p_createChild=function(pg){return new xmp.util.PreferenceNode(this,pg,this.p_isSystemNode);};xmp.util.PreferenceNode.prototype.p_getChild=function(qg){return this.p_children[qg];};xmp.util.PreferenceNode.prototype.p_get=function(rg){if(rg.length===0){throw new xmp.util.internals.InvalidArgsError("The 'key' argument must be a non-empty string.");}
var sg=this.p_map[rg];return sg;};xmp.util.PreferenceNode.prototype.i_addValue=function(tg,ug){this.p_map[tg]=ug;};xmp.util.PreferenceNode.prototype.p_isNumber=function(vg,wg){return xmp.isNumber(vg,wg);};xmp.util.PreferenceNode.prototype.p_splitPathAndReturnStartingNode=function(xg){var yg=this;var zg=xg.split(xmp.util.PreferenceNode.p_PATH_SEPARATOR);var i=0;var j=0;for(i=0,j=zg.length;i<j;i++){if(zg[i].length===0){if(i===0){yg=this.p_root;}
else{throw new Error("pathName contains consecutive slashes: "+xg,"pathName");}}}
if(zg[0].length===0){zg.shift();}
return[yg,zg];};xmp.util.PreferenceNode.prototype.p_getNodeForPathRecursive=function(Ag,Bg){if(Bg.length>0){var Cg=Bg[0];var Dg=Ag.p_getChild(Cg);if(!Dg){Dg=Ag.p_createChild(Cg);Ag.p_addChild(Cg,Dg);}
Ag=Dg;Bg.shift();return Ag.p_getNodeForPathRecursive(Ag,Bg);}
return this;};xmp.util.PreferenceNode.prototype.i_cloneTo=function(Eg){var Fg=this.retrieveKeys();for(var i=0;i<Fg.length;i++){var Gg=Fg[i];var Hg=this.p_get(Gg);Eg.i_addValue(Gg,Hg);}
var Ig=this.retrieveChildrenNames();for(var j=0;j<Ig.length;j++){var Jg=Ig[j];var Kg=this.getNodeForPath(Jg);var Lg=Eg.getNodeForPath(Jg);Kg.i_cloneTo(Lg);}};xmp.util.PreferenceNode.prototype.i_toXml=function(Mg,Ng){var Og=null;if(this===this.i_getRoot()){Og=Mg.createNode(1,'root','');Og.setAttribute('type',(this.p_isSystemNode?'system':'user'));}
else{Og=Mg.createNode(1,'node','');Og.setAttribute('name',this.getName());}
Ng.appendChild(Og);var Pg=Mg.createNode(1,'map','');Og.appendChild(Pg);var Qg=this.retrieveKeys();for(var i=0;i<Qg.length;i++){var Rg=Qg[i];var Sg=this.p_get(Rg);var Tg=Mg.createNode(1,'entry','');Tg.setAttribute('key',Rg);Tg.setAttribute('value',Sg);Pg.appendChild(Tg);}
var Ug=this.retrieveChildren();for(var j=0;j<Ug.length;j++){var Vg=Ug[j];Vg.i_toXml(Mg,Og);}};xmp.createNamespace("xmp.util");xmp.util.RootUrlProvider=function(){};xmp.util.RootUrlProvider.p_instance=null;xmp.util.RootUrlProvider.getInstance=function(){if(xmp.util.RootUrlProvider.p_instance===null){xmp.util.RootUrlProvider.p_instance=new xmp.util.RootUrlProvider();}
return xmp.util.RootUrlProvider.p_instance;};xmp.util.RootUrlProvider.prototype.i_getRootUrl=function(Wg,Xg){var Yg=this.i_getRootUrlNode(Wg);if(Yg===null){return'';}
if(!xmp.isNonEmptyString(Xg)){Xg=xmp.NO_DEFAULT_VALUE;}
return Yg.getString(xmp.i_ROOT_URL,Xg);};xmp.util.RootUrlProvider.prototype.i_getRootUrlNode=function(Zg){var $g=xmp.util.SettingsManager.getInstance().getGlobalContextNode();if(!$g.nodeExists('rootUrlMap/'+Zg)){return null;}
return $g.getNodeForPath('rootUrlMap/'+Zg);};xmp.createNamespace("xmp.util");xmp.util.SettingsManager=function(){this.p_doGenericPlayerContextUnderlay=true;this.p_root=null;this.p_buildingRoot=null;this.p_backingStoreArray=[];this.p_context='';this.p_contextNode=null;this.p_globalContextNode=null;this.p_contextChangeListeners=[];this.p_buildSubstitutionMap={};};xmp.util.SettingsManager.p_singeltonInstance=null;xmp.util.SettingsManager.getInstance=function(){if(xmp.util.SettingsManager.p_singeltonInstance===null){xmp.util.SettingsManager.p_singeltonInstance=new xmp.util.SettingsManager();}
return xmp.util.SettingsManager.p_singeltonInstance;};xmp.util.SettingsManager.prototype.getRoot=function(){return this.p_root;};xmp.util.SettingsManager.prototype.getContextNode=function(){return this.p_contextNode;};xmp.util.SettingsManager.prototype.getGlobalContextNode=function(){return this.p_globalContextNode;};xmp.util.SettingsManager.prototype.getContext=function(){return this.p_context;};xmp.util.SettingsManager.prototype.init=function(ah,bh){this.p_buildSubstitutionMap=(bh)?bh:{};this.p_context='';this.p_root=null;this.p_contextNode=null;this.p_globalContextNode=null;this.p_buildingRoot=null;this.p_backingStoreArray=[];this.p_backingStoreArray=this.p_backingStoreArray.concat(ah);this.p_build();};xmp.util.SettingsManager.prototype.i_addContextChangeListener=function(ch){this.p_contextChangeListeners.push(ch);};xmp.util.SettingsManager.prototype.setContext=function(dh){this.p_context=(!dh)?'':dh;this.p_contextNode=null;if(this.p_context.length!==0){this.p_contextNode=this.p_root.getNodeForPath('/PlayerContexts/'+this.p_context);}
for(var i=0;i<this.p_contextChangeListeners.length;i++){this.p_contextChangeListeners[i].call();}};xmp.util.SettingsManager.prototype.p_build=function(){this.p_buildingRoot=new xmp.util.PreferenceNode(null,'',true);try{for(var i=0;i<this.p_backingStoreArray.length;i++){var eh=this.p_backingStoreArray[i];this.p_buildBackingStore(eh);}}
catch(e){this.p_backingStoreArray=[];this.p_buildingRoot=null;throw e;}
this.p_backingStoreArray=[];this.p_root=this.p_buildingRoot;this.setContext(this.p_context);this.p_globalContextNode=this.p_root.getNodeForPath('/PlayerContexts/Global');};xmp.util.SettingsManager.prototype.p_buildBackingStore=function(fh){try{var gh=fh;var hh=this.p_buildingRoot;this.p_buildMap(hh,gh.map);this.p_buildNodes(hh,gh.nodes);}
catch(e){throw new Error("Error calling p_buildBackingStore: "+xmp.extractErrorMessage(e));}};xmp.util.SettingsManager.prototype.p_buildNode=function(ih,jh){if(!xmp.isNonEmptyString(jh.name)){throw new Error("Missing 'name' or 'name' is empty");}
var kh=ih.getNodeForPath(jh.name);this.p_buildGenericContext(ih,kh);this.p_buildMap(kh,jh.map);this.p_buildNodes(kh,jh.nodes);};xmp.util.SettingsManager.prototype.p_buildGenericContext=function(lh,mh){if(this.p_doGenericPlayerContextUnderlay&&(lh.getAbsolutePath()==='/PlayerContexts')&&!(mh.getName()==='Global'||mh.getName()==='Generic')){var nh=lh.getNodeForPath('/PlayerContexts/Generic');nh.i_cloneTo(mh);}};xmp.util.SettingsManager.prototype.p_buildMap=function(oh,ph){for(var i=0;i<ph.length;i++){var qh=ph[i];if(!xmp.isNonEmptyString(qh.key)||(typeof qh.value!=='string')){throw new Error("Missing or empty 'key' or missing 'value'.");}
oh.i_addValue(qh.key,this.p_substitute(qh.value));}};xmp.util.SettingsManager.prototype.p_substitute=function(rh){if(rh.indexOf('${{')===-1){return rh;}
for(var sh=xmp.MapIterator.create(this.p_buildSubstitutionMap);sh.hasNext();sh.next()){var th=sh.currentKey();var uh=sh.currentValue();var vh='${{'+th+'}}';rh=rh.replace(vh,uh);}
return rh;};xmp.util.SettingsManager.prototype.p_buildNodes=function(wh,xh){for(var i=0;i<xh.length;i++){var yh=xh[i];this.p_buildNode(wh,yh);}};xmp.util.SettingsManager.prototype.saveAsXmlFile=function(zh){if(xmp.isBrowserEnvironment()){xmp.showMessage('This method meant to be called from WSH only.');return;}
var Ah=this.p_toXml();Ah.save(zh);};xmp.util.SettingsManager.prototype.p_toXml=function(){var Bh='';Bh+='<?xml version="1.0" encoding="UTF-8" ?>';Bh+='<!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">';Bh+='<preferences EXTERNAL_XML_VERSION="1.0"/>';var Ch=new ActiveXObject('MSXML2.DOMDocument');Ch.async=false;Ch.resolveExternals=false;Ch.validateOnParse=false;Ch.loadXML(Bh);this.getRoot().i_toXml(Ch,Ch.documentElement);return Ch;};xmp.createNamespace("xmp.util");xmp.util.Timer=function(id,Dh,Eh,Fh){xmp.validateArguments(arguments,[xmp.i_STRING_TYPE,xmp.i_NUMBER_TYPE,xmp.i_NUMBER_TYPE,xmp.i_OBJECT_TYPE],"Timer.ctor");if(id===null||id.length===0||Dh<0||!(Eh===-1||Eh>0)||Fh===null){throw new xmp.util.internals.InvalidArgsError("The 'id' argument must be non-empty, "+"and the 'interval' argument must a positive integer, "+"and the 'maxRepeatCount' argument must be -1 or a positive integer, "+"and the 'callback' must be non-null.");}
this.p_id=id;this.p_interval=Dh;this.p_maxRepeatCount=Eh;this.p_callback=Fh;this.p_repeatCount=0;this.p_cookie=-1;};xmp.util.Timer.p_simpleIdCounter=0;xmp.util.Timer.p_simpleTimerMap={};xmp.util.Timer.doSimpleCallback=function(Gh){xmp.util.Timer.i_doSimpleCallbackEx(xmp.i_DEFAULT_TIMER_INTERVAL,Gh);};xmp.util.Timer.i_doSimpleCallbackEx=function(Hh,Ih){xmp.util.Timer.p_simpleIdCounter++;var id='SimpleTimer_'+xmp.util.Timer.p_simpleIdCounter.toString();var Jh=new xmp.util.Callback(id,xmp.util.Timer.p_doSimpleCallbackCb,null);Jh.setMetadata('relayCb',Ih);var Kh=new xmp.util.Timer(id,Hh,1,Jh);xmp.util.Timer.p_simpleTimerMap[Kh.getId()]=Kh;Kh.start();};xmp.util.Timer.p_doSimpleCallbackCb=function(Lh,Mh){if(typeof(xmp.util.Timer.p_simpleTimerMap[Mh.getId()])!=='undefined'){delete xmp.util.Timer.p_simpleTimerMap[Mh.getId()];}
var Nh=Lh.getMetadata('relayCb',xmp.util.internals.MetadataMap.defaultObj);Nh.call();};xmp.util.Timer.prototype.getId=function(){return this.p_id;};xmp.util.Timer.prototype.isRunning=function(){return(this.p_cookie!==-1);};xmp.util.Timer.prototype.start=function(){this.stop();this.p_repeatCount=0;var Oh=this;this.p_cookie=window.setInterval(function(){Oh.p_timerCallback();},this.p_interval);};xmp.util.Timer.prototype.stop=function(){if(this.p_cookie!==-1){window.clearInterval(this.p_cookie);this.p_cookie=-1;}};xmp.util.Timer.prototype.p_timerCallback=function(){if(!this.isRunning()){return;}
try{this.p_callback.call(this);}
catch(ex){xmp.util.internals.CategoryLogger.i_create('Timer').warn('Exception calling timer callback.',ex);}
if(!this.isRunning()){return;}
this.p_repeatCount++;if(this.p_maxRepeatCount!==-1&&this.p_repeatCount>=this.p_maxRepeatCount){this.stop();}};xmp.createNamespace("xmp.util");xmp.util.TriggerHelper=function(){};xmp.util.TriggerHelper.i_handleTrackRequest=function(Ph,Qh){xmp.baseplayer.internals.Trigger.getTrigger(Ph,'request').doCommands(xmp.util.TriggerHelper.p_createTriggerContext(Ph,Qh));};xmp.util.TriggerHelper.i_handleTrackStart=function(Rh,Sh){xmp.baseplayer.internals.Trigger.getTrigger(Rh,'start').doCommands(xmp.util.TriggerHelper.p_createTriggerContext(Rh,Sh));};xmp.util.TriggerHelper.i_handleTrackMidpoint=function(Th,Uh){xmp.baseplayer.internals.Trigger.getTrigger(Th,'mid').doCommands(xmp.util.TriggerHelper.p_createTriggerContext(Th,Uh));};xmp.util.TriggerHelper.handleTrackEnd=function(Vh,Wh){xmp.baseplayer.internals.Trigger.getTrigger(Vh,'end').doCommands(xmp.util.TriggerHelper.p_createTriggerContext(Vh,Wh));};xmp.util.TriggerHelper.p_createTriggerContext=function(Xh,Yh){var Zh=new xmp.baseplayer.TriggerContext();Zh.setPlayableNode(Xh);Zh.setMetadata('player',Yh);return Zh;};xmp.createNamespace("xmp.util");xmp.util.Version=function(){};xmp.util.Version.$buildVersion$="0.1.633.2120";xmp.util.Version.getAsString=function(){return xmp.util.Version.$buildVersion$;};xmp.util.Version.i_makeFileVersionString=function($h,ai){var bi=xmp.util.Version.getAsString();bi=bi.replace(/\./g,'_');return $h+'_'+bi+'.'+ai;};xmp.XmpErrorCodes=function(){};xmp.XmpErrorCodes.NONE=0;xmp.XmpErrorCodes.FATAL_UNSPECIFIED_ERROR=1;xmp.XmpErrorCodes.FATAL_PLATFORM=1000;xmp.XmpErrorCodes.FATAL_PLUGIN=2000;xmp.XmpErrorCodes.FATAL_PLUGIN_INIT=2100;xmp.XmpErrorCodes.CRITICAL_UNSPECIFIED_AJAX_ERROR=5000;xmp.XmpErrorCodes.CRITICAL_FIRST_FRAME_TIMEOUT=6000;xmp.XmpErrorCodes.CRITICAL_PLAYER_CONNECTION=7000;xmp.XmpErrorCodes.i_calc=function(ci){var di=xmp.XmpErrorCodes;if(typeof ci==='number'){for(var ei=xmp.MapIterator.create(di);ei.hasNext();ei.next()){var v=ei.currentValue();if(v===ci){return ci;}}}
return di.NONE;};xmp.XmpErrorCodes.i_stringify=function(fi){var gi=xmp.XmpErrorCodes;var hi=gi.i_calc(fi);switch(hi){case gi.NONE:return'none';case gi.FATAL_UNSPECIFIED_ERROR:return'fatal_unspecified_error';case gi.FATAL_PLATFORM:return'Unsupported Platform (fatal error)';case gi.FATAL_PLUGIN:return'Plugin Not Found (fatal error)';case gi.FATAL_PLUGIN_INIT:return'Plugin Timeout (fatal error)';case gi.CRITICAL_UNSPECIFIED_AJAX_ERROR:return'Unspecified Ajax Error (critical error)';case gi.CRITICAL_FIRST_FRAME_TIMEOUT:return'Video First Frame Timeout (critical error)';case gi.CRITICAL_PLAYER_CONNECTION:return'Video Connection Problem (critical error)';default:return'none';}};
