First, don't bother using
element.className = 'someclass'
Finally, I am amazed at how well Opera "just works". I didn't have to touch anything at all to make Opera render everything as I wanted; as far as I can tell, it behaved exactly like Firefox in most cases (specifically, it looks like they implemented the W3C DOM Events specification). Happiness.