var currentImageId = null;

function showPic (picSource, picWidth, picHeight, thumbId, startID) {
  if (document.getElementById)
    {
    var largeImage = document.getElementById('defaultPic');
    //set the image
    largeImage.src = picSource;
    largeImage.width = picWidth;
    largeImage.height = picHeight;

    //hide the thumbnail
    var divId = 'thumb_' + thumbId;
    var thumbnail = document.getElementById(divId);
    thumbnail.style.display = "none";

    //show the thumbnail of the image we're swapping out
    if (this.currentImageID == null)
    {
      divId = 'thumb_' + startID;
    }
    else
    {
      divId = 'thumb_' + this.currentImageID;
    }

    this.currentImageID = thumbId;
    thumbnail = document.getElementById(divId);
    thumbnail.style.display = "";

    return false;
  } else {
    return true;
  }
}
