var playing = false
function soundButtonClick (obj, mp3) {
  var lastPlaying = playing;

  if (lastPlaying != false) {
    parent.frames.sound.location.href = 'about:blank';
    lastPlaying.firstChild.src = 'images/items/button_play.gif';
    lastPlaying.firstChild.alt = 'play';
    playing = false;
    parent.frames.playerstatus.saveSoundStatus('');
  }

  if (lastPlaying != obj) {
    parent.frames.sound.location.href = obj.href;
    obj.firstChild.src = 'images/items/button_stop.gif';
    obj.firstChild.alt = 'stop';
    playing = obj;
    parent.frames.playerstatus.saveSoundStatus(mp3);
  }
}

function getSoundStatus () {
  var mp3 = parent.frames.playerstatus.getSoundStatus();
  var obj;

  for (var i=1; i<players; i++) {
    obj = document.getElementById('player' + i);
    if (obj.name == 'player_' + mp3) {
      obj.firstChild.src = 'images/items/button_stop.gif';
      obj.firstChild.alt = 'stop';
      playing = obj;
      break;
    }
  }
}