/* 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("homeimage01","homeimage2","homeimage3","homeimage4","homeimage5","homeimage6","homeimage7","homeimage8");
	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("Shi Bin Zheng '09 in front of three statues of Chinese gods representing longevity, good fortune and exuberance respectively",
							   "Nathan Janssen '09 at Parque Guell in Spain",
							   "Panagiotis 'Peter' Hondros '09 overlooking the beauty of Santorini, Greece",
							   "Agnieszka Gloskowski '09 in Teotihuacan, Mexico",
							   "Julia Faller '09 hugging one of the columns of one of the ancient Greek temples in Agrigento, Sicily",
							   "Katie Conrad '09 with a tame squirrel monkey in the city of Coca, Ecuador",
							   "Richard Barney (in red jacket) with kids from Casa Del Nino near Buenos Aires, Argentina",
							   "Marisa Baptiste '09 hugging an icicle in the Partnachklamm Gorge"
								);

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;
}
	


