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