In Firefox (or anything else but IE for that fact) you cannot use document.all which is a good reason to try to avoid it. Therefore instead of document.all you should use getElementById such as: document.getElementById("b1") Also, in Firefox you don't have fireEvent. You could instead either dispatchEvent (as described here: http://developer.mozilla.org/en/docs/DOM:element.dispatchEvent) or you could retrieve the handler yourself and call it explicitly
Cheers, Dani