It's bleeding obvious when you put purity and beauty of code aside and get down in the shit, innit?
I was going to suggest using jQuery and show how to do the same, but I only had a few minutes to spare on my break, so that'll do :Y
One day I will look at jQuery. Possibly.
I'm actually using jquery on that page anyway just for the select by class function.
If the 'select by class function' simply selects elements based on CSS class, that could easily be hand-rolled with DOM scripting. If it refers to programming classes, then I'm done :(
I never had much luck getting it to work across browsers consistently whereas the jquery function seems to be fairly bulletproof.