﻿var inc;
function counter()
{
	var cnt = 0;
	var flag = true;
	inc = function()
	{
		if(cnt == 0) flag=true;
		if(cnt ==-2600) flag = false;
		if(flag==false) return ++cnt;
		if(flag==true) return --cnt;
	}
}

counter();





//

window.setTimeout("moveimg()",500);
function miri_move()
{
	window.setInterval("test()",10);
}



//moveimg();
var test;
function moveimg()
{
	var move_i=document.getElementById("move");
	miri_move();
	//var style=getComputedStyle(move_i, '');
	//alert("komatta");
	test = function()
	{
	  //alert("moveimg");
	  move_i.setAttribute("style","left:"+inc()+"px;");
	  //alert(move_i.style.left);	
  }


	//i+=1;
	//window.alert(i);
}


