// JavaScript Document
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

<!--
m=4;
//movestep=10;movetime=5;movestop=true;movestart=false;curmenu=-1;leftshow=false;rightshow=false;bothstar=false;var moveobj;var nnnn;
//moveon=false;movelen=165;timesnum=100;rmstart=false;rm_tollen=0;timelen=0;volumlen=48;volon=false;ChangeSizeRate=1;balance=0
movestep=10;
movetime=5;
movestop=true;
movestart=false;
curmenu=-1;
leftshow=false;
rightshow=false;
bothstar=false;
var moveobj;
var nnnn;
moveon=false;
movelen=310;
timesnum=100;rmstart=false;rm_tollen=0;timelen=0;volumlen=42;volon=true;ChangeSizeRate=1;balance=0
document.onmouseup=Total_Up
document.ondragstart=doDragStart
function doDragStart() {event.returnValue=false}

var Living=true
var AutoPlay=true
var IsVidio
var HSFileName=''
var LSFileName=''
var Button_Num=0;
var Real
Real='document.MPlayer1.controls.'
Real1='document.MPlayer1.settings.'
var CanPlay=true;
var CanStop=false;
var CanPause=false;
var Mute=false;
var CanSetPos=false;
var SetPosStart=false;
var GetLenStart=false
var CanSetVol=true;
var SetVolStart=false
var bigwin=false;
var PlayState=0;//0-\u65E0\uFF08\u505C\u6B62\uFF09\uFF1B1-connecting;2-buffuring;3-playing;4-pause 5,6 forward rewind
var CurrentEntry=1;

function GetBufferPercent()
{
	var rate=MPlayer1.network.bufferingprogress;
	var percent=rate+'%';
	return percent;
}
function ShowTime()
{
	var length;
	length = document.MPlayer1.currentMedia.durationString;
	var nowtime;
	nowtime = document.MPlayer1.Controls.currentPositionString;
	face.innerHTML = nowtime;
	ttime.innerHTML = "/"+length;
	var tempstatus;
	var current_status;
	tempstatus=document.MPlayer1.playState;
	switch(tempstatus)
	{
		case 3:
			CanPause=true;
			current_status="\u6B63\u5728\u64AD\u653E";
			break;
		case 1:
			current_status="\u505C\u6B62";
			break;
		case 2:
			current_status="\u6682\u505C\u4E2D";
			break;
		case 4:
			current_status="\u5FEB\u8FDB";
			break;
		case 5:
			current_status="\u5FEB\u9000";
			break;

		case 8:
			current_status="\u64AD\u653E\u7ED3\u675F";
			break;
		case 6:
			current_status="\u7F13\u51B2:"+GetBufferPercent();
			break;
		default:
			current_status="\u68C0\u67E5\u7F13\u51B2";
	}
	currentstatus.innerHTML = current_status;
	timerID = setTimeout("ShowTime()", 1000);
}
function DoPlay()
{
	eval(Real1+'rate=1.0')
	eval(Real+'Play()');
	//eval(Real+'ShowControls=false')\uFF1B
}
function DoStop()
{
	eval(Real+'Stop()');
	eval(Real+'CurrentPosition=0');
}
function DoPlayPause()
{
	eval(Real+'Pause()');
}
function SetPosition(Pos)
{
	eval(Real+'CurrentPosition='+Pos);
}
function SetVolume(Pos)
{
	eval(Real1+'Volume=Pos');
}
function SetMute(Status)
{
	if (Status)
		eval(Real1+'Mute=true')
	else
		eval(Real1+'Mute=false');
}
function GetLength()
{
	return document.MPlayer1.currentMedia.duration;
}

function GetPosition()
{
	tt=eval(Real+'CurrentPosition')
	return tt*1000;
}
function SetSource(srcname)
{
	document.MPlayer1.URL=srcname;
}
function SetWH(widthpx,heightpx)
{
	eval(Real+'width=widthpx')
	eval(Real+'height=heightpx')
}
function SetFullScreen()
{
	document.MPlayer1.fullScreen=true;
}
function vols()
{
	if(event.button!=2)
	{
	orix=event.x
	orileft=vblock.style.pixelLeft
	SetVolStart=true
	}
}

function volgo()
{
	if(SetVolStart)
	{
		newx=event.x
		disx=newx-orix
		newleft=orileft+disx
		if(newleft>-1&&newleft<volumlen) vblock.style.left=newleft
	}
}

function setvol()
{
	SetVolStart=false
	newleft=vblock.style.pixelLeft
	newvol=Math.round((newleft/volumlen)*100)
	SetVolume(newvol)
}


function moves()
{
	if(CanSetPos&&event.button!=2)
	{
		DoPlayPause()
		orix=event.x
		orileft=mblock.style.pixelLeft
		if(moveon) clearTimeout(mfollow)
		SetPosStart=true
	}
	else
	return false
}
function fastforward()
{
	eval(Real+'fastforward()');
	PlayState=5;
}
function fastreverse()
{
	eval(Real+'fastreverse()');
	PlayState=6;
}
function movego()
{
	if(SetPosStart)
	{
		newx=event.x
		disx=newx-orix
		newleft=orileft+disx
		if(newleft>-1&&newleft<movelen) mblock.style.left=newleft
	}
}

function setpos()
{
	SetPosStart=false
	newleft=mblock.style.pixelLeft
	rcp=Math.round((newleft/movelen)*rm_tollen/1000)
	SetPosition(rcp)
	setTimeout('moveshow()',8000)
	DoPlay()
}

function getlen()
{
	rm_tollen=GetLength()*1000
	//document.timeform.time_all.value=formattime(Math.floor(rm_tollen/1000));
	if(rm_tollen==0) {reget=setTimeout('getlen()',50);GetLenStart=true}
	else
	{
		CanSetPos=true;
		if(GetLenStart) clearTimeout(reget)
		timelen=Math.floor(rm_tollen/timesnum)
		moveshow()
	}
}

function moveshow()
{
	rm_curpos=GetPosition()
	resttime=rm_tollen-rm_curpos
	if (eval('document.MPlayer1.'+'playState')==0) {clearTimeout(mfollow);ClickStop()}
	else if(rm_curpos<rm_tollen)
	{
		blockpos=Math.floor((movelen/rm_tollen)*rm_curpos)
		mblock.style.left=blockpos
		moveon=true
		mfollow=setTimeout('moveshow()',1000)
	}
}


function ClickPlay()
{
	if (CanPlay)
	{   
		CanPlay=false;
		CanSetPos=true;
		if ((PlayState=5) && (PlayState=6))
		{
		   ClickPause();
		}
		PlayState=1;

		if (!CanStop)
		{
			CanStop=true;
		}
		if(!CanPause){
			CanPause = true;
		}
		//if(!Mute) SetMute(false)
		setvol();
		DoPlay();
		if(Living) {setTimeout('getlen()',100)}
	}
									
	
	eval("document.MPlayer1.style.display=''"); 
        eval("document.all.MPlayer2.style.display='none'"); 
											
			     
		
}
function ClickPause()
{
	if (CanPause)
	{
               
		CanPause=false;
		CanPlay=true;
		PlayState=4
		CanSetPos=true;
		if(moveon){ 
			clearTimeout(mfollow);
		}
		DoPlayPause();
	}
}
function ClickStop()
{
	if (CanStop)
	{
		CanStop=false;
		CanPlay=true;
		CanPause = false;
		PlayState=0
		if (CanPause)
		{
			CanPause=false;
		}
		if(CanSetPos) {CanSetPos=false;}
		if(moveon) clearTimeout(mfollow)
		mblock.style.left=0
		DoStop();

	}
}
function ClickSound()
{
	if (Mute)
	{
		Mute=false;
		SetMute(Mute);
	}
	else
	{
		Mute=true;
		SetMute(Mute);
	}
}
function Total_Up()
{
		if(SetPosStart)
		{
			setpos();
		}
		if(SetVolStart)
		{
			setvol();
		}
}
function formattime(second)
{
	var t_hour,t_minute,t_second,t_temp;
	t_temp=Math.floor(second/60);
	t_second=''+Math.floor(second-t_temp*60);
	if (t_second.length==1) {t_second='0'+t_second}
	t_minute=t_temp;
	t_temp=Math.floor(t_temp/60);
	t_minute=''+(t_minute-t_temp*60);
	if (t_minute.length==1) {t_minute='0'+t_minute}
	t_hour=t_temp;
	return t_hour+':'+t_minute+':'+t_second;
}
function ChangeBalance(newbalance)
{
	if (newbalance==0)
	{
		balance=0;
	}
	else if (newbalance==-100)
	{
		balance=newbalance;
	}
	else if (newbalance==100)
	{
		balance=newbalance;
	}
	eval(Real1+'Balance=balance');
}

function SetSrc()
{
	if (CanStop)
		ClickStop();

	

	if (AutoPlay)
		ClickPlay();


}
//-->
 