// JavaScript Document

var isDebugging = false;
var logJsErrors = true;
function ErrorSetting(msg, file_loc, line_no) {
    var e_msg=msg;
    var e_file=file_loc;
    var e_line=line_no;
    var   error_d = "Error in file: " + file_loc +"\nline number:" + line_no + "\nMessage:" + msg;

    if(logJsErrors){
        theData = "file="+file_loc+"&line="+line_no+"&err="+msg;
        ajaxCtrl(
            function(){
                return true;
            },"/TW_assets/tw_errorlogging/tw_logerrors.asp",theData);
    }

    if(isDebugging) {
        alert("Error Encountered:\n\nAn error was encountered that's caused a problem on this page.  We're sorry for the inconvenience.  The error has been logged and sent to our technical staff for evaluation. \n\nTechnical data:\n--------------\n"+error_d);
	}
    
	return true;
}

window.onerror = ErrorSetting;

