Well, that code looks terrible. I would try and reformat it so people can see what is going on... but it would take a while... and there isn't really any point.
Basically you are using the keyword 'with'. This keyword doesn't exist in Javascript (to my knowledge). And I'd be very surprised if it didn't give you any errors in Firefox. I suspect you just aren't aware that errors in Firefox are quietly reported in the Javascript console (Tools > JavaScript Console).
I've checked my hypothesis using the JSLint website http://www.crockford.com/javascript/jslint.html which also complains about with.
I presume that you have some knowledge of VB script... so you shouldn't have much trouble substituting this aspect of your code.
You may want to know why this works in IE... there are a couple of good reasons it works in IE (and also good reasons why you shouldn't expect it to always work)...
1. IE also supports VBscript. Where you indicated you are using Javascript, I suspect that IE is just guessing about what it is you want it to do (since what you asked for isn't what you are trying to do), the problem here is that you are allowing an ambiguous situation where the browser may or may not respond the way you intended and may perform differently on different machines.
2. IE always seems to do this, for some reason the people at Microsoft feel it is better to guess what you want it to do instead of blow up in your face... again in this situation you can never be sure how it will work.