var CoreVideoPlayerInstances={};function CoreVideoPlayerInit(a){CoreVideoPlayerInstances[a].onPlayerInit()}function CoreVideoPlayer(a){a=typeof(a)!="undefined"?a:{};this.setOptions(a)}CoreVideoPlayer.prototype.width=320;CoreVideoPlayer.prototype.height=240;CoreVideoPlayer.prototype.debuging=0;CoreVideoPlayer.prototype.swfPath="CoreVideoPlayer.swf";CoreVideoPlayer.prototype.expressInstallPath="swfobject/expressInstall.swf";CoreVideoPlayer.prototype.targetID="";CoreVideoPlayer.prototype.playerOptions={};CoreVideoPlayer.prototype.playerID="";CoreVideoPlayer.prototype._flashVersion="9.0.64";CoreVideoPlayer.prototype._player;CoreVideoPlayer.prototype.setOptions=function(a){var b,c;c=["writePlayer","onPlayerInit"];for(b in a){if(b.charAt(0)=="_"){continue}if(this[b]==undefined){continue}if(!this._inArray(c,b)&&typeof(a[b])=="function"){continue}this[b]=a[b]}};CoreVideoPlayer.prototype.playPause=function(){var a=this._getPlayer();a.videoPlayPause()};CoreVideoPlayer.prototype.nextVideo=function(){var a=this._getPlayer();a.nextVideo()};CoreVideoPlayer.prototype.prevVideo=function(){var a=this._getPlayer();a.prevVideo()};CoreVideoPlayer.prototype.skipTo=function(a){var b=this._getPlayer();return b.skipTo(a)};CoreVideoPlayer.prototype.stop=function(){var a=this._getPlayer();a.videoStop()};CoreVideoPlayer.prototype.mute=function(){var a=this._getPlayer();a.setVolume(0)};CoreVideoPlayer.prototype.unmute=function(){var a=this._getPlayer();a.setVolume(1)};CoreVideoPlayer.prototype.isMuted=function(){return this.getVolume()==0};CoreVideoPlayer.prototype.setVolume=function(b){var a=this._getPlayer();a.setVolume(b)};CoreVideoPlayer.prototype.getVolume=function(){var a=this._getPlayer();return a.getVolume()};CoreVideoPlayer.prototype.seekTo=function(b){var a=this._getPlayer();a.seekTo(b)};CoreVideoPlayer.prototype.getBytesLoaded=function(){var a=this._getPlayer();return a.getBytesLoaded()};CoreVideoPlayer.prototype.getBytesTotal=function(){var a=this._getPlayer();return a.getBytesTotal()};CoreVideoPlayer.prototype.getCurrentTime=function(){var a=this._getPlayer();return a.getCurrentTime()};CoreVideoPlayer.prototype.getDuration=function(){var a=this._getPlayer();return a.getDuration()};CoreVideoPlayer.prototype.getCurrentVideo=function(){var a=this._getPlayer();return a.getCurrentVideo()};CoreVideoPlayer.prototype.getPlaylistLength=function(){var a=this._getPlayer();return a.getPlaylistLength()};CoreVideoPlayer.prototype.addEventListener=function(b,c){var a=this._getPlayer();a.addEventListener(b,c)};CoreVideoPlayer.prototype.removeEventListener=function(b,c){var a=this._getPlayer();a.addEventListener(b,c)};CoreVideoPlayer.prototype.writePlayer=function(){var c,b,a;c={allowFullscreen:"true",quality:"medium"};b=this.playerOptions;a={id:this.playerID,name:this.playerID};CoreVideoPlayerInstances[this.playerID]=this;swfobject.embedSWF(this.swfPath,this.targetID,this.width,this.height,this._flashVersion,this.expressInstallPath,b,c,a)};CoreVideoPlayer.prototype.onPlayerInit=function(){};CoreVideoPlayer.prototype._getPlayer=function(){if(this._player){return this._player}var a=document.getElementById(this.playerID);if(a){_player=a}return a};CoreVideoPlayer.prototype._inArray=function(d,c,a){var b;a=typeof(a)!="undefined"?a:false;if(a){for(b=0;b<d.length;b++){if(d[b]==c){return true}}}else{for(b=0;b<d.length;b++){if(d[b]===c){return true}}}return false};