I'll be damned if I remember how I did it, but you can dig through the source code on my
Winamp Remote project. I built my own cross-browser compliant scrollbar for the playlist.
There's a lot that goes into it. You need to find out how tall the scrolling area is going to be (not the window size, but the entire length of the data). That was easy with my project because each line of the playlist was 14px tall, and there's no text wrapping.
There is probably a more efficient way of doing it, but the way I did it was to dynamically create a table comparing each pixel of movement on the scrollbar to a number of lines in the playlist. So depending on how long the playlist is, 10 pixels of movement on the scrollbar might scroll 1 or 5 items on the playlist.
Given the same format, it would be easy to trigger an event when certain points on the scrollbar are reached...