/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Jay M. Rumsey, OD | http://www.nova.edu/~rumsey */

var num=0;

imgArray = [
  ['front.jpg','information', 'The Conspiracy of the birds 1/22'],
  ['photo1.jpg','interference','2/22'],
  ['photo2.jpg','message','3/22'],
  ['photo3.jpg','information', '4/22'],
  ['photo4.jpg','interference','5/22'],
  ['photo5.jpg','message','6/22'],
  ['photo6.jpg','information', '7/22'],
  ['photo7.jpg','interference','8/22'],
  ['photo8.jpg','message','9/22'],
  ['photo9.jpg','information', '10/22'],
  ['photo10.jpg','interference','11/22'],
  ['photo11.jpg','message','12/22'],
  ['photo12.jpg','information', '13/22'],
  ['photo13.jpg','interference','14/22'],
  ['photo14.jpg','message','15/22'],
  ['photo15.jpg','information', '16/22'],
  ['photo16.jpg','interference','17/22'],
  ['photo17.jpg','message','18/22'],
  ['photo18.jpg','information', 'Installation view 19/22'],
  ['photo19.jpg','interference','Installation view 20/22'],
  ['photo20.jpg','message','Installation view 21/22'],
  ['photo21.jpg','information', 'Installation view 22/22']
]

function slideshow(slide_num) {
  document.getElementById('warsaw').src=imgArray[slide_num][0];
  document.getElementById('warsaw').alt=imgArray[slide_num][1];
  document.getElementById('burns').innerHTML=imgArray[slide_num][2];
}

function slideshowUp() {
  num++;
  num = num % imgArray.length;
  slideshow(num);
}

function slideshowBack() {
  num--;
  if (num < 0) {num=imgArray.length-1;}
  num = num % imgArray.length;
  slideshow(num);
}
