/* 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 = 520;
	var imgHeight = 288;

function homeImageToUse(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 separate items.*/
		
	var randomPics = new Array("mercury", "bolkerExcellenceInTeachingAward", "MickieWalsh", "PierandBoats", "DocentLITTERCREW", "dogfish", "science_sphere", "healy-helicopter-615", "lobster_tag");
	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(		
							   "Deenie Bugge, a technician who works with Celia Chen at Dartmouth College, digs for small polychaete worms in the Squamscott River mud. A new study is examining how these worms and other organisms affect mercury cycling in Great Bay.<br>Photo Credit: Becky Zeiber<br><a href='http://www.unh.edu/news/cj_nr/2009/june/rz16mercury.cfm'>Learn More</a>", 
							   "<br><br><br><strong>Jessica Bolker, Associate Professor of Biological Sciences, Receives 2009 Excellence In Teaching Award</strong><br><a href='http://www.unh.edu/facultyexcellence/2009/excellence.cfm?image=bolker'>Learn More</a>",
														   
							  "<br><br><br><strong>UNH Graduate Student, Michelle Walsh, Receives Fulbright Scholarship</strong><br><br><a href='http://www.unh.edu/news/cj_nr/2009/may/jr18fulbright.cfm'>Learn More,</a>",
							  
							  "<strong>The UNH Marine Pier Facility</strong><br /><br />The UNH Marine Laboratory and Pier Facility construction project is moving into its final stages.  The Pier became 'operational' last spring and is currently supporting all of the permanent vessels that UNH has assigned to the facility on the floating dock side.  UNH also operates a number of smaller boats that will periodically use the pier and will provide occasional support for the R/V Kingsbury and R/V Heiser that serve Shoals Marine Lab operations.  The new NOAA Coastal Mapping Vessel, Ferdinand R. Hassler, which is expected to be home-ported at the Pier, is currently under construction in Mississippi.  <br><br><a href='http://marine.unh.edu/saltwater-news/2008/december2008/Lab_and_Pier_Update.htm'> Learn More</a>",
							   
							  "<br><br><strong>Business is <i>picking up</i> for the Marine Docents!</strong><br><br>Each Fall and each Spring, members of the UNH Marine Docents gather to pick up road side trash on their adopted section of Rt. 155 near Kingman Farm.  Pictured are Beryl Harper, Bob Pollard, Mark Wiley, Vicki Guy, Dari Ward and Peter Flynn.<br><br> <a href='http://marine.unh.edu/outreach/marine-docents.html'>Learn More</a><br><br>Photo Credit: Lori Lavac", 
							  
							 "<br><br><strong> UNH Researchers Studying Spiny Dogfish, Gulf of Maine's Mini Shark</strong><br><br><a href='http://www.marine.unh.edu/news/pdf/articles/SpinyDogfish.pdf'>Learn More</a>",
							 
							  "<br><br><strong>UNH Professor Colin Ware Puts Science on a Sphere in New Smithsonian Hall</strong><br><br><a href='http://www.unh.edu/news/cj_nr/2008/nov/bp13ware.cfm'>Learn More</a>", 
							  
							  "<br><br><br><strong>National Geographic publishes Healy Mapping Mission, featuring Larry Mayer, Director of the UNH Center for Coastal and Ocean Mapping.</strong> <br><br><a href='http://ngm.nationalgeographic.com/2009/05/healy/funk-text/1'>Learn More</a>",
							  
							  "<br><br><strong>UNH Researchers Track Lobster Migrations to Improve Population Estimates</strong><br><br><p>UNH Ph.D. candidate Jason Goldstein holds a lobster with a temperature logger, an ultrasonic transmitter and a return tag. These items are secured to the lobster like a lightweight backpack to help UNH researchers learn about their migration patterns. <a href='http://www.marine.unh.edu/news/GoldsteinLobsters.htm'>Learn More</a></p>Photo Credit: Rebecca Zeiber"


							  
				)
			  
 
; 		
	
textToUse =randomPicsText[picNum];			
return textToUse; 
}

/* Background color of rotate.*/
	var fillerBkgnd = new Array("#819943", "#A0B8CC", "#888A3E", "#CCCCCC", "#83A6BE", "#666666", "#01365B", "#AB3436", "#F48066");
						
/* Color of text in rotate */
	var captionColor = new Array("#FFFFFF",  "#FFFFFF", "#FFFFFF", "#000000", "#062567", "#ffffff", "#FFFFFF", "#FFFFFF", "#FFFFFF");
	
/* Color of links in rotate */
	var captionLinks = new Array("#FFFFFF", "#FFFFFF", "#ffffff", "#ffffff", "#FFFFFF", "#ffffff", "#FFFFFF", "#ffffff", "#FFFFFF");

/* Color of hovers in rotate */
	var captionHovers = new Array("#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;
}
