
var REPORT_ERRORS = true;

onerror=handleErr;
window.onerror=handleErr;

function handleErr(msg,filename,line)
{
  if(REPORT_ERRORS)
  {
    var requestObject;
    var url = "http://www.osaa.org/schoolnet/includes/reportError.aspx?type=js&msg=" + msg + "&file=" + filename + "&line=" + line;
    requestObject = getXMLHttpObject();
    requestObject.onreadystatechange = function(){}
    requestObject.open("get", url, true);
    requestObject.send(null);

    // Returning true stops this event from bubbling
    return true;
  }
}

function handleTimeout()
{}