i dont have a faintest idea why this is happening. and i am sure that i am not providing a solution to your problem.
but.... from my experience of debugging JS errors on IE 6 (while it works fine on IE 7) i can tell you that probably you encountered a IE 6 specific JS error before that line of code. in these cases Firefox web developer addon, firebug addon and inbuilt javascript console came to my aid.