/* 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 = 523;
	var imgHeight = 250;

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.*/
	7
	var randomPics = new Array("new_1","new_16","new_3","new_4", "new_5", "new_6","new_7","new_8","new_19","new_10","new_13","new_14","new_15","new_17","new_18");
	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("Robert Coggon graduated with a MS degree in Chemical Engineering in September 2006. His research was on Transesterification of trolein by solid catalysts.",																																				
							   
							   "Meaghan Maher, undergraduate chemical engineering student, working on microvascular blood flow experiment with Dr. Russell Carr. <a href='russell_carr.htm' target='_blank'>Learn more</a>",
							
							   "Eric Beauregard, who graduated in May 2006, did research with Professor Niva Gupta on Surfactant and Elastic Effects in Microfluidic Devices. <a href='http://pubpages.unh.edu/~ngupta#RESEARCH' target='_blank'>Learn more</a>",
							   
							   "Distillation experiment in the unit operations laboratory.",
							   
							   "A view of the Unit Operations Laboratory in the new Kingsbury building.",
							   
							   "Welcome to the Department of Chemical Engineering!",
							   
							   "The annual faculty and students softball game.",
							   "Stephanie Grainger presenting her project at the Annual UNH Undergraduate Research Conference (URC), April 2007.",
							   "Carlo LaScala, undergraduate student and Wenxin Du, graduate student, working on synthesis of Pt-based nanoparticles as fuel cell catalyst in Dr. Xiaowei Teng's laboratory.",
							   "Thad Webster measuring light intensity in a UNH dorm. Thad was taking ChE 410, Energy and Environment. He did Energy Audit of one of UNH dorms to check if the dorm qualifies for the US EPA ENERGY STAR label.",
							   "Vassili Vorotnikov, Senior, received an IROP award to do research at the Institute of Catalysis in Madrid, Spain, this summer. Vasya, who is also the recipient of a prestigious Goldwater Scholarship and a Rieser Foundation grant, is an avid rock climber as seen in the photo taken in Mallorca.",
							   "ChE/ENE-IP students are the proud recipients of various department/college/university scholarships - May 2009. Dr. Farag and Dr. Vasu are also seen in the photo.",
							   "Xiameng Liu, undergraduate student, analyzing captured drop images to study drop breakup dynamics in coflowing systems in Dr. Gupta's laboratory.",
							   "Ashleigh Kreider and Eric Stevenson, CHE students, plasma cleaning PDMS sheets to study enzymatic reactions in microchannels in Dr. Gupta's laboratory.",
							   "Michael Gagnon, graduate student in Dr. Vasudevan's laboratory, explaining his research on biofuels to Katja Luxem, High School Senior."); 		
	
textToUse =randomPicsText[picNum];			
return textToUse; 
}

/* Background color of filler div.*/
	var fillerBkgnd = new Array("#556F4C", "#292644", "#4E3B35", "#510100", "#201d16", "#3F1516","#7a8939", "#5B343C","#334F56","#A29E92","#A64D40","#192650","#192650","#192650","#192650");
						
/* Color of text in randomPicsText */
	var captionColor = new Array("#ffffff", "#ffffff",  "#ffffff", "#ffffff", "#ffffff", "#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff");
	
/* Color of links in randomPicsText */
	var captionLinks = new Array("#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff");

/* Color of hovers in randomPicsText */
	var captionHovers = new Array("#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff", "#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff","#ffffff");


/*  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;
}