CiviMail adds call to onbeforeunload function then throws "Illegal Characters" error over and over again
Because this doesn't exhibit on the demo sites and hasn't been reported by anyone else, my first suggestion is to disable extensions/plugins/customizations because this may not be originating from CiviCRM.

If that doesn't work, try the more detailed troubleshooting javascript in CiviCRM guide.