    function doMove() {
	 a = a + 2;
     document.getElementById('sponsor_rotate').style.backgroundPosition = 'center ' + a + 'px';
     
	 if(a > 200) { initAnimation(); currentid++; return; } 
	  setTimeout(doMove,50); // call doMove() in 20 msec
    }
	
	function moveIn() {
	 a = a + 2;
          document.getElementById('sponsor_rotate').style.backgroundPosition = 'center ' + a + 'px';     
	 if(a > (100 - (wh /2 ))) { waitNext(); currentid++; return; } 
	  setTimeout(moveIn,50); // call doMove() in 20 msec
	}
	
	function waitNext() {
	setTimeout(doMove,10000);
	}
	
	function initAnimation() {
	if(sponsors[currentid] == "" || !sponsors[currentid]) { currentid = 0; }
	sponsorurl = "sponsors";
  if(sponsor_id[currentid] < 10) sponsorurl += '0';
  sponsorurl += sponsor_id[currentid]+".html";
	
	wh = sponsor_h[currentid] / (sponsor_w[currentid] / 200);
	a = -1 * wh;
		
	document.getElementById('sponsor_rotate').style.backgroundImage = 'url(thumb_sponsor.php?src=images/benefactors/'+sponsors[currentid]+'&f=0)';
	document.getElementById('sponsor_rotate').style.backgroundPosition = 'center -200px';
	moveIn();
	}
	
	function sponsorGo() {
	location.href=sponsorurl;
	}

