Doh!

Feel free to use anything here that you think will be useful. Kudos has to to go to John who created the original version, I just extended it slightly.

Gary