function trim(string)
{
return string.replace(/(^\s*)|(\s*$)/g,'');
} 


// JavaScript Functions Written by:
//    Scott Mitchell
//    mitchell@4guysfromrolla.com
//    http://www.4GuysFromRolla.com
function Left(str, n)	{
/***
	IN: str - the string we are LEFTing
			n - the number of characters we want to return

	RETVAL: n characters from the left side of the string
***/

	if (n <= 0)     // Invalid bound, return blank string
		return "";
	else if (n > String(str).length)   // Invalid bound, return
		return str;                // entire string
	else // Valid bound, return appropriate substring
		return String(str).substring(0,n);
}

