Interesting. I would have thought JS would have provided an easier way of doing this!