BlackBook is correct; getElementsBySelector() is not a standard in any browser, but a nifty little JavaScript routine that can help you with your own JavaScript stuff. To use it, though, you'll need to include his JavaScript alongside your own.
This said, there's another wrinkle to watch out for: it's possible to have more than one class on an element (all browsers, even IE/Windows, support this). It's highly useful for some things, but if you ever go that route then the technique of just replacing an element's className will become very dangerous. This is a serious problem with the DOM.
This page at
Dean Edwards' site shows another technique which allows you to switch only the class you want, and leave alone any other classes which might be on the element you're switching. You don't have to use his IE7 JavaScript to make it work (though you may want to; as it's nothing short of godlike in what it does).
If you're interested in getElementsBySelector, by the way, then you may want to check out Dean Edwards'
cssQuery engine. It seems to work in all browsers tested so far, and it's more powerful than getElementsBySelector, even though it works on the same principle.