Stop slideshow onmouseover javascript
<p>This is the slideshow script, I want it to stop when mouse move over. But i dont know what to add on it. I've tried to look for it online, but all of them doesn't work:(</p>

<pre><code>&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!--
var dimages=new Array();
var numImages=2;
for (i=0; i&lt;numImages; i++)
{
dimages[i]=new Image();
dimages[i].src="/v/vspfiles/assets/images/image"+(i+1)+".jpg";
}
var curImage=-1;
function swapPicture()
{
if (document.images)
{
var nextImage=curImage+1;
if (nextImage&gt;=numImages)
nextImage=0;
if (dimages[nextImage] &amp;&amp; dimages[nextImage].complete)
{
var target=0;
if (document.images.myImage)
target=document.images.myImage;  
if (document.all &amp;&amp; document.getElementById("myImage"))
target=document.getElementById("myImage");

if (target)
{
target.src=dimages[nextImage].src;
curImage=nextImage;
}
setTimeout("swapPicture()", 4000);
}
else
{
setTimeout("swapPicture()", 1000);
}
setTimeout("swapPicture()", 4000);
//--&gt;
</code></pre>
