
var thisImg=0;

  function rotate()
     {
     d = document.getElementById(element);
	 d.href = theLinks[thisImg];
	 
     document.getElementById(elementImg).src = theImages[thisImg];

     thisImg = thisImg+1;
	 setTimeout("rotate()", interval*1000);
     if(thisImg == (theImages.length))
		{ thisImg=0; }
  	}

function startRotate()
	{
	rotate();
	}

