Posts: 275
Name: Mark Stegeman
Location: Netherlands, Europe
|
Make an array containing all the descriptions and an array containing all the image src's, like so:
var src = new Array('image1.jpg','image2.jpg','image3.jpg' etc...);
var desc = new Array('image 1','image 2','image 3' etc...);
Then change your swap function to this:
function swapPhoto(ID){
document.images.imgPhoto.src = src[ID];
document.images.description.innerHTML = desc[ID];
scrollTo(0,0);
}
and the link:
<a href="javascript:swapPhoto(1)"><img src="small.jpg" /></a>
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
|