I'm trying to modify some JavaScript. Right now, you click on a thumbnail of an
image and a larger version of the image appears in a larger box to the right.

I would like to change the thumbnail to text, so clicking on the text will
change the image in the box.

The html looks like this:

<a href="javascript:swapPhoto('clay_tile1.jpg','Spani sh style clay
tile')"><img src="pictures/clay_tile1_53x40.jpg" width="100" height="40"
border="0" />

The JavaScript looks like this:

// swap image and caption

function swapPhoto(photoSRC,theCaption,thePrice) {

var displayedCaption = document.getElementById("caption");

displayedCaption.firstChild.nodeValue = theCaption;

document.images.imgPhoto.src = "pictures/" + photoSRC;
}

Here's an example of a page I built using the thumbnails:

[url]http://www.connoisseurslateandtile.com/gallery.html[/url]

I'm trying to learn some JavaScript, but my eyes keep glazing over.

Thank you for your help,

Denny:A :confused;