speed up img loading
<p>I have an array of images which pre-load and I have nine img tags on my page.
I want to randomly replace and scramble the nine imgs with images from the array when i hover over a button.
this all works but, it runs slowly, the imgs re-load the src. how do i  </p>

<pre><code>var arrayImg = new Array();

arrayImg[0] = new Image();

&lt;img id="img0" &gt;
</code></pre>

<p>then do:</p>

<pre><code>document.getElementbyID("img0").src = arrayImg[random_ndx].src;
</code></pre>

<p>there are 9 images.</p>

<p>I am running ie8 on a new fast pc but there is a very noticeable lag in the images changing. So, my question; how do I assign a cached image (arrayImg[random_ndx]) directly to an element () on the page?</p>
