var first_picture = false;
var picture_array = new Array();
var picture_count = 0;

function addpicture(basepath, pictureurl) {
  // Add picture to array
  picture_array[picture_count++] = pictureurl; 

  // If this is the first call of this function, set current picture to first picture
  if(first_picture)
    return;

  first_picture = true;

  show(basepath, pictureurl);

}

function highlight(id) {
  for(var i = 0; i < picture_array.length; ++i) {
    document.getElementById(picture_array[i]).className = '';
  }

  document.getElementById(id).className = 'highlight';
}


function show(basepath, pictureurl) {
  highlight(pictureurl);
  document.getElementById('showpicture').src = basepath + pictureurl;
}


