/* 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 = 333;

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("jones-orrin","mauck-trevor","barbour-ashley","joseph-liz");
	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("<strong>Orrin Jones, '09</strong><br />With an Undergraduate Research Award (URA), wildlife management major Orrin Jones investigated the winter distribution of wild turkeys surrounding Pease International Tradeport in Portsmouth, NH.",
								
								"<strong>Trevor Mauck, '08</strong><br />Morocco: Transition from an Islamic Monarchy to a Democratic Islamic Nation<br />Funding: SURF<br />Trevor Mauck, a senior pursuing a dual major in political science and philosophy, went to Morocco over the summer to research the country's transition from an Islamic monarchy to a democratic nation.",
								
								"<strong>Ashley Barbour, '08</strong><br />With funding from the International Research Opportunities Program (IROP), nursing major Ashley Barbour traveled to the Ashanti region of Ghana to explore midwifery's grass roots and learn about midwives' experiences in the developing world.",
								
								"<strong>Liz Joseph, '08</strong><br />With a Summer Undergraduate Research Fellowship (SURF), Liz Joseph observed communal living at the New Meadow Run Bruderhof Community in Pennsylvania and wrote eight stories, each one illustrating the central values she observed during her time researching there.");

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;
}
	


