function jsTrim(TRIM_VALUE)
{
// Function to remove all leading and trailing blank spaces before and after
// the passed value
	if(TRIM_VALUE.length < 1)
	{
		return"";
	}
	TRIM_VALUE = jsRTrim(TRIM_VALUE);
	TRIM_VALUE = jsLTrim(TRIM_VALUE);
	if(TRIM_VALUE=="")
	{
		return "";
	}
	else
	{
		return TRIM_VALUE;
	}
} //End Function

function jsRTrim(VALUE)
{
// Function to remove all trailing blank spaces
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";
	if(v_length < 0)
	{
		return"";
	}
	var iTemp = v_length -1;

	while(iTemp > -1)
	{
		if(VALUE.charAt(iTemp) == w_space)
		{
		}
		else
		{
			strTemp = VALUE.substring(0,iTemp +1);
			break;
		}
		iTemp = iTemp-1;
	} //End While
	
	return strTemp;

} //End Function

function jsLTrim(VALUE)
{
// function to return all leading blank spaces
	var w_space = String.fromCharCode(32);
	if(v_length < 1)
	{
		return"";
	}
	var v_length = VALUE.length;
	var strTemp = "";

	var iTemp = 0;

	while(iTemp < v_length)
	{
		if(VALUE.charAt(iTemp) == w_space)
		{
		}
		else
		{
			strTemp = VALUE.substring(iTemp,v_length);
			break;
		}
		iTemp = iTemp + 1;
	} //End While
	
	return strTemp;
} //End Function


