I played around with this some more and keeping the optional links is fairly easy too, so let's go with that. OK, add a new array (shown in red) to the carousel script (it will contain the large images in the same order as the carousel images, if you want to skip one, leave the empty quotes and the comma at the end of the line behind):
Code:
Car_Image_Sources=new Array(
"photo1.jpg","http://www.dynamicdrive.com",
"photo2.jpg","http://www.javascriptkit.com",
"photo3.jpg","", //this slide isn't linked
"photo4.jpg","http://www.codingforums.com" // NOTE No comma after last line
);
Car_Large_Sources=new Array(
"", //no large image for photo1.jpg in the above array
"photo6.jpg",
"photo7.jpg",
"photo8.jpg" // NOTE No comma after last line
);
/***************** DO NOT EDIT BELOW **********************************/
Next, find these lines in the script, and add the red one as shown:
Code:
CW_I[i].src=Car_Image_Sources[2*i];
CW_I[i].lnk=Car_Image_Sources[2*i+1];
CW_I[i].pic=Car_Large_Sources[i];
Find this line:
Code:
function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
Make it like this:
Code:
function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;if(this.pic){document.getElementById('picArea').src=this.pic}}
Finally, in your HTML where you have:
Code:
<td width="100%"><img id="picArea" src="images/aboutus.jpg" width="295" height="590"></td>
add in the id as shown in red.
Note: Unless all of your large images are the same dimensions, remove dimensions from the above image tag and set the dimensions of the td to the largest width and the largest height in the large image collection and add these two attributes:
Code:
<td valign="middle" align="center">
Depending upon the rest of your layout and the image sizes, that may or may not look good. Best to have all the large images be of the same dimensions and not worry about this last part.
Bookmarks