function imageClick(index) {

  var image;

  select = document.getElementById(index);
  image  = document.getElementById('viewer');
  title  = document.getElementById('image-title');

  // show the selected image in the image viewer
  image.src = select.src;
  title.innerHTML = select.title;
  image.title = select.title;
}
