function LRTrim(str)
{
	var strTrim = "";
	len = str.length;

	// Find non white space at start
	for (i=0; i < len; i++)
	{
		strChar = str.charAt(i);
		if (strChar != " " && strChar != "\t" && strChar != "\n" && strChar != "\r")  {
			break;
		}
	}

	//Find non white space at end
	for (j=(len - 1); j > i; j--)
	{
		strChar = str.charAt(j);
		if (strChar != " " && strChar != "\t")
			break;
	}

	// Loop through and copy the remaining data
	for (k=i; k <= j; k++)
		strTrim += str.charAt(k);

	return strTrim;
};


