Just revisiting this post because I lost the original code I wrote and astonished to see over 64,000 downloads!

Now if I'd sold it for 50 cents a copy......