var motion=function(element){
	this.element=document.getElementById(element);
	this.timer=null;
	this.current=null;
	this.lastUpdated = '2007-10-27';
}
motion.prototype={
	moveTo:function(finalX,finalY){
		if(this.timer)clearTimeout(this.timer);
		if(!this.element.style.left)this.element.style.left='0px';
		if(!this.element.style.top)this.element.style.top='0px';
		var posX=parseInt(this.element.style.left);
		var posY=parseInt(this.element.style.top);
		var elStyle=this.element.style;
		if(posX>finalX){
			var diffX=Math.ceil((posX-finalX)/10);
			elStyle.left=posX-diffX+'px';
		}
		if(posY>finalY){
			var diffY=Math.ceil((posY-finalY)/10);
			elStyle.top=posY-diffY+'px';
		}
		if(posX<finalX){
			var diffX=Math.ceil((finalX-posX)/10);
			elStyle.left=posX+diffX+'px';
		}
		if(posY<finalY){
			var diffY=Math.ceil((finalY-posY)/10);
			elStyle.top=posY+diffY+'px';
		}
		if(posX==finalX && posY==finalY){
			return;
		}else{
			var _this=this;
			this.timer=setTimeout(function(){_this.moveTo(finalX,finalY);},30);
		}
	}
}