/******************************************************************************
'Function name(): fnErrorMessage
'Description  :  This function will be used to display a error message corresponding to an error code
'Input        :  Error Code
'                Form Field Name
'Output       :  String
'*******************************************************************************/
function fnErrorMessage(intErrorCode,strFieldName)
{
	
	var strErrorString
	switch (intErrorCode) //Pass Errorcode
	{
		case 1:
			strErrorString = strFieldName +  " must be entered" //Mandatory check
			return strErrorString;
		case 2:
			strErrorString = strFieldName + " must be selected " 
			return strErrorString;
		case 3:
			strErrorString = "Invalid " + strFieldName  //For Email Address
			return strErrorString;
		case 4:
			strErrorString = strFieldName + " out of Range"			
			return strErrorString;
		case 5:
			strErrorString = "Your passwords do not match " + strFieldName			
			return strErrorString;
		case 6:
			strErrorString = strFieldName + " must be a positve value"
			return strErrorString;
		case 7:
			strErrorString = strFieldName + " must be entered in DD/MM/YYYYY format"
			return strErrorString;
		case 8:
			strErrorString = strFieldName + " has to be greater than current date"
			return strErrorString;
		case 9:
			strErrorString = strFieldName + " cannot be less than Current Date"
			return strErrorString;
		case 10: 
			strErrorString = "Invalid " + strFieldName //For Phone number, contactno,Faxno or any general error
			return strErrorString;
		case 11:
			strErrorString = strFieldName + " can have [A-Z],[a-z],[0-9], spaces and [\" _ - , . '] only" // for alphanumeris values like password
			return strErrorString;
		case 12:
			var arrSplit = new Array();
			arrSplit = 	strFieldName.split(","); 
			strErrorString = arrSplit[0] + " must be less than " + arrSplit[1] //Date compare
			return strErrorString;
		case 13:
			strErrorString = "Please select atleast one record from "+strFieldName 
			return strErrorString;	
		case 14:
			strErrorString = " Invalid Image Format " 
			return strErrorString;
		case 15:
			strErrorString = " Invalid htm/html/pdf Format " 
			return strErrorString;
		case 16:
			strErrorString = " Invalid htm/html/pdf Format " 
			return strErrorString;
		case 17:
			strErrorString = strFieldName + " must be greater then 0"
			return strErrorString;					
		case 18:
			strErrorString = " Invalid GIF/JPG/JPEG/BMP Format " 
			return strErrorString;
		case 19:
			strErrorString = "Total Number of character exceeded in " + strFieldName //for text area  
			return strErrorString;
		case 20:
			strErrorString = strFieldName + " must be like 99999.99 or 99999"
			return strErrorString;
		case 21:
			strErrorString = strFieldName + " must be a valid numeric value"
			return strErrorString;	
		case 22:
			strErrorString = strFieldName + " must be up to 2 decimal places or 4 digits in length"
			return strErrorString;
		case 23:
			strErrorString = strFieldName + " must be a valid integer"
			return strErrorString;
		case 24:
			strErrorString = strFieldName + " cannot be greater than Current Date"
			return strErrorString;
		case 25:
			strErrorString = strFieldName + " already exist"
			return strErrorString;
		case 26:
			strErrorString = strFieldName + " can't be greater than Max points you can redeem"
			return strErrorString;	
		case 27:
			strErrorString = strFieldName + " can't be greater than Actual price"
			return strErrorString;	
		case 28:
			strErrorString = strFieldName + " must be greater than 4 characters in lenght"
			return strErrorString;
		case 29:
			strErrorString = " Special characters(!,#$%& etc.) are not allowed in "+strFieldName 
			return strErrorString;
		case 30:
			strErrorString = " Please select atleast one record" 
			return strErrorString;
		case 31:
			strErrorString = " You can't select more then "+strFieldName+ " records"
			return strErrorString;
		case 32:
			strErrorString = strFieldName + " must be integer"
			return strErrorString;
		case 33:
			strErrorString = "New Password must match Confirm Password"
			return strErrorString;
		case 34:
			strErrorString = "New Email Id must match Confirm Email Id"
			return strErrorString;
		case 35:
			strErrorString = "Points to be redeemed can be updated at this stage only"
			return strErrorString;
		case 36:
			strErrorString = "Please select atleast one Email from " + strFieldName  //For Email Address
			return strErrorString;
		case 37:
			strErrorString = "Journal should be active if selected as Default one"  //For Email Address
			return strErrorString;
		case 38:
			strErrorString = "No of free emails cannot be greater then 0 for the input Extra Email cost in Rs or $."
			return strErrorString;
		case 39:
			strErrorString = "No of free emails cannot be 0 for the input Email cost in Rs or $."
			return strErrorString;			
	}	
}

