movestep=10;movetime=5;movestop=true;movestart=false;curmenu=-1;leftshow=false;rightshow=false;bothstar=false;
var moveobj;
var nnnn;
moveon=false;volumlen=65;volon=false;
document.onmouseup=Total_Up
document.ondragstart=doDragStart
function doDragStart() {event.returnValue=false}

function menurightmove()
{
	movestart=false;
	moveobj='rightabo'
	if(!rightshow) {menumove(1,0,0,0,0);rightarow.src=st_f04.src;rightshow=true;}
	else {menumove(0,0,0,0,0);rightarow.src=st_f05.src;rightshow=false;}
}


var Button_Num=0;
var Real 
Real='document.MediaPlayer1.'
var Mute=false;
var CanSetPos=false;
var SetPosStart=false;
var GetLenStart=false
var CanSetVol=true;
var SetVolStart=false
var bigwin=false;



function SetVolume(Pos)
{
	eval(Real+'Volume=Pos');
}

function GetLength()
{
	return eval(Real+'Duration');
}

function M_Down(Num,Status,D_Img,S_Img)
{
	if (Status&&event.button!=2)
	{
		Button_Num=Num;
		D_Img.src=S_Img.src;
	}
}



function Total_Up()
{
	if(event.button!=2)
	{
		switch (Button_Num)
		{
			case 1: playimg.src=st_play01.src;break;
			case 2: pauseimg.src=st_pause01.src;break;
			case 3: stopimg.src=st_stop01.src;break;
		}
		if(SetPosStart)
			setpos();
		if(SetVolStart) setvol();
	}
}


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 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()',timelen)
	DoPlay()
}


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((volumlen-newleft)/volumlen*(-2000))
	SetVolume(newvol)
}