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.FLASH_EVENT_HANDLER="eventHandler";xmp.FLASH_CALLBACK_CONTEXT="callbackContext";xmp.FLASH_CALLBACK_OBJECT="callbackObject";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_CALLBACK_CONTEXT,Sa.group);Va.addVariable(xmp.FLASH_CALLBACK_OBJECT,xmp.FLASH);Va.addVariable(xmp.FLASH_EVENT_HANDLER,xmp.NATIVE_PLAYER_EVENT_DISPATCH_HANDLER);Va.addVariable(xmp.FLASH_INITIALIZATION_CALLBACK,xmp.FLASH_PLAYER_INITIALIZATION_METHOD);Va.addVariable(xmp.FLASH_STATE_CHANGE_CALLBACK,xmp.FLASH_PLAYER_STATE_CHANGE_METHOD);Va.addVariable(xmp.FLASH_STATE_EXECUTE_COMMAND_CALLBACK,xmp.FLASH_PLAYER_EXECUTE_COMMAND_METHOD);Va.addVariable(xmp.FLASH_ERROR_CALLBACK,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_CALLBACK_CONTEXT,value:Xa.group},{name:xmp.FLASH_CALLBACK_OBJECT,value:xmp.FLASH},{name:xmp.FLASH_EVENT_HANDLER,value:xmp.NATIVE_PLAYER_EVENT_DISPATCH_HANDLER},{name:xmp.FLASH_INITIALIZATION_CALLBACK,value:xmp.FLASH_PLAYER_INITIALIZATION_METHOD},{name:xmp.FLASH_STATE_CHANGE_CALLBACK,value:xmp.FLASH_PLAYER_STATE_CHANGE_METHOD},{name:xmp.FLASH_STATE_EXECUTE_COMMAND_CALLBACK,value:xmp.FLASH_PLAYER_EXECUTE_COMMAND_METHOD},{name:xmp.FLASH_ERROR_CALLBACK,value: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.error=function(){xmp.QuickTimePlayer.base.error.call(this);this.state.error();};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'"+" cache='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_BUFFERING_ON_LOAD="BufferingOnLoad";xmp.QUICKTIME_BUFFERING_ON_WAIT="BufferingOnWait";xmp.QUICKTIME_MONITOR_INTERVAL=200;xmp.QUICKTIME_ERROR_CODE_DELIMITER=",";xmp.QuicktimeStateMachine=function(ad){this.player=ad;this.initTransitionTable();this.initStateChangeHandlers();this.initOperations();this.initErrorCodes();this.live=true;this.monitorTimer=null;this.bufferingComplete=false;};xmp.QuicktimeStateMachine.prototype.open=function(bd){this.url=bd.getURI();this.initState();this.player.getNative().SetURL(this.url);};xmp.QuicktimeStateMachine.prototype.close=function(){this.opened=false;this.stopMonitor();this.player.getNative().SetMute(true);this.setState(xmp.IDLE,false);};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.error=function(){this.stopMonitor();};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(){return Math.floor(this.player.getNative().GetTime()/this.player.getNative().GetTimeScale());};xmp.QuicktimeStateMachine.prototype.getDuration=function(){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()));};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(((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.volume=ld.volume;this.muted=ld.muted;this.initState();};xmp.QuicktimeStateMachine.prototype.onStateChange=function(md,nd){try{if(this.state===xmp.ERRORS){return;}
var od=this.player.getNative().GetPluginStatus();if(!od){return;}
this.validate();var pd=this.translateState(od);if(pd.length>0){this.stateHandlers[pd].apply(this,[od,pd]);}
var qd=this.getPosition();if(false===this.isInitializing()&&this.state!==xmp.ENDED&&qd>0&&(qd>=this.getDuration())&&false===this.live){this.setState(xmp.ENDED,true);}}
catch(e){this.player.setError(null,e);}};xmp.QuicktimeStateMachine.prototype.translateState=function(rd){for(var i=0;i<this.transitionTable.length;i++){var sd=this.transitionTable[i];if(rd.indexOf(sd.type)===0){if(0===sd.states.length){return sd.player_state;}
else{for(var j=0;j<sd.states.length;j++){if(this.state===sd.states[j]){return sd.player_state;}}}}}
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(td,ud,vd){this.state=td;if(true===ud){var wd=((td===xmp.QUICKTIME_BUFFERING_ON_LOAD||td===xmp.QUICKTIME_BUFFERING_ON_WAIT)?xmp.BUFFERING:td);this.player.setState(wd,vd);}};xmp.QuicktimeStateMachine.prototype.initTransitionTable=function(){this.transitionTable=[];this.transitionTable.push({type:xmp.QUICKTIME_WAITING,states:[xmp.READY],player_state:xmp.CONNECTING});this.transitionTable.push({type:xmp.QUICKTIME_WAITING,states:[xmp.CONNECTING,xmp.QUICKTIME_BUFFERING_ON_WAIT],player_state:xmp.QUICKTIME_BUFFERING_ON_WAIT});this.transitionTable.push({type:xmp.QUICKTIME_LOADING,states:[xmp.READY,xmp.CONNECTING,xmp.QUICKTIME_BUFFERING_ON_WAIT],player_state:xmp.CONNECTED});this.transitionTable.push({type:xmp.QUICKTIME_LOADING,states:[xmp.CONNECTED,xmp.QUICKTIME_BUFFERING_ON_LOAD,xmp.OPEN],player_state:xmp.QUICKTIME_BUFFERING_ON_LOAD});this.transitionTable.push({type:xmp.QUICKTIME_PLAYABLE,states:[xmp.PLAY,xmp.PAUSE,xmp.STOP,xmp.REWIND,xmp.FAST_FORWARD,xmp.SEEKABLE,xmp.BUFFERING],player_state:xmp.BUFFERING});this.transitionTable.push({type:xmp.QUICKTIME_COMPLETE,states:[xmp.PLAY,xmp.PAUSE,xmp.STOP,xmp.REWIND,xmp.FAST_FORWARD,xmp.SEEKABLE],player_state:xmp.BUFFERING});this.transitionTable.push({type:xmp.QUICKTIME_PLAYABLE,states:[xmp.READY,xmp.CONNECTING,xmp.CONNECTED,xmp.QUICKTIME_BUFFERING_ON_WAIT,xmp.QUICKTIME_BUFFERING_ON_LOAD],player_state:xmp.OPEN});this.transitionTable.push({type:xmp.QUICKTIME_COMPLETE,states:[xmp.QUICKTIME_BUFFERING_ON_LOAD],player_state:xmp.ERRORS});this.transitionTable.push({type:xmp.QUICKTIME_ERROR,states:[],player_state: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_BUFFERING_ON_WAIT]=this.onBuffering;this.stateHandlers[xmp.QUICKTIME_BUFFERING_ON_LOAD]=this.onBuffering;this.stateHandlers[xmp.BUFFERING]=this.onBuffering;};xmp.QuicktimeStateMachine.prototype.onError=function(xd,yd){this.opened=false;var zd="Unknown error.";if(true===this.isInitializing()){zd="Error connecting to \""+this.url+"\".";}
this.setState(xmp.ERRORS,false);this.player.setError(null,this.createConnectionError(xd,"Connecting to media.",zd));};xmp.QuicktimeStateMachine.prototype.onConnected=function(Ad,Bd){this.player.startMonitor();this.setState(xmp.CONNECTED,true);};xmp.QuicktimeStateMachine.prototype.onConnecting=function(Cd,Dd){this.player.startMonitor();this.setState(xmp.CONNECTING,true);};xmp.QuicktimeStateMachine.prototype.onOpen=function(Ed,Fd){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);};xmp.QuicktimeStateMachine.prototype.onBuffering=function(Gd,Hd){this.checkSetOpen();if(this.state!==xmp.QUICKTIME_BUFFERING_ON_WAIT&&this.state!==xmp.QUICKTIME_BUFFERING_ON_LOAD&&this.state!==xmp.BUFFERING){this.operations[Hd]=this.operations[this.state];}
var Id=this.player.getNative().GetDuration();var Jd=((Id===0)?0:Math.floor((this.player.getNative().GetMaxTimeLoaded()/Id)*100));Jd=((99===Jd)?100:Jd);if(false===this.bufferingComplete&&(false===this.isLive(Id)||Hd===xmp.QUICKTIME_BUFFERING_ON_WAIT||Hd===xmp.QUICKTIME_BUFFERING_ON_LOAD)){this.setState(Hd,true,{percent:Jd,bytesDownloaded:0,bytesTotal:0});}
this.bufferingComplete=(100===Jd);};xmp.QuicktimeStateMachine.prototype.isInitializing=function(){return(this.state===xmp.READY||this.state===xmp.CONNECTING||this.state===xmp.CONNECTED||this.state===xmp.QUICKTIME_BUFFERING_ON_WAIT||this.state===xmp.QUICKTIME_BUFFERING_ON_LOAD);};xmp.QuicktimeStateMachine.prototype.isBuffering=function(){return(this.state===xmp.BUFFERING||this.state===xmp.QUICKTIME_BUFFERING_ON_WAIT||this.state===xmp.QUICKTIME_BUFFERING_ON_LOAD);};xmp.QuicktimeStateMachine.prototype.isLive=function(Kd){return(xmp.QUICKTIME_INITIAL_LIVE_DURATION===Kd||0===Kd||-1===Kd);};xmp.QuicktimeStateMachine.prototype.validate=function(){if((xmp.util.internals.BrowserDetect.browser!==xmp.FIREFOX_BROWSER)||false===this.isInitializing()){return;}
var Ld=this.player.getNative().GetURL();if((!Ld||(Ld!==this.url))){if((this.state===xmp.READY&&!Ld)||true===this.isBuffering()){return;}
this.setState(xmp.ERRORS,false);var e=this.createConnectionError(this.player.getNative().GetPluginStatus(),"Validating connection.","Error connecting to \""+this.url+"\".");throw e;}};xmp.QuicktimeStateMachine.prototype.startMonitor=function(){if(!this.monitorTimer){this.monitorTimer=this.player.createTimer({object:this,id:"stateChange",interval:xmp.QUICKTIME_MONITOR_INTERVAL,handler:this.onStateChange,context:null});this.monitorTimer.start();}};xmp.QuicktimeStateMachine.prototype.stopMonitor=function(){if(this.monitorTimer){this.monitorTimer.stop();this.monitorTimer=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(Md){var Nd=((this.errorCodeDesc[Md])?this.errorCodeDesc[Md]:"(Unknown)");return Md+" "+Nd;};xmp.QuicktimeStateMachine.prototype.getErrorCodes=function(Od){var Pd=[];var Qd=Od.substring(Od.indexOf(":")+1);if(Qd.indexOf(xmp.QUICKTIME_ERROR_CODE_DELIMITER)===-1){Pd.push(this.getErrorCodeDesc(parseInt(Qd,10)));}
else{while(Qd.length>0){var Rd=Qd.indexOf(xmp.QUICKTIME_ERROR_CODE_DELIMITER);if(Rd===-1){Pd.push(this.getErrorCodeDesc(parseInt(Qd,10)));break;}
else{Pd.push(this.getErrorCodeDesc(parseInt(Qd.substring(0,Rd),10)));Qd=Qd.substring(Rd+1);}}}
return Pd;};xmp.QuicktimeStateMachine.prototype.initState=function(){this.opened=false;this.bufferingComplete=false;this.setState(xmp.READY,false);this.startMonitor();};xmp.QuicktimeStateMachine.prototype.checkSetOpen=function(){if(false===this.opened&&this.getPosition()>0){this.onOpen("",xmp.OPEN);}};xmp.QuicktimeStateMachine.prototype.createConnectionError=function(Sd,Td,Ud){var Vd=[];if(Sd&&Sd.indexOf(xmp.QUICKTIME_ERROR)===0){Vd.push({label:"Quicktime Error Codes",text:this.getErrorCodes(Sd).join(", ")});}
return new xmp.NativePlayerConnectionError(Td,Ud,this.player,Vd);};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";xmp.WindowsMediaCommands=function(){var Wd=init();function init(){var Wd={};Wd[xmp.PLAY]=xmp.WINDOWS_MEDIA_PLAY;Wd[xmp.PAUSE]=xmp.WINDOWS_MEDIA_PAUSE;Wd[xmp.STOP]=xmp.WINDOWS_MEDIA_STOP;Wd[xmp.REWIND]=xmp.WINDOWS_MEDIA_REWIND;Wd[xmp.FAST_FORWARD]=xmp.WINDOWS_MEDIA_FAST_FORWARD;Wd[xmp.SEEKABLE]=xmp.WINDOWS_MEDIA_SEEK;Wd[xmp.FULLSCREEN]=xmp.FULLSCREEN.toLowerCase();return Wd;}
return{getCommand:function(Xd){return Wd[Xd];}};}();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(Yd){xmp.WindowsMediaPlayer.ctor.call(this,xmp.WINDOWS_MEDIA,Yd);this.logger=new xmp.util.internals.CategoryLogger(xmp.WINDOWS_MEDIA);this.initCallbackStates();};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.WindowsMediaPlayer);xmp.WindowsMediaPlayer.prototype.open=function(Zd){this.getNative().URL=Zd.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($d){this.getNative().controls.currentPosition=$d;xmp.WindowsMediaPlayer.base.seek.call(this,$d);this.setState(xmp.SEEKABLE);};xmp.WindowsMediaPlayer.prototype.isAvailable=function(ae){if(ae===xmp.FULLSCREEN){return(this.getNative().playState===xmp.WINDOWS_MEDIA_PLAYING);}
return this.getNative().controls.isAvailable(xmp.WindowsMediaCommands.getCommand([ae]));};xmp.WindowsMediaPlayer.prototype.canAccept=function(be){return(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)!==-1&&xmp.util.internals.BrowserDetect.OS===xmp.WINDOWS_PLATFORM&&xmp.WINDOWS_MEDIA_MIME_TYPE.indexOf(be)!==-1);};xmp.WindowsMediaPlayer.prototype.onValidatePlugIn=function(ce,de){var ee=this.getPlugInInfo(de,xmp.WINDOWS_MEDIA);try{var fe=new ActiveXObject(xmp.WINDOWS_MEDIA_ACTIVEX_PROGID);this.validatePlugInVersion(ce,xmp.WINDOWS_MEDIA,fe.versionInfo,de);return;}
catch(e){if(e instanceof xmp.InvalidPlugInVersionError){throw e;}}
throw new xmp.PlugInNotFoundError(ce,ee);};xmp.WindowsMediaPlayer.prototype.getPosition=function(){return this.getNative().controls.currentPosition;};xmp.WindowsMediaPlayer.prototype.getDuration=function(){var ge=this.getNative().currentMedia;if(ge===null){return 0;}
return ge.duration;};xmp.WindowsMediaPlayer.prototype.getVolume=function(){return this.getNative().settings.volume;};xmp.WindowsMediaPlayer.prototype.setVolume=function(he){this.getNative().settings.volume=he;};xmp.WindowsMediaPlayer.prototype.getMute=function(){return this.getNative().settings.mute;};xmp.WindowsMediaPlayer.prototype.setMute=function(ie){this.getNative().settings.mute=ie;};xmp.WindowsMediaPlayer.prototype.getFullscreen=function(){return this.getNative().fullScreen;};xmp.WindowsMediaPlayer.prototype.setFullscreen=function(je){this.getNative().fullScreen=je;};xmp.WindowsMediaPlayer.prototype.create=function(ke){ke.id=xmp.WINDOWS_MEDIA+ke.group;xmp.WindowsMediaPlayer.base.create.call(this,ke);var le=ke.viewport.getNative();le.innerHTML="<object id='"+ke.id+"' width='"+le.style.width+"' height='"+le.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='"+ke.volume+"'/>"+"<param name='mute' value='"+((true===ke.mute)?xmp.TRUE:xmp.FALSE)+"'/></object>"+"<script language = 'jscript' for='"+ke.id+"' event=playstatechange(newstate)>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_PLAY_STATE_CHANGE_METHOD)+"(newstate);</script>"+"<script language = 'jscript' for='"+ke.id+"' event=openstatechange(newstate)>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_OPEN_STATE_CHANGE_METHOD)+"(newstate);</script>"+"<script language = 'jscript' for='"+ke.id+"' event=buffering(start)>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_BUFFERING_METHOD)+"(start);</script>"+"<script language = 'jscript' for='"+ke.id+"' event='scriptcommand(name, data)'>"+this.getCallbackMethod(xmp.WINDOWS_MEDIA_PLAYER_TRIGGER_METHOD)+"(name, data);</script>"+"<script language = 'jscript' for='"+ke.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(me,ne){var oe=this.callbackStates[me];for(var i=0;i<oe.length;i++){if(ne==oe[i].state){return oe[i].player_state;}}
return"";};xmp.WindowsMediaPlayer.prototype.onPlayStateChange=function(pe){try{if(pe===xmp.WINDOWS_MEDIA_STOPPED){this.logger.warn("Play state changed to \"Stopped\".");}
var qe=this.translateState(xmp.PLAY_STATE_CHANGE,pe);if(qe.length>0){this.setState(qe);}}
catch(e){this.setError("Handling play state change.",e);}};xmp.WindowsMediaPlayer.prototype.onOpenStateChange=function(re){try{var se=this.translateState(xmp.OPEN_STATE_CHANGE,re);if(se.length>0){this.setState(se);}}
catch(e){this.setError("Handling open state change.",e);}};xmp.WindowsMediaPlayer.prototype.onBuffering=function(te){try{var ue=((true===te)?this.getNative().network.bufferingProgress:100);this.setState(xmp.BUFFERING,{percent:ue,bytesDownloaded:0,bytesTotal:0});if(100===ue){this.setState(xmp.FIRST_FRAME_RENDERED);}}
catch(e){this.setError("Handling buffering.",e);}};xmp.WindowsMediaPlayer.prototype.onTrigger=function(ve,we){try{this.setTrigger(ve,we);}
catch(e){this.setError("Handling trigger.",e);}};xmp.WindowsMediaPlayer.prototype.onError=function(){try{var xe=null;var ye=this.getNative().Error.item(0).errorCode;if(ye===xmp.WINDOWS_MEDIA_CONNECTION_ERROR){var ze=[{label:"Windows Media Error Code",text:ye}];xe=new xmp.NativePlayerConnectionError("Connecting to media.",this.getNative().Error.item(0).errorDescription,this,ze);}
else{xe=new xmp.NativePlayerError("Handling error.",this.getNative().Error.item(0).errorDescription,this);}
this.setError(null,xe);}
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(Ae){xmp.WindowsMediaPlugInPlayer.ctor.call(this,xmp.WINDOWS_MEDIA_PLUGIN,Ae);this.initCallbackStates();};xmp.DERIVE_CLASS(xmp.AbstractNativePlayer,xmp.WindowsMediaPlugInPlayer);xmp.WindowsMediaPlugInPlayer.prototype.open=function(Be){this.setState(xmp.CONNECTING);this.getNative().url=Be.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(Ce){this.getNative().seek(Ce);xmp.WindowsMediaPlugInPlayer.base.rewind.call(this);this.setState(xmp.SEEKABLE);};xmp.WindowsMediaPlugInPlayer.prototype.isAvailable=function(De){return this.getNative().isAvailable(xmp.WindowsMediaCommands.getCommand([De]));};xmp.WindowsMediaPlugInPlayer.prototype.canAccept=function(Ee){return(navigator.appName.indexOf(xmp.MICROSOFT_BROWSER)===-1&&xmp.util.internals.BrowserDetect.OS===xmp.WINDOWS_PLATFORM&&xmp.WINDOWS_MEDIA_MIME_TYPE.indexOf(Ee)!==-1);};xmp.WindowsMediaPlugInPlayer.prototype.onValidatePlugIn=function(Fe,Ge){var He=this.getPlugInInfo(Ge,xmp.TURNER_MEDIA_PLUGIN);var Ie=navigator.mimeTypes[xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE];if(!Ie){throw new xmp.PlugInNotFoundError(Fe,He);}
if(!Ie.enabledPlugin){throw new xmp.PlugInDisabledError(Fe,He,xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE);}
var Je=Ie.enabledPlugin.name;if(Je.indexOf(xmp.TURNER_MEDIA_PLUGIN_NAME)===-1){throw new xmp.PlugInDisabledError(Fe,He,xmp.WINDOWS_MEDIA_PLUGIN_MIME_TYPE);}
this.validatePlugInVersion(Fe,xmp.TURNER_MEDIA_PLUGIN,Je.substr(Je.lastIndexOf(" ")+1),Ge);};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(Ke){this.getNative().volume=Math.floor(Ke);};xmp.WindowsMediaPlugInPlayer.prototype.getMute=function(){return this.getNative().mute;};xmp.WindowsMediaPlugInPlayer.prototype.setMute=function(Le){this.getNative().mute=Le;};xmp.WindowsMediaPlugInPlayer.prototype.getFullscreen=function(){return this.getNative().fullscreen;};xmp.WindowsMediaPlugInPlayer.prototype.setFullscreen=function(Me){this.getNative().fullscreen=Me;};xmp.WindowsMediaPlugInPlayer.prototype.create=function(Ne){Ne.id=xmp.WINDOWS_MEDIA_PLUGIN+Ne.group;xmp.WindowsMediaPlugInPlayer.base.create.call(this,Ne);var Oe=Ne.viewport.getNative();Oe.innerHTML="<embed id='"+Ne.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='"+Ne.volume+"' mute='"+((true===Ne.mute)?xmp.TRUE:xmp.FALSE)+"' fullscreen='"+Ne.fullscreen+"' enablecontextmenu='false' width='"+Oe.style.width+"' height='"+Oe.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(Pe){return this.callbackStates[Pe];};xmp.WindowsMediaPlugInPlayer.prototype.onStateChange=function(Qe,Re){try{var Se=this.translateState(Qe);if(Se.length>0){var Te=((Se===xmp.BUFFERING)?{percent:parseInt(Re,10),bytesDownloaded:0,bytesTotal:0}:null);this.setState(Se,Te);if(Se===xmp.BUFFERING&&100===Te.percent){this.setState(xmp.FIRST_FRAME_RENDERED);}}}
catch(e){this.setError("Handling state change.",e);}};xmp.WindowsMediaPlugInPlayer.prototype.onError=function(Ue){try{this.setError(null,new xmp.NativePlayerError("Handling error.",Ue,this));}
catch(e){this.setError("Handling error.",e);}};xmp.WindowsMediaPlugInPlayer.prototype.onTrigger=function(Ve,We){try{this.setTrigger(Ve,We);}
catch(e){this.setError("Handling trigger.",e);}};xmp.WindowsMediaPlugInPlayer.prototype.createCallbackMethod=function(Xe){return xmp.escapeHtml(this.getCallbackMethod(Xe),false,false);};