
var x = 0; //Starting Location - left
var mv_interval = 80; //Move ??px every initialization
var tm_interval = 30;
var pic_id = 0; // init 0, from *1 to 5

function moveImage() {
	
	var mv_offset = 700*pic_id; 
	if (x>0) {
		var xx;
		xx=Math.round((x*x*0.01));
		if (xx>mv_interval) xx=mv_interval;
		if (xx<1) xx=1;
		x=x-xx;

		document.getElementById("movBoard").style.left = (x-mv_offset)+'px';    // move img

		//Keep on calling this function every ?? microsecond 
		//	till the target location is reached
		window.setTimeout('moveImage()',tm_interval);
	} else {
		pic_id = pic_id +1;
		if (pic_id>5) pic_id=1;
		x=700;
		window.setTimeout('moveImage()',7000);
	}
}

