/* 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 = 250;
	var imgHeight = 188;

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("fsae","w1","asme","camel");
	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("A student team designs, builds and competes with mini-Formula-1 racing cars. <a href=undergrad_students.html#formula>Learn more</a>.",
								"North Atlantic Right Whale Mandible Project (A Tech 797 &ndash; Undergraduate Ocean Research Senior Project). <a href=undergrad_tech797.html> Learn More </a>",
								"All students are encouraged to join the American Society of Mechanical Engineers (ASME) as student members and to upgrade their status to full membership upon graduation. <a href=undergrad_students.html#asme>Learn more</a>.",
								"Several of our students are actively involved in the Students without Borders organization. <a href=undergrad_students.html#borders>Learn more</a>."
								);

function picsText(picNum){
	textToUse =randomPicsText[picNum];			
return textToUse; 
}


/* Color of text in randomPicsText */
	var captionColor = new Array("#006", "#006", "#006", "#006", "#006");
	
/* Color of links in randomPicsText */
	var captionLinks = new Array("#006", "#006", "#006", "#006", "#006");

/* Color of hovers in randomPicsText */
	var captionHovers = new Array("#7373AB", "#7373AB", "#7373AB", "#7373AB", "#7373AB");




/*  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;
}
	


