
function trim(str) {
	if (str) {
  	return str.replace(/^\s*|\s*$/g,"");
  } else {
  	return '';
  }
} 



