Um. Well. I knew where to uh....borrow it from. :)
'Tis why I have the code on my home page (such as it is :-)