/* 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 = 237;

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 seprate items.*/
		
	var randomPics = new Array("1_scotland","2_africa", "3_africa", "4_mapping", "5_hydro", "6_groundwater", "7_graduates07");
	imageDisplayed = randomPics[picNum];
	return imageDisplayed;
	}


	
/*place text within this array in the format in the example. Place them in the same order as the 
picture names in the above array. Captions must be surrounded in quotes and commas must seprate items.*/	
	
	
var randomPicsText = new Array('Civil Engineering students John Westover, Heather Newton, and Amy Conaty during their spring semester in Scotland',
							   'Civil Engineering Senior, Tim Corrigan (far right), travels with the UNH&rsquo;s Students Without Borders to Niger, Africa to implement a rope-and-washer pump operated by a camel to irrigate community-school gardens. For more information on Student life as a Civil Engineer, <a href=/civil-engineering/undergrad/life.html>click here</a>',
							   'Civil Engineering Senior, Tim Corrigan, travels with the UNH&rsquo;s Students Without Borders to Niger, Africa to implement a rope-and-washer pump operated by a camel to irrigate community-school gardens. For more information on Student life as a Civil Engineer, <a href=/civil-engineering/undergrad/life.html>click here.</a>',
							   'Students perform field mapping during a stream restoration course. For more information on courses offered through Civil and environmental Engineering <a href=/civil-engineering/undergrad/courses.html>click here</a>',
							   'Students at a lecture and field exercise in a course on hydrologic monitoring. For more information on courses offered through Civil and environmental Engineering <a href=/civil-engineering/undergrad/courses.html>click here</a>',
							   'Students field verify groundwater discharges mapped from remote sensing. For more information on research conducted in the department <a href=/civil-engineering/research/>click here</a>',
							   'Class of 2007 Civil Engineering Graduates and Faculty. For more information on the Civil Engineering Undergraduate Program, <a href="/civil-engineering/news/class-of-07.html">click here</a>');






function picsText(picNum){
	textToUse =randomPicsText[picNum];			
return textToUse; 
}



/*  Make No Other Changes   */	

function getPicNum(){	
			var numItems = randomPicsText.length;
			var picNum = Math.floor(Math.random()*numItems) + 0;
			
			if(picNum >= numItems){
				picNum = 0;
				}
return picNum;
}
	


