﻿window.onerror = function(msg, url, linenumber) {
	var domain = /^[^/]+:\/\/([^:/]+).*$/;
	if(window.location.toString().match(domain)[1] == url.match(domain)[1]) {
		$.post('/services/error', { ErrorMessage: msg, URL: url, LineNumber: linenumber });
	}
}
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();