Thanks farrukhndm, that worked a treat!

However, how would this work with commercial certificates?

Can you post an alternate version outlining what I need to do _please_ :)

Many thanks