function errorHandler(message, url, line)
{
   // message == text-based error description
   // url     == url which exhibited the script error
   // line    == the line number being executed when the error occurred

 // handle the error here
 // stop the event from bubbling up to the default window.onerror handler
 // (see the "For More Info" section for an article on event bubbling)
   return true;
}

// install the global error-handler
window.onerror = errorHandler;
