
function viewPhoto(index) {
  $('photo-album').hide();
  $('photo-container').show();
  $('big-photo').src = 'photo.php5?id=' + photos[index];
  currentPhoto = index;
}

function showPhotoAlbum() {
  $('photo-album').show();
  $('photo-container').hide();
}

function previousPhoto() {
  if (currentPhoto == 0) {
    return;
  } else {
    viewPhoto(currentPhoto - 1);
  }

}

function nextPhoto() {
  if ((currentPhoto + 2) == photos.length ) {
    return;
  } else {
    viewPhoto(currentPhoto + 1);
  }
}
