Hello all,

Am having a little bit of trouble trying to get a mouseover function working into an existing slideshow script.

The current slideshow script simply preloads then replaces images in the same placeholder. I'm trying to incorporate a mouseover function so that when the mouse is rolled over the original image, a mouseover image comes up.

Where it's currently falling down is that the slideshow script fails to re-initiate after the mouseover function has been implemented, and I get heaps of script errors.

Any help would be appreciated. Thanks.

<!-- Code below from http://members.aol.com/grassblad/html/slideshow.html-->

PHP Code:
<--------HTML code:---------->
<
body onLoad="slideit('slide','carImage',1)">

<
img src="../images/cars/ABelmont1.jpg" width="150"
        
height="100" name="slide1">  
<
img src="../images/cars/KEarnhardt1.jpg" width="150"
        
height="100" name="slide2">  
<
img src="../images/cars/JLabonte1.jpg" width="150"
        
height="100" name="slide3">

<--------
Javascript code:---------->

<
script language='javascript'>
<!-- 


var 
carImage1=new Image()
carImage1.src="../images/cars/ABelmont1.jpg"
var carImage2=new Image()
carImage2.src="../images/cars/ABelmont2.jpg"
var carImage3=new Image()
carImage3.src="../images/cars/KEarnhardt1.jpg"
var carImage4=new Image()
carImage4.src="../images/cars/KEarnhardt2.jpg"
var carImage5=new Image()
carImage5.src="../images/cars/JLabonte1.jpg"
var carImage6=new Image()
carImage6.src="../images/cars/JLabonte2.jpg"

function slideit(slideNamepicNamenumRollOvers)
{
   var 
lenName slideName.length;
   var 
imgNum numRollOvers;
   var 
0;

   if (
document.images)
   {
      
with (document.images)
      {
         for (
0lengthi++)
         {
            if (
document.images[i].name.substring(0,lenName) == slideName)
            {
              
j++;
              
srcObj = eval(slideName j) ;
              
srcObj.src = eval(picName imgNum +".src");
              
imgNum+=2;
            }
         }
         if (
numRollOvers 2numRollOvers++
         else 
numRollOvers 1;
      }
      
setTimeout("slideit('" slideName "','" picName "'," numRollOvers ")",1000);
   }
}
//-->