//#--	Starting the Function for ErrorHandling
function ErrorHandling(pmErrorObject)	
{
	try
	{
		vErrNo	=	pmErrorObject.number  & 0xFFFF
		//#--	Starting the Switch Case
		switch(parseInt(vErrNo))
		{
			case 5 :
				vErrorType	=	"Invalid procedure call or argument";break; 
			case 6 :
				vErrorType	=	"Overflow";break; 
			case 7 :
				vErrorType	=	"Out of memory"; break;
			case 9 :
				vErrorType	=	"Subscript out of range"; break;
			case 10 :
				vErrorType	=	"This array is fixed or temporarily locked"; break;
			case 11 :
				vErrorType	=	"Division by zero"; break;
			case 13 :
				vErrorType	=	"Type mismatch";break;
			case 14 :
				vErrorType	=	"Out of string space";break;
			case 17 :
				vErrorType	=	"Can't perform requested operation";break;
			case 28 :
				vErrorType	=	"Out of stack space ";break;
			case 35 :
				vErrorType	=	"Sub or Function not defined ";break;
			case 48 :
				vErrorType	=	"Error in loading DLL ";break;
			case 51 :
				vErrorType	=	"Internal error ";break;
			case 52 :
				vErrorType	=	"Bad file name or number ";break;
			case 53 :
				vErrorType	=	"File not found ";break;
			case 54 :
				vErrorType	=	"Bad file mode"; break;
			case 55 :
				vErrorType	=	"File already open"; break;
			case 57 :
				vErrorType	=	"Device I/O error ";break;
			case 58 :
				vErrorType	=	"File already exists"; break;
			case 61 :
				vErrorType	=	"Disk full"; break;
			case 62 :
				vErrorType	=	"Input past end of file"; break;
			case 67 :
				vErrorType	=	"Too many files"; break;
			case 68 :
				vErrorType	=	"Device unavailable"; break;
			case 70 :
				vErrorType	=	"Permission denied";break;
			case 71 :
				vErrorType	=	"Disk not ready"; break;
			case 74 :
				vErrorType	=	"Can't rename with different drive"; break;
			case 75 :
				vErrorType	=	"Path/File access error"; break;
			case 76 :
				vErrorType	=	"Path not found"; break;
			case 91 :
				vErrorType	=	"Object variable or With block variable not set"; break;
			case 92 :
				vErrorType	=	"For loop not initialized"; break;
			case 94 :
				vErrorType	=	"Invalid use of Null"; break;
			case 322 :
				vErrorType	=	"Can't create necessary temporary file"; break;
			case 424 :
				vErrorType	=	"Object required"; break;
			case 429 :
				vErrorType	=	"Automation server can't create object"; break;
			case 430 :
				vErrorType	=	"Class doesn't support Automation"; break;
			case 432 :
				vErrorType	=	"File name or class name not found during Automation operation"; break;
			case 438 :
				vErrorType	=	"Object doesn't support this property or method"; break;
			case 440 :
				vErrorType	=	"Automation error"; break;
			case 445 :
				vErrorType	=	"Object doesn't support this action"; break;
			case 446 :
				vErrorType	=	"Object doesn't support named arguments"; break;
			case 447 :
				vErrorType	=	"Object doesn't support current locale setting";break; 
			case 448 :
				vErrorType	=	"Named argument not found"; break;
			case 449 :
				vErrorType	=	"Argument not optional"; break;
			case 450 :
				vErrorType	=	"Wrong number of arguments or invalid property assignment"; break;
			case 451 :
				vErrorType	=	"Object not a collection"; break;
			case 453 :
				vErrorType	=	"Specified DLL function not found"; break;
			case 458 :
				vErrorType	=	"Variable uses an Automation type not supported in JScript"; break;
			case 462 :
				vErrorType	=	"The remote server machine does not exist or is unavailable"; break;
			case 501 :
				vErrorType	=	"Cannot assign to variable"; break;
			case 502 :
				vErrorType	=	"Object not safe for scripting"; break;
			case 503 :
				vErrorType	=	"Object not safe for initializing";break;
			case 504 :
				vErrorType	=	"Object not safe for creating"; break;
			case 507 :
				vErrorType	=	"An exception occurred"; break;
			case 5000 :
				vErrorType	=	"Cannot assign to \"this\""; break;
			case 5001 :
				vErrorType	=	"Number expected"; break;
			case 5002 :
				vErrorType	=	"Function expected"; break;
			case 5003 :
				vErrorType	=	"Cannot assign to a function result"; break;
			case 5004 :
				vErrorType	=	"Cannot index object"; break;
			case 5005 :
				vErrorType	=	"String expected"; break;
			case 5006 :
				vErrorType	=	"Date object expected"; break;
			case 5007 :
				vErrorType	=	"Object expected"; break;
			case 5008 :
				vErrorType	=	"Illegal assignment"; break;
			case 5009 :
				vErrorType	=	"Undefined identifier"; break;
			case 5010 :
				vErrorType	=	"Boolean expected"; break;
			case 5011 :
				vErrorType	=	"Can't execute code from a freed script"; break;
			case 5012 :
				vErrorType	=	"Object member expected"; break;
			case 5013 :
				vErrorType	=	"VBArray expected"; break;
			case 5014 :
				vErrorType	=	"JScript object expected";break; 
			case 5015 :
				vErrorType	=	"Enumerator object expected"; break;
			case 5016 :
				vErrorType	=	"Regular Expression object expected"; break;
			case 5017 :
				vErrorType	=	"Syntax error in regular expression"; break;
			case 5018 :
				vErrorType	=	"Unexpected quantifier"; break;
			case 5019 :
				vErrorType	=	"Expected ']' in regular expression"; break;
			case 5020 :
				vErrorType	=	"Expected ')' in regular expression"; break;
			case 5021 :
				vErrorType	=	"Invalid range in character set";break;
			case 5022 :
				vErrorType	=	"Exception thrown and not caught";break;
			case 5023 :
				vErrorType	=	"Function does not have a valid prototype object";break;
			default:
					vErrorType="Undefine";break;
		}//#--	End of the Switch Case
		alert("Err No     : " + vErrNo +"\nErr Type  : " +vErrorType +"\nErr Desc  : "+ pmErrorObject.description);
	}
	catch(error)
	{
		alert(error.description);
	}
}//#--	Ennd of the ErrorHandling()


