
function application(location){
    var self=this;
    
    if(location === 'local'){
       var url = 'http://localhost/ajax_devel/index.php'; 
    }else{
      var url = 'http://dabnis-webdesign.co.uk/index.php';  
    }
    
    // Init the modules
    this.Sys = new system();
    this.Ajax = new ajax_manager(url);
    // Set up the module manager.
    this.mod_mgr = new module_manager();
    
    function init(){
        $('#testmodule button.control').live('click', function(event){
       self.Ajax.cmd_blk.from = 'cs_system';
       self.Ajax.cmd_blk.to = 'TestModule';
       self.Ajax.cmd_blk.cmd = 'stop';
       self.Ajax.send();
       return false; 
    });
    }
    init();
}
//$('body').append("<script type='text/javascript' src='./js/system.js'></script>");

// Start the application.
$(app = new application('live'));
