function OnPlay()
{
	if(WMPlay.playstate != 2)
	{
		WMPlay.play();
	}
}

function OnPause()
{
	if(WMPlay.playstate == 2)
	{
		WMPlay.pause();
	}
}

function OnStop()
{
		WMPlay.stop();
		WMPlay.currentposition=0;
}

function VolumeUpDown(UpDown)
{
    var AUDIOSTEP = 300;
    var curVol = document.WMPlay.Volume;

  if (UpDown == "up")
  {
    curVol = curVol + AUDIOSTEP;
     if (curVol > 0)
    {
      curVol = 0;
    }
  }
  else
  {
    curVol = curVol - AUDIOSTEP;
    if (curVol < -2000)
    {
      curVol = -2000;
    }
  }

  curVol = Math.floor(curVol);
  document.WMPlay.Volume = curVol;
}

function SoundMute(aa)
{
	if(aa=="0")
	{
		Player.mute =1;
		Player.Play();
	}
	else
	{
		Player.mute = 0;
		Player.Play();
	}
}

