/* 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 = [
  ['images/trujopg1-sm.gif','Page one of four','Page one of four'],
  ['images/trujopg2-sm.gif','Page two of four','Page two of four'],
  ['images/trujopg3-sm.gif','Page three of four','Page three of four'],
	['images/trujopg4-sm.gif','Page four of four','Page four of four']
]

function slideshow(slide_num) {
 
document.getElementById('trujopages').src=imgArray[slide_num][0];
document.getElementById('trujopages').alt=imgArray[slide_num][1];
document.getElementById('subtitle').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);
}
