<!--Remove leading and trailing spaces-->
function trimField(input)
{
	index = 0;
	
	//Remove leading spaces
	if(input.charAt(0) == ' ')
	{
		while(input.charAt(index) == ' ')
		   index++;
	
		input = input.substring( index, input.length )
	}
	
	//Remove trailing spaces
	index = input.length - 1;
	if(input.charAt(index) == ' ')
	{
		while(input.charAt(index) == ' ')
		   index--;
	
		input = input.substring( 0, (index + 1) )
	}
	//alert("about to return: >" + input + "<");
	
	return input;
}

