I am not much of a JavaScript programmer. I want to know how can I supress any errors that come in my script, like if there are some errors in my script like syntax errors or runtime errors, the browser(MSIE or NN) display a dialog stating that there are errors in script.
I don't want them to display that.
I know that there's an event

 window.onerror = some function
this event is raised if there's any error in the script, but what should I put in place of some function so that the error dialogs in the browser doesn't appear.