// Trim string
function Trim(FormInfo,Collapse)
{

	TestString = FormInfo.value
	TestString = TestString.replace(/^\s+/,"")
	TestString = TestString.replace(/\s+$/,"")
	
	if (Collapse)
	{TestString = TestString.replace(/\s+/g," ")}
	
	FormInfo.value = TestString

}

// ****************************************************************

// Remove all spaces
function RemoveSpaces(FormInfo)
{

	FormInfo.value = FormInfo.value.replace(/\s+/g,"")

}

// ****************************************************************