// JavaScript Document for image transitions
// The first image should be titled:   image_prefix + first_image_index
// Each image thereafter should follow sequentially

description_array = new Array();			// description array

// enter in the descriptions here in sequential order (as they are entered in image_transition.js)
description_array[0] = "<a href=\"events_tech_0607.htm#sou\">David E. Shaw</a>";
description_array[1] = "<a href=\"events_tech_0607.htm#barker\">David Barker</a>";
description_array[2] = "<a href=\"events_tech_0607.htm#lincoln\">Steve Lincoln</a>";

// Required configuration variables (modify to your environment)
var number_of_images = 3;			// total number of images to display
var image_width = 78;				// width of the image in pixels
var image_height = 95;				// height of the image in pixels
var image_link = 'images/index/';
var image_prefix = 'tech_';

// Optional variables to modify
var transition_delay = 3500;		// quantity in milliseconds
var first_image_index = 0;

// Other script variables
var current_image = 0;				// current image index, we start at the zeroth image
image_array = new Array();			// image array

// creating image array
for (i = 0; i < number_of_images; i++) {
	image_array[i] = new Image(image_width, image_height);
	image_array[i].src = image_link + image_prefix + i + '.jpg';
}

// animating
function animate_tech(image_id, label_id) {
	
	switchImage_tech(image_id, label_id);
	
	setTimeout("animate_tech(\'" + image_id + "\',\'" + label_id + "\')", transition_delay);
	
}

// image transition
function switchImage_tech(image_id, label_id) { 

	document.getElementById(image_id).src = image_array[current_image].src;
	document.getElementById(label_id).innerHTML = description_array[current_image];
	
	current_image++;
	   if(current_image == number_of_images) 
			current_image = 0; 
}