function trim(s) {
	str = new String(s);
	str = str.replace(/^\s+|\s+$/g, ""); 
	return str;
}
