/* 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 = 481;
	var imgHeight = 224;

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("7", "9", "10", "19");
	imageDisplayed = randomPics[picNum];
	return imageDisplayed;
	}

function picsText(picNum){
	
/*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>Athletic Training: Health Care for Life and Sport</strong><br>The Athletic Training Major of the University of New Hampshire, College of Health and Human Services, Department of Kinesiology has a threefold mission consistent with the overall mission of the University which encompass the scholarly functions of teaching, research, and public service.",
							   "<strong>Athletic Training: Health Care for Life and Sport</strong><br>The Athletic Training Major of the University of New Hampshire, College of Health and Human Services, Department of Kinesiology has a threefold mission consistent with the overall mission of the University which encompass the scholarly functions of teaching, research, and public service.",
							   "<strong>Athletic Training: Health Care for Life and Sport</strong><br>The Athletic Training Major of the University of New Hampshire, College of Health and Human Services, Department of Kinesiology has a threefold mission consistent with the overall mission of the University which encompass the scholarly functions of teaching, research, and public service.",
							   "<strong>Athletic Training: Health Care for Life and Sport</strong><br>The Athletic Training Major of the University of New Hampshire, College of Health and Human Services, Department of Kinesiology has a threefold mission consistent with the overall mission of the University which encompass the scholarly functions of teaching, research, and public service.");
	
textToUse =randomPicsText[picNum];			
return textToUse; 
}

/* Background color of filler div.*/
	var fillerBkgnd = new Array("#669999", "#669999", "#669999", "#669999");
						
/* Color of text in randomPicsText */
	var captionColor = new Array("#ffffff", "#ffffff", "#ffffff", "#ffffff");
	
/* Color of links in randomPicsText */
	var captionLinks = new Array("#ffffff", "#ffffff", "#ffffff", "#ffffff");

/* Color of hovers in randomPicsText */
	var captionHovers = new Array("#ffffff", "#ffffff", "#ffffff", "#ffffff");

function picsLink(picNum){
	
/*place link within this array in the format in the example. Place them in the same order as the 
picture names in the above array. Links must be surrounded in quotes and commas must separate items.*/	
	
	
var randomPicsLink = new Array("none",
							   "none",
							   "none",
							   "none");
	linkToUse =randomPicsLink[picNum];			
	return linkToUse; 
}


/*  Make No Other Changes   */	

function getPicNum(){	
			var numItems = captionColor.length;
			var picNum = Math.floor(Math.random()*numItems) + 0;
			
			if(picNum >= numItems){
				picNum = 0;
				}
return picNum;
}
	


