function trim(theValue)
{
   return(theValue.replace(/^\s+/, '').replace(/\s+$/, ''));
}
