/* JavaScript Document

Developed by: 
	Web Solutions
	April 2004
For:
	Rotating the image, caption, caption color and background color on the unh homepage.
Rights:
	May be used, modified, re-distributed freely dependant that alterations of the manner in which the code behaves
	is well documented to maintain ease of use.
*/

/* Enter width and height, respectively, for image being rotated */	
	var imgWidth = 300;
	var imgHeight = 250;

function imageToUse(picNum){			
/*The following code is where you name your images. .jpg will be automatically appended
so it is only necessary to use the file's name. Image names must be surrounded in quotes and commas must separate items.*/
		
	var randomPics = new Array("01", "02", "03", "04", "05", "06", "08", "09", "10", "11");
	imageDisplayed = randomPics[picNum];
	return imageDisplayed;
	}
	
	
	
function captionToUse(picNum) {
	var randomCaptions = new Array(
					"McNair scholar Imani Lugalla (UNH '10) at The Art Institute of Chicago.",
					"McNair scholars Uyen-Mai Doan (UNH '10), Jessica Myers (Bradley '09), and Stephen Morgan (UNH '09) during the 2008 summer session orientation.",
					"2008 McNair Summer Fellows",
					"McNair alumna Gaelle Gourgues (UNH '03) and senior Leolene Jean (UNH '08) at the 2007 UNH Undergraduate Research Conference.",
					"McNair scholar Adam Hernandez (UNH '08) at the 2007 Senior Retreat.",
					"McNair scholars at the 2007 Senior Retreat in Durham, NH.",
					"McNair scholars and staff at the 2008 Senior Retreat at the Hickory Pond Inn in Durham, NH",
					"McNair seniors Adam Hernandez (UNH '08) and Eman Akam (UNH '08) utilizing the McNair computer lab and resource room.",
					"McNair scholars Stephen Morgan (UNH '09), Grace Rivera (Westfield '09), and Hayley Haywood (Clark '09) at the 2008 National McNair Conference in Delevan, WI with Carl S. McNair, brother of the program's namesake, Dr. Ronald E. McNair.",
					"UNH students at the 2009 McNair Commemorative Celebration and Research Symposium at the University of North Carolina Agricultural and Technical State University. Attending were Ethan Archundia ('12), JeRome Wilkins ('12), Amadin Osagiede ('11), and Calvin Vaillancourt ('10). Participants are standing next to the bronze bust of program namesake Dr. Ronald E. McNair."
					);
	captionDisplayed = randomCaptions[picNum];
	return captionDisplayed;
	
}

// same as the array above... 
randomPics = new Array("01", "02", "03", "04", "05", "06", "08", "09", "10", "11"); 



/*  Make No Other Changes   */	

function getPicNum(){	
			var numItems = randomPics.length;
			var picNum = Math.floor(Math.random()*numItems) + 0;
			
			if(picNum >= numItems){
				picNum = 0;
				}
return picNum;
}
	


