////////////////////////////////////////////////////////////////// // Parameters: // fieldVal - - value of the field on the HTML form // Descriptions: // Trims the blank spaces before and after the value // Returns: // Returns the trimmed value ////////////////////////////////////////////////////////////////// function TrimVal(fieldVal) { fieldVal = this != window? this : fieldVal; return fieldVal.replace(/^\s+/g, '').replace(/\s+$/g, ''); }