Thanks to both of you.
I had seen the sample, and I even considered writing something similar for the mouseup event. Somehow I kept thinking it would be something more simpler, though.