/* JavaScript Document

Developed by: 
	Web Solutions
	September 2007
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 = 290;
	var imgHeight = 218;


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("01", "02", "03", "04", "05", "06", "07", "08", "09");
	imageDisplayed = randomPics[picNum];
	return imageDisplayed;
			
}

/*  
	!! IMPORTANT !!
	IF YOU ADD OR DELETE PHOTOS IN THE ROTATE 
	MAKE SURE YOU CHANGE THE numItems NUMBER
	BELOW. 
	IT SHOULD BE ONE LESS THAN THE NUMBER OF 
	PHOTOS YOU ACTUALLY HAVE IN THE randomPics 
	ARRAY. FOR EXAMPLE, IF YOU HAVE 11 PICTURES, 
	THEN numItems = 10. 
	
*/

function getPicNum(){	
			var numItems = 8;
			var picNum = Math.floor(Math.random()*numItems) + 0;
			
			if(picNum >= numItems){
				picNum = 0;
				}
return picNum;
}


