/* 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 = 435;
	var imgHeight = 230;

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("COELab", "healy-helicopter-615");
	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("<br><br><br><b>Welcome to the New Ocean Engineering website!</b><br /><br /><a href='' target='_blank'></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>"); 		
	
textToUse =randomPicsText[picNum];			
return textToUse; 
}

/* Background color of rotate.*/
	var fillerBkgnd = new Array("#999999", "#AB3436");
						
/* Color of text in rotate */
	var captionColor = new Array("#ffffff", "#ffffff");
	
/* Color of links in rotate */
	var captionLinks = new Array("#1a375f", "#ffffff");

/* Color of hovers in rotate */
	var captionHovers = new Array("#1a375f", "#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;
}