This link looks like it could be very helpful but you will need to convert it to JScript from the language that it is in already. I found the kind of thing you were after about halfway down. I recommend using an ActiveXObject like in iTunes+. Good luck with coding it