/* 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("brown_1", "skills_4", "acad_5", "summithike", "mountaintop_teaching", "white_mountains", "wallconstruct");
	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>Outdoor Education</strong><br><br>The Browne Center for Innovative Learning, UNH's world-class experiential education and training facility, sees thousands of clients a year and supports students' training, internships, and research.",
								"<strong>Outdoor Education</strong><br><br>Undergraduate Outdoor Education students have the opportunity to learn advanced rock climbing skills at world-class sites, such as Acadia National Park.",
								"<strong>Outdoor Education</strong><br><br>Our Outdoor Education program combines hands-on practical experience with academic preparation, for lifelong learning and career advancement.", 
								"<strong>Outdoor Education</strong><br><br>Undergraduate Outdoor Education students learn to lead trips among some of New England's classic peaks, like Mt. Moosilauke.",
								"<strong>Outdoor Education</strong><br><br>Rocky summits are a key part of the curriculum at UNH, where the line between academics and backcountry experiences is erased.",
								"<strong>Outdoor Education</strong><br><br>Outdoor Education students have the opportunity to travel to remote environments to learn mountaineering skills.",
								"<strong>Climbing Wall Construction Photos</strong><br><br>View photos from the recently completed construction of the new climbing wall in NH Hall.");
	
textToUse =randomPicsText[picNum];			
return textToUse; 
}

/* Background color of filler div.*/
	var fillerBkgnd = new Array("#669999", "#669999", "#669999", "#669999", "#669999", "#669999", "#669999");
						
/* Color of text in randomPicsText */
	var captionColor = new Array("#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff");
	
/* Color of links in randomPicsText */
	var captionLinks = new Array("#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff");

/* Color of hovers in randomPicsText */
	var captionHovers = new Array("#ffffff", "#ffffff", "#ffffff", "#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("http://www.brownecenter.com' target='_blank'",
								"undergrad_oe.html'",
								"oe_profiles_undergrad.html'",
								"undergrad_oe.html'",
								"programs_oe.html'",
								"programs_oe.html'",
								"http://www.flickr.com/photos/27843921@N08/sets/72157614292214814/show/' target='_blank'");
	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;
}
	


