/*'--textTrim.js---------------------------------------------------------------------------------------
 - Purpose : this function is a javascript equivalent to the Trim() in ASP.  It removes
 		all white space from both ends of string value to ensure conciseness
 - Parameters : 
 		-	strInput = string to be trimmed
 - Author : Ryan Putman
  - Updates : 3/17/2004 - comments updated
  ---------------------------------------------------------------------------------------------------*/
	function textTrim(strInput) 
	{
		var strResult = '';
		if(strInput != '')
		{
			var i = 0;
			var intTrimFront = 0;
			var intTrimLast = strInput.length;
			
			//determine the place where the first actual letter is found in the string
			while(intTrimFront == 0 && i<strInput.length) {
				if (strInput.charCodeAt(i)!=32)
					intTrimFront = i;
				i++;
			}
	
			i=strInput.length;
			
			//determine the place where the last actual letter is found in the string
			while(intTrimLast == 0&& i>-1){
				if (strInput.charCodeAt(i)!=32)
					intTrimLast = i;
				i--;
			} 
			
			//combine all the information in between the first actual letter and last actual letter
			for(i=intTrimFront-1; i<=intTrimLast; i++)
			{
				strResult += strInput.charAt(i); 
			}
		}
		return strResult
	} 