javascript not working on second page
<p>I am implementing a image rotator on one of my pages, however I would like to re use the code on two other pages as well. I would also like each page to rotate images in different a order to other pages. I thought this was covered by declaring different arrays and calling them with unique ids.</p>

<p>The code is as follows</p>

<pre><code> var ImageArr1 = new Array("/assets/function.jpg","assets/takeaway.jpg","/assets  /delivery.jpg");
 var ImageHolder1 = document.getElementById('Rotating1');


 var ImageArr2 = new Array("/assets/takeaway.jpg","/assets/function.jpg","/assets/delivery.jpg");
 var ImageHolder2 = document.getElementById('Rotating2');

  function RotateImages(whichHolder,Start)
  {
  var a = eval("ImageArr"+whichHolder);
   var b = eval("ImageHolder"+whichHolder);
  if(Start&gt;=a.length)
  Start=0;
  b.src = a[Start];
  window.setTimeout("RotateImages("+whichHolder+","+(Start+1)+")",3000);
  }

  RotateImages(1,0);
  RotateImages(2,0);
</code></pre>

<p>And my HTML is as follows-Page1</p>

<pre><code>&lt;img src="/assets/function.jpg" name="Rotating" id="Rotating1" width="260" height="180" alt=""&gt;
</code></pre>

<p>Page 2</p>

<pre><code>&lt;img src="/assets/takeaway.jpg" name="Rotating" id="Rotating2" width="260" height="180" alt=""&gt;
</code></pre>

<p>I am slowly learning Javascript but this has got me stumped</p>

<p>Any help appreciated</p>
