var myEngine=function () {
	var self=this;
	this.handlers		=	[];
	this.addEventHandler=	function (type,func) {
		if(typeof this.handlers[type]!="object")
			this.handlers[type]=[];
		this.handlers[type].push(func);
	}
	this.delEventHandler = function(type,func) {
		if(typeof this.handlers[type]!="object")
			return true;
		for(i in this.handlers[type])
			if(this.handlers[type][i]==func)
				delete this.handlers[type][i];
		return true;
	} 
	this.onEventHandler = function (e) {
		if(!e)
			var e=window.event;
		var type="on"+e.type;
		if(typeof self.handlers[type]!="object")
			return true;
		var arr=[];
		for(i in self.handlers[type]) {
			if(typeof self.handlers[type][i]=="function") {
					self.handlers[type][i](e);
			}
		}
	return true;
	}
	this.onresize=function(e) {};
}

var Engine=new myEngine();
window.onresize=Engine.onEventHandler;
Engine.addEventHandler("onresize",Engine.onresize);
