Function.prototype.extendsClass=function(parentClass){if(parentClass.constructor==Function){for(var prop in parentClass.prototype){this.prototype[prop]=parentClass.prototype[prop];}}else{this.prototype=parentClass;}this.prototype.constructor=this;return this;};