I have a photo page that swaps out images when a thumbnail is clicked. The
javascript is in an external file and reads as follows:

function showPhoto (whichPhoto) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichPhoto.href;
if (whichPhoto.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichPhoto.title;
}
else {
document.getElementById('desc').childNodes[0].nodeValue =
whichPhoto.childNodes[0].nodeValue;
}
return false;
}
else {
return true;
}
}