Function.prototype.method = function (name, func) {
    this.prototype[name] = func;
    return this;
};

function InvestecFunctionHandler() {
    this.functionList = new Array();
}

InvestecFunctionHandler.method('registerFunction', function (func) {
    this.functionList.push(func);
});

InvestecFunctionHandler.method('unregisterAllFunctions', function () {
    this.functionList = new Array();
});

InvestecFunctionHandler.method('launchFunctions', function () {
     for (var i = 0; i < this.functionList.length; i++){ 
         this.functionList[i](); 
      } 
      
});
