function animatorObj() {
	this.id = animatorObj.objects.length;
	animatorObj.objects[this.id] = this;
	this.allAnimations = [];
	this.animCount = 0;
	this.endCmds = [];
	this.addAnimation = function(obj,fromX,fromY,toX,toY,steps,delay,loop,cmd) {
		if(arguments.length < 5 || !obj.isLayer) return;
		this.animCount++;
		var a;
		var isDelay = false;
		for(var i = 0; i < this.allAnimations.length; i++) {
			if(this.allAnimations[i][0].delay == delay) {
				a = this.allAnimations[i][this.allAnimations[i].length] = {};
				isDelay = true;
				break;
			}
		}
		if(!isDelay) {
			var idx = this.allAnimations.length;
			this.allAnimations[idx] = [];
			a = this.allAnimations[idx][0] = {};
		}
		a.obj = obj;
		a.pathX = [];
		a.pathY = [];
		a.steps = steps||steps>1||2;
		a.delay = delay||0;
		a.loop = loop||1;
		a.cmd = cmd||null;
		a.currentStep = 1;
		a.isDone = false;
		var stepX = (toX - fromX) / steps;
		var stepY = (toY - fromY) / steps;
		var pi = Math.PI;
		for(var i = 0; i < steps; i++) {
			a.pathX[i] = Math.round(fromX+0.5*steps*(1-Math.cos((i+1)*pi/steps))*stepX);
			a.pathY[i] = Math.round(fromY+0.5*steps*(1-Math.cos((i+1)*pi/steps))*stepY);
		}
	}
	this.addCmd = function(cmd) { this.endCmds[this.endCmds.length] = cmd }
	this.start = function() {
		for(var i = 0; i < this.allAnimations.length; i++) {
			this.allAnimations[i].timerID = setInterval('animatorObj.objects['+this.id+'].doAnimation('+i+')',this.allAnimations[i][0].delay);
			this.allAnimations[i].animationsCount = this.allAnimations[i].length;
			this.allAnimations[i].isDone = false;
		}
	}//start
	this.doAnimation = function(i) {
		for(var j = 0; j < this.allAnimations[i].length; j++) {
			var a = this.allAnimations[i][j];
			if(!a.isDone) {
				a.obj.moveTo(a.pathX[a.currentStep-1],a.pathY[a.currentStep-1]);
				if(++a.currentStep > a.steps) {
					a.currentStep = 1;
					if(!--a.loop) {
						a.isDone = true;
						if(a.cmd) eval(a.cmd);
						if(!--this.allAnimations[i].animationsCount) {
							clearInterval(this.allAnimations[i].timerID);
							this.allAnimations[i].isDone = true;
						}
						if(!--this.animCount) if(is.ie) setTimeout('animatorObj.objects['+this.id+'].exeEndCmds()',a.delay); else this.exeEndCmds();
					}
				}
			}
		}//for
	}
	this.stop = function() {
		for(var i = 0; i < this.allAnimations.length; i++) if(!this.allAnimations[i].isDone) clearInterval(this.allAnimations[i].timerID);
		this.exeEndCmds();
	}
	this.exeEndCmds = function() { for(var j = 0; j < this.endCmds.length; j++) if(this.endCmds[j]) eval(this.endCmds[j]); this.endCmds = [] }
	return this;
}//animatorObj
animatorObj.objects = [];