Useful, thanks. I've been coding web stuff for a long time, (since the early 90's) but I fell off my trolly about that a couple of years ago, things went too fast, too many technologies making things too simple/too hard. Now it's all a bit arcane again, and snippets like this make it handy when I'm trying to put something together. I feel comfortable again. Cheers.