xmp.DHTML_PLAYER="DHTML";xmp.DHTML_MIME_TYPE="application/x-dhtml";xmp.DHTML_OBJECT_TRANSPORT="dhtmlObject";xmp.DHTMLPlayer=function(aa){this.object=null;this.node=null;this.url="";xmp.DHTMLPlayer.ctor.call(this,xmp.DHTML_PLAYER,aa);};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.DHTMLPlayer);xmp.DHTMLPlayer.prototype.open=function(ba){this.node=ba;this.url=ba.getURI();var ca=new xmp.util.Callback(this.getName(),this.onDHTMLObjectLoad,this);var da=xmp.net.AjaxRequestManager.getInstance();var ea=xmp.DHTML_OBJECT_TRANSPORT;var fa=ba.getMetadata('altRootUrlType','');if(fa.length>0){ea=fa;}
da.request(this.url,ca,ea,this.url,xmp.net.ContentTypes.JSON,null);};xmp.DHTMLPlayer.prototype.close=function(){if(this.object){this.object.close();this.object=null;}
xmp.DHTMLPlayer.base.close.call(this);};xmp.DHTMLPlayer.prototype.play=function(){this.object.play();xmp.DHTMLPlayer.base.play.call(this);this.setState(xmp.PLAY);};xmp.DHTMLPlayer.prototype.pause=function(){this.object.pause();xmp.DHTMLPlayer.base.pause.call(this);this.setState(xmp.PAUSE);};xmp.DHTMLPlayer.prototype.stop=function(){this.object.stop();xmp.DHTMLPlayer.base.stop.call(this);this.setState(xmp.STOP);};xmp.DHTMLPlayer.prototype.rewind=function(){this.object.rewind();xmp.DHTMLPlayer.base.rewind.call(this);this.setState(xmp.REWIND);};xmp.DHTMLPlayer.prototype.fastForward=function(){this.object.fastForward();xmp.DHTMLPlayer.base.fastForward.call(this);this.setState(xmp.FAST_FORWARD);};xmp.DHTMLPlayer.prototype.seek=function(ga){this.object.seek(ga);xmp.DHTMLPlayer.base.seek.call(this,ga);this.setState(xmp.SEEKABLE);};xmp.DHTMLPlayer.prototype.ended=function(){xmp.DHTMLPlayer.base.ended.call(this);this.object.ended();};xmp.DHTMLPlayer.prototype.isAvailable=function(ha){if(!this.object){return false;}
return this.object.isAvailable(ha);};xmp.DHTMLPlayer.prototype.canAccept=function(ia){return(xmp.DHTML_MIME_TYPE.indexOf(ia)!==-1);};xmp.DHTMLPlayer.prototype.getPosition=function(){return this.object.getPosition();};xmp.DHTMLPlayer.prototype.getDuration=function(){return this.object.getDuration();};xmp.DHTMLPlayer.prototype.moveTo=function(ja,ka,la,ma){xmp.DHTMLPlayer.base.moveTo.call(this,ja,ka,la,ma);this.object.moveTo(ja,ka,la,ma);};xmp.DHTMLPlayer.prototype.create=function(na){na.id=xmp.DHTML_PLAYER+na.group;xmp.DHTMLPlayer.base.create.call(this,na);this.volume=na.volume;this.mute=na.mute;var oa=na.viewport.getNative();oa.innerHTML="<div id='"+na.id+"' style='background-color: #000000; z-index: "+xmp.NATIVE_PLAYER_Z_INDEX+"; width: "+oa.style.width+"; height: "+oa.style.height+"' />";this.setCreated();};xmp.DHTMLPlayer.prototype.onDHTMLObjectLoad=function(pa,qa){var ra="";try{if(true===qa.isError()){throw new xmp.NativePlayerConnectionError("Retrieving DHTML object via Ajax request.","Unable to retrieve DHTML object \""+this.url+"\".",this);}
this.object=qa.getJsonObject();this.validateObject();this.object.open(this.getGroup(),this,this.getNative(),this.node);this.node=null;}
catch(e){this.setError("Loading DHTML object via Ajax request.",e);}};xmp.DHTMLPlayer.prototype.validateObject=function(){if(!this.object){throw new xmp.DHTMLObjectError("Validating DHTML object.","NULL DHTML object.");}
var sa=[{name:xmp.OPEN_OPERATION,implementation:this.object.open,args:4},{name:xmp.CLOSE_OPERATION,implementation:this.object.close,args:0},{name:xmp.PLAY_OPERATION,implementation:this.object.play,args:0},{name:xmp.PAUSE_OPERATION,implementation:this.object.pause,args:0},{name:xmp.STOP_OPERATION,implementation:this.object.stop,args:0},{name:xmp.REWIND_OPERATION,implementation:this.object.rewind,args:0},{name:xmp.FAST_FORWARD_OPERATION,implementation:this.object.fastForward,args:0},{name:xmp.SEEK_OPERATION,implementation:this.object.seek,args:1},{name:xmp.ENDED_OPERATION,implementation:this.object.ended,args:0},{name:xmp.IS_AVAILABLE_OPERATION,implementation:this.object.isAvailable,args:1},{name:xmp.GET_POSITION_OPERATION,implementation:this.object.getPosition,args:0},{name:xmp.GET_DURATION_OPERATION,implementation:this.object.getDuration,args:0},{name:xmp.MOVETO_OPERATION,implementation:this.object.moveTo,args:4}];var ta=sa.length;for(var i=0;i<ta;i++){if(!sa[i].implementation){throw new xmp.DHTMLObjectError("Validating DHTML object.","Missing required DHTML object method \""+sa[i].name.toLowerCase()+"\" implementation.");}
if(sa[i].implementation.length!==sa[i].args){throw new xmp.DHTMLObjectError("Validating DHTML object.","The required DHTML object method \""+sa[i].name.toLowerCase()+"\" requires \""+sa[i].args+"\" arguments.  \n\n"+sa[i].implementation.length+" arguments were found.");}}};xmp.DHTMLPlayer.prototype.onStateChange=function(ua,va){xmp.validateArguments(arguments,[xmp.STRING_TYPE,xmp.STRING_TYPE],"DHTMLPlayer.onStateChange");this.setState(ua,va);};xmp.DHTMLPlayer.prototype.onError=function(wa,e){xmp.validateArguments(arguments,[xmp.STRING_TYPE,xmp.OBJECT_TYPE],"DHTMLPlayer.onError");this.setError(wa,e);};xmp.FLASH="Flash";xmp.FLASH_MIME_TYPE="video/x-flv";xmp.FLASH_PLUGIN_MIME_TYPE="application/x-shockwave-flash";xmp.FLASH_PLUGIN_NAME="Shockwave Flash";xmp.FLASH_ACTIVEX_BASE_PROGID="ShockwaveFlash.ShockwaveFlash.";xmp.LATEST_FLASH_VERSION=9;xmp.FLASH_VERSION=8;xmp.FLASH_VERSION_VARIABLE="$version";xmp.ALLOW_SCRIPT_ACCESS="allowScriptAccess";xmp.ALWAYS_ACCESS="always";xmp.QUALITY="quality";xmp.QUALITY_HIGH="high";xmp.WINDOW_MODE="wmode";xmp.TRANSPARENT_WINDOW_MODE="transparent";xmp.FLASH_PLAYER_STATE_CHANGE_METHOD="onStateChange";xmp.FLASH_PLAYER_ERROR_METHOD="onError";xmp.FLASH_PLAYER_FSCOMMAND_METHOD="onFSCommand";xmp.FLASH_PLAYER_INITIALIZATION_METHOD="onInit";xmp.FLASH_PLAYER_EXECUTE_COMMAND_METHOD="onExecuteCommand";xmp.COMMAND="fmpCommand";xmp.FMP_OPEN_COMMAND="fmpOpen";xmp.FMP_CLOSE_COMMAND="fmpClose";xmp.FMP_PLAY_COMMAND="fmpPlay";xmp.FMP_PAUSE_COMMAND="fmpPause";xmp.FMP_STOP_COMMAND="fmpStop";xmp.FMP_REWIND_COMMAND="fmpRewind";xmp.FMP_FAST_FORWARD_COMMAND="fmpFastForward";xmp.FMP_SEEK_COMMAND="fmpSeek";xmp.FMP_ENDED_COMMAND="fmpEnded";xmp.FMP_IS_AVAILABLE_COMMAND="fmpIsAvailable";xmp.FMP_GET_POSITION_COMMAND="fmpGetPosition";xmp.FMP_GET_DURATION_COMMAND="fmpGetDuration";xmp.FMP_GET_VOLUME_COMMAND="fmpGetVolume";xmp.FMP_SET_VOLUME_COMMAND="fmpSetVolume";xmp.FMP_GET_MUTE_COMMAND="fmpGetMute";xmp.FMP_SET_MUTE_COMMAND="fmpSetMute";xmp.SCRIPT_ELEMENT_TAG="script";xmp.FLASH_ERROR_CALLBACK="errorCallback";xmp.FLASH_INITIALIZATION_CALLBACK="initializationCallback";xmp.FLASH_STATE_CHANGE_CALLBACK="stateChangeCallback";xmp.FLASH_STATE_EXECUTE_COMMAND_CALLBACK="executeCommandCallback";xmp.EXECUTE_COMMAND_RESULT="executeCommandResult";xmp.FLASH_NATIVE_PLAYER_COMPONENT="native_player_component";xmp.FLASH_CONNECTION_ERROR="ConnectionError";xmp.FlashPlayer=function(xa){this.externalInterface=true;xmp.FlashPlayer.ctor.call(this,xmp.FLASH,xa);};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.FlashPlayer);xmp.FlashPlayer.prototype.open=function(ya){((true===this.externalInterface)?this.getNative().fmpOpen(xmp.FLASH_MIME_TYPE,ya.getURI(),ya.getEndedFrame()):this.getNative().SetVariable(xmp.COMMAND,this.getFSCommandInfo(xmp.FMP_OPEN_COMMAND,[xmp.FLASH_MIME_TYPE,ya.getURI(),ya.getEndedFrame()])));};xmp.FlashPlayer.prototype.close=function(){((true===this.externalInterface)?this.getNative().fmpClose():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_CLOSE_COMMAND));xmp.FlashPlayer.base.close.call(this);};xmp.FlashPlayer.prototype.play=function(){((true===this.externalInterface)?this.getNative().fmpPlay():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_PLAY_COMMAND));xmp.FlashPlayer.base.play.call(this);this.setState(xmp.PLAY);};xmp.FlashPlayer.prototype.pause=function(){((true===this.externalInterface)?this.getNative().fmpPause():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_PAUSE_COMMAND));xmp.FlashPlayer.base.pause.call(this);this.setState(xmp.PAUSE);};xmp.FlashPlayer.prototype.stop=function(){((true===this.externalInterface)?this.getNative().fmpStop():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_STOP_COMMAND));xmp.FlashPlayer.base.stop.call(this);this.setState(xmp.STOP);};xmp.FlashPlayer.prototype.rewind=function(){((true===this.externalInterface)?this.getNative().fmpRewind():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_REWIND_COMMAND));xmp.FlashPlayer.base.rewind.call(this);this.setState(xmp.REWIND);};xmp.FlashPlayer.prototype.fastForward=function(){((true===this.externalInterface)?this.getNative().fmpFastForward():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_FAST_FORWARD_COMMAND));xmp.FlashPlayer.base.fastForward.call(this);this.setState(xmp.FAST_FORWARD);};xmp.FlashPlayer.prototype.seek=function(za){((true===this.externalInterface)?this.getNative().fmpSeek(za):this.getNative().SetVariable(xmp.COMMAND,this.getFSCommandInfo(xmp.FMP_SEEK_COMMAND,[za])));xmp.FlashPlayer.base.seek.call(this,za);this.setState(xmp.SEEKABLE);};xmp.FlashPlayer.prototype.ended=function(){((true===this.externalInterface)?this.getNative().fmpEnded():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_ENDED_COMMAND));xmp.FlashPlayer.base.ended.call(this);};xmp.FlashPlayer.prototype.isAvailable=function(Aa){if(true===this.externalInterface){return this.getNative().fmpIsAvailable(Aa);}
else{this.getNative().SetVariable(xmp.COMMAND,this.getFSCommandInfo(xmp.FMP_IS_AVAILABLE_COMMAND,[Aa]));return(xmp.TRUE===this.getNative().GetVariable(xmp.FMP_IS_AVAILABLE_COMMAND));}};xmp.FlashPlayer.prototype.getPosition=function(){if(true===this.externalInterface){return this.getNative().fmpGetPosition();}
else{this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_GET_POSITION_COMMAND);return parseInt(this.getNative().GetVariable(xmp.FMP_GET_POSITION_COMMAND),10);}};xmp.FlashPlayer.prototype.getDuration=function(){if(true===this.externalInterface){return this.getNative().fmpGetDuration();}
else{this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_GET_DURATION_COMMAND);return parseInt(this.getNative().GetVariable(xmp.FMP_GET_DURATION_COMMAND),10);}};xmp.FlashPlayer.prototype.getVolume=function(){if(true===this.externalInterface){return this.getNative().fmpGetVolume();}
else{this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_GET_VOLUME_COMMAND);return parseInt(this.getNative().GetVariable(xmp.FMP_GET_VOLUME_COMMAND),10);}};xmp.FlashPlayer.prototype.setVolume=function(Ba){((true===this.externalInterface)?this.getNative().fmpSetVolume(Ba):this.getNative().SetVariable(xmp.COMMAND,this.getFSCommandInfo(xmp.FMP_SET_VOLUME_COMMAND,[Ba])));};xmp.FlashPlayer.prototype.getMute=function(){if(true===this.externalInterface){return this.getNative().fmpGetMute();}
else{this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_GET_MUTE_COMMAND);return(xmp.TRUE===this.getNative().GetVariable(xmp.FMP_GET_MUTE_COMMAND));}};xmp.FlashPlayer.prototype.getFullscreen=function(){throw new xmp.NativePlayerUnsupportedError("Invoking \"getFullscreen\" method.","The \"getFullscreen\" method is not supported.",this);};xmp.FlashPlayer.prototype.setFullscreen=function(Ca){throw new xmp.NativePlayerUnsupportedError("Invoking \"setFullscreen\" method.","The \"setFullscreen\" method is not supported.",this);};xmp.FlashPlayer.prototype.setMute=function(Da){((true===this.externalInterface)?this.getNative().fmpSetMute(Da):this.getNative().SetVariable(xmp.COMMAND,this.getFSCommandInfo(xmp.FMP_SET_MUTE_COMMAND,[Da])));};xmp.FlashPlayer.prototype.canAccept=function(Ea){return(xmp.FLASH_MIME_TYPE.indexOf(Ea)!==-1);};xmp.FlashPlayer.prototype.onValidatePlugIn=function(Fa,Ga){this.validatePlugInVersion(Fa,xmp.FLASH,this.validatePlugInExists(Fa,Ga),Ga);};xmp.FlashPlayer.prototype.validatePlugInExists=function(Ha,Ia){var Ja;var Ka;var La;var Ma=this.getPlugInInfo(Ia,xmp.FLASH);if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1){for(var i=xmp.LATEST_FLASH_VERSION;i>=3;i--){try{var Na=new ActiveXObject(xmp.FLASH_ACTIVEX_BASE_PROGID+i);La=Na.GetVariable(xmp.FLASH_VERSION_VARIABLE);Ka=La.indexOf(" ");if(-1!==Ka){La=La.substr(La.indexOf(" ")+1);Ja=La.replace(/,/g,xmp.VERSION_DELIMITER);}
return Ja;}
catch(e){}}
throw new xmp.PlugInNotFoundError(Ha,Ma);}
else{var Oa=navigator.mimeTypes[xmp.FLASH_PLUGIN_MIME_TYPE];if(!Oa){throw new xmp.PlugInNotFoundError(Ha,Ma);}
if(!Oa.enabledPlugin){throw new xmp.PlugInDisabledError(Ha,Ma,xmp.FLASH_PLUGIN_MIME_TYPE);}
var Pa=Oa.enabledPlugin.name;if(Pa.indexOf(xmp.FLASH_PLUGIN_NAME)===-1){throw new xmp.PlugInDisabledError(Ha,Ma,xmp.FLASH_PLUGIN_MIME_TYPE);}
var Qa=Oa.enabledPlugin.description;La=Qa.substr(Qa.indexOf(xmp.VERSION_DELIMITER)-1);Ja=La.substr(0,La.indexOf(" "));Ka=La.indexOf(" r");if(-1!==Ka){var Ra=La.substr(Ka+2);Ja+=xmp.VERSION_DELIMITER+Ra;}}
return Ja;};xmp.FlashPlayer.prototype.create=function(Sa){if(true===this.attach(Sa)){return;}
Sa.id=xmp.FLASH+Sa.group;xmp.FlashPlayer.base.create.call(this,Sa);var Ta=Sa.viewport.getNative();var Ua=Ta.getAttribute(xmp.FLASH_NATIVE_PLAYER_COMPONENT);if(!Ua||Ua===0){throw new xmp.NativePlayerError("Creating.","Invalid flash player component.  Missing component.",this);}
var Va=new SWFObject(Ua,Sa.id,Ta.style.width,Ta.style.height,xmp.FLASH_VERSION,xmp.BLACK_BACKGROUND_COLOR);Va.addParam(xmp.ALLOW_SCRIPT_ACCESS,xmp.ALWAYS_ACCESS);Va.addParam(xmp.QUALITY,xmp.QUALITY_HIGH);Va.addParam(xmp.WINDOW_MODE,xmp.TRANSPARENT_WINDOW_MODE);Va.addVariable(xmp.FLASH_INITIALIZATION_CALLBACK,this.getCallbackMethod(xmp.FLASH_PLAYER_INITIALIZATION_METHOD));Va.addVariable(xmp.FLASH_STATE_CHANGE_CALLBACK,this.getCallbackMethod(xmp.FLASH_PLAYER_STATE_CHANGE_METHOD));Va.addVariable(xmp.FLASH_STATE_EXECUTE_COMMAND_CALLBACK,this.getCallbackMethod(xmp.FLASH_PLAYER_EXECUTE_COMMAND_METHOD));Va.addVariable(xmp.FLASH_ERROR_CALLBACK,this.getCallbackMethod(xmp.FLASH_PLAYER_ERROR_METHOD));Va.addVariable(xmp.VOLUME,Sa.volume);Va.addVariable(xmp.MUTE,((true===Sa.mute)?xmp.TRUE:xmp.FALSE));if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)===-1){var Wa=document.createElement(xmp.SCRIPT_ELEMENT_TAG);Wa.innerHTML="function "+Sa.id+"_DoFSCommand(command, args) { "+this.getCallbackMethod(xmp.FLASH_PLAYER_FSCOMMAND_METHOD)+"(command, args); }";Ta.insertBefore(Wa,null);}
Va.write(Ta.id);};xmp.FlashPlayer.prototype.attach=function(Xa){if(Xa.viewport.type!==xmp.FLASH_VIEWPORT){return false;}
Xa.id=Xa.viewport.name;xmp.FlashPlayer.base.attach.call(this,Xa);this.externalInterface=Xa.viewport.getExternalInterface();var Ya=[{name:xmp.FLASH_INITIALIZATION_CALLBACK,value:this.getCallbackMethod(xmp.FLASH_PLAYER_INITIALIZATION_METHOD)},{name:xmp.FLASH_STATE_CHANGE_CALLBACK,value:this.getCallbackMethod(xmp.FLASH_PLAYER_STATE_CHANGE_METHOD)},{name:xmp.FLASH_STATE_EXECUTE_COMMAND_CALLBACK,value:this.getCallbackMethod(xmp.FLASH_PLAYER_EXECUTE_COMMAND_METHOD)},{name:xmp.FLASH_ERROR_CALLBACK,value:this.getCallbackMethod(xmp.FLASH_PLAYER_ERROR_METHOD)},{name:xmp.VOLUME,value:Xa.volume},{name:xmp.MUTE,value:((true===Xa.mute)?xmp.TRUE:xmp.FALSE)}];var Za=Ya.length;for(var i=0;i<Za;i++){var $a=Ya[i];this.getNative().SetVariable($a.name,$a.value);}
if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)===-1){var ab=document.createElement(xmp.SCRIPT_ELEMENT_TAG);ab.innerHTML="function "+Xa.id+"_DoFSCommand(command, args) { "+this.getCallbackMethod(xmp.FLASH_PLAYER_FSCOMMAND_METHOD)+"(command, args); }";Xa.viewport.getNative().insertBefore(ab,null);}
this.setCreated();return true;};xmp.FlashPlayer.prototype.translateState=function(bb){return bb;};xmp.FlashPlayer.prototype.getFSCommandInfo=function(cb,db){var eb=cb;for(var i=0;i<db.length;i++){eb+=xmp.DELIMITER+db[i];}
return eb;};xmp.FlashPlayer.prototype.onInit=function(){try{this.getNative().style.zIndex=xmp.NATIVE_PLAYER_Z_INDEX;this.setCreated();}
catch(e){this.setError("Initializing.",e);}};xmp.FlashPlayer.prototype.onStateChange=function(fb,gb){try{var hb=this.translateState(fb);if(hb.length>0){var ib=gb;if(fb===xmp.BUFFERING){var jb=gb;var kb=parseInt(jb.substring(0,jb.indexOf(xmp.DELIMITER)),10);jb=jb.substring(jb.indexOf(xmp.DELIMITER)+1,jb.length);var lb=parseInt(jb.substring(0,jb.indexOf(xmp.DELIMITER)),10);var mb=parseInt(jb.substring(jb.indexOf(xmp.DELIMITER)+1),10);ib={percent:kb,bytesDownloaded:lb,bytesTotal:mb};}
this.setState(hb,ib);}}
catch(e){this.setError("Handling state change.",e);}};xmp.FlashPlayer.prototype.onExecuteCommand=function(nb,ob){var pb=null;try{pb=xmp.FlashPlayer.base.executeCommand.call(this,nb,ob);if(false===this.externalInterface){this.getNative().SetVariable(xmp.EXECUTE_COMMAND_RESULT,pb);}}
catch(e){this.setError("Execute command.",e);}
return pb;};xmp.FlashPlayer.prototype.onError=function(qb,rb){try{var sb=[{label:"Flash Error Type",text:qb}];var tb=((qb===xmp.FLASH_CONNECTION_ERROR)?new xmp.NativePlayerConnectionError("Connecting to media.",rb,this,sb):new xmp.NativePlayerError("Handling error.",rb,this,sb));this.setError(null,tb);}
catch(e){this.setError("Handling error.",e);}};xmp.FlashPlayer.prototype.onFSCommand=function(ub,vb){try{var wb=null;if(ub===xmp.FLASH_PLAYER_INITIALIZATION_METHOD){this.externalInterface=false;this.onInit();}
else if(ub===xmp.FLASH_PLAYER_STATE_CHANGE_METHOD){wb=vb;var xb=wb.substring(0,wb.indexOf(xmp.DELIMITER));var yb=wb.substring(wb.indexOf(xmp.DELIMITER)+1);this.onStateChange(xb,yb);}
else if(ub===xmp.FLASH_PLAYER_EXECUTE_COMMAND_METHOD){wb=vb;var zb=wb.substring(0,wb.indexOf(xmp.DELIMITER));var Ab=wb.substring(wb.indexOf(xmp.DELIMITER)+1);this.onExecuteCommand(zb,Ab);}
else if(ub===xmp.FLASH_PLAYER_ERROR_METHOD){wb=vb;var Bb=wb.substring(0,wb.indexOf(xmp.DELIMITER));var Cb=wb.substring(wb.indexOf(xmp.DELIMITER)+1);this.onError(Bb,Cb);}
else{throw new xmp.NativePlayerError("Handling FS command.","Invalid FS command \""+ub+"\" .",this);}}
catch(e){this.setError("Handling FS command.",e);}};xmp.IMAGE_PLAYER="Image";xmp.IMAGE_MIME_TYPE="image/jpg";xmp.IMAGE_TAG="IMG";xmp.IMAGE_STATE_CHANGE_METHOD="onStateChange";xmp.IMAGE_ERROR_METHOD="onError";xmp.IMAGE_FSCOMMAND_METHOD="onFSCommand";xmp.IMAGE_INITIALIZATION_METHOD="onInit";xmp.ImagePlayer=function(Db){this.externalInterface=true;xmp.ImagePlayer.ctor.call(this,xmp.IMAGE_PLAYER,Db);};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.ImagePlayer);xmp.ImagePlayer.prototype.open=function(Eb){this.url=Eb.getURI();this.timeLimit=Eb.getTimeLimitInSeconds();this.position=0;if(this.getNative().tagName.toUpperCase()===xmp.IMAGE_TAG){this.getNative().src=this.url;this.setState(xmp.OPEN);}
else{((true===this.externalInterface)?this.getNative().fmpOpen(xmp.IMAGE_MIME_TYPE,this.url,Eb.getEndedFrame()):this.getNative().SetVariable(xmp.COMMAND,this.getFSCommandInfo(xmp.FMP_OPEN_COMMAND,[xmp.IMAGE_MIME_TYPE,this.url,Eb.getEndedFrame()])));}};xmp.ImagePlayer.prototype.close=function(){if(this.getNative().tagName.toUpperCase()!==xmp.IMAGE_TAG){((true===this.externalInterface)?this.getNative().fmpClose():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_CLOSE_COMMAND));}
xmp.ImagePlayer.base.close.call(this);};xmp.ImagePlayer.prototype.play=function(){if(-1!==this.timeLimit){this.startMonitor();}
this.setState(xmp.PLAY);};xmp.ImagePlayer.prototype.stop=function(){this.setState(xmp.STOP);};xmp.ImagePlayer.prototype.ended=function(){if(this.getNative().tagName.toUpperCase()!==xmp.IMAGE_TAG){((true===this.externalInterface)?this.getNative().fmpEnded():this.getNative().SetVariable(xmp.COMMAND,xmp.FMP_ENDED_COMMAND));}
xmp.ImagePlayer.base.ended.call(this);this.close();};xmp.ImagePlayer.prototype.isAvailable=function(Fb){return(Fb===xmp.ENDED);};xmp.ImagePlayer.prototype.canAccept=function(Gb){return(xmp.IMAGE_MIME_TYPE.indexOf(Gb)!==-1);};xmp.ImagePlayer.prototype.getPosition=function(){return this.position;};xmp.ImagePlayer.prototype.getDuration=function(){return((-1===this.timeLimit)?0:this.timeLimit);};xmp.ImagePlayer.prototype.create=function(Hb){if(true===this.attach(Hb)){return;}
Hb.id=xmp.IMAGE_PLAYER+Hb.group;xmp.ImagePlayer.base.create.call(this,Hb);this.volume=Hb.volume;this.mute=Hb.mute;var Ib=Hb.viewport.getNative();Ib.innerHTML="<img style='background-color:  #000000' id='"+Hb.id+"' width='"+(Ib.style.width)+"' height='"+(Ib.style.height)+"' src='"+Hb.node.getURI()+"' style='background-color:  #000000; z-index: "+xmp.NATIVE_PLAYER_Z_INDEX+"' />";this.setCreated();};xmp.ImagePlayer.prototype.onMonitor=function(){this.position++;};xmp.ImagePlayer.prototype.attach=function(Jb){if(Jb.viewport.type!==xmp.FLASH_VIEWPORT){return false;}
Jb.id=Jb.viewport.name;this.volume=Jb.volume;this.mute=Jb.mute;xmp.ImagePlayer.base.attach.call(this,Jb);this.externalInterface=Jb.viewport.getExternalInterface();this.getNative().SetVariable(xmp.FLASH_INITIALIZATION_CALLBACK,this.getCallbackMethod(xmp.IMAGE_INITIALIZATION_METHOD));this.getNative().SetVariable(xmp.FLASH_STATE_CHANGE_CALLBACK,this.getCallbackMethod(xmp.IMAGE_STATE_CHANGE_METHOD));this.getNative().SetVariable(xmp.FLASH_ERROR_CALLBACK,this.getCallbackMethod(xmp.IMAGE_ERROR_METHOD));this.getNative().SetVariable(xmp.CONTEXT,Jb.group);if(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)===-1){var Kb=document.createElement(xmp.SCRIPT_ELEMENT_TAG);Kb.innerHTML="function "+Jb.id+"_DoFSCommand(command, args) { "+this.getCallbackMethod(xmp.IMAGE_FSCOMMAND_FUNCTION)+"('"+Jb.group+"', command, args); }";Jb.viewport.getNative().insertBefore(Kb,null);}
this.setCreated();return true;};xmp.ImagePlayer.prototype.translateState=function(Lb){if(Lb===xmp.OPEN){return xmp.OPEN;}
return Lb;};xmp.ImagePlayer.prototype.getFSCommandInfo=function(Mb,Nb){var Ob=Mb;for(var i=0;i<Nb.length;i++){Ob+=xmp.DELIMITER+Nb[i];}
return Ob;};xmp.ImagePlayer.prototype.onInit=function(){try{this.setCreated();}
catch(e){this.setError("Initializing.",e);}};xmp.ImagePlayer.prototype.onStateChange=function(Pb,Qb){try{var Rb=this.translateState(Pb);if(Rb.length>0){var Sb=Qb;if(Pb===xmp.BUFFERING){var Tb=Qb;var Ub=parseInt(Tb.substring(0,Tb.indexOf(xmp.DELIMITER)),10);Tb=Tb.substring(Tb.indexOf(xmp.DELIMITER)+1,Tb.length);var Vb=parseInt(Tb.substring(0,Tb.indexOf(xmp.DELIMITER)),10);var Wb=parseInt(Tb.substring(Tb.indexOf(xmp.DELIMITER)+1),10);Sb={percent:Ub,bytesDownloaded:Vb,bytesTotal:Wb};}
this.setState(Rb,Sb);}}
catch(e){this.setError("Handling state change.",e);}};xmp.ImagePlayer.prototype.onError=function(Xb,Yb){try{var Zb=[{label:"Flash Error Type",text:Xb}];var $b=((Xb===xmp.FLASH_CONNECTION_ERROR)?new xmp.NativePlayerConnectionError("Connecting to media.",Yb,this,Zb):new xmp.NativePlayerError("Handling error.",Yb,this,Zb));this.setError(null,$b);}
catch(e){this.setError("Handling error.",e);}};xmp.ImagePlayer.prototype.onFSCommand=function(ac,bc){try{var cc="";if(ac===xmp.IMAGE_INITIALIZATION_METHOD){this.externalInterface=false;this.onInit();}
else if(ac===xmp.IMAGE_STATE_CHANGE_METHOD){cc=bc;var dc=cc.substring(0,cc.indexOf(xmp.DELIMITER));var ec=cc.substring(cc.indexOf(xmp.DELIMITER)+1);this.onStateChange(dc,ec);}
else if(ac===xmp.IMAGE_ERROR_METHOD){cc=bc;var fc=cc.substring(0,cc.indexOf(xmp.DELIMITER));var gc=cc.substring(cc.indexOf(xmp.DELIMITER)+1);this.onError(fc,gc);}
else{throw new xmp.NativePlayerError("Handling FS command.","Invalid image player FS command \""+ac+"\".",this);}}
catch(e){this.setError("Handling FS command.",e);}};xmp.MOCK_NATIVE="MOCK_NATIVE";xmp.MOCK_MIME_TYPE="application/xmp-mock";xmp.MOCK_DEFAULT_PLAY_TIME=1000;xmp.MOCK_PLAY_TIME_SCALE=1.0/60;xmp.MockNativePlayer=function(hc){xmp.MockNativePlayer.ctor.call(this,xmp.MOCK_NATIVE,hc);this.position=0;this.duration=0;this.logger=new xmp.util.internals.CategoryLogger('MockNativePlayer');};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.MockNativePlayer);xmp.MockNativePlayer.prototype.open=function(ic){this.node=ic;this.logger.info("open(): "+this.node.getURI());this.setState(xmp.OPEN);};xmp.MockNativePlayer.prototype.close=function(){if(this.node){this.logger.info("close(): "+this.node.getURI());}
this.node=null;xmp.MockNativePlayer.base.close.call(this);};xmp.MockNativePlayer.prototype.fini=function(){this.close();};xmp.MockNativePlayer.prototype.play=function(){xmp.MockNativePlayer.base.play.call(this);var jc=this.node;var kc=-1;if(jc!==null){this.logger.info("play(): "+jc.getURI());this.logger.info("node type: "+jc.getNodeTypeName());kc=this.getSimulatedDuration(jc);this.logger.info("simulated duration: "+(kc/1000.0)+" second(s)");}
this.setState(xmp.PLAY);this.createTimer({object:this,id:"play",interval:kc,handler:this.onSimulatedPlayEnded,context:null}).start();};xmp.MockNativePlayer.prototype.onSimulatedPlayEnded=function(lc,mc){mc.stop();this.setState(xmp.ENDED);};xmp.MockNativePlayer.prototype.getSimulatedDuration=function(nc){var oc=-1;var pc=nc.getNodeTypeName();if(pc==="Content"||pc==="PreRoll"||pc==="PostRoll"){var qc=nc.getPlayableData();oc=qc.getTotalRunTime();}
if(oc<=0){oc=xmp.MOCK_DEFAULT_PLAY_TIME;}
else{this.logger.info("actual duration: "+oc+" second(s)");oc=oc*1000.0*xmp.MOCK_PLAY_TIME_SCALE;}
return oc;};xmp.MockNativePlayer.prototype.pause=function(){if(this.node!==null){this.logger.info("pause(): "+this.node.getURI());}
xmp.MockNativePlayer.base.pause.call(this);this.setState(xmp.PAUSE);};xmp.MockNativePlayer.prototype.stop=function(){if(this.node!==null){this.logger.info("stop(): "+this.node.getURI());}
xmp.MockNativePlayer.base.stop.call(this);this.setState(xmp.STOP);};xmp.MockNativePlayer.prototype.rewind=function(){if(this.node!==null){this.logger.info("rewind(): "+this.node.getURI());}
xmp.MockNativePlayer.base.rewind.call(this);this.setState(xmp.REWIND);};xmp.MockNativePlayer.prototype.fastForward=function(){if(this.node!==null){this.logger.info("fastForward(): "+this.node.getURI());}
xmp.MockNativePlayer.base.fastForward.call(this);this.setState(xmp.FAST_FORWARD);};xmp.MockNativePlayer.prototype.seek=function(rc){if(this.node!==null){this.logger.info("seek(): "+this.node.getURI()+" to "+rc);}
xmp.MockNativePlayer.base.seek.call(this);this.setPosition(rc);this.setState(xmp.SEEKABLE);};xmp.MockNativePlayer.prototype.ended=function(){if(this.node!==null){this.logger.info("ended(): "+this.node.getURI());}
xmp.MockNativePlayer.base.ended.call(this);};xmp.MockNativePlayer.prototype.isAvailable=function(sc){return true;};xmp.MockNativePlayer.prototype.canAccept=function(tc){return(xmp.MOCK_MIME_TYPE.indexOf(tc)!==-1);};xmp.MockNativePlayer.prototype.getPosition=function(){return this.position;};xmp.MockNativePlayer.prototype.getDuration=function(){return this.duration;};xmp.MockNativePlayer.prototype.validate=function(uc,vc){};xmp.MockNativePlayer.prototype.onValidatePlugIn=function(wc,xc){};xmp.MockNativePlayer.prototype.setCreated=function(){this.createTimer({object:this,id:"setCreated",interval:xmp.DEFAULT_TIMER_INTERVAL,handler:this.onSetCreated,context:null}).start();};xmp.MockNativePlayer.prototype.executeCommand=function(yc,zc){return this.listener.onNativePlayerExecuteCommand(yc,zc);};xmp.MockNativePlayer.prototype.create=function(Ac){this.data=Ac;};xmp.MockNativePlayer.prototype.attach=function(Bc){this.data=Bc;};xmp.MockNativePlayer.prototype.getNative=function(){return null;};xmp.QUICKTIME="QuickTime";xmp.QUICKTIME_MIME_TYPE="video/quicktime";xmp.FLIP4MAC="Flip4Mac";xmp.QuickTimePlayer=function(Cc){this.state=new xmp.QuicktimeStateMachine(this);xmp.QuickTimePlayer.ctor.call(this,xmp.QUICKTIME,Cc);};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.QuickTimePlayer);xmp.QuickTimePlayer.prototype.open=function(Dc){this.state.open(Dc);};xmp.QuickTimePlayer.prototype.close=function(){xmp.QuickTimePlayer.base.close.call(this);this.state.close();};xmp.QuickTimePlayer.prototype.play=function(){xmp.QuickTimePlayer.base.play.call(this);this.state.play();};xmp.QuickTimePlayer.prototype.pause=function(){xmp.QuickTimePlayer.base.pause.call(this);this.state.pause();};xmp.QuickTimePlayer.prototype.stop=function(){xmp.QuickTimePlayer.base.stop.call(this);this.state.stop();};xmp.QuickTimePlayer.prototype.rewind=function(){xmp.QuickTimePlayer.base.rewind.call(this);this.state.rewind();};xmp.QuickTimePlayer.prototype.fastForward=function(){xmp.QuickTimePlayer.base.fastForward.call(this);this.state.fastForward();};xmp.QuickTimePlayer.prototype.seek=function(Ec){xmp.QuickTimePlayer.base.seek.call(this,Ec);this.state.seek(Ec);};xmp.QuickTimePlayer.prototype.ended=function(){xmp.QuickTimePlayer.base.ended.call(this);this.state.ended();};xmp.QuickTimePlayer.prototype.isAvailable=function(Fc){return this.state.isAvailable(Fc);};xmp.QuickTimePlayer.prototype.canAccept=function(Gc){return((navigator.platform.indexOf(xmp.MAC_PLATFORM)!==-1&&xmp.WINDOWS_MEDIA_MIME_TYPE.indexOf(Gc)!==-1));};xmp.QuickTimePlayer.prototype.onValidatePlugIn=function(Hc,Ic){this.validateQuicktime(Hc,Ic);this.validateFlip4Mac(Hc,Ic);};xmp.QuickTimePlayer.prototype.getPosition=function(){return this.state.getPosition();};xmp.QuickTimePlayer.prototype.getDuration=function(){return this.state.getDuration();};xmp.QuickTimePlayer.prototype.getVolume=function(){return this.state.getVolume();};xmp.QuickTimePlayer.prototype.setVolume=function(Jc){this.state.setVolume(Jc);};xmp.QuickTimePlayer.prototype.getMute=function(){return this.state.getMute();};xmp.QuickTimePlayer.prototype.setMute=function(Kc){this.state.setMute(Kc);};xmp.QuickTimePlayer.prototype.getFullscreen=function(){throw new xmp.NativePlayerUnsupportedError("Invoking \"getFullscreen\" method.","The \"getFullscreen\" method is not implemented.",this);};xmp.QuickTimePlayer.prototype.setFullscreen=function(Lc){throw new xmp.NativePlayerUnsupportedError("Invoking \"setFullscreen\" method.","The \"setFullscreen\" method is not implemented.",this);};xmp.QuickTimePlayer.prototype.create=function(Mc){Mc.id=xmp.QUICKTIME+Mc.group;xmp.QuickTimePlayer.base.create.call(this,Mc);var Nc=Mc.viewport.getNative();Nc.innerHTML="<embed type='video/quicktime' name='"+Mc.id+"' width='"+Nc.style.width+"' height='"+Nc.style.height+"' src='"+Mc.node.getURI()+"' showlogo='false'"+" style='background-color:  #000000; z-index: '"+xmp.NATIVE_PLAYER_Z_INDEX+"' bgcolor='#000000' autoplay='true'"+" controller='false' enablejavascript='true' saveembedtags='true'"+" scale='ASPECT' loop='false' kioskmode='true'></embed>";this.state.create(Mc);this.setCreated();};xmp.QuickTimePlayer.prototype.validateQuicktime=function(Oc,Pc){var Qc=navigator.mimeTypes[xmp.QUICKTIME_MIME_TYPE];var Rc=this.getPlugInInfo(Pc,xmp.QUICKTIME);if(!Qc){throw new xmp.PlugInNotFoundError(Oc,Rc);}
if(!Qc.enabledPlugin){throw new xmp.PlugInDisabledError(Oc,Rc,xmp.QUICKTIME_MIME_TYPE);}
var Sc=Qc.enabledPlugin.name;if(Sc.indexOf(xmp.QUICKTIME)===-1){throw new xmp.PlugInDisabledError(Oc,Rc,xmp.QUICKTIME_MIME_TYPE);}
this.validatePlugInVersion(Oc,xmp.QUICKTIME,Sc.substr(Sc.lastIndexOf(" ")+1),Pc);};xmp.QuickTimePlayer.prototype.validateFlip4Mac=function(Tc,Uc){var Vc;var Wc=this.getPlugInInfo(Uc,xmp.FLIP4MAC);var Xc=navigator.plugins.length;for(var i=0;i<Xc;i++){var Yc=navigator.plugins[i];Vc=Yc.name;var Zc=Vc.length;if(Vc.indexOf(xmp.FLIP4MAC)!==-1){var $c=Vc.lastIndexOf(" ");if($c===(Vc.length-1)){Zc--;$c=Vc.lastIndexOf(" ",$c-1);}
Zc=Zc-($c+1);this.validatePlugInVersion(Tc,xmp.FLIP4MAC,Vc.substr($c+1,Zc),Uc);return;}}
throw new xmp.PlugInNotFoundError(Tc,Wc);};xmp.QUICKTIME_WAITING="Waiting";xmp.QUICKTIME_LOADING="Loading";xmp.QUICKTIME_PLAYABLE="Playable";xmp.QUICKTIME_COMPLETE="Complete";xmp.QUICKTIME_ERROR="Error";xmp.QUICKTIME_NORMAL_RATE=1;xmp.QUICKTIME_PAUSE_RATE=0;xmp.QUICKTIME_REWIND_RATE=-5;xmp.QUICKTIME_FAST_FORWARD_RATE=5;xmp.QUICKTIME_VOLUME_MAX=256;xmp.QUICKTIME_INITIAL_LIVE_DURATION=180000;xmp.QUICKTIME_LOAD_BUFFERING="LoadBuffering";xmp.QUICKTIME_WAIT_BUFFERING="WaitBuffering";xmp.QUICKTIME_BUFFERING_COMPLETE="BufferingComplete";xmp.QUICKTIME_STATE_CHANGE_MONITOR_INTERVAL=200;xmp.QUICKTIME_CONNECTION_TIMEOUT_MONITOR_INTERVAL=30000;xmp.QUICKTIME_ERROR_CODE_DELIMITER=",";xmp.QuicktimeStateMachine=function(ad){this.player=ad;this.initTransitionTable();this.initStateChangeHandlers();this.initOperations();this.initErrorCodes();this.live=true;this.stateChangeMonitorTimer=null;this.connectionTimeoutTimer=null;this.bufferingComplete=false;};xmp.QuicktimeStateMachine.prototype.open=function(bd){if(false===this.checkForStaticUrl()){this.initState();this.url=bd.getURI();this.player.getNative().SetURL(this.url);}};xmp.QuicktimeStateMachine.prototype.close=function(){try{this.setState(xmp.IDLE,false);this.opened=false;this.stopStateChangeMonitor();this.stopConnectionTimeoutMonitor();this.player.getNative().SetMute(true);this.player.getNative().Stop();}
catch(e){}};xmp.QuicktimeStateMachine.prototype.play=function(){this.player.getNative().Play();this.setState(xmp.PLAY,true);};xmp.QuicktimeStateMachine.prototype.pause=function(){this.player.getNative().SetRate(xmp.QUICKTIME_PAUSE_RATE);this.setState(xmp.PAUSE,true);};xmp.QuicktimeStateMachine.prototype.stop=function(){this.player.getNative().Stop();this.player.getNative().Rewind();this.setState(xmp.STOP,true);};xmp.QuicktimeStateMachine.prototype.rewind=function(){this.player.getNative().SetRate(xmp.QUICKTIME_REWIND_RATE);this.setState(xmp.REWIND,true);};xmp.QuicktimeStateMachine.prototype.fastForward=function(){this.player.getNative().SetRate(xmp.QUICKTIME_FAST_FORWARD_RATE);this.setState(xmp.FAST_FORWARD,true);};xmp.QuicktimeStateMachine.prototype.seek=function(cd){this.player.getNative().SetRate(xmp.QUICKTIME_NORMAL_RATE);this.player.getNative().SetTime(cd*this.player.getNative().GetTimeScale());this.setState(xmp.SEEKABLE,true);};xmp.QuicktimeStateMachine.prototype.ended=function(){this.setState(xmp.ENDED,false);};xmp.QuicktimeStateMachine.prototype.isAvailable=function(dd){var ed=this.operations[this.state];for(var i in ed){if(ed[i].state===dd){if(false===this.live){return true;}
else{return(true===ed[i].live);}}}
return false;};xmp.QuicktimeStateMachine.prototype.getPosition=function(){try{return Math.floor(this.player.getNative().GetTime()/this.player.getNative().GetTimeScale());}
catch(e){}
return 0;};xmp.QuicktimeStateMachine.prototype.getDuration=function(){try{var fd=this.live;var gd=this.player.getNative().GetDuration();if(true===this.isInitializing()){fd=this.isLive(gd);}
return((true===fd||gd===0)?0:Math.floor(gd/this.player.getNative().GetTimeScale()));}
catch(e){}
return 0;};xmp.QuicktimeStateMachine.prototype.getVolume=function(){return Math.abs(Math.floor(((this.player.getNative().GetVolume()+1)/xmp.QUICKTIME_VOLUME_MAX)*100));};xmp.QuicktimeStateMachine.prototype.setVolume=function(hd){this.player.getNative().SetVolume(Math.floor(((hd.toFixed(1)+1)*0.01)*xmp.QUICKTIME_VOLUME_MAX));this.volume=hd;this.muted=this.getMute();};xmp.QuicktimeStateMachine.prototype.getMute=function(){var jd=this.player.getNative().GetMute();return(jd===true||jd===1);};xmp.QuicktimeStateMachine.prototype.setMute=function(kd){this.player.getNative().SetMute(kd);this.muted=kd;this.volume=Math.floor(((this.player.getNative().GetVolume()+1)/xmp.QUICKTIME_VOLUME_MAX)*100);};xmp.QuicktimeStateMachine.prototype.create=function(ld){this.url=ld.node.getURI();this.staticUrl=this.url;this.volume=ld.volume;this.muted=ld.muted;this.initState();};xmp.QuicktimeStateMachine.prototype.onStateChange=function(md,nd){try{if(this.state===xmp.ERRORS){return;}
if(true===this.canGetPluginStatus()){var od=this.getRawPluginStatus();if(!od){return;}
var pd=this.translateState(od);if(pd.length>0){if(false===this.stateHandlers[pd].apply(this,[od,pd])){return;}}}
if(false===this.isInitializing()){var qd=this.getPosition();if(this.state!==xmp.ENDED&&qd>0&&(qd>=this.getDuration())&&false===this.live){this.setState(xmp.ENDED,true);}}}
catch(e){this.setError(null,e);}};xmp.QuicktimeStateMachine.prototype.onConnectionTimeout=function(rd,sd){try{this.stopConnectionTimeoutMonitor();if(this.state===xmp.ERRORS){return;}
if(false===this.opened&&false===this.validateUrl()){var e=this.createConnectionError(this.getRawPluginStatus(),"Connection timeout.","Error connecting to \""+this.url+"\".");throw e;}}
catch(e){this.setError(null,e);}};xmp.QuicktimeStateMachine.prototype.translateState=function(td){if(td.indexOf(xmp.QUICKTIME_ERROR)===-1&&false===this.validateUrl()){return"";}
for(var i=0;i<this.transitionTable.length;i++){var ud=this.transitionTable[i];if(td.indexOf(ud.nativeState)===0){if(0===ud.currentState.length){return ud.transitionState;}
else{for(var j=0;j<ud.currentState.length;j++){if(this.state===ud.currentState[j]){return ud.transitionState;}}}}}
return"";};xmp.QuicktimeStateMachine.prototype.initOperations=function(){this.operations={};this.operations[xmp.READY]=[];this.operations[xmp.CONNECTING]=[];this.operations[xmp.CONNECTED]=[];this.operations[xmp.OPEN]=[];this.operations[xmp.IDLE]=[];this.operations[xmp.PLAY]=[{state:xmp.PAUSE,live:false},{state:xmp.STOP,live:true},{state:xmp.REWIND,live:false},{state:xmp.FAST_FORWARD,live:false},{state:xmp.SEEKABLE,live:false}];this.operations[xmp.PAUSE]=[{state:xmp.PLAY,live:false},{state:xmp.STOP,live:false},{state:xmp.REWIND,live:false},{state:xmp.FAST_FORWARD,live:false},{state:xmp.SEEKABLE,live:false}];this.operations[xmp.STOP]=[{state:xmp.PLAY,live:true},{state:xmp.REWIND,live:false},{state:xmp.FAST_FORWARD,live:false}];this.operations[xmp.REWIND]=[{state:xmp.PLAY,live:false},{state:xmp.STOP,live:false},{state:xmp.PAUSE,live:false},{state:xmp.FAST_FORWARD,live:false},{state:xmp.SEEKABLE,live:false}];this.operations[xmp.FAST_FORWARD]=[{state:xmp.PLAY,live:false},{state:xmp.PAUSE,live:false},{state:xmp.STOP,live:false},{state:xmp.REWIND,live:false},{state:xmp.SEEKABLE,live:false}];this.operations[xmp.SEEKABLE]=[{state:xmp.SEEKABLE,live:false},{state:xmp.PAUSE,live:false},{state:xmp.STOP,live:false},{state:xmp.REWIND,live:false},{state:xmp.FAST_FORWARD,live:false}];this.operations[xmp.ENDED]=[{state:xmp.PLAY,live:false},{state:xmp.FAST_FORWARD,live:false},{state:xmp.SEEKABLE,live:false}];this.operations[xmp.ERRORS]=[];};xmp.QuicktimeStateMachine.prototype.setState=function(vd,wd,xd){this.state=vd;if(true===wd){var yd=((vd===xmp.QUICKTIME_LOAD_BUFFERING||vd===xmp.QUICKTIME_WAIT_BUFFERING||vd===xmp.QUICKTIME_BUFFERING_COMPLETE)?xmp.BUFFERING:vd);this.player.setState(yd,xd);}};xmp.QuicktimeStateMachine.prototype.initTransitionTable=function(){this.transitionTable=[];this.transitionTable.push({nativeState:xmp.QUICKTIME_WAITING,currentState:[xmp.READY],transitionState:xmp.CONNECTING});this.transitionTable.push({nativeState:xmp.QUICKTIME_WAITING,currentState:[xmp.CONNECTING,xmp.QUICKTIME_WAIT_BUFFERING],transitionState:xmp.QUICKTIME_WAIT_BUFFERING});this.transitionTable.push({nativeState:xmp.QUICKTIME_LOADING,currentState:[xmp.READY,xmp.CONNECTING,xmp.QUICKTIME_WAIT_BUFFERING],transitionState:xmp.CONNECTED});this.transitionTable.push({nativeState:xmp.QUICKTIME_LOADING,currentState:[xmp.CONNECTED,xmp.QUICKTIME_LOAD_BUFFERING,xmp.OPEN],transitionState:xmp.QUICKTIME_LOAD_BUFFERING});this.transitionTable.push({nativeState:xmp.QUICKTIME_PLAYABLE,currentState:[xmp.PLAY,xmp.PAUSE,xmp.STOP,xmp.REWIND,xmp.FAST_FORWARD,xmp.SEEKABLE,xmp.BUFFERING],transitionState:xmp.BUFFERING});this.transitionTable.push({nativeState:xmp.QUICKTIME_COMPLETE,currentState:[xmp.READY,xmp.CONNECTING,xmp.CONNECTED,xmp.QUICKTIME_WAIT_BUFFERING,xmp.QUICKTIME_LOAD_BUFFERING],transitionState:xmp.OPEN});this.transitionTable.push({nativeState:xmp.QUICKTIME_COMPLETE,currentState:[xmp.PLAY,xmp.PAUSE,xmp.STOP,xmp.REWIND,xmp.FAST_FORWARD,xmp.SEEKABLE,xmp.OPEN,xmp.BUFFERING],transitionState:xmp.QUICKTIME_BUFFERING_COMPLETE});this.transitionTable.push({nativeState:xmp.QUICKTIME_PLAYABLE,currentState:[xmp.READY,xmp.CONNECTING,xmp.CONNECTED,xmp.QUICKTIME_WAIT_BUFFERING,xmp.QUICKTIME_LOAD_BUFFERING],transitionState:xmp.OPEN});this.transitionTable.push({nativeState:xmp.QUICKTIME_COMPLETE,currentState:[xmp.QUICKTIME_LOAD_BUFFERING],transitionState:xmp.ERRORS});this.transitionTable.push({nativeState:xmp.QUICKTIME_ERROR,currentState:[],transitionState:xmp.ERRORS});};xmp.QuicktimeStateMachine.prototype.initStateChangeHandlers=function(){this.stateHandlers={};this.stateHandlers[xmp.ERRORS]=this.onError;this.stateHandlers[xmp.CONNECTING]=this.onConnecting;this.stateHandlers[xmp.CONNECTED]=this.onConnected;this.stateHandlers[xmp.OPEN]=this.onOpen;this.stateHandlers[xmp.QUICKTIME_WAIT_BUFFERING]=this.onBuffering;this.stateHandlers[xmp.QUICKTIME_LOAD_BUFFERING]=this.onBuffering;this.stateHandlers[xmp.QUICKTIME_BUFFERING_COMPLETE]=this.onBuffering;this.stateHandlers[xmp.BUFFERING]=this.onBuffering;};xmp.QuicktimeStateMachine.prototype.onError=function(zd,Ad){this.opened=false;var Bd="Unknown error.";if(true===this.isInitializing()){Bd="Error connecting to \""+this.url+"\".";}
this.setError(null,this.createConnectionError(zd,"Connecting to media.",Bd));return false;};xmp.QuicktimeStateMachine.prototype.onConnected=function(Cd,Dd){this.player.startMonitor();this.setState(xmp.CONNECTED,true);return true;};xmp.QuicktimeStateMachine.prototype.onConnecting=function(Ed,Fd){this.player.startMonitor();this.setState(xmp.CONNECTING,true);return true;};xmp.QuicktimeStateMachine.prototype.onOpen=function(Gd,Hd){this.opened=true;this.live=this.isLive(this.player.getNative().GetDuration());this.setVolume(this.volume);if(true===this.muted){this.setMute(true);}
this.setState(xmp.OPEN,true);this.player.setState(xmp.FIRST_FRAME_RENDERED);return true;};xmp.QuicktimeStateMachine.prototype.onBuffering=function(Id,Jd){this.checkSetOpen();if(this.state!==xmp.QUICKTIME_WAIT_BUFFERING&&this.state!==xmp.QUICKTIME_LOAD_BUFFERING&&this.state!==xmp.QUICKTIME_BUFFERING_COMPLETE&&this.state!==xmp.BUFFERING){this.operations[Jd]=this.operations[this.state];}
var Kd=this.getRawBytesTotal();var Ld=((Jd===xmp.QUICKTIME_BUFFERING_COMPLETE)?Kd:this.getRawBytesLoaded());var Md=((Kd<=0)?0:Math.floor((Ld/Kd)*100));Md=((99===Md)?100:Md);if(false===this.bufferingComplete&&(false===this.isLive(this.getRawDuration())||Jd===xmp.QUICKTIME_WAIT_BUFFERING||Jd===xmp.QUICKTIME_LOAD_BUFFERING||Jd===xmp.QUICKTIME_BUFFERING_COMPLETE)){this.setState(Jd,true,{percent:Md,bytesDownloaded:Ld,bytesTotal:Kd});}
this.bufferingComplete=(100===Md);if(Jd===xmp.QUICKTIME_LOAD_BUFFERING&&true===this.bufferingComplete){this.onOpen(Id,Jd);}
return true;};xmp.QuicktimeStateMachine.prototype.isInitializing=function(){return(this.state===xmp.READY||this.state===xmp.CONNECTING||this.state===xmp.CONNECTED||this.state===xmp.QUICKTIME_WAIT_BUFFERING||this.state===xmp.QUICKTIME_LOAD_BUFFERING);};xmp.QuicktimeStateMachine.prototype.isBuffering=function(){return(this.state===xmp.BUFFERING||this.state===xmp.QUICKTIME_WAIT_BUFFERING||this.state===xmp.QUICKTIME_LOAD_BUFFERING||this.state===xmp.QUICKTIME_BUFFERING_COMPLETE);};xmp.QuicktimeStateMachine.prototype.isLive=function(Nd){return(xmp.QUICKTIME_INITIAL_LIVE_DURATION===Nd||0===Nd||-1===Nd);};xmp.QuicktimeStateMachine.prototype.canGetPluginStatus=function(){return(false===this.bufferingComplete);};xmp.QuicktimeStateMachine.prototype.startStateChangeMonitor=function(){if(!this.stateChangeMonitorTimer){this.stateChangeMonitorTimer=this.player.createTimer({object:this,id:"stateChange",interval:xmp.QUICKTIME_STATE_CHANGE_MONITOR_INTERVAL,handler:this.onStateChange,context:null});this.stateChangeMonitorTimer.start();}};xmp.QuicktimeStateMachine.prototype.stopStateChangeMonitor=function(){if(this.stateChangeMonitorTimer){this.stateChangeMonitorTimer.stop();this.stateChangeMonitorTimer=null;}};xmp.QuicktimeStateMachine.prototype.startConnectionTimeoutMonitor=function(){if(!this.connectionTimeoutTimer){this.connectionTimeoutTimer=this.player.createTimer({object:this,id:"connectionTimeout",interval:xmp.QUICKTIME_CONNECTION_TIMEOUT_MONITOR_INTERVAL,handler:this.onConnectionTimeout,context:null});this.connectionTimeoutTimer.start();}};xmp.QuicktimeStateMachine.prototype.stopConnectionTimeoutMonitor=function(){if(this.connectionTimeoutTimer){this.connectionTimeoutTimer.stop();this.connectionTimeoutTimer=null;}};xmp.QuicktimeStateMachine.prototype.initErrorCodes=function(){this.errorCodeDesc={};this.errorCodeDesc[100]="(Continue)";this.errorCodeDesc[101]="(Switching Protocols)";this.errorCodeDesc[200]="(OK)";this.errorCodeDesc[201]="(Created)";this.errorCodeDesc[202]="(Accepted)";this.errorCodeDesc[204]="(No Content)";this.errorCodeDesc[205]="(Reset Content)";this.errorCodeDesc[206]="(Partial Content)";this.errorCodeDesc[300]="(Multiple Choices)";this.errorCodeDesc[301]="(Moved Permanently)";this.errorCodeDesc[302]="(Found)";this.errorCodeDesc[303]="(See Other)";this.errorCodeDesc[304]="(Not Modified)";this.errorCodeDesc[305]="(Use Proxy)";this.errorCodeDesc[306]="(No Longer Used)";this.errorCodeDesc[307]="(Temporary Redirect)";this.errorCodeDesc[400]="(Bad Request)";this.errorCodeDesc[401]="(Not Authorised)";this.errorCodeDesc[402]="(Payment Required)";this.errorCodeDesc[403]="(Forbidden)";this.errorCodeDesc[404]="(Not Found)";this.errorCodeDesc[405]="(Method Not Allowed)";this.errorCodeDesc[406]="(Not Acceptable)";this.errorCodeDesc[407]="(Proxy Authentication Required)";this.errorCodeDesc[408]="(Request Timeout)";this.errorCodeDesc[409]="(Conflict)";this.errorCodeDesc[410]="(Gone)";this.errorCodeDesc[411]="(Length Required)";this.errorCodeDesc[412]="(Precondition Failed)";this.errorCodeDesc[413]="(Request Entity Too Large)";this.errorCodeDesc[414]="(Request URI Too Long)";this.errorCodeDesc[415]="(Unsupported Media Type)";this.errorCodeDesc[416]="(Requested Range Not Satisfiable)";this.errorCodeDesc[417]="(Expectation Failed)";this.errorCodeDesc[451]="(Parameter Not Understood)";this.errorCodeDesc[452]="(Conference Not Found)";this.errorCodeDesc[453]="(Not Enough Bandwidth)";this.errorCodeDesc[454]="(Session Not Founds)";this.errorCodeDesc[455]="(Method Not Valid In This State)";this.errorCodeDesc[456]="(Header Field Not Valid For Resource)";this.errorCodeDesc[457]="(Invalid Range)";this.errorCodeDesc[458]="(Parameter Is Read Only)";this.errorCodeDesc[459]="(Aggregate Operation Not Allowed)";this.errorCodeDesc[460]="(Only Aggregate Operation Allowed)";this.errorCodeDesc[461]="(Unsupported Transport)";this.errorCodeDesc[462]="(Destination Unreachable)";this.errorCodeDesc[500]="(Internal Server Error)";this.errorCodeDesc[501]="(Not Implemented)";this.errorCodeDesc[502]="(Bad Gateway)";this.errorCodeDesc[503]="(Service Unavailable)";this.errorCodeDesc[504]="(Gateway Timeout)";this.errorCodeDesc[505]="(HTTP Version Not Supported)";};xmp.QuicktimeStateMachine.prototype.getErrorCodeDesc=function(Od){var Pd=((this.errorCodeDesc[Od])?this.errorCodeDesc[Od]:"(Unknown)");return Od+" "+Pd;};xmp.QuicktimeStateMachine.prototype.getErrorCodes=function(Qd){var Rd=[];var Sd=Qd.substring(Qd.indexOf(":")+1);if(Sd.indexOf(xmp.QUICKTIME_ERROR_CODE_DELIMITER)===-1){Rd.push(this.getErrorCodeDesc(parseInt(Sd,10)));}
else{while(Sd.length>0){var Td=Sd.indexOf(xmp.QUICKTIME_ERROR_CODE_DELIMITER);if(Td===-1){Rd.push(this.getErrorCodeDesc(parseInt(Sd,10)));break;}
else{Rd.push(this.getErrorCodeDesc(parseInt(Sd.substring(0,Td),10)));Sd=Sd.substring(Td+1);}}}
return Rd;};xmp.QuicktimeStateMachine.prototype.initState=function(){this.opened=false;this.bufferingComplete=false;this.setState(xmp.READY,false);this.startStateChangeMonitor();this.startConnectionTimeoutMonitor();};xmp.QuicktimeStateMachine.prototype.checkSetOpen=function(){if(false===this.opened&&this.getPosition()>0){this.onOpen("",xmp.OPEN);}};xmp.QuicktimeStateMachine.prototype.createConnectionError=function(Ud,Vd,Wd){var Xd=[];if(Ud&&Ud.indexOf(xmp.QUICKTIME_ERROR)===0){Xd.push({label:"QuickTime Error Codes",text:this.getErrorCodes(Ud).join(", ")});}
return new xmp.NativePlayerConnectionError(Vd,Wd,this.player,Xd);};xmp.QuicktimeStateMachine.prototype.getRawDuration=function(){try{return this.player.getNative().GetDuration();}
catch(e){}
return 0;};xmp.QuicktimeStateMachine.prototype.getRawMaxTimeLoaded=function(){try{return this.player.getNative().GetMaxTimeLoaded();}
catch(e){}
return 0;};xmp.QuicktimeStateMachine.prototype.getRawBytesLoaded=function(){try{return this.player.getNative().GetMaxBytesLoaded();}
catch(e){}
return 0;};xmp.QuicktimeStateMachine.prototype.getRawBytesTotal=function(){try{return this.player.getNative().GetMovieSize();}
catch(e){}
return 0;};xmp.QuicktimeStateMachine.prototype.getRawPluginStatus=function(){try{return this.player.getNative().GetPluginStatus();}
catch(e){}
return null;};xmp.QuicktimeStateMachine.prototype.checkForStaticUrl=function(){if(this.staticUrl){this.staticUrl=null;return true;}
return false;};xmp.QuicktimeStateMachine.prototype.setError=function(Yd,e){this.setState(xmp.ERRORS,false);this.player.setError(Yd,e);};xmp.QuicktimeStateMachine.prototype.validateUrl=function(){try{var Zd=this.player.getNative().GetURL();if(!Zd){return false;}
return(Zd.length>0&&(Zd===this.url));}
catch(e){}
return false;};xmp.WINDOWS_MEDIA="WindowsMedia";xmp.WINDOWS_MEDIA_MIME_TYPE="video/x-ms-wmv";xmp.OPEN_STATE_CHANGE="OpenState";xmp.PLAY_STATE_CHANGE="PlayState";xmp.WINDOWS_MEDIA_ENDED=8;xmp.WINDOWS_MEDIA_PLAYING=3;xmp.WINDOWS_MEDIA_STOPPED=1;xmp.WINDOWS_MEDIA_CONNECTING=10;xmp.WINDOWS_MEDIA_LOADING=11;xmp.WINDOWS_MEDIA_OPEN=13;xmp.WINDOWS_MEDIA_ACTIVEX_PROGID="WMPlayer.OCX.7";xmp.WINDOWS_MEDIA_PLAYER_PLAY_STATE_CHANGE_METHOD="onPlayStateChange";xmp.WINDOWS_MEDIA_PLAYER_OPEN_STATE_CHANGE_METHOD="onOpenStateChange";xmp.WINDOWS_MEDIA_PLAYER_BUFFERING_METHOD="onBuffering";xmp.WINDOWS_MEDIA_PLAYER_TRIGGER_METHOD="onTrigger";xmp.WINDOWS_MEDIA_PLAYER_ERROR_METHOD="onError";xmp.WINDOWS_MEDIA_CONNECTION_ERROR=-1072885353;xmp.WindowsMediaPlayer=function($d){xmp.WindowsMediaPlayer.ctor.call(this,xmp.WINDOWS_MEDIA,$d);this.logger=new xmp.util.internals.CategoryLogger(xmp.WINDOWS_MEDIA);this.initCallbackStates();};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.WindowsMediaPlayer);xmp.WindowsMediaPlayer.prototype.open=function(ae){this.getNative().URL=ae.getURI();};xmp.WindowsMediaPlayer.prototype.close=function(){this.getNative().close();xmp.WindowsMediaPlayer.base.close.call(this);};xmp.WindowsMediaPlayer.prototype.play=function(){this.getNative().controls.play();xmp.WindowsMediaPlayer.base.play.call(this);this.setState(xmp.PLAY);};xmp.WindowsMediaPlayer.prototype.pause=function(){this.getNative().controls.pause();xmp.WindowsMediaPlayer.base.pause.call(this);this.setState(xmp.PAUSE);};xmp.WindowsMediaPlayer.prototype.stop=function(){this.getNative().controls.stop();xmp.WindowsMediaPlayer.base.stop.call(this);this.setState(xmp.STOP);};xmp.WindowsMediaPlayer.prototype.rewind=function(){this.getNative().controls.fastReverse();xmp.WindowsMediaPlayer.base.rewind.call(this);this.setState(xmp.REWIND);};xmp.WindowsMediaPlayer.prototype.fastForward=function(){this.getNative().controls.fastForward();xmp.WindowsMediaPlayer.base.fastForward.call(this);this.setState(xmp.FAST_FORWARD);};xmp.WindowsMediaPlayer.prototype.seek=function(be){this.getNative().controls.currentPosition=be;xmp.WindowsMediaPlayer.base.seek.call(this,be);this.setState(xmp.SEEKABLE);};xmp.WindowsMediaPlayer.prototype.isAvailable=function(ce){if(ce===xmp.FULLSCREEN){return(this.getNative().playState===xmp.WINDOWS_MEDIA_PLAYING);}
return this.getNative().controls.isAvailable(xmp.WindowsMediaUtility.getCommand([ce]));};xmp.WindowsMediaPlayer.prototype.canAccept=function(de){return(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1&&xmp.util.internals.BrowserDetect.OS===xmp.WINDOWS_PLATFORM&&xmp.WINDOWS_MEDIA_MIME_TYPE.indexOf(de)!==-1);};xmp.WindowsMediaPlayer.prototype.onValidatePlugIn=function(ee,fe){var ge=this.getPlugInInfo(fe,xmp.WINDOWS_MEDIA);try{var he=new ActiveXObject(xmp.WINDOWS_MEDIA_ACTIVEX_PROGID);this.validatePlugInVersion(ee,xmp.WINDOWS_MEDIA,he.versionInfo,fe);return;}
catch(e){if(e instanceof xmp.InvalidPlugInVersionError){throw e;}}
throw new xmp.PlugInNotFoundError(ee,ge);};xmp.WindowsMediaPlayer.prototype.getPosition=function(){return this.getNative().controls.currentPosition;};xmp.WindowsMediaPlayer.prototype.getDuration=function(){var ie=this.getNative().currentMedia;if(ie===null){return 0;}
return ie.duration;};xmp.WindowsMediaPlayer.prototype.getVolume=function(){return this.getNative().settings.volume;};xmp.WindowsMediaPlayer.prototype.setVolume=function(je){this.getNative().settings.volume=je;};xmp.WindowsMediaPlayer.prototype.getMute=function(){return this.getNative().settings.mute;};xmp.WindowsMediaPlayer.prototype.setMute=function(ke){this.getNative().settings.mute=ke;};xmp.WindowsMediaPlayer.prototype.getFullscreen=function(){return this.getNative().fullScreen;};xmp.WindowsMediaPlayer.prototype.setFullscreen=function(le){this.getNative().fullScreen=le;};xmp.WindowsMediaPlayer.prototype.create=function(me){me.id=xmp.WINDOWS_MEDIA+me.group;xmp.WindowsMediaPlayer.base.create.call(this,me);var ne=me.viewport.getNative();ne.innerHTML="<object id='"+me.id+"' width='"+ne.style.width+"' height='"+ne.style.height+"' style='background-color:  #000000; z-index: "+xmp.NATIVE_PLAYER_Z_INDEX+"' classid='clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6'>"+"<param name='uiMode' value='none' />"+"<param name='stretchToFit' value='true' />"+"<param name='enableContextMenu' value='false' />"+"<param name='windowlessVideo' value='false' />"+"<param name='volume' value='"+me.volume+"'/>"+"<param name='mute' value='"+((true===me.mute)?xmp.TRUE:xmp.FALSE)+"'/></object>"+"<script language = 'jscript' for='"+me.id+"' event=playstatechange(newstate)>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_PLAY_STATE_CHANGE_METHOD)+"(newstate);</script>"+"<script language = 'jscript' for='"+me.id+"' event=openstatechange(newstate)>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_OPEN_STATE_CHANGE_METHOD)+"(newstate);</script>"+"<script language = 'jscript' for='"+me.id+"' event=buffering(start)>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_BUFFERING_METHOD)+"(start);</script>"+"<script language = 'jscript' for='"+me.id+"' event='scriptcommand(name, data)'>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_TRIGGER_METHOD)+"(name, data);</script>"+"<script language = 'jscript' for='"+me.id+"' event=error()>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_ERROR_METHOD)+"();</script>";this.setCreated();};xmp.WindowsMediaPlayer.prototype.initCallbackStates=function(){this.callbackStates={};this.callbackStates[xmp.PLAY_STATE_CHANGE]=[{state:xmp.WINDOWS_MEDIA_PLAYING,player_state:xmp.PLAY},{state:xmp.WINDOWS_MEDIA_ENDED,player_state:xmp.ENDED}];this.callbackStates[xmp.OPEN_STATE_CHANGE]=[{state:xmp.WINDOWS_MEDIA_CONNECTING,player_state:xmp.CONNECTING},{state:xmp.WINDOWS_MEDIA_LOADING,player_state:xmp.CONNECTED},{state:xmp.WINDOWS_MEDIA_OPEN,player_state:xmp.OPEN}];};xmp.WindowsMediaPlayer.prototype.translateState=function(oe,pe){var qe=this.callbackStates[oe];for(var i=0;i<qe.length;i++){if(pe==qe[i].state){return qe[i].player_state;}}
return"";};xmp.WindowsMediaPlayer.prototype.onPlayStateChange=function(re){try{if(re===xmp.WINDOWS_MEDIA_STOPPED){this.logger.warn("Play state changed to \"Stopped\".");}
var se=this.translateState(xmp.PLAY_STATE_CHANGE,re);if(se.length>0){this.setState(se);}}
catch(e){this.setError("Handling play state change.",e);}};xmp.WindowsMediaPlayer.prototype.onOpenStateChange=function(te){try{var ue=this.translateState(xmp.OPEN_STATE_CHANGE,te);if(ue.length>0){this.setState(ue);}}
catch(e){this.setError("Handling open state change.",e);}};xmp.WindowsMediaPlayer.prototype.onBuffering=function(ve){try{var we=((true===ve)?this.getNative().network.bufferingProgress:100);this.setState(xmp.BUFFERING,{percent:we,bytesDownloaded:0,bytesTotal:0});if(100===we){this.setState(xmp.FIRST_FRAME_RENDERED);}}
catch(e){this.setError("Handling buffering.",e);}};xmp.WindowsMediaPlayer.prototype.onTrigger=function(xe,ye){try{this.setTrigger(xe,ye);}
catch(e){this.setError("Handling trigger.",e);}};xmp.WindowsMediaPlayer.prototype.onError=function(){try{var ze=null;var Ae=this.getNative().Error.item(0).errorCode;var Be=this.getNative().Error.item(0).errorDescription;var Ce=[{label:"Windows Media Error Code",text:xmp.WindowsMediaUtility.getErrorCodeDesc(Ae)}];if(true===xmp.WindowsMediaUtility.isConnectionError(Ae)){ze=new xmp.NativePlayerConnectionError("Connecting to media.",Be,this,Ce);}
else{ze=new xmp.NativePlayerError("Handling error.",Be,this,Ce);}
this.setError(null,ze);}
catch(e){this.setError("Handling error.",e);}};xmp.WINDOWS_MEDIA_PLUGIN="WindowsMediaPlugIn";xmp.WINDOWS_MEDIA_PLUGIN_CONNECTING="1";xmp.WINDOWS_MEDIA_PLUGIN_CONNECTED="2";xmp.WINDOWS_MEDIA_PLUGIN_OPEN="3";xmp.WINDOWS_MEDIA_PLUGIN_ENDED="4";xmp.WINDOWS_MEDIA_PLUGIN_BUFFERING="5";xmp.WINDOWS_MEDIA_PLUGIN_PLAYING="6";xmp.WINDOW_MEDIA_PLUGIN_STATE_CHANGE_METHOD="onStateChange";xmp.WINDOW_MEDIA_PLUGIN_ERROR_METHOD="onError";xmp.WINDOW_MEDIA_PLUGIN_TRIGGER_METHOD="onTrigger";xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE="video/x-turner-wmv";xmp.TURNER_MEDIA_PLUGIN_NAME="Turner Media Plugin";xmp.TURNER_MEDIA_PLUGIN="TurnerMedia";xmp.WindowsMediaPlugInPlayer=function(De){xmp.WindowsMediaPlugInPlayer.ctor.call(this,xmp.WINDOWS_MEDIA_PLUGIN,De);this.initCallbackStates();};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.WindowsMediaPlugInPlayer);xmp.WindowsMediaPlugInPlayer.prototype.open=function(Ee){this.setState(xmp.CONNECTING);this.getNative().url=Ee.getURI();};xmp.WindowsMediaPlugInPlayer.prototype.close=function(){this.getNative().close();xmp.WindowsMediaPlugInPlayer.base.close.call(this);};xmp.WindowsMediaPlugInPlayer.prototype.play=function(){this.getNative().play();xmp.WindowsMediaPlugInPlayer.base.play.call(this);this.setState(xmp.PLAY);};xmp.WindowsMediaPlugInPlayer.prototype.pause=function(){this.getNative().pause();xmp.WindowsMediaPlugInPlayer.base.pause.call(this);this.setState(xmp.PAUSE);};xmp.WindowsMediaPlugInPlayer.prototype.stop=function(){this.getNative().stop();xmp.WindowsMediaPlugInPlayer.base.stop.call(this);this.setState(xmp.STOP);};xmp.WindowsMediaPlugInPlayer.prototype.rewind=function(){this.getNative().rewind();xmp.WindowsMediaPlugInPlayer.base.rewind.call(this);this.setState(xmp.REWIND);};xmp.WindowsMediaPlugInPlayer.prototype.fastForward=function(){this.getNative().fastForward();xmp.WindowsMediaPlugInPlayer.base.rewind.call(this);this.setState(xmp.FAST_FORWARD);};xmp.WindowsMediaPlugInPlayer.prototype.seek=function(Fe){this.getNative().seek(Fe);xmp.WindowsMediaPlugInPlayer.base.rewind.call(this);this.setState(xmp.SEEKABLE);};xmp.WindowsMediaPlugInPlayer.prototype.isAvailable=function(Ge){return this.getNative().isAvailable(xmp.WindowsMediaUtility.getCommand([Ge]));};xmp.WindowsMediaPlugInPlayer.prototype.canAccept=function(He){return(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)===-1&&xmp.util.internals.BrowserDetect.OS===xmp.WINDOWS_PLATFORM&&xmp.WINDOWS_MEDIA_MIME_TYPE.indexOf(He)!==-1);};xmp.WindowsMediaPlugInPlayer.prototype.onValidatePlugIn=function(Ie,Je){var Ke=this.getPlugInInfo(Je,xmp.TURNER_MEDIA_PLUGIN);var Le=navigator.mimeTypes[xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE];if(!Le){throw new xmp.PlugInNotFoundError(Ie,Ke);}
if(!Le.enabledPlugin){throw new xmp.PlugInDisabledError(Ie,Ke,xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE);}
var Me=Le.enabledPlugin.name;if(Me.indexOf(xmp.TURNER_MEDIA_PLUGIN_NAME)===-1){throw new xmp.PlugInDisabledError(Ie,Ke,xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE);}
this.validatePlugInVersion(Ie,xmp.TURNER_MEDIA_PLUGIN,Me.substr(Me.lastIndexOf(" ")+1),Je);};xmp.WindowsMediaPlugInPlayer.prototype.getPosition=function(){return this.getNative().position;};xmp.WindowsMediaPlugInPlayer.prototype.getDuration=function(){return this.getNative().duration;};xmp.WindowsMediaPlugInPlayer.prototype.getVolume=function(){return this.getNative().volume;};xmp.WindowsMediaPlugInPlayer.prototype.setVolume=function(Ne){this.getNative().volume=Math.floor(Ne);};xmp.WindowsMediaPlugInPlayer.prototype.getMute=function(){return this.getNative().mute;};xmp.WindowsMediaPlugInPlayer.prototype.setMute=function(Oe){this.getNative().mute=Oe;};xmp.WindowsMediaPlugInPlayer.prototype.getFullscreen=function(){return this.getNative().fullscreen;};xmp.WindowsMediaPlugInPlayer.prototype.setFullscreen=function(Pe){this.getNative().fullscreen=Pe;};xmp.WindowsMediaPlugInPlayer.prototype.create=function(Qe){Qe.id=xmp.WINDOWS_MEDIA_PLUGIN+Qe.group;xmp.WindowsMediaPlugInPlayer.base.create.call(this,Qe);var Re=Qe.viewport.getNative();Re.innerHTML="<embed id='"+Qe.id+"' type='"+xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE+"' statechangecallback='"+this.createCallbackMethod(xmp.WINDOW_MEDIA_PLUGIN_STATE_CHANGE_METHOD)+"' errorcallback='"+this.createCallbackMethod(xmp.WINDOW_MEDIA_PLUGIN_ERROR_METHOD)+"' triggercallback='"+this.createCallbackMethod(xmp.WINDOW_MEDIA_PLUGIN_TRIGGER_METHOD)+"' "+"uimode='none' stretchtofit='true' windowlessvideo='true'"+"' volume='"+Qe.volume+"' mute='"+((true===Qe.mute)?xmp.TRUE:xmp.FALSE)+"' enablecontextmenu='false' width='"+Re.style.width+"' height='"+Re.style.height+"' style='background-color:  #000000; z-index: "+xmp.NATIVE_PLAYER_Z_INDEX+"' />";this.setCreated();};xmp.WindowsMediaPlugInPlayer.prototype.initCallbackStates=function(){this.callbackStates={};this.callbackStates[xmp.WINDOWS_MEDIA_PLUGIN_CONNECTING]=xmp.CONNECTING;this.callbackStates[xmp.WINDOWS_MEDIA_PLUGIN_CONNECTED]=xmp.CONNECTED;this.callbackStates[xmp.WINDOWS_MEDIA_PLUGIN_OPEN]=xmp.OPEN;this.callbackStates[xmp.WINDOWS_MEDIA_PLUGIN_ENDED]=xmp.ENDED;this.callbackStates[xmp.WINDOWS_MEDIA_PLUGIN_BUFFERING]=xmp.BUFFERING;this.callbackStates[xmp.WINDOWS_MEDIA_PLUGIN_PLAYING]=xmp.PLAY;};xmp.WindowsMediaPlugInPlayer.prototype.translateState=function(Se){return this.callbackStates[Se];};xmp.WindowsMediaPlugInPlayer.prototype.onStateChange=function(Te,Ue){try{var Ve=this.translateState(Te);if(Ve.length>0){var We=((Ve===xmp.BUFFERING)?{percent:parseInt(Ue,10),bytesDownloaded:0,bytesTotal:0}:null);this.setState(Ve,We);if(Ve===xmp.BUFFERING&&100===We.percent){this.setState(xmp.FIRST_FRAME_RENDERED);}}}
catch(e){this.setError("Handling state change.",e);}};xmp.WindowsMediaPlugInPlayer.prototype.onError=function(Xe){try{this.setError(null,new xmp.NativePlayerError("Handling error.",Xe,this));}
catch(e){this.setError("Handling error.",e);}};xmp.WindowsMediaPlugInPlayer.prototype.onTrigger=function(Ye,Ze){try{this.setTrigger(Ye,Ze);}
catch(e){this.setError("Handling trigger.",e);}};xmp.WindowsMediaPlugInPlayer.prototype.createCallbackMethod=function($e){return xmp.escapeHtml(this.getCallbackMethod($e),false,false);};xmp.WindowsMediaUtility=function(){xmp.WINDOWS_MEDIA_PLAY="play";xmp.WINDOWS_MEDIA_PAUSE="pause";xmp.WINDOWS_MEDIA_STOP="stop";xmp.WINDOWS_MEDIA_REWIND="fastReverse";xmp.WINDOWS_MEDIA_FAST_FORWARD="fastForward";xmp.WINDOWS_MEDIA_SEEK="currentPosition";return{getCommand:function(af){if(!this.commands){this.commands={};this.commands[xmp.PLAY]=xmp.WINDOWS_MEDIA_PLAY;this.commands[xmp.PAUSE]=xmp.WINDOWS_MEDIA_PAUSE;this.commands[xmp.STOP]=xmp.WINDOWS_MEDIA_STOP;this.commands[xmp.REWIND]=xmp.WINDOWS_MEDIA_REWIND;this.commands[xmp.FAST_FORWARD]=xmp.WINDOWS_MEDIA_FAST_FORWARD;this.commands[xmp.SEEKABLE]=xmp.WINDOWS_MEDIA_SEEK;this.commands[xmp.FULLSCREEN]=xmp.FULLSCREEN.toLowerCase();}
return this.commands[af];},getErrorCodeDesc:function(bf){this.initConnectionErrorCodes();return((this.connectionErrorCodes[bf])?this.connectionErrorCodes[bf]:bf);},isConnectionError:function(cf){this.initConnectionErrorCodes();return((this.connectionErrorCodes[cf])?true:false);},initConnectionErrorCodes:function(){if(!this.connectionErrorCodes){this.connectionErrorCodes={};this.connectionErrorCodes[-1072885352]="NS_E_WMP_SERVER_INACCESSIBLE (0xC00D1198)";this.connectionErrorCodes[-1072885353]="NS_E_WMP_CANNOT_FIND_FILE (0xC00D1197)";this.connectionErrorCodes[-1072885325]="NS_E_WMP_SERVER_NOT_RESPONDING (0xC00D11B3)";this.connectionErrorCodes[-1072885328]="NS_E_WMP_SERVER_UNAVAILABLE (0xC00D11B0)";this.connectionErrorCodes[-1072885322]="NS_E_WMP_NETWORK_FIREWALL (0xC00D11B6)";this.connectionErrorCodes[-1072885320]="NS_E_WMP_PROXY_CONNECT_TIMEOUT (0xC00D11B8)";this.connectionErrorCodes[-1072885312]="NS_E_WMP_NETWORK_ERROR (0xC00D11C0)";this.connectionErrorCodes[-1072885311]="NS_E_WMP_CONNECT_TIMEOUT (0xC00D11C1)";this.connectionErrorCodes[-1072885309]="NS_E_WMP_SERVER_DNS_TIMEOUT (0xC00D11C3)";this.connectionErrorCodes[-1072885308]="NS_E_WMP_PROXY_NOT_FOUND (0xC00D11C4)";}}};}();