http://www.webreference.com/js/ is a good reference site for a bunch of js-related hints and tricks.
I would caution you to use .mid music very sparingly, as it is quickly becoming the hallmark of bad and cheesy websites.
However, if you'd like to play something like MP3s (say for a rock band's website) then you'll probably have to use flash.