﻿// --------------------------------------------------------------------------------------------
// © Intelogie.com 2007
// 
// WARNING : This computer program is protected by copyright law and international treaties.
// Unauthorized reproduction or distribution of this program, or any porttion of it, may
// result in severe civil and criminal penalties, and will be prosecuted to the maximum extent
// possible under the law.
// --------------------------------------------------------------------------------------------
Beezilla =  {
    
    version : '1.1',    
    
    modules : {
        items : new Array(),
        load: function(sModuleName) {
                var oModule = new Beezilla.Module();
                oModule.Load(sModuleName);          
                this.items[this.items.length] = oModule;
              },
        unload: function(sModuleName) {
            alert('unload module ' + sModuleName);
              }
    },
    
    actions : {
        items : new Array(),
        add : function(oAction) {
            this.items[this.items.length] = oAction;
        } , // add
        execute : function () {
            var i;
            // First argument is the action name
            var sActionName = '';
            if (arguments.length > 0) {
                sActionName = arguments[0];
            }
            for (i=0;i<this.items.length -1;i++) {
                if (this.items[i].name == sActionName) {
                    this.items[i].execute(arguments)
                    return;
                }
            }
        } // execute
        
    },
    
    forms : {
        show : function() {
        
        }
    },
    
    views : {
        show : function() {
        
        }
    },
    
    MsgBox : function(sMessage, sTitle, sIcon) {
        Ext.Msg.show({
            title:sTitle,
            buttons: Ext.Msg.OK,
            icon: sIcon,
            minWidth: 300,
            minHeight: 150,
            msg: sMessage                                    
        });    
    }
    
};

