a0000.blogspot.com
// Quick string trim functionString.prototype.trim = function() { return this.replace(/^\s+\s+$/g, ''); }