if(typeof(sina)!="object"){var sina={}} sina.isIE=navigator.appName=="Microsoft Internet Explorer";sina.isNS=navigator.appName=="Netscape";sina.isOP=navigator.appName=="Opera";sina.$=function(objId){if(!objId){throw new Error("sina.$(String objId)参数必须")} if(document.getElementById){return eval('document.getElementById("'+objId+'")')}else if(document.layers){return eval("document.layers['"+objId+"']")}else{return eval('document.all.'+objId)}} sina.GetOLeft=function(I){curObj=I;var i=curObj.offsetLeft;while(curObj!=curObj.offsetParent&&curObj.offsetParent){curObj=curObj.offsetParent;if(curObj.tagName=="DIV"||curObj.tagName=="TABLE"||curObj.tagName=="TR"||curObj.tagName=="TD"){i+=curObj.offsetLeft}} return i} sina.GetClassName=function(i){if(!i){throw new Error("GetClassName(obj)参数:必须")} return i.className} sina.SetClassName=function(I,i){if(!I||i==undefined){throw new Error("SetClassName(obj,classNameTmp)参数:必须")} I.className=i} sina.SetCookie=function(l,I){if(!l||!I){throw new Error("sina.SetCookie(name,value) 参数必须")} var O=arguments,o=arguments.length;var i=new Date;i.setFullYear(i.getFullYear()+1);var c=l+"="+I+";"+"expires="+i.toGMTString();document.cookie=c} sina.GetCookie=function(o){var l=o+"=",I=l.length,i=document.cookie.length,c=0;while(c9){l.SetVolume(9)}else if(i<0){l.SetVolume(0)}else{var I=(10-i)*(-100);l.wObject.Volume=I;l.vBox.style.left=Math.round(l.vZoneWidth/10*i)+"px"}},PlayOrPauseHandler:function(){var i=this;if(i.wObject.PlayState==2){i.SetBtnState("pause");i.wObject.pause()}else{i.SetBtnState("play");i.wObject.play();i.mplayerAd.style.display="none";i.wZone.style.display="block"}},Play:function(){var i=this;if(i.wObject.PlayState!=1){i.wObject.stop()} if(i.netModel==0){i.wObject.FileName=i.curNarrowFile} if(i.netModel==1){i.wObject.FileName=i.curBroadFile} if(i.autoStart==false){i.wObject.play()} i.SetBtnState("play")},Pause:function() {var i=this;i.SetBtnState("pause"); i.wObject.pause()},Stop:function() {var i=this;i.SetBtnState("stop"); i.wObject.stop();i.wZone.style.display="none"; i.mplayerAd.style.display="block"},FullScreen:function() {var i=this;if(i.wObject.PlayState==1||i.wObject.PlayState==2){i.wObject.DisplaySize=3}},SelectNetModel:function(){var i=this;i.wObject.stop();if(i.netModel==0){i.SetBtnState("broad");i.netModel=1;i.wObject.FileName=i.curBroadFile;sina.SetCookie("bnTxtNetModel","1")}else if(i.netModel==1){i.SetBtnState("narrow");i.netModel=0;i.wObject.FileName=i.curNarrowFile;sina.SetCookie("bnTxtNetModel","0")}else{throw new Error("当前this.netModel状态不正确")} i.SetBtnState("play"); i.wObject.play()},FixPos:function() {var i=this; if(i.wObject.Duration>0) { i.pBox.style.left=Math.round((i.pZoneWidth-i.pBoxWidth)/i.wObject.Duration*i.wObject.CurrentPosition); if((i.wObject.Duration-i.wObject.CurrentPosition)<1.5) { i.Stop(); } } if(i.wObject.PlayState==8) { i.pBox.style.left="0px"; }},MouseDown:function(i){var I=this;I.isPorV=i;if(I.isPorV==0){if(I.wObject.Duration>0){I.pFlag=true;if(window.event.srcElement.id!=I.pZone.id){I.pBox.style.left=I.pBox.offsetLeft+I.pBoxWidth/2}else{I.pBox.style.left=window.event.clientX-sina.GetOLeft(I.pZone)-I.pBoxWidth/2}}}else if(I.isPorV==1){I.vFlag=true;if(window.event.srcElement.id!=I.vZone.id){I.vBox.style.left=I.vBox.offsetLeft+I.vBoxWidth/2}else{I.vBox.style.left=window.event.clientX-sina.GetOLeft(I.vZone)-I.vBoxWidth/2}}},MouseMove:function(){var i=this;if(i.isPorV==0){if(i.wObject.Duration>0){if(i.pFlag){i.pBox.style.left=window.event.clientX-sina.GetOLeft(i.pZone)-i.pBoxWidth/2+"px"} if(parseInt(i.pBox.style.left.replace("px",""))>(i.pZoneWidth-i.pBoxWidth)){i.pBox.style.left=i.pZoneWidth-i.pBoxWidth+"px"} if(parseInt(i.pBox.style.left.replace("px",""))<0){i.pBox.style.left=0+"px"}}}else if(i.isPorV==1){if(i.vFlag){i.vBox.style.left=window.event.clientX-sina.GetOLeft(i.vZone)-i.vBoxWidth/2+"px"} if(parseInt(i.vBox.style.left.replace("px",""))>(i.vZoneWidth-i.vBoxWidth)){i.vBox.style.left=(i.vZoneWidth-i.vBoxWidth)+"px"} if(parseInt(i.vBox.style.left.replace("px",""))<0){i.vBox.style.left=0+"px"}}},MouseUp:function(){var I=this;if(I.isPorV==0){if(I.wObject.Duration>0){if(I.pFlag){I.wObject.CurrentPosition=I.wObject.Duration*(parseInt(I.pBox.style.left.replace("px",""))/(I.pZoneWidth-I.pBoxWidth))} I.pFlag=false}}else if(I.isPorV==1){if(I.vFlag){var i=(1-parseInt(I.vBox.style.left)/(I.vZoneWidth-I.vBoxWidth))*(-1000);if(i<=-1000){if(I.wObject.Mute.toString().toLowerCase()=='false'){}}else{if(I.wObject.Mute.toString().toLowerCase()=='true'){I.wObject.Mute=false;I.SetBtnState("muteNo")}} I.wObject.Volume=Math.round(i)} I.vFlag=false}},MouseEnd:function(){if(this.wObject.Duration>0){window.event.returnValue=false}},SetCurFile:function(I,i,l){var o=this;o.curBroadFile=I;o.curNarrowFile=i;if(l){o.defaultAdurl=l} if(!sina.isIE){alert("提示: \n请使用 Microsoft Internet Explorer 浏览器观看") if(o.netModel==0)o.wEmbed.src=o.curNarrowFile;if(o.netModel==1)o.wEmbed.src=o.curBroadFile;return} if(o.wObject.PlayState!=0||o.wObject.FileName!=""){o.wObject.stop()} if(o.netModel==0){o.wObject.FileName=o.curNarrowFile} if(o.netModel==1){o.wObject.FileName=o.curBroadFile} o.SetBtnState("play")},Zoom:function(o,l,I){var O=this; if(arguments.length==1&&arguments[0]==0){if(O.wObject.width!=O.wWidth){O.wObject.width=O.wWidth;O.wObject.height=O.wHeight;O.wmZone.style.width=O.wWidth+"px";O.wmZone.style.height=O.wHeight+60+"px";O.wZone.style.width=O.wWidth+"px";O.wZone.style.height=O.wHeight+"px";O.SetBtnState("zoom2");O.SetBtnState("zoom1")} return} var i=sina.GetOffsetPos(O.wObject)[1]-10;window.scrollTo(0,i);if(O.wObject.width!=o){O.wObject.width=o;O.wObject.height=l;O.wmZone.style.width=o+"px";O.wmZone.style.height=l+60+"px";O.wZone.style.width=o+"px";O.wZone.style.height=l+"px";if(I==1){O.SetBtnState("reZoom1");O.SetBtnState("zoom2")}else if(I==2){O.SetBtnState("reZoom2");O.SetBtnState("zoom1")}}else{O.wObject.width=O.wWidth;O.wObject.height=O.wHeight;O.wmZone.style.width=O.wWidth+"px";O.wmZone.style.height=O.wHeight+60+"px";O.wZone.style.width=O.wWidth+"px";O.wZone.style.height=O.wHeight+"px";O.SetBtnState("zoom1");O.SetBtnState("zoom2")}},SetBtnState:function(i){var I=this;switch(i){case "play":I.playBtn.setAttribute("src",I.pauseBtnUrl);I.playBtn.setAttribute("alt",I.pauseBtnAlt);I.stopBtn.setAttribute("src",I.stopBtnUrl);I.stopBtn.setAttribute("alt",I.stopBtnAlt);I.stopBtn.style.cursor="hand";I.fullScreenBtn.setAttribute("src",I.fullScreenBtnUrl);I.fullScreenBtn.style.cursor="hand";I.fullScreenBtn.setAttribute("alt",I.fullScreenBtnAlt);break;case "pause":I.playBtn.setAttribute("src",I.playBtnUrl);I.playBtn.setAttribute("alt",I.playBtnAlt);I.stopBtn.setAttribute("src",I.stopBtnUrl);I.stopBtn.setAttribute("alt",I.stopBtnAlt);I.stopBtn.style.cursor="hand";break;case "stop":I.stopBtn.setAttribute("src",I.stopBtnNoneUrl);I.stopBtn.setAttribute("alt","");I.stopBtn.style.cursor="default";I.playBtn.setAttribute("src",I.playBtnUrl);I.playBtn.setAttribute("alt",I.playBtnAlt);I.fullScreenBtn.setAttribute("src",I.fullScreenBtnNoneUrl);I.fullScreenBtn.style.cursor="default";I.fullScreenBtn.setAttribute("alt","");break;case "muteNo":I.muteBtn.setAttribute("src",I.muteBtnNoUrl);I.muteBtn.setAttribute("alt",I.muteBtnNoAlt);break;case "mute":I.muteBtn.setAttribute("src",I.muteBtnUrl);I.muteBtn.setAttribute("alt",I.muteBtnAlt);break;case "narrow":I.bOrNBtn.setAttribute("src",I.broadBtnUrl);I.bOrNBtn.style.cursor="hand";I.bOrNBtn.setAttribute("alt",I.broadBtnAlt);break;case "broad":I.bOrNBtn.setAttribute("src",I.narrowBtnUrl);I.bOrNBtn.style.cursor="hand";I.bOrNBtn.setAttribute("alt",I.narrowBtnAlt);break;case "zoom1":if(I.zoomBtn1){I.zoomBtn1.setAttribute("src",I.zoomBtn1Url);I.zoomBtn1.setAttribute("alt",I.zoomBtn1Alt);I.zoomBtn1.style.cursor="hand"} break;case "reZoom1":if(I.zoomBtn1){I.zoomBtn1.setAttribute("src",I.reZoomBtn1Url);I.zoomBtn1.setAttribute("alt",I.reZoomBtn1Alt);I.zoomBtn1.style.cursor="hand"} break;case "zoom2":if(I.zoomBtn2){I.zoomBtn2.setAttribute("src",I.zoomBtn2Url);I.zoomBtn2.setAttribute("alt",I.zoomBtn2Alt);I.zoomBtn2.style.cursor="hand"} break;case "reZoom2":if(I.zoomBtn2){I.zoomBtn2.setAttribute("src",I.reZoomBtn2Url);I.zoomBtn2.setAttribute("alt",I.reZoomBtn2Alt);I.zoomBtn2.style.cursor="hand"} break;default:throw new Error("SetBtnState(String state) 参数不正确")}}}