mLeft = 0;
mWidth = 4373;
salt = 2;
saltX = 0;
speed = 50;
directionX = 1;
num = 0;
x = 0;
y = 0;
init = 0;

function initemps()
{  if (init == 0)
 	 {  
 	 	   setInterval('temps();', speed);
 	 	   init = 1;
	 }
}

function posic()
{ initemps();
	x = event.clientX;
  y = event.clientY;
  if (x < ((screen.width / 2) - 50)) { directionX = -1; }
  if (x > ((screen.width / 2) + 50)) { directionX = 1; }   
}

function temps()
{
  if (foto1.complete)
  {  mLeft+=saltX;
     if (saltX*directionX < salt) saltX+=(.1*directionX);
     if (mLeft < 0) mLeft += mWidth;
     if (mLeft > mWidth) mLeft -= mWidth;
     foto1.style.left = -mLeft;
 //    window.status='('+foto1.style.left+','+saltX+')'; 
  }  
}