var SLPlayer={author:"zhangping1",version:"0.0.0.1",config:{wm:{classID:"clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6",progID:"WMPlayer.OCX.7",codeBase:""},sinatv:{classID:"clsid:070CA17A-4BD2-4612-83B4-32B1B9159B48",progID:"ULIVECTRL.ULiveCtrlCtrl.1",codeBase:"",liveCoreVersion:"",liveCoreURL:"",checkUpdate:false,adURLTpl:"http://va.sina.com.cn/videov2/adv2?vid={vid}&srctp={srctp}&srcid={srcid}&subid={subid}&client={client}&cid={cid}"}}},DownloaderConfig={sProgID:"Downloader.DLoader",sHtml:"<object width=\"100\" height=\"100\" classid=\"clsid:78ABDC59-D8E7-44D3-9A76-9A0918C52B4A\" codebase=\"http://dl.uc.sina.com/cab/downloader.cab#version=1,0,0,14\"></object>",exeAllOneSrc:"http://dl.uc.sina.com/SinaTvWebPluginSetup.exe",exeAllOneSrcForEdu:"ftp://202.205.3.15/SinaTvWebPluginSetup.exe"};SLPlayer.Window={};if(typeof sinaFlash=="undefined"||sinaFlash.constructor!=Function){if(typeof(sina)!="object")var sina={};sina.$=function(id){if(!id)return;if(document.getElementById)return eval("document.getElementById(\""+id+"\")");else if(document.layers)return eval("document.layers['"+id+"']");else return eval("document.all."+id)};var sinaFlash=function(_,F,J,G,$,H,E,C,D,B,A){var I=this;if(!document.createElement||!document.getElementById)return;I.id=F?F:"";I.ver=$?$:8;I.__classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";I.__codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+I.ver+",0,0,0";I.width=J;I.height=G;I.movie=_;I.src=I.movie;I.bgcolor=H?H:"";I.quality=C?C:"high";I.__pluginspage="http://www.macromedia.com/go/getflashplayer";I.__type="application/x-shockwave-flash";I.useExpressInstall=(typeof(E)=="boolean")?E:false;I.xir=D?D:window.location;I.redirectUrl=B?B:window.location;I.detectKey=(typeof(A)=="boolean")?A:true;I.escapeIs=false;I.__objAttrs={};I.__params={};I.__embedAttrs={};I.__flashVars=[];I.__flashVarsStr="";I.__forSetAttribute("id",I.id);I.__objAttrs["classid"]=I.__classid;I.__forSetAttribute("codebase",I.__codebase);I.__forSetAttribute("width",I.width);I.__forSetAttribute("height",I.height);I.__forSetAttribute("movie",I.movie);I.__forSetAttribute("quality",I.quality);I.__forSetAttribute("pluginspage",I.__pluginspage);I.__forSetAttribute("type",I.__type);I.__forSetAttribute("bgcolor",I.bgcolor)};sinaFlash.prototype={getFlashHtml:function(){var _=this,A="<object ";for(var $ in _.__objAttrs)A+=$+"=\""+_.__objAttrs[$]+"\""+" ";A+=">\n";for($ in _.__params)A+="\t<param name=\""+$+"\" value=\""+_.__params[$]+"\" />\n";if(_.__flashVarsStr!="")A+="\t<param name=\"flashvars\" value=\""+_.__flashVarsStr+"\" />\n";A+="\t<embed ";for($ in _.__embedAttrs)A+=$+"=\""+_.__embedAttrs[$]+"\""+" ";A+="></embed>\n</object>";return A},__forSetAttribute:function(_,A){var $=this;if(typeof(_)=="undefined"||_==""||typeof(A)=="undefined"||A=="")return;_=_.toLowerCase();switch(_){case"classid":break;case"pluginspage":$.__embedAttrs[_]=A;break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"codebase":$.__objAttrs[_]=A;break;case"src":case"movie":$.__embedAttrs["src"]=A;$.__params["movie"]=A;break;case"width":case"height":case"align":case"vspace":case"hspace":case"title":case"class":case"name":case"id":case"accesskey":case"tabindex":case"type":$.__objAttrs[_]=$.__embedAttrs[_]=A;break;default:$.__params[_]=$.__embedAttrs[_]=A}},__forGetAttribute:function(_){var $=this;_=_.toLowerCase();if(typeof $.__objAttrs[_]!="undefined")return $.__objAttrs[_];else if(typeof $.__params[_]!="undefined")return $.__params[_];else if(typeof $.__embedAttrs[_]!="undefined")return $.__embedAttrs[_];else return null},setAttribute:function($,_){this.__forSetAttribute($,_)},getAttribute:function($){return this.__forGetAttribute($)},addVariable:function(_,A){var $=this;if($.escapeIs){_=escape(_);A=escape(A)}if($.__flashVarsStr=="")$.__flashVarsStr=_+"="+A;else $.__flashVarsStr+="&"+_+"="+A;$.__embedAttrs["FlashVars"]=$.__flashVarsStr},getVariable:function(A){var $=this,B=$.__flashVarsStr;if($.escapeIs)A=escape(A);var _=new RegExp(A+"=([^\\&]*)(\\&?)","i").exec(B);if($.escapeIs)return unescape(RegExp.$1);return RegExp.$1},addParam:function($,_){this.__forSetAttribute($,_)},getParam:function($){return this.__forGetAttribute($)},write:function(_){var $=this;if(typeof _=="string")sina.$(_).innerHTML=$.getFlashHtml();else if(typeof _=="object")_.innerHTML=$.getFlashHtml()}}}var $=function($){if(!$)return null;if(document.getElementById)return document.getElementById($);else if(document.layers)return document.layers[$];else return document.all[$]};function $defined($){return($!=undefined)}var $gw=function($){return($.style.width.toInt()||$.clientWidth||$.offsetWidth||$.scrollWidth)},$gh=function($){return($.style.height.toInt()||$.clientHeight||$.offsetHeight||$.scrollHeight)},GetOffsetPos=function(_){var A=0,$=0;do{A+=_.offsetTop||0;$+=_.offsetLeft||0;_=_.offsetParent}while(_);return{x:$,y:A}};function loadCSSFile($){if(!$){throw new Error("loadCSSFile(sSrc) sSrc is undefined");return false}var _=document.createElement("link");_.setAttribute("rel","stylesheet");_.setAttribute("type","text/css");_.setAttribute("href",$);var A=document.getElementsByTagName("head")[0];return A.appendChild(_)}function getStyle(A,B){var _="";if(document.defaultView&&document.defaultView.getComputedStyle)_=document.defaultView.getComputedStyle(A,"").getPropertyValue(B);else if(A.currentStyle){try{B=B.replace(/\-(\w)/g,function($,_){return _.toUpperCase()});_=A.currentStyle[B]}catch($){}}return _}var getCssText=function(A){if(A.styleSheet)return A.styleSheet.cssText;else if(A.sheet){var $="",_=A.sheet.cssRules;for(var B=0;B<_.length;B++)$+=_[B]+"\n";return $}return""},$addEvent=function($,_,A){if($.attachEvent)$.attachEvent("on"+_,A);else $.addEventListener(_,A,false)};function getOS(){var A=[],_=[];A[0]=" Windows4.0";_[0]="Win95";A[1]=" Windows 98";_[1]="Win98";A[2]=" Windows NT 5.0";_[2]="Win2000";A[3]=" Windows NT 5.1";_[3]="WinXP";A[4]=" Windows NT 5.2";_[4]="Win2003";A[5]=" Windows NT 6.0";_[5]="WinVista";var $=navigator.userAgent.split(";");for(var B=0;B<A.length;B++)if($[2]&&$[2]==A[B])return _[B];return $[2]||"unknow"}function getPlugin(){var _="",$=navigator.userAgent.split(";");if($.length<4)return"";for(var A=4;A<$.length;A++)_+=$[A]+",";return _.substring(0,_.length-2)}function getFlash(){var f="-1",n=navigator;if(n.plugins&&n.plugins.length){for(var ii=0;ii<n.plugins.length;ii++)if(n.plugins[ii].name.indexOf("Shockwave Flash")!=-1){f=n.plugins[ii].description.split("Shockwave Flash ")[1];break}}else if(window.ActiveXObject)for(ii=10;ii>=2;ii--){try{var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");if(fl){f=ii+".0";break}}catch(e){}}if(f=="-1")return f;else return f.substring(0,f.indexOf(".")+2)}function getBrowserInfo(){var A=[];A[0]=navigator.appName;A[7]=navigator.language;if(A[0]=="Netscape"){var $=navigator.userAgent;A[1]=$.substring($.lastIndexOf(" ")+1,$.length);A[0]=A[1].substring(0,A[1].lastIndexOf("/"));A[1]=$.substring($.lastIndexOf("/")+1,$.length);A[7]=navigator.language}else if(A[0]=="Microsoft Internet Explorer"){A[1]=navigator.userAgent.split(";")[1];A[7]=navigator.userLanguage}A[2]=navigator.javaEnabled()?1:-1;A[3]=getFlash();A[4]=getOS();if(self.screen){sr=screen.width+"x"+screen.height;sc=screen.colorDepth+"-bit"}else if(self.java){var B=java.awt.Toolkit.getDefaultToolkit(),_=B.getScreenSize();sr=_.width+"x"+_.height}A[5]=sr;A[6]=sc;A[8]=getPlugin();return A}var getMediaPlayerVersion=function(){var _=null;try{_=new ActiveXObject("WMPlayer.OCX.7")}catch($){try{_=new GeckoActiveXObject("WMPlayer.OCX.7")}catch($){}}if(_)return _.versionInfo||null;else return null};Function.prototype.bind=function(){var $=this,A=arguments[0],_=new Array();for(var B=1;B<arguments.length;B++)_.push(arguments[B]);return function(){return $.apply(A,_)}};Function.prototype.bindWithEvent=function(){var $=this,_=arguments,A=_.shift();return function(B){return $.apply(A,[B||window.event].concat(_))}};Function.prototype.BindForEvent=function(){var $=this,A=arguments[0],_=[];for(var B=1;B<arguments.length;B++)_.push(arguments[B]);return function(B){return $.apply(A,[(B||window.event)].concat(_))}};String.prototype.trim=function(){return this.replace(/(^\s+)|(\s+$)/g,"")};String.prototype.trimall=function(){return this.replace(/\s+/g,"")};var trim=function($){return $.replace(/(^\s+)|(\s+$)/g,"")},trimall=function($){return $.replace(/\s+/g,"")};String.prototype.toInt=function(){return parseInt(this,10)};Number.prototype.toHMS=function(){var B=Math.floor(this),$=parseInt(B/3600,10),C=B%3600,A=parseInt(C/60,10),_=C%60;if($<10)$="0"+$;if(A<10)A="0"+A;if(_<10)_="0"+_;return $+":"+A+":"+_};var $extend=function(){var $=arguments;if(!$[1])$=[this,$[0]];for(var _ in $[1])$[0][_]=$[1][_];return $[0]};function $clear($){clearTimeout($);clearInterval($);$=null;return null}var EventUtil={};EventUtil.GetEvent=function(){return EventUtil.FormatEvent(window.event||EventUtil.GetEvent.caller.arguments[0])};EventUtil.FormatEvent=function(_){try{_.offsetX?"":_.offsetX=_.layerX;_.offsetY?"":_.offsetY=_.layerY;_.srcElement?"":_.srcElement=_.target;_.x?"":_.x=_.pageX;_.y?"":_.y=_.pageY}catch($){}return _};GetOffsetPos=function(_){var A=0,$=0;do{A+=_.offsetTop||0;$+=_.offsetLeft||0;_=_.offsetParent}while(_);return{x:$,y:A}};SetCookie=function(B,D){if(!B||!D)throw new Error("SetCookie(name,value) not find arguments");var C=arguments,A=arguments.length,_=new Date();_.setFullYear(_.getFullYear()+1);var $=B+"="+D+";"+"expires="+_.toGMTString();document.cookie=$};GetCookie=function(A){var _=A+"=",$=_.length,B=document.cookie.length,D=0;while(D<B){var C=D+$;if(document.cookie.substring(D,C)==_)return getCookieVal(C);D=document.cookie.indexOf("",D)+1;if(D==0)break}return null};function getCookieVal(_){var $=document.cookie.indexOf(";",_);if($==-1)$=document.cookie.length;return unescape(document.cookie.substring(_,$))}Function.prototype.Bind=function(){var $=this,A=arguments[0],_=new Array();for(var B=1;B<arguments.length;B++)_.push(arguments[B]);return function(){return $.apply(A,_)}};var QueryString=function($){this.string=$;this.length=0;var C=/[?&]([^=]+)=([^&]*)/g,B=C.exec($);while(B){var _=B[1],A=decodeURI(B[2]);this[_]=A;this[this.length]=new QueryString.Pair(_,A);this.length++;B=C.exec($)}};QueryString.prototype.toString=function(){return this.string};QueryString.Pair=function($,_){this.name=$;this.value=_};QueryString.Pair.prototype.toString=function(){return this.name+"="+this.value};var iexmlloader=function(){this.isOk=false;if(!window.ActiveXObject)return this.isOk;this.isOk=true;this.oXMLDom=null};iexmlloader.prototype={__creatXMLDom:function(){if(window.ActiveXObject){var $=["MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","Microsoft.XmlDom"];for(var B=$.length-1;B>=0;B--){try{var _=new ActiveXObject($[B]);return _}catch(A){return false}}}},load:function(_,A){if(!this.isOk)return false;var $=this.__creatXMLDom();$.load(_);$.async=false;if(typeof A=="function")A($)},loadXML:function($,A){if(!this.isOk)return false;var _=this.__creatXMLDom();_.loadXML($);_.async=false;if(typeof A=="function")A(_)},validate:function(){if(!this.isOk)return null;if(this.oXMLDom.parseError!=0){var $=this.oXMLDom.parseError;alert("An error occurred:\n\u9519\u8bef\u4ee3\u7801: "+$.errorCode+"\n"+"\u884c\u6570: "+$.line+"\n"+"\u5217\u6570: "+$.linepos+"\n"+"\u539f\u56e0: "+$.reason);return false}else return true}};SLPlayer.Ctrl={};SLPlayer.Ctrl.Interface=function(){};SLPlayer.Ctrl.Interface.prototype={getVersion:function(){throw new Error("getVersion function not implement")},getCtrl:function(){throw new Error("getCtrl function not implement")},getType:function(){throw new Error("getType function not implement")},isLive:function(){throw new Error("isLive function not implement")},setPlayURL:function($){throw new Error("setPlayURL function not implement")},getPlayURL:function(){throw new Error("getPlayURL function not implement")},setPlayInfo:function($){throw new Error("setPlayURL function not implement")},getPlayInfo:function(){throw new Error("getPlayURL function not implement")},setPlayTitle:function($){throw new Error("setPlayTitle function not implement")},getPlayTitle:function(){throw new Error("getPlayTitle function not implement")},play:function(){throw new Error("play function not implement")},stop:function(){throw new Error("stop function not implement")},pause:function(){throw new Error("pause function not implement")},setVolume:function($){throw new Error("setVolume function not implement")},getVolume:function(){throw new Error("getVolume function not implement")},setMute:function($){throw new Error("setMute function not implement")},getMute:function(){throw new Error("getMute function not implement")},getFullScreen:function(){throw new Error("getFullScreen function not implement")},setFullScreen:function($){throw new Error("setFullScreen function not implement")},getPlayState:function(){throw new Error("getPlayState function not implement")},getPlayStateString:function(){throw new Error("getPlayState function not implement")},getBufferingProgress:function(){throw new Error("getBufferingProgress function not implement")},setCurrentPostion:function($){throw new Error("setCurrentPostion function not implement")},getCurrentPositionString:function(){throw new Error("getCurrentPositionString function not implement")},getCurrentPosition:function(){throw new Error("getCurrentPosition function not implement")},getDuration:function(){throw new Error("getDuration function not implement")},getDurationString:function(){throw new Error("getDurationString function not implement")},destroy:function(){throw new Error("destroy function not implement")},attachEvent:function(_,$){throw new Error("attachEvent function not implement")}};SLPlayer.Ctrl.WMPlayer=function(){this.__init()};$extend(SLPlayer.Ctrl.WMPlayer.prototype,new SLPlayer.Ctrl.Interface());$extend(SLPlayer.Ctrl.WMPlayer.prototype,{__init:function(){this.sProgID=SLPlayer.config.wm.progID;this.nCtrl=document.createElement("object");this.codeBase=SLPlayer.config.wm.codeBase;this.classid=SLPlayer.config.wm.classID;this.playURL="";this.playTitle="";this.onPlayStateChange=null},getCtrl:function(){return this.nCtrl},getType:function(){return"wm"},isLive:function(){if(this.nCtrl.currentMedia&&this.nCtrl.currentMedia.duration>0)return false;return true},isInstall:function(){try{var _={};_.ax=new ActiveXObject(this.sProgID);delete a.ax;_=null}catch($){return false}return true},appendCtrl:function($){$.appendChild(this.nCtrl);this.nCtrl.setAttribute("codeBase",this.codeBase);this.nCtrl.setAttribute("classid",this.classid);this.nCtrl.uiMode="none";this.nCtrl.stretchToFit=true;this.nCtrl.playCount=999;return this.nCtrl},setPlayURL:function($){this.playURL=$},getPlayURL:function(){return this.playURL},setPlayTitle:function($){this.playTitle=$},getPlayTitle:function(){return this.playTitle},play:function(){var $=this.getPlayURL(),_=this.getPlayTitle();this.nCtrl.URL=$;this.nCtrl.controls.play()},rePlay:function(){this.nCtrl.controls.play()},stop:function(){this.nCtrl.controls.stop()},pause:function(){if(this.isLive())this.nCtrl.controls.stop();else this.nCtrl.controls.pause()},setVolume:function($){if($<0)$=0;if($>100)$=100;this.nCtrl.settings.volume=$},getVolume:function(){return this.nCtrl.iSoundValue},setMute:function($){this.nCtrl.settings.mute=!!$},getMute:function(){return this.nCtrl.settings.mute},setFullScreen:function($){this.nCtrl.fullScreen=!!$},getFullScreen:function(){return this.nCtrl.fullScreen},getPlayState:function(){return this.nCtrl.playState},getBufferingProgress:function(){return this.nCtrl.iBufPercent},setCurrentPostion:function($){this.nCtrl.controls.currentPosition=$},getCurrentPosition:function(){return this.nCtrl.controls.currentPosition||0},getCurrentPositionString:function(){return this.nCtrl.controls.currentPositionString||"00:00:00"},getDuration:function(){return this.nCtrl.currentMedia.duration},getDurationString:function(){var $=this.getDuration();return $.toHMS()},destroy:function(){try{this.nCtrl.close()}catch($){}}});SLPlayer.Ctrl.SinaTVPlayer=function(){this.__init()};$extend(SLPlayer.Ctrl.SinaTVPlayer.prototype,new SLPlayer.Ctrl.Interface());$extend(SLPlayer.Ctrl.SinaTVPlayer.prototype,{__init:function(){this.sProgID=SLPlayer.config.sinatv.progID;this.nCtrl=document.createElement("object");this.codeBase=SLPlayer.config.sinatv.codeBase;this.classid=SLPlayer.config.sinatv.classID;this.liveCoreVersion=SLPlayer.config.sinatv.liveCoreVersion;this.liveCoreURL=SLPlayer.config.sinatv.liveCoreURL;this.playURL="";this.playTitle="";this.Info={c:"",s:"",url:""};this.onPlayStateChange=null},getCtrl:function(){return this.nCtrl},getType:function(){return"sinatv"},__checkUpdate:function(){var $=this.liveCoreVersion.split(",");this.nCtrl.CheckUpdate($[0].toInt(),$[1].toInt(),$[2].toInt(),$[3].toInt(),this.liveCoreURL)},setAD:function($,A){if(typeof $=="string"&&$.trim()!=""){try{this.nCtrl.SetAdCookie(A||"")}catch(_){}try{this.nCtrl.GetHttpData($)}catch(_){}}},showAD:function($,C,B,A,_){return this.nCtrl.showAD($,C,B,A,_)},hideAD:function(){return this.nCtrl.hideAD()},__getADSrc:function(_){var $=new iexmlloader();if(!$)return"";$.loadXML(_,function($){})},isLive:function(){if((this.getCurrentPosition()>=0)&&(this.getDuration()>0))return false;else return true},isInstall:function(){try{var _={};_.ax=new ActiveXObject(this.sProgID);delete a.ax;_=null}catch($){return false}return true},appendCtrl:function($){$.appendChild(this.nCtrl);this.nCtrl.setAttribute("codeBase",this.codeBase);this.nCtrl.setAttribute("classid",this.classid);return this.nCtrl},setPlayURL:function($){this.playURL=$},setPlayInfo:function($){this.Info=$},checkPlay:function(A,_){if(typeof(A)=="undefined"||A===""||A==="0")return;var A=parseInt(A,10);try{this.nCtrl.AfterSetPlayURL(A,_)}catch($){}},checkPlay2:function(A,_,B){if(typeof(A)=="undefined"||A===""||A==="0")return;var A=parseInt(A,10);try{this.nCtrl.AfterSetPlayURL2(A,_,B)}catch($){}},getPlayURL:function(){return this.playURL},getPlayInfo:function(){return this.Info},setPlayTitle:function($){this.playTitle=$},getPlayTitle:function(){return this.playTitle},play:function(){var _=this.getPlayURL(),B=this.getPlayTitle(),A=this.getPlayInfo(),$=A||{c:"",s:"",url:""},C=0;if(typeof($.c)=="undefined"||$.c===""||$.c==="0")C=0;else C=parseInt($.c,10);if(SLPlayer.config.sinatv.checkUpdate)this.__checkUpdate();this.nCtrl.SetPlayURL2(_,B,C,$.s,$.url)},rePlay:function(){this.nCtrl.Play()},stop:function(){this.nCtrl.Stop()},pause:function(){this.nCtrl.Pause()},setVolume:function($){if($<0)$=0;if($>100)$=100;this.nCtrl.SetVolume($)},getVolume:function(){return this.nCtrl.GetVolume()},setMute:function($){this.nCtrl.SetMute($)},getMute:function(){return this.nCtrl.GetMute()},setFullScreen:function($){this.nCtrl.SetFullScreen($)},getFullScreen:function(){return this.nCtrl.GetFullScreen()},getPlayState:function(){return this.nCtrl.GetPlayState()},getBufferingProgress:function(){return this.nCtrl.GetBufferingProgress()},setCurrentPostion:function($){this.nCtrl.SetCurrentPostion($)},getCurrentPosition:function(){return this.nCtrl.GetCurrentPostion()||0},getCurrentPositionString:function(){var $=this.getCurrentPosition();return $.toHMS()},getDuration:function(){return this.nCtrl.GetDuration()||0},getDurationString:function(){var $=this.getDuration();return $.toHMS()},destroy:function(){try{this.nCtrl.Destroy()}catch($){}}});SLPlayer.Ctrl.Factory={};SLPlayer.Ctrl.Factory.create=function($){switch($){case"wm":return new SLPlayer.Ctrl.WMPlayer();case"sinatv":return new SLPlayer.Ctrl.SinaTVPlayer();default:throw new Error("\""+$+"\" ctrl type is not implement \n from: SLPlayer.Ctrl.Factory.create")}};$extend(SLPlayer.Window,{Interface:function(){}});$extend(SLPlayer.Window.Interface.prototype,{draw:function(){throw new Error("draw function not implement")},show:function($){throw new Error("show function not implement")},isLive:function($){throw new Error("isLive function not implement")},destroy:function(){throw new Error("destroy function not implement")},addMedia:function($){throw new Error("addMedia function not implement")},setAD:function($){throw new Error("setAD function not implement")},getMediaList:function(){throw new Error("getMediaList function not implement")},getCurMedia:function(){throw new Error("getCurMedia function not implement")},getCurCtrlType:function(){throw new Error("getCurCtrlType function not implement")},getCurCtrl:function(){throw new Error("getCurCtrl function not implement")},clearMediaList:function(){throw new Error("clearMediaList function not implement")},play:function(_,$){throw new Error("play function not implement")},rePlay:function(){throw new Error("rePlay function not implement")},stop:function(){throw new Error("play function not implement")},pause:function(){throw new Error("play function not implement")},getVolume:function(){throw new Error("play function not implement")},setVolume:function($){throw new Error("play function not implement")},setMute:function($){throw new Error("play function not implement")},getMute:function(){throw new Error("play function not implement")},setFullScreen:function($){throw new Error("setFullScreen function not implement")},getFullScreen:function(){throw new Error("getFullScreen function not implement")},getBufferingProgress:function(){throw new Error("getBufferingProgress function not implement")},setCurrentPosition:function($){throw new Error("setCurrentPosition function not implement")},getCurrentPosition:function(){throw new Error("getCurrentPosition function not implement")},getCurrentPositionString:function(){throw new Error("getCurrentPositionString function not implement")},getDuration:function(){throw new Error("getDuration function not implement")},onFullScreen:null,onPlayStateChange:null});function ucInstResult(){this.retvalue=-1}var Downloader=function($){this.init($)};Downloader.prototype={init:function(_){this.nHost=$(_+"_host");this.nNoInstall=$(_+"_noInstall");this.nInstall=$(_+"_install");this.nDownload=$(_+"_download");this.nFailed=$(_+"_failed");this.nCtrlHost=$(_+"_ctrlHost");this.nInstallStateTxt=$(_+"_installStateTxt");this.nFinishedStateTxt=$(_+"_finishedStateTxt");this.nProgress=$(_+"_progress");this.nProgressBar=$(_+"_progressBar");this.sProgID=DownloaderConfig.sProgID;this.nCtrl=this.nCtrlHost.getElementsByTagName("object")[0];this.nDownloadCtrlTotal=0;this.nDownloadCtrlNum=0;this.sCgiTpl="http://beacon.sina.com.cn/e.gif?sinatvplugdown||{random}";$addEvent(window,"beforeunload",function(){this.destroy()}.bind(this))},hidenTips:function(){this.nNoInstall.style.display="none";this.nInstall.style.display="none";this.nDownload.style.display="none";this.nFailed.style.display="none"},showTip:function($){this.hidenTips();switch($){case"noInstall":this.nNoInstall.style.display="block";break;case"failed":this.nFailed.style.display="block";break;case"installing":this.nInstall.style.display="block";break;case"download":this.nDownload.style.display="block";break;default:}},appendCtrl:function(_){var $="";$+="<object width=\"100\" height=\"100\" style=\"\" classid=\""+this.classid+"\" codebase=\""+this.codeBase+"\">";$+="\t<param name=\"configURL\" value=\""+this.configURL+"\" />";$+="</object>";_.innerHTML=$;this.nCtrl=_.getElementsByTagName("object")[0];return this.nCtrl},isInstall:function(){try{var $=new ActiveXObject(this.sProgID);$=null;return true}catch(_){return false}},destroy:function(){this.nCtrl=null},request:function(){var $=(new Date()).getTime(),A=this.sCgiTpl.replace(/{random}/i,$),_=new Image();setTimeout(function(){_.setAttribute("src",A)},1000)},downloadCallBack:function(_,C,E,F,B,$){var A="";switch(_){case 0:A="\u6b63\u5728\u51c6\u5907\u66f4\u65b0Sina TV\u63d2\u4ef6,\u8bf7\u7a0d\u5019...";this.request();break;case 1:A="\u6b63\u5728\u66f4\u65b0Sina TV\u63d2\u4ef6,\u8bf7\u7a0d\u5019...";break;case 2:A="<span>\u6b63\u5728\u5b89\u88c5Sina TV\u63d2\u4ef6,\u8bf7\u7a0d\u5019</span>";break;case 3:if(C==0)A="\u66f4\u65b0\u6210\u529f";else{A="\u66f4\u65b0\u5931\u8d25";this.showTip("failed")}break;case 4:if(F==0){this.nDownloadCtrlNum--;if(this.nDownloadCtrlNum==0)A="\u8fd0\u884c\u66f4\u65b0\u7a0b\u5e8f\u5b8c\u6bd5!";else A="\u51c6\u5907\u5f00\u59cb\u5b89\u88c5\u4e0b\u4e00\u4e2a\u63a7\u4ef6"}else{A="\u66f4\u65b0\u5931\u8d25";this.showTip("failed")}break;case-1:A="\u542f\u52a8\u4e0b\u8f7d\u5931\u8d25";this.showTip("failed");break;default:A="\u672a\u77e5\u72b6\u6001";this.showTip("failed");break}this.nInstallStateTxt.innerHTML=A;if(_==1){if(C>=99)C=99;this.nProgressBar.style.width=C+"%";var D=""+C+"%";if(this.nDownloadCtrlTotal!=1)D="("+(this.nDownloadCtrlTotal-this.nDownloadCtrlNum+1)+"/"+this.nDownloadCtrlTotal+") "+D;this.nFinishedStateTxt.innerHTML=D}else if(_<0)this.showTip("failed");if(this.nDownloadCtrlNum==0)if(typeof $=="function")$()},check:function(H){var L=$("slp_validate_host"),_=$("slp_validate_isie"),K=$("slp_validate_noie"),E=$("slp_validate_flash"),M=$("slp_validate_mediaplayer"),A=$("slp_validate_downloader"),I=$("slp_validate_tip");if(!window.ActiveXObject){this.showTip("noInstall");K.style.display="block";_.style.display="none";return false}else{K.style.display="none";_.style.display="block"}var J=getFlash().split(".")[0]>=8,F=getMediaPlayerVersion().split(".")[0]>=9,B=this.isInstall();if(!J||!F||!B){this.showTip("noInstall");I.style.display="block";if(!J)E.style.display="block";if(!F)M.style.display="block";if(!B)A.style.display="block";return false}var N=true,D=false,G=new ucInstResult();try{D=this.nCtrl.checkLatestVersion(false,null,null)}catch(C){N=false}if(!N)this.showTip("noInstall");else if(!D){if(typeof H=="function")H()}else this.showTip("download")},aftercheck:function(I){var N=$("slp_validate_host"),_=$("slp_validate_isie"),M=$("slp_validate_noie"),E=$("slp_validate_flash"),P=$("slp_validate_mediaplayer"),A=$("slp_validate_downloader"),J=$("slp_validate_tip");if(!window.ActiveXObject){this.showTip("noInstall");for(var H=0;H<N.getElementsByTagName("li").length;H++)N.getElementsByTagName("li")[H].style.display="none";M.style.display="block";_.style.display="none";return false}else{M.style.display="none";_.style.display="block"}var K=getFlash().split(".")[0]>=8,F=getMediaPlayerVersion().split(".")[0]>=9,B=this.isInstall();if(!K||!F||!B){this.showTip("noInstall");J.style.display="block";if(!K)E.style.display="block";if(!F)P.style.display="block";if(!B)A.style.display="block";return false}var L=this,O=true,D=false,G=new ucInstResult();try{D=this.nCtrl.checkLatestVersion(true,G,function($,A,B,C,_){L.downloadCallBack.call(L,$,A,B,C,_,I)});this.nDownloadCtrlTotal=this.nDownloadCtrlNum=G.retvalue}catch(C){O=false}if(!O)this.showTip("noInstall");else if(!D){if(typeof I=="function")I()}else this.showTip("installing")},downloadAndInstall:function($){this.nCtrl.DownloadAndInstall($)}}