<!--
/*
PURPOSE:	To chop off leading and trailing spaces from a string.
					Just like trim in vbscript.
CREATED:	19 April 2001
AUTHOR:		Omar Cortez Marshall
*/
function trim (inS)
{
	var i;
	s = new String;
	strTemp = new String;

	//Initialise return string
	s = "";

	//Jump over leading spaces
	for (i = 0; ((inS.charAt(i) == " ") && (i < inS.length)); i++);

	//Trim off trailing spaces
	while (i < inS.length)
	{
		if (inS.charAt(i) == " ")
			strTemp += " ";
		else
		{
			s += strTemp;
			s += inS.charAt(i);
			strTemp = "";
		}

		i++;
	}

	return s;
}
//end trim
-->


