var ErrorCaptured = "https://ccsrv.bostontech.com/Handling/ErrCap.html";var ErrorNotCaptured = "https://ccsrv.bostontech.com/Handling/ErrCapFail.asp";var ErrorHandler = "https://ccsrv.bostontech.com/Handling/Error.asp";function errorHandle(fatal, reason, lineNum, linePos, errCode, lineSrc, module, errType, errSrc){	//Function: errorHandle	//Programmer: Daniel J. Boston	//Date: June 3, 2004	//Revision: 2.0	//Purpose: To report errors to a handling script in a cross-browser compatible way.	//		var errorHandler = XMLHttpObject();		//Compatible.	errorHandler.open("POST", ErrorHandler, false);	var StS = "Error=" + sstr(reason) + "&LineNum=" + sstr(lineNum);	StS = StS + "&LinePos=" + sstr(linePos) + "&ErrCode="  + sstr(errCode);	StS = StS + "&LineSrc=" + sstr(lineSrc) + "&Module=" + sstr(module);	StS = StS + "&ErrType=" + sstr(errType) + "&" + sstr(errType) + "Src=" + sstr(errSrc);	var Sta = "<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE Content <!ELEMENT Content (#PCDATA)>><Content>" + escape(StS) + "</Content>";	errorHandler.send(Sta);	if ((errorHandler.responseText == "Ok") && (fatal))	{		window.location = ErrorCaptured;	}	else if ((errorHandler.responseText != "Ok") && (fatal))	{		window.location = ErrorNotCaptured + "?Error=" + sstr(reason) + "&ErrLine=" + sstr(lineNum) + "&ErrPos=" + sstr(linePos) + "&ErrCode=" + sstr(errCode) + "&ErrSrc=" + sstr(lineSrc) + "&Module=" + sstr(module);	}	else if ((errorHandler.responseText == "Ok") && !(fatal))	{		return true;	}	else	{		return false;	}		//Template calls:	//errorHandle(true, e.message, "", "", e.number & 0xFFFF, "", module, "Other", "In [functionname]: [vars]");}function errorHandleExp(e, module, section){	//Function: errorHandleExp	//Programmer: Daniel J. Boston	//Date: June 3, 2004 / Rev. June 7, 2004	//Revision: 1.2 	//Purpose: A wrapper class to call errorHandle(); in the case of a specific type of error potentially found in code. Is easier then writing full errorHandle() call string.	//	// Revision 1: Added specific handlers for extended reporting functions available to NS and IE.	var errNum;		try	{	//IE specific error function		errNum = e.number;	}	catch(e)	{		errNum = 0;	}		var lineNum;		try	{	//NS specific error function		lineNum = e.lineNumber;	}	catch(e)	{		lineNum = "";	}	var fileName;		try	{	//NS specific error function		fileName = e.fileName;	}	catch(e)	{		fileName = "";	}		errorHandle(true, e.message + "::" + e.name, lineNum, "", errNum & 0xFFFF, "", fileName + "::" + module, "Code", "In " + section);}function exceptionHandleExp(e, module, section){	//Function: exceptionHandleExp	//Programmer: Daniel J. Boston	//Date: June 7, 2004	//Revision: 1.0 	//Purpose: A wrapper class to call errorHandle(); Just a non-fatal version in the case of a specific type of exception potentially found in code. Is easier then writing full errorHandle() call string.	//		var errNum;		try	{	//IE specific error function		errNum = e.number;	}	catch(e)	{		errNum = 0;	}		var lineNum;		try	{	//NS specific error function		lineNum = e.lineNumber;	}	catch(e)	{		lineNum = "";	}	var fileName;		try	{	//NS specific error function		fileName = e.fileName;	}	catch(e)	{		fileName = "";	}		errorHandle(false, e.message + "::" + e.name, lineNum, "", errNum & 0xFFFF, "", fileName + "::" + module, "Code", "In " + section);}function dummyHandle(e){	//Function: dummyHandle	//Programmer: Daniel J. Boston	//Date: June 2, 2004	//Revision: 1.0 (final)	//Purpose: To suppress error reporting on case of error inside (routine). A dummy handler.	//		return true;}function sstr(val){	//Function: sstr	//Programmer: Daniel J. Boston	//Date: June 2, 2004 / Rev. June 7, 2004	//Revision: 1.2 (final)	//Purpose: To attempt to put [val] into a string. Uses dummy handler in case of failure.	//	// Revision 1: IE doesn't support String and /or .toString() on certain objects. Added secondary output.		var returning;	try	{		returning = String(val);	}	catch (e)	{		try		{			returning = val.className;		}		catch(e)		{			returning = e.message;			dummyHandle(e);		}	}	return returning;}
