We then increment or decrement the array depending upon which direction is clicked by using gallery_index++. The reverse of that is gallery_index--;
All we have to do then is just condition out the directions based on an argument and the galleryArray.length and we are good to go.
The final thing to look at as far as this part of the tutorial goes is the start_up case
case "start_up":
ajaxManager('hide_access');
ajaxManager('array_setup');
ajaxManager('load_page', galleryArray[gallery_index],
'galleryLYR');
ajaxManager('load_page',
descriptionArray[description_index],
'captionLYR');
break;