if(typeof AC==="undefined"){AC={};}AC.QuickTime={_createNullMovie:function(H,W){H=0;W=0;var v=$(document.createElement("div")),c="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",D="http://www.apple.com/qtactivex/qtplugin.cab#version=7,3,0,0",A="http://www.apple.com/quicktime/download/";v.innerHTML="<object width=\""+H+"\" height=\""+W+"\" classid=\""+c+"\" codebase=\""+D+"\"><embed width=\""+H+"\" height=\""+W+"\" type=\"video/quicktime\" pluginspage=\""+A+"\"></embed></object>";return v;},packageMovie:function(H,W,c){if(!H||!W){throw new TypeError("Valid Name and File URL are required arguments.");}var D="7",A=null;if(c&&c.minVersion){D=c.minVersion;}if(!AC.Detector.isMobile()&&!AC.Detector.isValidQTAvailable(D)){A=$(document.createElement("a"));A.addClassName("quicktime-download");A.setAttribute("href","http://www.apple.com/quicktime/download/");A.innerHTML=c.downloadText||"Get the latest QuickTime.";return A;}if(AC.Detector.isIEStrict()){AC.QuickTime.createEventSource();}if(c&&!!c.factory){return c.factory.create.call(c.factory,H,W,c);}else{return AC.QuickTime.Factory.Plugin.create(H,W,c);}},createEventSource:function(){var H="qt_event_source",c,W;if(document.getElementById(H)){return ;}c=document.createElement("object");c.id=H;c.setAttribute("clsid","CB927D12-4FF7-4a9e-A169-56E4B8A75598");W=document.getElementsByTagName("head")[0];W.appendChild(c);}};AC.Quicktime=AC.QuickTime;AC.QuickTime.Factory={Combined:{create:function(H,W,c){var D=null,A=null;D=AC.QuickTime.Factory.Plugin.create(H,W,c);if(AC.Detector.isIEStrict()){return D;}else{A=AC.QuickTime.Factory.Video.create(H,W,c);A.appendChild(D);return A;}}},Plugin:{create:function(A,c,H){var D=this._createOuterObject(A,c,H),W=null;if(!AC.Detector.isIEStrict()){W=this._createInnerObject(A,c,H);D.appendChild(W);D.inner=W;}else{D.style.behavior="url(#qt_event_source)";if(H.aggressiveCleanup!==false){Event.observe(window,"unload",function(){try{D.Stop();}catch(v){}D.style.display="none";D=null;});}}this._configure(W,D,H);this._addParameter(D,"saveembedtags",true);this._addParameter(W,"saveembedtags",true);this._addParameter(D,"postdomevents",true);this._addParameter(W,"postdomevents",true);D.setAttribute("classid","clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B");return D;},_configure:function(W,D,H){if(!H){return false;}var A=null,c=null;for(A in H){if(H.hasOwnProperty(A)){c=A.toLowerCase();switch(c){case ("type"):case ("src"):case ("data"):case ("classid"):case ("name"):case ("id"):case ("postdomevents"):case ("saveembedtags"):case ("factory"):case ("aggressiveCleanup"):break;case ("class"):Element.addClassName(D,H[A]);break;case ("innerId"):if(W){W.setAttribute("id",H[A]);}break;case ("autoplay"):this._addParameter(D,"autostart",H[A]);this._addParameter(W,"autostart",H[A]);break;case ("width"):case ("height"):D.setAttribute(c,H[A]);if(W){W.setAttribute(c,H[A]);}break;default:this._addParameter(D,c,H[A]);this._addParameter(W,c,H[A]);break;}}}},_addParameter:function(c,W,H){if(!c){return ;}var A=document.createElement("param");A.setAttribute("value",H);A.setAttribute("name",W);c.appendChild(A);A=null;},_createOuterObject:function(H,W,c){var D=document.createElement("object"),A="7,3,0,0";if(AC.Detector.isMobile()&&c.posterFrame){this._addParameter(D,"src",c.posterFrame);this._addParameter(D,"href",W);this._addParameter(D,"target","myself");}else{this._addParameter(D,"src",W);}D.setAttribute("id",H);if(null!==c&&(typeof c.codebase!=="undefined")&&""!==c.codebase){A=c.codeBase;}D.setAttribute("codebase","http://www.apple.com/qtactivex/qtplugin.cab#version="+A);return D;},_createInnerObject:function(A,c,H){var W=document.createElement("object");W.setAttribute("type","video/quicktime");W.setAttribute("data",c);W.setAttribute("id",A+"Inner");W.setAttribute("name",A);return W;}},Video:{create:function(H,W,c){var A=document.createElement("video");A.setAttribute("id",H);A.setAttribute("src",W);this._configure(A,c);return A;},_configure:function(H,c){if(!c){return false;}var A=null,W=null;for(A in c){if(c.hasOwnProperty(A)){W=A.toLowerCase();switch(W){case ("type"):case ("src"):case ("data"):case ("classid"):case ("name"):case ("id"):case ("postdomevents"):case ("saveembedtags"):case ("factory"):case ("aggressiveCleanup"):case ("innerId"):case ("cache"):case ("wmode"):case ("aggressivecleanup"):case ("showlogo"):break;case ("class"):Element.addClassName(H,c[A]);break;case ("controller"):if(c[A]){H.setAttribute("controls","controls");}break;case ("autoplay"):case ("autostart"):if(c[A]){H.setAttribute("autoplay","autoplay");}break;default:H.setAttribute(W,c[A]);break;}}}}},Audio:{},Null:{}};AC.QuickTime.States={Polling:{isAvailable:function(W){return true;},toString:function(){return "Polling State";},detachFromMovie:Prototype.emptyFunction,reset:Prototype.emptyFunction,_monitor:function(){var c=this.isPlaying(),W=null;if(!this._acknowledgedPlayable){W=this.GetPluginStatus();if("Playable"===W||"Complete"===W){this._didBecomePlayable();}}else{if(!this.isJogging){if(c&&!this.playing){this._didStart();}else{if(!c&&this.playing){this._didStop();}}}}this.updateController();if(this.movie!==null){this.movieWatcher=setTimeout(AC.Quicktime.States.Polling._monitor.bind(this),this._monitorDelay);}},monitorMovie:function(){this.movieWatcher=setTimeout(AC.Quicktime.States.Polling._monitor.bind(this),this._monitorDelay);}},Events:{eventNames:{plugin:{loadstart:"loadstart",progress:"qt_progress",loadedmetadata:"loadedmetadata",loadedfirstframe:"loadedfirstframe",load:"load",abort:"abort",error:"error",emptied:"emptied",stalled:"stalled",play:"qt_play",pause:"qt_pause",waiting:"waiting",seeking:"seeking",seeked:"seeked",timeupdate:"timeupdate",ended:"qt_ended",dataunavailable:"dataunavailable",canshowcurrentframe:"canshowcurrentframe",canplay:"canplay",canplaythrough:"qt_canplaythrough",ratechange:"ratechange",durationchange:"durationchange",volumechange:"volumechange"},video:{loadstart:"loadstart",progress:"progress",loadedmetadata:"loadedmetadata",loadedfirstframe:"loadedfirstframe",load:"load",abort:"abort",error:"error",emptied:"emptied",stalled:"stalled",play:"play",pause:"pause",waiting:"waiting",seeking:"seeking",seeked:"seeked",timeupdate:"timeupdate",ended:"ended",dataunavailable:"dataunavailable",canshowcurrentframe:"canshowcurrentframe",canplay:"canplay",canplaythrough:"canplaythrough",ratechange:"ratechange",durationchange:"durationchange",volumechange:"volumechange"}},isAvailable:function(W){return AC.Detector.isQTCompatible("7.3");},toString:function(){return "DOM Event State";},detachFromMovie:function(){var W=AC.QuickTime.States.Events._eventNames(this.movie);Event.stopObserving(this.movie,W.canplaythrough,this._didBecomePlayableCallback);Event.stopObserving(this.movie,W.pause,this._didStopCallback);Event.stopObserving(this.movie,W.play,this._didStartCallback);},_eventNames:function(W){var c=W.tagName.match(/video/i)?AC.QuickTime.States.Events.eventNames.video:AC.QuickTime.States.Events.eventNames.plugin;return c;},reset:Prototype.emptyFunction,_monitor:function(){var W=null,c;if(!this._acknowledgedPlayable){W=this.GetPluginStatus();if("Playable"===W||"Complete"===W){this._didBecomePlayable();if(this.isPlaying()){this._didStart();}c=AC.QuickTime.States.Events._eventNames(this.movie);this._didStartCallback=this._didStart.bind(this);Event.observe(this.movie,c.play,this._didStartCallback);}}this.updateController();if(this.movie!==null){this.movieWatcher=setTimeout(AC.Quicktime.States.Events._monitor.bind(this),this._monitorDelay);}},monitorMovie:function(){if(!this._hasBegunMonitoring){var W=AC.QuickTime.States.Events._eventNames(this.movie);this._didStopCallback=this._didStop.bind(this);Event.observe(this.movie,W.pause,this._didStopCallback);Event.observe(this.movie,W.ended,this._didStopCallback);}this.movieWatcher=setTimeout(AC.Quicktime.States.Events._monitor.bind(this),this._monitorDelay);}}};AC.QuickTime.Controller=Class.create();AC.QuicktimeController=AC.QuickTime.Controller;AC.QuickTimeController=AC.QuickTime.Controller;AC.QuickTime.Controller.prototype={movie:null,options:null,movieAttacher:null,attachDelay:500,movieWatcher:null,normalMonitorDelay:480,longMonitorDelay:4800,_monitorDelay:this.normalMonitorDelay,_hasBegunMonitoring:false,currentTime:0,percentLoaded:0,maxBytesLoaded:0,movieSize:0,allowAttach:true,controllerPanel:null,currentControl:null,playControl:null,pauseControl:null,slider:null,track:null,playHead:null,loadedProgress:null,state:null,_closedCaptionsAvailable:false,_closedCaptionsEnabled:false,_closedCaptionTrackIndex:4,_acknowledgedPlayable:false,isJogging:false,hardPaused:false,duration:0,finished:false,playing:false,unloader:null,initialize:function(W,c){this._eventSource=document.getElementsByTagName("body")[0];this.options=c||{};if(this.options.delegate){this.setDelegate(this.options.delegate);}if(this.options.renderInto){this.render(this.options.renderInto);}this.attachToMovie(W,c);},setDelegate:function(W){this.delegate=W;},setState:function(c,W){if(typeof (c)!=="undefined"){this.state=c;}else{this.state=AC.Quicktime.States.Polling;}},attachToMovie:function(W,c){if(!W||!this.allowAttach){return ;}if(!$(W)){throw "Movie has to be appended to document prior to attaching to with a controller.";}if(this.movie){this.detachFromMovie();}this._trackTypes=[];this._trackNames=[];this._chapterNames=[];clearInterval(this.movieAttacher);if(typeof c!=="undefined"){this.options=c;}if(!this.unloader){this.unloader=this.detachFromMovie.bind(this);Event.observe(window,"unload",this.unloader);}this._startLoadingIndicator(W);this.movieAttacher=setInterval(this._attach.bind(this,W),this.attachDelay);W=null;},_attach:function(W){if(!this.allowAttach){return ;}this.movie=this._responsiveMediaElement(W);if(this.movie){clearInterval(this.movieAttacher);this.setState(this.options.state);this.movieIsVideo=!!this.movie.tagName.match(/video/i);if(this.delegate&&typeof this.delegate.didAttach==="function"){this.delegate.didAttach(this);}this._eventSource.fire("QuickTime:didAttach",{controller:this});this.monitorMovie();}W=null;},_startLoadingIndicator:function(W){this._movieContainer=W.parentNode;Element.addClassName(this._movieContainer,"movie-loading");if(this.controllerPanel){Element.addClassName(this.controllerPanel,"movie-loading");}},_stopLoadingIndicator:function(){if(this._movieContainer){Element.removeClassName(this._movieContainer,"movie-loading");this._movieContainer=null;}if(this.controllerPanel){Element.removeClassName(this.controllerPanel,"movie-loading");}},_responsiveMediaElement:function(W){try{if(!W){return null;}else{if(W.play||W.Play){return W;}else{return this._responsiveMediaElement(W.down("video, object, embed"));}}}catch(c){if(W.GetPluginStatus()){return W;}else{return this._responsiveMediaElement(W.down("video, object, embed"));}return null;}},detachFromMovie:function(){this.allowAttach=false;if(this.state){this.state.detachFromMovie.call(this);}clearInterval(this.movieAttacher);clearTimeout(this.movieWatcher);this.movie=null;this.reset();this._trackTypes=null;this._trackNames=null;this._chapterNames=null;Event.stopObserving(window,"unload",this.unloader);this.unloader=null;this.allowAttach=true;if(this.delegate&&typeof this.delegate.didDetach==="function"){this.delegate.didDetach(this);}this._eventSource.fire("QuickTime:didDetach",{controller:this});},monitorMovie:function(){if(!this.movie){throw new Error("Cannot begin monitoring until attached to a movie");}this.state.monitorMovie.call(this);if(this.controllerPanel!==null&&!this._hasBegunMonitoring){this.slider=new Control.Slider(this.playHead,this.track,{onSlide:function(W){if(isNaN(W)){return ;}this.trackProgress.style.width=this.slider.translateToPx(W);if(!this.isJogging){this._didStartJogging();}this.SetTime(W*this.GetDuration());}.bind(this),onChange:function(W){if(isNaN(W)){return ;}if(this.isJogging){this._didStopJogging();}this.trackProgress.style.width=this.slider.translateToPx(W);}.bind(this)});this.slider.updateStyles=Prototype.emptyFunction;}this._hasBegunMonitoring=true;},_didBecomePlayable:function(){this._stopLoadingIndicator();this.updateController();if(this._acknowledgedPlayable){return ;}this._acknowledgedPlayable=true;var W=this.GetTrackCount(),c;for(c=1;c<=W;c++){if("Closed Caption"===this.GetTrackType(c)){this._closedCaptionTrackIndex=c;this._setClosedCaptionsAvailable(true);}}if(this.options.onMoviePlayable&&typeof this.options.onMoviePlayable==="function"){this.options.onMoviePlayable();}if(this.delegate&&typeof this.delegate.didBecomePlayable==="function"){this.delegate.didBecomePlayable(this);}this._eventSource.fire("QuickTime:canplaythrough",{controller:this});},playedCount:0,_didStart:function(){if(this.wasJogging){this.wasJogging=false;return ;}this.playing=true;if(this.controllerPanel){this.controllerPanel.replaceChild(this.pauseControl,this.currentControl);this.currentControl=this.pauseControl;}if(typeof this.options.onMovieStart==="function"){this.options.onMovieStart();}if(0===this.playedCount){if(this.delegate&&typeof this.delegate.didBegin==="function"){this.delegate.didBegin(this);}this._eventSource.fire("QuickTime:begin",{controller:this});}else{if(this.delegate&&typeof this.delegate.didStart==="function"){this.delegate.didStart(this);}this._eventSource.fire("QuickTime:start",{controller:this});}this.playedCount+=1;},_didStop:function(){if(this.isJogging){return ;}this.playing=false;if(this.controllerPanel){this.controllerPanel.replaceChild(this.playControl,this.currentControl);this.currentControl=this.playControl;}if(typeof this.options.onMovieStop==="function"){this.options.onMovieStop();}var c=this.GetTime(),W=this.GetDuration();if(c>=W){this._didPlayProgress(W,W);if(this.options.onMovieFinished&&typeof this.options.onMovieFinished==="function"){this.options.onMovieFinished();}if(this.delegate&&typeof this.delegate.didEnd==="function"){this.delegate.didEnd(this);}this._eventSource.fire("QuickTime:end",{controller:this});}else{if(this.delegate&&typeof this.delegate.didStop==="function"){this.delegate.didStop(this);}this._eventSource.fire("QuickTime:stop",{controller:this});}},reset:function(){if(this.state){this.state.reset.call(this);}this.duration=0;this.movieSize=0;this.maxBytesLoaded=0;this.percentLoaded=0;this.movieIsVideo=false;this._acknowledgedPlayable=false;this.playedCount=0;this._hasBegunMonitoring=false;this._monitorDelay=this.normalMonitorDelay;this._trackCount=NaN;this._trackTypes=[];this._trackNames=[];this._chapterCount=NaN;this._chapterNames=[];this.setClosedCaptionsEnabled(false);this._setClosedCaptionsAvailable(false);delete this.timeScale;if(this.slider){this.slider.setValue(0);this.slider.trackLength=this.slider.maximumOffset()-this.slider.minimumOffset();}this._stopLoadingIndicator();if(this.loadedProgress){this.loadedProgress.style.width="0px";}},render:function(W){if(typeof W!=="undefined"&&!$(W)){throw new Error("Specified container ID, '"+W+"' not found in DOM");}this.controllerPanel=$(document.createElement("div"));Element.addClassName(this.controllerPanel,"ACQuicktimeController");this.playControl=document.createElement("div");Element.addClassName(this.playControl,"control");Element.addClassName(this.playControl,"play");this.playControl.innerHTML="Play";this.playControl.onclick=this.Play.bind(this);this.pauseControl=document.createElement("div");Element.addClassName(this.pauseControl,"control");Element.addClassName(this.pauseControl,"pause");this.pauseControl.innerHTML="Pause";this.pauseControl.onclick=this.Stop.bind(this);var c=false;if(null!==this.movie){c=this.GetAutoPlay();}this.currentControl=(c)?this.pauseControl:this.playControl;this.controllerPanel.appendChild(this.currentControl);this.sliderPanel=document.createElement("div");Element.addClassName(this.sliderPanel,"sliderPanel");this.track=document.createElement("div");Element.addClassName(this.track,"track");this.sliderPanel.appendChild(this.track);this.loadedProgress=document.createElement("div");Element.addClassName(this.loadedProgress,"loadedProgress");this.track.appendChild(this.loadedProgress);this.trackProgress=document.createElement("div");Element.addClassName(this.trackProgress,"trackProgress");this.track.appendChild(this.trackProgress);this.playHead=document.createElement("div");Element.addClassName(this.playHead,"playHead");this.track.appendChild(this.playHead);this.controllerPanel.appendChild(this.sliderPanel);this.timeDisplay=document.createElement("div");Element.addClassName(this.timeDisplay,"timeDisplay");this.controllerPanel.appendChild(this.timeDisplay);if(W){$(W).appendChild(this.controllerPanel);this.trackWidth=Element.getDimensions(this.track).width;if(this.delegate&&typeof this.delegate.didRenderController==="function"){this.delegate.didRenderController(this);}this._eventSource.fire("QuickTime:didRenderController",{controller:this});if(this.movie){this.monitorMovie();}}return this.controllerPanel;},setTimeDisplayString:function(W){this.timeDisplay.innerHTML=W;},updateController:function(W){if(!this.controllerPanel){return ;}this._updateControllerLoadedProgress();if(this.isJogging||this.isPlaying()){var A=this.currentTime,c=this.GetTime(),H=this.GetDuration();if(A!==c){if(!this.isJogging){this.slider.setValue(c/H);}this._didPlayProgress(c,H);}}},_didPlayProgress:function(W,c){if(this.delegate&&typeof this.delegate.didPlayProgress==="function"){this.delegate.didPlayProgress(this,W,c);}this._eventSource.fire("QuickTime:didPlayProgress",{controller:this,currentTime:W,duration:c});},_updateControllerLoadedProgress:function(){if(this.percentLoaded<1){var W=Element.getDimensions(this.track).width,H=this.GetMaxBytesLoaded()/this.GetMovieSize(),c=0;if(!isNaN(H)&&0!==H){this.percentLoaded=H;}c=W*this.percentLoaded;Element.setStyle(this.loadedProgress,{width:c+"px"});}},_didStartJogging:function(){if(!this.isJogging){this.playAfterJog=this.isPlaying();this.isJogging=true;this.Stop();var W=this.GetTime();if(this.delegate&&typeof this.delegate.didStartJogging==="function"){this.delegate.didStartJogging(this,W);}this._eventSource.fire("QuickTime:didStartJogging",{controller:this,time:W});}},_didStopJogging:function(){this.isJogging=false;var W=this.GetTime();if(this.delegate&&typeof this.delegate.didStopJogging==="function"){this.delegate.didStopJogging(this,W);}this._eventSource.fire("QuickTime:didStopJogging",{controller:this,time:W});if(this.playAfterJog){this.wasJogging=true;this.Play();}},Play:function(){if(null!==this.movie){try{if(this.movieIsVideo){this.movie.play();}else{this.movie.Play();}}catch(W){}}},Stop:function(){if(null!==this.movie){try{if(this.movieIsVideo){this.movie.pause();}else{this.movie.Stop();}}catch(W){}}},Rewind:function(){if(null!==this.movie){this.movie.Stop();this.movie.Rewind();}},Step:function(W){this.movie.Step(W);},ShowDefaultView:function(){this.movie.ShowDefaultView();},GoPreviousNode:function(){this.movie.GoPreviousNode();},GetQuicktimeVersion:function(){return this.movie.GetQuickTimeVersion();},GetQuicktimeLanguage:function(){return this.movie.GetQuicktimeLanguage();},GetQuicktimeConnectionSpeed:function(){return this.movie.GetQuicktimeConnectionSpeed();},GetIsQuickTimeRegistered:function(){return this.movie.GetIsQuickTimeRegistered();},GetComponentVersion:function(){return this.movie.GetComponentVersion();},GetPluginVersion:function(){return this.movie.GetPluginVersion();},ResetPropertiesOnReload:function(){this.movie.ResetPropertiesOnReload();},GetPluginStatus:function(){if(!this.movieIsVideo){try{return this.movie.GetPluginStatus();}catch(c){return "Waiting";}}else{var W=this.movie.readyState;return W>2?"Playable":"Waiting";}},GetAutoPlay:function(){return this.movie.GetAutoPlay();},SetAutoPlay:function(W){this.movie.SetAutoPlay(W);},GetControllerVisible:function(){return this.movie.GetControllerVisible();},SetControllerVisible:function(W){this.movie.SetControllerVisible(W);},GetRate:function(){return this.movie.GetRate();},SetRate:function(W){this.movie.SetRate();},GetTime:function(){var c=0;try{if(this.movieIsVideo){c=this.movie.currentTime;}else{c=this.movie.GetTime();}}catch(W){}if(0===c){c=this.currentTime+this._monitorDelay;}else{this.currentTime=c;}return c;},SetTime:function(c){try{if(this.movieIsVideo){this.movie.currentTime=c;}else{this.movie.SetTime(c);}}catch(W){}},GetVolume:function(){return this.movie.GetVolume();},SetVolume:function(W){this.movie.SetVolume(W);},GetMute:function(){return this.movie.GetMute();},SetMute:function(W){this.movie.SetMute(W);this.setClosedCaptionsEnabled(W);},GetMovieName:function(){return this.movie.GetMovieName();},SetMovieName:function(W){this.movie.SetMovieName(W);},GetMovieID:function(){return this.movie.GetMovieID();},SetMovieID:function(W){this.movie.SetMovieID(W);},GetStartTime:function(){return this.movie.GetStartTime();},SetStartTime:function(W){this.movie.SetStartTime(W);},GetEndTime:function(){return this.movie.GetEndTime();},SetEndTime:function(W){this.movie.SetEndTime(W);},GetBgColor:function(){return this.movie.GetBgColor();},SetBgColor:function(W){this.movie.SetBgColor(W);},GetIsLooping:function(){return this.movie.GetIsLooping();},SetIsLooping:function(W){this.movie.SetIsLooping(W);},GetLoopIsPalindrome:function(){return this.movie.GetLoopIsPalindrome();},SetLoopIsPalindrome:function(W){this.movie.SetLoopIsPalindrome(W);},GetPlayEveryFrame:function(){return this.movie.GetPlayEveryFrame();},SetPlayEveryFrame:function(W){this.movie.SetPlayEveryFrame(W);},GetHREF:function(){return this.movie.GetHREF();},SetHREF:function(W){this.movie.SetHREF(W);},GetTarget:function(){return this.movie.GetTarget();},SetTarget:function(W){this.movie.SetTarget(W);},GetQTNEXTUrl:function(){return this.movie.GetQTNEXTUrl();},SetQTNEXTUrl:function(c,W){this.movie.SetQTNEXTUrl(c,W);},GetURL:function(){return this.movie.GetURL();},SetURL:function(W){if(!!this.movie.tagName.match(/video/i)){this.movie.src=W;this.movie.load();}else{this.movie.SetURL(W);}this.reset();},GetKioskMode:function(){return this.movie.GetKioskMode();},SetKioskMode:function(W){this.movie.SetKioskMode(W);},GetDuration:function(){if(null===this.duration||0===this.duration){try{if(this.movieIsVideo){this.duration=this.movie.duration;}else{this.duration=this.movie.GetDuration();}}catch(W){this.duration=0;}}return this.duration;},GetMaxTimeLoaded:function(){return this.movie.GetMaxTimeLoaded();},GetTimeScale:function(){if(typeof this.timeScale!=="undefined"){return this.timeScale;}try{if(this.movieIsVideo){this.timeScale=2997;}else{this.timeScale=this.movie.GetTimeScale();}}catch(W){}return this.timeScale;},GetMovieSize:function(){if(0===this.movieSize){try{if(this.movieIsVideo){this.movieSize=this.movie.totalBytes;}else{this.movieSize=this.movie.GetMovieSize();}}catch(W){this.movieSize=0;}}return this.movieSize;},GetMaxBytesLoaded:function(){try{if(this.movieIsVideo){this.maxBytesLoaded=this.movie.bufferedBytes;}else{this.maxBytesLoaded=this.movie.GetMaxBytesLoaded();}}catch(W){}return this.maxBytesLoaded;},_trackCount:NaN,GetTrackCount:function(){if(!isNaN(this._trackCount)){return this._trackCount;}try{this._trackCount=this.movie.GetTrackCount();return this._trackCount;}catch(W){return NaN;}},GetMatrix:function(){return this.movie.GetMatrix();},SetMatrix:function(W){this.movie.SetMatrix(W);},GetRectangle:function(){return this.movie.GetRectangle();},SetRectangle:function(W){this.movie.SetRectangle(W);},GetLanguage:function(){return this.movie.GetLanguage();},SetLanguage:function(W){this.movie.SetLanguage(W);},GetMIMEType:function(){return this.movie.GetMIMEType();},GetUserData:function(W){return this.movie.GetUserData(W);},GetIsVRMovie:function(){return this.movie.GetIsVRMovie();},GetHotspotUrl:function(W){return this.movie.GetHotspotUrl(W);},SetHotspotUrl:function(W,c){this.movie.SetHotspotUrl(W,c);},GetHotspotTarget:function(W){return this.movie.GetHotspotTarget(W);},SetHotspotTarget:function(W,c){this.movie.SetHotspotTarget(W,c);},GetPanAngle:function(){return this.movie.GetPanAngle();},SetPanAngle:function(W){this.movie.SetPanAngle(W);},GetTiltAngle:function(){return this.movie.GetTiltAngle();},SetTiltAngle:function(W){this.movie.SetTiltAngle(W);},GetFieldOfView:function(){return this.movie.GetFieldOfView();},SetFieldOfView:function(W){this.movie.SetFieldOfView(W);},GetNodeCount:function(){return this.movie.GetNodeCount();},SetNodeID:function(W){this.movie.SetNodeID(W);},_trackNames:null,GetTrackName:function(W){if(!this._trackNames){throw "Need to attach to a movie before getting track names";}if(this._trackNames[W]){return this._trackNames[W];}try{var c=this.movie.GetTrackName(W);this._trackNames[W]=c;return c;}catch(H){if(!this._trackExistsAtIndex(W)){throw "There is no track at the specified index: "+W;}else{return "Unknown";}}},_trackTypes:null,GetTrackType:function(W){if(!this._trackTypes){throw "Need to attach to a movie before getting track types";}if(this._trackTypes[W]){return this._trackTypes[W];}try{var c=this.movie.GetTrackType(W);this._trackTypes[W]=c;return c;}catch(H){if(!this._trackExistsAtIndex(W)){throw "There is no track at the specified index: "+W;}else{return "Unknown";}}},GetTrackEnabled:function(W){try{return this.movie.GetTrackEnabled(W);}catch(c){if(!this._trackExistsAtIndex(W)){throw "There is no track at the specified index: "+W;}}},SetTrackEnabled:function(c,W){try{this.movie.SetTrackEnabled(c,W);}catch(H){if(!this._trackExistsAtIndex(c)){throw "There is no track at the specified index: "+c;}}},_trackExistsAtIndex:function(W){return !isNaN(this._trackCount)&&(W<=this._trackCount)&&(W>0);},GetSpriteTrackVariable:function(c,W){return this.movie.GetSpriteTrackVariable(c,W);},SetSpriteTrackVariable:function(c,W){this.movie.SetSpriteTrackVariable(c,W);},_chapterCount:NaN,GetChapterCount:function(){if(!isNaN(this._chapterCount)){return this._chapterCount;}try{this._chapterCount=this.movie.GetChapterCount();return this._chapterCount;}catch(W){return NaN;}},_chapterNames:null,GetChapterName:function(W){if(!this._chapterNames){throw "Need to attach to a movie before getting chapter names";}if(this._chapterNames[W]){return this._chapterNames[W];}try{var H=this.movie.GetChapterName(W);this._chapterNames[W]=H;return H;}catch(c){if(!this._chapterExistsAtIndex(W)){throw "There is no chapter at the specified index: "+W;}else{return null;}}},GoToChapter:function(W){try{this.movie.GoToChapter(W);return true;}catch(c){return false;}},_chapterExistsAtIndex:function(W){return !isNaN(this._chapterCount)&&(W<=this._chapterCount)&&(W>0);},isPlaying:function(){try{if(this.movieIsVideo){return !this.movie.paused&&!this.movie.ended;}else{return this.movie.GetRate()!==0;}}catch(W){return false;}},isFinished:function(){try{if(this.movieIsVideo){return this.movie.ended;}var H=this.movie.GetRate()===0,W=this.movie.GetTime()===this.GetDuration();return H&&W;}catch(c){return false;}},toggle:function(){if(this.isPlaying()){this.Stop();}else{this.Play();}},_setClosedCaptionsAvailable:function(W){this._closedCaptionsAvailable=W;if(this.controllerPanel){if(W){if(!this.captioningToggle){this.captioningToggle=document.createElement("div");Element.addClassName(this.captioningToggle,"captioningToggle");Element.addClassName(this.captioningToggle,"ccAvailable");this.captioningToggle.innerHTML="Closed Captioning";this.captioningToggle.onclick=this.toggleClosedCaptions.bind(this);}if(!this.captioningToggle.parentNode){this.controllerPanel.appendChild(this.captioningToggle);}}else{if(!W&&this.captioningToggle&&this.captioningToggle.parentNode){this.controllerPanel.removeChild(this.captioningToggle);}}}},toggleClosedCaptions:function(){if(!this._closedCaptionsAvailable){return ;}this.setClosedCaptionsEnabled(!this._closedCaptionsEnabled);},setClosedCaptionsEnabled:function(W){if(!this._closedCaptionsAvailable){return ;}try{this.SetTrackEnabled(this._closedCaptionTrackIndex,W);if(this.captioningToggle&&W){Element.addClassName(this.captioningToggle,"ccEnabled");}else{Element.removeClassName(this.captioningToggle,"ccEnabled");}this._closedCaptionsEnabled=W;if(this.delegate&&typeof this.delegate.didSetClosedCaptions==="function"){this.delegate.didSetClosedCaptions(this,W);}this._eventSource.fire("QuickTime:didSetClosedCaptions",{controller:this,enabled:W});}catch(c){}},closedCaptionsEnabled:function(){return this._closedCaptionsEnabled;},suspend:function(){if(this.movieWatcher){clearTimeout(this.movieWatcher);this.movieWatcher=null;}},decelerate:function(){this.setMonitorDelay(this.longMonitorDelay);},resume:function(){if(!this.movie){return ;}if(!this.movieWatcher){this.monitorMovie();}else{this.setMonitorDelay(this.normalMonitorDelay);}},setMonitorDelay:function(W){clearTimeout(this.movieWatcher);this._monitorDelay=W;this.monitorMovie();},monitorDelay:function(){return this._monitorDelay;}};
