/*
 * @author Erik Anders aka --=GT-O=--Hellfire
 */

// reference local blank image
Ext.BLANK_IMAGE_URL = 'images/spacer.gif';
 
// create namespace
Ext.namespace('gto');
 
// create application
gto.server = function() {
    // do NOT access DOM from here; elements don't exist yet
	var sDiv = 'server-status';
    // private variables
		
    // private functions
 
    // public space
    return {
		// public properties, e.g. strings to translate
		
		// public methods
		init: function()
		{   
			Ext.QuickTips.init();			
			this.loadStatusTS();
		},
		
		loadStatusTS: function()
		{
			Ext.Updater.defaults.showLoadIndicator = false;
			Ext.get(sDiv).setStyle({opacity: .7});
			
			Ext.get(sDiv).load(
			{
				url: 'serverstatus.php',
				params:
				{
					status: 'ts'
				},
				scripts: false,
				scope: this,
				callback: function()
				{
					this.loadStatusTS.defer(30000, this);
				}
			});
			
			Ext.Updater.defaults.showLoadIndicator = true;
		}
	}
}(); // end of app
 
// end of file
