function TrimStr(StrToTrim)
{
 if (StrToTrim.length > 0) StrToTrim = StrToTrim.replace(/^\s*|\s*$/g, "");

 return StrToTrim;
}