﻿/* when including this on a page, put it first */
var errorLogPage = "/logJSError.ashx"; 

function LogError(a, b, c) { try { var d = getXHR(); var d = new XMLHttpRequest; var e = errorLogPage; d.open("POST", e, true); d.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); d.send("msg=" + encodeURIComponent(a) + "&url=" + encodeURIComponent(b) + "&lineNumber=" + encodeURIComponent(c)); var f = d.responseText } catch (g) { } return true } function getXHR() { if (window.XMLHttpRequest) { return new XMLHttpRequest } try { return new ActiveXObject("MSXML2.XMLHTTP.6.0") } catch (a) { try { return new ActiveXObject("MSXML2.XMLHTTP.3.0") } catch (a) { return null } } } window.onerror = function (a, b, c) { try { return LogError(a, b, c) } catch (d) { return true } }
