While I just wasted an afternoon debugging a quasi-similar problem. I've got a bunch of js functions in a head section but I do NOT have runat=server. I found a decrementing for loop ( for (int i=10;i>0;i--), also caused unknown error issue. After messing around I find it is the decrment operator (--). I even tried doing this: alert("hi -- there") and got same issue. Seems the parsing is finding the -- and assuming it's found the end of comments or something like that.
I notice other characters causing issues if all script was not surrounded by HTML/XML comments <!-- --> but having the comments around other scripts seems to prevent errors for most special characters except decrement. So my for loop now says i=1-1 for the decrement.
Does anyone know if Microsoft confirms this to be a bug and if so whether it's fixed in ver 1.0?