/* 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 = 227;

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("homeimage1","homeimage2","homeimage3","homeimage4","homeimage5","homeimage6","homeimage7","homeimage8");
	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 separate items.*/	
	
	
var randomPicsText = new Array("Short on memory? Imagine working with 100 gigabytes of data at one time. With NASA's help, UNH computer scientists are making it possible. <a href=news/releases06/STARVis606.html>Learn more</a>.",
								"CEPS celebrated the successful move of longtime UNH art Professor John Hatch's &quot;Atomic Age&quot; mural with an unveiling ceremony.<a href=news/releases06/mural1006.html target=_blank> Learn more</a>.",
								"State-of-the-art and world-class are just two of the many dynamic adjectives that describe the classrooms, teaching labs, offices, libraries, and student project space available within the College of Engineering and Physical Sciences.   CEPS is an exceptional resource for aspiring engineers and scientists of tomorrow. <a href=kingsbury/index.html>Learn more</a>.",
								"&quot;Chemistry is not dogma; it is evolving all the time,&quot; says Edward Wong. &quot;When I was going to high school and college, you couldn&rsquo;t see molecules. Now you can!&quot; <a href=http://www.unh.edu/facultyexcellence/2005/excellence.cfm?image=wong target=_blank>Learn more</a>.",
								"UNH engineers are designing a &quot;sniffling, sneezing, aching, fever, so you can rest&quot; remedy for polluted river sediment <a href=http://www.unh.edu/news/cj_nr/2006/july/dl_060720sediment.cfm?type=n target=_blank>Learn more</a>.",
								"UNH Associate Professor Carmela Amato-Wierda has invented a process for coating solar cells that could allow them to be produced faster and for less money. <a href=news/releases05/solar905.htm target=_blank>Learn more</a>.",
								"The University of New Hampshire is leading an environmental team working to help cities in the Association of Southeast Asian Nations (ASEAN) clean their water. <a href=news/releases06/ASEAN605.html target=_blank>Learn more</a>.",
								"Dover Middle School students recently experienced some hands-on science during a field trip to the University of New Hampshire. <a href=news/releases06/DMS1106.html target=_blank> Learn more</a>."
								);
	
textToUse =randomPicsText[picNum];			
return textToUse; 
}

/* Background color of filler div.*/
	var fillerBkgnd = new Array("#292644", "#5B2425", "#1A1311", "#660033", "#661C13", "#000033", "#312B2D", "#000000");
						
/* Color of text in randomPicsText */
	var captionColor = new Array("#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");

/* Color of hovers in randomPicsText */
	var captionHovers = new Array("#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;
}
	


