I have this simple java script for a gallery. Here's the code:

<script type="text/javascript" language="javascript">
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
return false;
} else {
return true;

It sets up a nice gallery with thumbnails but no image displayed. I simply want to change it so that it loads one of the images of the gallery automatically whereas the user/viewer would see one of the images as soon as they arrive at the page.

So far, haven't been able to figure this out. It's probably easy for you guys. Does anyone know how to do this? I'd really appreciate it.