Thanks for that, it'll save me writing something for an upcoming project. I'll play with it when the time comes.
Rob