Ext.namespace('mm.base');
mm.base.construct = function(autoconstruct){
	this.eventbuffer = {};
	this.constructor = function()
	{
		
	};

	this.addEventListener = function(event, eventobject)
	{
		if (typeof eventobject == 'object' && typeof eventobject.fire == 'function')
		{
			if (typeof this.eventbuffer[event] != 'object' || typeof this.eventbuffer[event].length != 'number' || typeof this.eventbuffer[event].push != 'function')
			{
				this.eventbuffer[event] = [];
			}
			this.eventbuffer[event].push(eventobject);
		}
	};

	this.fireEvent = function(event, eventcontext)
	{
		if (typeof this.eventbuffer[event] != 'undefined')
		{
			var events = this.eventbuffer[event];
			for(var i=0; i<events.length; i++)
			{
				events[i].fire(eventcontext);
			}
		}
	};
};
mm.base.construct.prototype.domname = 'base';
mm.base.construct.prototype.namespace = mm.base;

mm.base.obj = new mm.base.construct(true);
