Object.prototype.extend = function(object) {
    for (property in object) {
        this[property] = object[property];
    }
return this;
}


Function.prototype.bind = function(object) {
  var method = this;
  return function() {
    method.apply(object, arguments);
  }
}

String.prototype.trim = function()	{
    s = this.replace( /^\s+/g, "" );// strip leading
    return s.replace( /\s+$/g, "" );
}

