Marquee Selection and Feedback

I need to implement a marquee style selection in which I would drag a
cursor so as to draw a box on an image and return the coordinates
while it is dragging (thus live feedback) in a popup/tooltip style
fashion and then feed that information back to the rails app.

Is there something out there that already does this or provides the
foundations for such a function or do I need to build it from scratch
somehow with Scriptaculous or MooTools?