function MapAnim(settings) {
	this.interval = typeof settings.interval == "undefined" ? 1000 : settings.interval;	
	this.animTime = typeof settings.animTime == "undefined" ? 800 : settings.animTime;	
	this.currY = this.getY();
	
	var myself = this;
	this.timer = setTimeout(
		function(){myself.move.call(myself);},
			this.interval);			
	
	this.xStartPoint = this.getX;
	this.yStartPoint = xOffsetTop('mapSection');
	if (xIE4Up) this.yStartPoint += 2;
	
}

MapAnim.prototype = {
	move: function() {	
				
		var myself = this;			    	
		
		var y = this.getY();
		if (y < this.yStartPoint) y = this.yStartPoint;
		
		var attributes = {
		    points: { to: [this.getX(), y] }
		};
		
		var anim = new YAHOO.util.Motion('mapSection', attributes, this.animTime/1000);
		
		/*  this check is performed to avoid map "twitching" in IE */
		
		if (xGetElementById("mapMotionFlag")) {
			if (this.yCurrPoint != y  && xGetElementById("mapMotionFlag").value == "Y"){			
				anim.animate();		
				this.yCurrPoint = y;
			}
		}
		
		this.timer = setTimeout(
			function(){myself.move.call(myself);},
			this.interval);
	},
	
	getX: function() {				
		 var x = xOffsetLeft('mapSection');
		 if (xIE4Up) x += 2; 
		 return x;
	},
	
	getY: function() {
		var y = this.yStartPoint + document.documentElement.scrollTop;
		if (y < (xClientHeight()-80)) y = this.yStartPoint;
		else y = document.documentElement.scrollTop + 10;
		return y;	
	}
}
