Playing mp3's generally doesn't work too well in Javascript as it simply doesn't support it.
There are Flash .swf music players though, that can be inserted dynamically using javascript, having JS setting the mp3 location for the player.
It all depends on your browser, but the file Document Viewer widget just might do the trick. (But why do you want to play sounds ?!)