// WORKSHOP SLIDESHOW
// preload
var preloaded = new Array();
function preload_images() {
    for (var i = 0; i < arguments.length; i++){
        preloaded[i] = document.createElement('img');
        preloaded[i].setAttribute('src',arguments[i]);
    };
};
preload_images(
    '/images/history/workshop1.jpg',
	'/images/history/workshop1.jpg',
	'/images/history/workshop1.jpg',
	'/images/history/workshop1.jpg',
	'/images/history/workshop1.jpg',
	'/images/history/prototype1.jpg',
	'/images/history/prototype2.jpg',
	'/images/history/prototype3.jpg',
	'/images/history/prototype4.jpg',
	'/images/history/prototype5.jpg',
	'/images/history/prototype6.jpg'
);

// begin slideshow script
self.name = "wgallery"

var photos=new Array()
var which=0

/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
photos[0]="/images/history/workshop1.jpg"
photos[1]="/images/history/workshop2.jpg"
photos[2]="/images/history/workshop3.jpg"
photos[3]="/images/history/workshop4.jpg"
photos[4]="/images/history/workshop5.jpg"

function backward(){
	if ((which>0) && (which<5)){
		which--
		document.getElementById('workshopImage').src=photos[which]
		}
	}

function forward(){
	if (which<photos.length-1){
		which++
		document.getElementById('workshopImage').src=photos[which]
		}
	}
	

///////////////////////
// PROTOTYPE SLIDESHOW
///////////////////////
self.name = "p_gallery"

var p_photos=new Array()
var p_which=0

p_photos[0]="/images/history/prototype1.jpg"
p_photos[1]="/images/history/prototype2.jpg"
p_photos[2]="/images/history/prototype3.jpg"
p_photos[3]="/images/history/prototype4.jpg"
p_photos[4]="/images/history/prototype5.jpg"
p_photos[5]="/images/history/prototype6.jpg"

function prev(){
	if (p_which>0){
		p_which--
		document.getElementById('prototypeImage').src=p_photos[p_which]
		}
	}

function next(){
	if (p_which<p_photos.length-1){
		p_which++
		document.getElementById('prototypeImage').src=p_photos[p_which]
		}
	}