Use jsmin for compressing js files.
And you can also try this simple tr command to remove the Carriage return(^M).
$ tr -d "\r" < in.js > out.js
-Girish
--
G3 Tech
Networking appliance company
web: http://g3tech.in ?mail: girish at g3tech.in