$(document).ready(function(){function i(i,r){var f,u;if(i!=null){if(n==null){alert("logErrorUrl must be defined.");return}f=i.fileName!=null?i.fileName:document.location;r==null&&i.stack!=null&&(r=i.stack);u=i.message!=null?i.name+": "+i.message:i;u+=": at document path '"+f+"'.";r!=null&&(u+="\n  at "+r.join("\n  at "));t++>50&&(window.location="/?higherrorcount");$.ajax({type:"POST",url:n,data:{message:u}})}}var n="/Error/LogJSError/",t=0;Function.prototype.trace=function(){for(var t=[],n=this;n;)t.push(n.signature()),n=n.caller;return t};Function.prototype.signature=function(){var t={name:this.getName(),params:[],toString:function(){var n=this.params.length>0?"'"+this.params.join("', '")+"'":"";return this.name+"("+n+")"}},n;if(this.arguments)for(n=0;n<this.arguments.length;n++)t.params.push(this.arguments[n]);return t};Function.prototype.getName=function(){if(this.name)return this.name;var n=this.toString().split("\n")[0],t=/^function ([^\s(]+).+/;return t.test(n)?n.split("\n")[0].replace(t,"$1")||"anonymous":"anonymous"};window.onerror=function(n){arguments!=null&&arguments.callee!=null&&arguments.callee.trace&&i(n,arguments.callee.trace())}})