// JavaScript Document
// to add or remove images from the PicTextArray list beloe:
//	1. copy/paste the last line to the end (make sure to place it inside the closing paren)
//  2. add a comma at the end of the last line you just copied (will now be the second to last line in the list)
//  3. change the first value to the relative location of the new picture being added
//  4. change the second value to the name of the picture (1st caption line)
//  5. change the third value to the name of the university (2nd camption line)
//
//  for example:
//	...
//	new Array("images/frame_UA.jpg", "Denny Chimes", "The University of Alabama"),
//	new Array("images/frame_pic3.jpg", "Test Name 3", "Some University 3"), <------ don't forget to add a comma
//	new Array("images/newimagename.jpg", "New Caption", "New Univeristy Name") <---- update the new line values as listed in steps 3, 4, & 5 above
//  );  <---- be sure the new line is added above the closing paren
//  ...
//
var PicTextArray = new Array(
	new Array("images/frame_AU.jpg", "Samford Hall", "Auburn University"),
	new Array("images/frame_Vandy.jpg", "Bicentennial Oak", "Vanderbilt University"),
	new Array("images/frame_AR.jpg", "Senior Walk", "Univeristy of Arkansas"),
	new Array("images/frame_UA.jpg", "Denny Chimes", "The University of Alabama"),
	new Array("images/frame_FL.jpg", "Century Tower", "University of Florida"),
	new Array("images/frame_KY.jpg", "Memorial Hall", "University of Kentucky"),
	new Array("images/frame_KY_2.jpg", "Memorial Colliseum", "University of Kentucky"),
	new Array("images/frame_MS.jpg", "MSU Chapel", "Mississippi State University"),
	new Array("images/frame_MS_2.jpg", "Cafeteria", "Mississippi State University"),
	new Array("images/frame_MS_3.jpg", "Lee Hall", "Mississippi State University"),
	new Array("images/frame_SC.jpg", "McKissick Museum", "University of South Carolina"),
	new Array("images/frame_SC_2.jpg", "Williams Brice Stadium", "University of South Carolina"),
	new Array("images/frame_SC_3.jpg", "Maxcy Monument", "University of South Carolina")
	);
//alert ( PicTextArray[0][0] + "\n" + PicTextArray[0][1] + "\n" + PicTextArray[0][2]);
var currentIndex = -1;

function changePicture(picImageName, picTextDiv){
	///pause a little to make sure the page elements are loaded.
	for ( i=0; i<300; i++ ){}
	var nextIndex = currentIndex;
	while ( nextIndex == currentIndex ) {
		nextIndex = Math.floor(Math.random() * (PicTextArray.length));	
	}
	var picImage = document.getElementById(picImageName);
	var picTextDiv = document.getElementById(picTextDiv);
	picImage.src = PicTextArray[nextIndex][0];
	picTextDiv.innerHTML = PicTextArray[nextIndex][1] + "<br />" + PicTextArray[nextIndex][2];
	currentIndex = nextIndex;
	/// pause a little to let the picture load
	for ( i=0; i<300; i++ ){}
	if (picImage.style.visibility != "visible") { picImage.style.visibility = "visible" };
	if (picTextDiv.style.visibility != "visible") { picTextDiv.style.visibility = "visible" };
}