var cOnLoadManager = function()
{
    this.functions = new Array();
}

cOnLoadManager.prototype.attach = function(function_item)
{
    this.functions[this.functions.length]=function_item;
}
cOnLoadManager.prototype.run_on_load_functions = function()
{
    //alert(111)
    //debugger
    //alert(this)
    //alert(this.functions)
    for(var i=0;i<this.functions.length;i++)
        {
            this.functions[i]();
        }

}

//debugger;
on_load_manager = new cOnLoadManager();
//alert(on_load_manager.run_on_load_functions())
//alert(on_load_manager)
//alert(on_load_manager.attach())
//window.functions = on_load_manager
hydra_add_event(window, 'load', function(){on_load_manager.run_on_load_functions()});

//this.window.onload = on_load_manager.run_on_load_functions();