/*Author: Matthew La Rouche
some thanks to: http://www.javascriptkit.com/javatutors/error.shtml
This Javascript file when sourced into any HTML page will suppress all JS error messages.
In order to trap all errors, it should be the first script in the page. I.e.
-->must be in head section
-->be the first script
-->in a distinct script section
*/
function alertError(msg, url, linenumber){
	//alert('JS Error: ' + msg + '\nURL= ' + url + '\nLine Number= ' + linenumber);
	return true;
}

//test for the objects existence before trying to access it
if (window) {
	//since onerror is always null, try to set the property / ignore any error
	try {
		//sets the window onerror event handler
		window.onerror = alertError;
	}
	catch (e) {
	}
}