
	var fulldecompress = false;

	function ExtStack () {
		var stack = new Array();
				
		this.push = function (fn) {
			if (stack.indexOf(fn)==-1)
				stack.push(fn);
		};
		
		this.callAll = function() {
			for (var i=0;i<stack.length;i++)
				stack[i].call();	
		};
	};
	
	function EventMessager () {
		var names = [];
		var fn = [];
		var p = [];
		var sc = [];
		var un = [];
		this.register = function(id,callback,scope,param) {
			names.push(id);
			fn.push(callback)
			p.push(param);
			sc.push(scope);
			un.push(false);
		};
		this.unregister = function(id) {
			if (names.indexOf(id)!==-1)
				un[names.indexOf(id)]=true;
		};
		this.reregister = function(id) {
			if (name.indexOf(id)!==-1)
				un[name.indexOf(id)]=false;
		};
		this.call = function(id,param) {
			if (names.indexOf(id)!==-1)
				if (!un[names.indexOf(id)])
					fn[names.indexOf(id)].apply(sc[names.indexOf(id)],param||p[names.indexOf(id)]);
		};
	};
	
	var eventmessager = new EventMessager();
	var stack = new ExtStack();
	var run = function() {
		if (fulldecompress)
			stack.callAll();	
		else
			window.setTimeout(function() { run(); },100);
	}
	Ext.onReady(function(){run();});

