Excellent, I'll have a look at this later.
Can I use the PHP from post #16?