/******************************************************************************
 * Registro
 */
(function () {
    this.Registro = {
        funciones : [],
        set : function (k, f) {
            if (typeof(f) === 'function') {
                if (!this.funciones[k]) {
                    this.funciones[k] = [];
                }
                this.funciones[k].push(f);
            }
        },
        get : function (k) {
            return (this.funciones[k]) ? this.funciones[k] : null;
        }
    }

    /******************************************************************************
     * Onload - se ejecutan todas las funciones que se registraron para onload
     */
    window.onload = function () {
        var onload = Registro.get('onload');
        for (n in onload ) {
            onload[n].call();
        }
    }
})();
