function time()
{
	//if (MMPlayer1.ErrorCode == 0){
		var pPosition = MMPlayer1.currentPosition;
		var rmin = parseInt(pPosition / 60);		
		var rsec = parseInt(pPosition) % 60;		
		var pState = MMPlayer1.playState;			
		var buffer = MMPlayer1.BufferingProgress	
		var pStateValue = "连接中";
		var pSTV = "连接中";				
		var pStateFlag = 1;
		//var My_Gs=MMPlayer1.GetMediaParameter(1, "author");
		//var My_Gq=MMPlayer1.GetMediaParameter(1, "title");
		var My_Gs=s;
		var My_Gq=t;

		if(buffer > 0 && buffer < 90) pStateValue = "正在缓冲 (" + buffer +"%)";
		
		//else if (buffer > 90){
			switch(pState){
				case 0:
					pStateValue = "<font color=blue>停止</font>/播放";
					pSTV = "播放已停止";
					break;
				case 1:
					pStateValue = "<font color=blue>暂停</font>/播放";
					pSTV = "播放已暂停";
					break;
				case 2:
					pStateValue = "<font color=blue>播放</font>/暂停";
					pSTV = "正在播放中";
					pStateFlag = 0;
					break;
			}	
			
		//}
		endMin = parseInt(MMPlayer1.SelectionEnd / 60);
		endSec = parseInt(MMPlayer1.SelectionEnd) % 60;	


		if(endMin < 10) endMin = "0" + endMin;	
		if(endSec < 10 && endSec > -1) endSec = "0" + endSec;

		if(rmin < 10) rmin = "0" + rmin;			
		if(rsec < 10 && rsec > -1) rsec = "0" + rsec;
		else if (pPosition == -1){					
			if(pStateFlag == 0)	pStateValue = "结束";
		}

		if((parseInt(rmin) < 0) || (parseInt(rmin) > 60)) rmin = "00";
		if((parseInt(rsec) < 0) || (parseInt(rsec) > 60)) rsec = "00";
		if((parseInt(endMin) < 0) || (parseInt(endMin) > 60)) endMin = "00";
		if((parseInt(endSec) < 0) || (parseInt(endSec) > 60)) endSec = "00";

		self.pstate.innerHTML = pStateValue;
		self.sTime.innerText = rmin + ":" + rsec + " / " + endMin + ":" + endSec;
		self.IsPL.innerText = pSTV;
		var wsinfo =" | (" + rmin + ":" + rsec + " | " + endMin + ":" + endSec + ")";
		window.status=(" §福建音乐视听网§ ");
		window.status+=(My_Gs);
		window.status+=(" - ");
		window.status+=(My_Gq);
		window.status+=(wsinfo);

		var Ppos;
		var Pduration;	
		var curLeft;
		if(!positionSet) {
			if(MMPlayer1.PlayState == 2) {
				Ppos = MMPlayer1.currentPosition;
				Pduration = MMPlayer1.Duration;
				
				curLeft = ( 191 * Ppos ) / Pduration;			
				curLett = parseInt(curLeft);
				//alert(curLett);
				Layer1.style.left = curLeft + 28;	
			}
		}
		
		window.setTimeout("time()", 500);
	//}
	
}

var tempx = 0;
var iex = 0;
var mov = 0;
var positionSet = false;
function SetStatebar() {
	if(MMPlayer1.PlayState == 2){ 
		if(Math.floor(MMPlayer1.currentPosition)>0) {
			positionSet=true;
			iex=event.clientX;
			tempx=Layer1.style.pixelLeft;
			document.onmousemove=positionDragControl;
			if (document.all) { document.onmouseup=playerSetPosition; }
		}
	}
}
function positionDragControl() {
	if (positionSet) {
		var mov = tempx + event.clientX-iex;
		if ((mov >= 28)  && (mov < 217)){
			Layer1.style.pixelLeft = mov;
		} 
		return false;
	}
}
function playerSetPosition() {
	if (positionSet) {
		positionSet=false;
		MMPlayer1.currentPosition = Math.floor(MMPlayer1.Duration * ((Layer1.style.pixelLeft-26)/191));		
	}
}
function PLAPS() { 	
if (MMPlayer1.PlayState != 2)
	MMPlayer1.Play();
else 
	MMPlayer1.Pause();
}
function LookQS(qq){
window.open('http://qqshow.qq.com/cgi-bin/qqshow_user_info?uin='+qq,'LookQqShow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=555,height=345,top=10,left=10'); 
}