One way to get around some of the incompatibilities between browsers (and make writing code easier) is to use a library like
iQuery. While you might want to use document.all in IE, but document.getElementById() in FireFox, jQuery will work out for you which to use - you just use a single jquery function and your code works on different browsers.