hiding form when clicking outside field

im guessing this is somethign to do with prototype but i want a form which comprises of one field to disapear if the user clicks anywhere outside of that field. Ive seen this doen on rememberthemilk.com but not sure how its done in rails.

if anyone could point me in the right direction id appreciate it.

Hi Adam,

thanks bill,

ill research into that more