
window.onload = init;

function init() {
  // Init for the info box, top right
  infoInit();

  imageEls = document.getElementsByTagName("img");

  for (var i=0; i<imageEls.length; i++) {
    if (imageEls[i].className == 'imageThumb') imageEls[i].onclick = showFullPicture;
  }
}


function showFullPicture(e) {
  // Make sure we have the event (for IE)
  if (!e) var e = window.event;

  // What element was changed?
  if (e.target) targ = e.target;
  else if (e.srcElement) targ = e.srcElement;

  // Defeat Safari bug
  if (targ.nodeType == 3) targ = targ.parentNode;

  // Picture path
  $picture = targ.id;
  // Picture Description
  $description = targ.title;

  // Do our thing
  fp = document.getElementById("fullPicture")
  fp.innerHTML = "<img src=\""+ $picture +"\">";
  fpd = document.getElementById("fullPictureDesc")
  fpd.innerHTML = $description;
}

