// simple addition to add "trim" functionality to String
String.prototype.trim = function() {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
}
