// JavaScript Document


//拖放控制声音变量设置
var Player;
var x,theImg;
var Maxvol, Minvol
mute=false;
Player="document.WMPlay";
Maxvol=85;
Minvol=0;
cur=5;
var g_Browser = navigator.appName; 
function controlType (setting) 
{ 
document.WMPlay.ShowControls = setting; 
} 
function displaySize (setting) 
{ 
document.WMPlay.DisplaySize = setting; 
} 
function PlayClick () 
{ 
document.WMPlay.Play(); 
} 
function StopClick () 
{ 
document.WMPlay.Stop(); 
//document.WMPlay.CurrentPosition = 0; 
} 
function PauseClick () 
{ 
document.WMPlay.Pause(); 
} 
function PlayPauseClick () 
{ 
var state; 
state = document.WMPlay.PlayState; 
if (state == 0) 
document.WMPlay.Play(); 
else if (state == 1) 
document.WMPlay.Play(); 
else if (state == 2) 
document.WMPlay.Pause(); 
} 
function SetMute()
{
	if (mute){
		eval(Player).Mute=false
	 //document.sound.src=sound1.src;	 
	 //document.vol.style.visibility="visible";
	 mute=false	
	}	
	else{
	 eval(Player).Mute=true;
	 //document.sound.src=sound2.src;
	 //document.vol.style.visibility="hidden";
	 mute=true
	} 
}
function SetVolume(Pos)
{
eval(Player).volume=Pos;
}
function move(){
 if (event.button==1){
 left=temp1+event.clientX-x
 
 if ((left<=Maxvol)&&(left>=Minvol))
 theImg.style.pixelLeft=left
 else 
 if(left>Maxvol)
 theImg.style.pixelLeft=Maxvol
 else
 theImg.style.pixelLeft=Minvol
 // document.form1.pos.value=theImg.style.pixelāLeft
 return false
 }
}
function enddrag(){
 cur=theImg.style.pixelLeft;
 cur=Math.floor((Maxvol-cur)/(Maxvol-Minvol)*(-2000)); 
 SetVolume(cur);
 document.onmousemove=null;
}
function begindrag(Elm){
 if (!document.all)
 return
 temp1=Elm.style.pixelLeft 
 theImg=Elm
 x=event.clientX;
 document.onmousemove=move 
}
