since he mentioned trim() function, i think by blanks he means spaces. i believe you will have to parse the
string looking for the space character which is, i believe, #160(or nbsp in IE but not netscape4.7). then you will have to remove them somehow. even if there is a trim() function it will only remove leading and trailing spaces. im pretty sure this has been done before. you can probly find a ready made script somewhere.