function AudioPlayer()
{
this.Common = new Common();
this.Browser = this.Common.Browser();
this.Player = null;
this.SetPlayer = function(){
this.Player = this.Common.GetBrowserIndependentElement("AudioPlayer");
}
this.GetPlayer = function(){
return this.Player;
}
this.LoadAudioPlayer = function(src, SoundState){
var request = this.Common.GetXMLHttpRequest();
if (request)
{
request.onreadystatechange = function() {
if( request.readyState == 4 )
{
try{
this.LoadedAudioPlayer(SoundState);
}
catch(ex){
}
}
}
request.open('POST', src, true);
request.send("");
}
}
this.LoadedAudioPlayer = function(SoundState){
var AudioPlayer = this.Common.GetBrowserIndependentElement("AudioPlayer");
if (AudioPlayer != null)
{
AudioPlayer.innerHTML = xmlRequest.responseText;
this.SetAudioPlayerSoundStatus(SoundState);
}
}
this.SetAudioPlayerSoundStatus = function(SoundState){
if (this.Player == null){return;}
if (Player.id == "WindowsMediaAudioPlayer")
{
if (SoundState == true)
{
if (this.Browser == "IE") {Player.Mute = false;}
else {Player.SetMute(false);}
}
else
{
if (this.Browser == "IE"){Player.Mute = true;}
else {Player.SetMute(true);}
}
}
if (Player.id == "FlashAudioPlayer")
{
if (!Player.object.Playing){}
else{}
}
if (Player.id == "QuickTimeAudioPlayer")
{
if (SoundState == true) {Player.SetMute(false);}
else {Player.SetMute(true);}
}
}
}

