var itemPerpage = 50;
var k = (!Ext.isEmpty(CURR_SESS)) ? CURR_SESS : ''; //do not remove this!
var ut = (!Ext.isEmpty(S_UT)) ? S_UT : ''; //do not remove this!
var tokenDelimiter = ':';
var errortpl = Ext.create('Ext.XTemplate','<ul><tpl for="."><li><span class="field-name">{name}</span>: <span class="error">{error}</span></li></tpl></ul>');

Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);

Ext.Loader.setConfig({
    enabled: true,
    disableCaching: true,
    paths: {
        'Extensible': 'lib/extensible-1.5.0/src',
        'Extensible.example': 'lib/extensible-1.5.0/examples'
    }
});
Ext.application({
    name: 'DB',
    appFolder: 'app',
    controllers: ['Navigation'],
    launch: function() {
    	Ext.History.init();
    	
    	if (Ext.isEmpty(CURR_SESS))
    		Ext.create('DB.view.Login', {});
    	else{
    		Ext.create('DB.view.Dashboard', {});
    		Ext.getCmp('appdashboard').onNaviSelect(0);
    	}
        Ext.get('loading').hide();
    }
});
