// JavaScript choosepics.js - home banner image rotation

//How to add images to the home banner:  There are three columns: left, middle, right.  Each function below (chooseLeftPic, choodeMiddlePic and chooseRightPic) corresponds to each column and chooses a picture randomly that is assigned to that column. Put Guggenheim pics in Left Column. 
//To add an image, put the actual image in /image/homerotate/ folder - image needs to be 325x225.  
//Go to function for the column you want to put it in and copy the last "case" line.  Change the case number and the path to image, text that will appear below the image, link to where image goes, and alttext.  If you do not want to include text or link, you can leave it blank like this "".  Change the "numImages" number at the top to one more than the last case number.  
//To delete an image, comment out the line containing the image using /* */ and change the number of the case for the images that come after that one, and change the "numImages" number at the top. (this way you have a record of what you have used already). //

function chooseLeftPic()

{

	numImages = 5;//change this number when you add/delete images. it should be one more than the last case number

	randomNum = Math.floor ((Math.random() * numImages)+1);

	switch (randomNum)

		  {

			case 1:  eventPic = new Array("/images/homebanner/gugg.jpg", "Historical Hall, Latest Technology", "/about/guggenheim.html", "Guggenheim Hall behind fountains"); break;

			case 2:  eventPic = new Array("/images/homebanner/guggLamp.jpg", "", "/about/guggenheim.html", "1920s Lamp in Guggenheim Hall entryway"); break;	
			
			case 3: eventPic = new Array("/images/homebanner/johnson_bruckner_kiro.jpg",   "Video: A&amp;A  Shares Excitement for Shuttle Pilot", "/news/index.php", "A&amp;A Profs Share Excitement for Space Shuttle Pilot"); break;	//remove 10/09
			
			default: eventPic = new Array("/images/homebanner/nasaTest.jpg", 'Launching Careers', "/students/careers.html", "Students in NASA Anti-gravity test chamber"); break;

		  }

	document.write('<a href="' + eventPic[2] +'"><img src="' + eventPic[0] + '" alt="' + eventPic[3] + '" width="335" height="225" /><div class="captionBox"></div><div class="captionText">' + eventPic[1] +  '</div></a>');

}




function chooseMiddlePic()

{

	numImages = 2;//change this number when you add/delete images. it should be one more than the last case number

	randomNum = Math.floor ((Math.random() * numImages)+1);

	switch (randomNum)

		  {

			case 1:  eventPic = new Array("/images/homebanner/johnsonSpace.jpg", "A&A Alum Greg Johnson in Space", "/news/index.php", "Astronaut Greg Johnson"); break;  


			default: eventPic = new Array("/images/homebanner/johnsonSpace.jpg", "A&A Alum Greg Johnson in Space", "/news/index.php", "Astronaut Greg Johnson"); break;

		  }

	document.write('<a href="' + eventPic[2] +'"><img src="' + eventPic[0] + '" alt="' + eventPic[3] + '" width="335" height="225" /><div class="captionBox"></div><div class="captionText">' + eventPic[1] +  '</div></a>');

}



function chooseRightPic()

{

	numImages = 5;//change this number when you add/delete images. it should be one more than the last case number

	randomNum = Math.floor ((Math.random() * numImages)+1);

	switch (randomNum)

		  {

			
			case 1:  eventPic = new Array("/images/homebanner/uwal.jpg", "UWAL: Working with Industry", "http://www.aa.washington.edu/uwal/", "Researcher in Kirsten Wind Tunnel"); break;

			case 2:  eventPic = new Array("/images/homebanner/mars.jpg", "Crossing Boundaries with Innovation", "/research/index.html", "Surface of Mars"); break;
			
		case 3:  eventPic = new Array("/images/homebanner/capstone1.jpg", "Capstone Aircraft Design Projects", "/research/airplaneDesign.html", "Sketch of Airplane Designs"); break;	
			
			default:  eventPic = new Array("/images/homebanner/spaceAlum.jpg", '', "/alumni/spaceAlum.html", "5 Alumni NASA Astronauts"); break; //put in holding tank 10/09

				

		  }

	document.write('<a href="' + eventPic[2] +'"><img src="' + eventPic[0] + '" alt="' + eventPic[3] + '" width="335" height="225" /><div class="captionBox"></div><div class="captionText">' + eventPic[1] +  '</div></a>');

}


/* HOLDING TANK

	case 3:  eventPic = new Array("/images/homebanner/afsl.jpg", "Research: Guidance for Autonomous Vehicles", "/research/afsl/", "Graph of Centroid Method Compensation Using a Swarming Function"); break;
	
	default: eventPic = new Array("/images/homebanner/fluids.jpg", "Fluids Research: Free Surface Deformation", "/research/FluidsLab/", "Visualization of Free Surface Deformation"); break;
	
		case 3:  eventPic = new Array("/images/homebanner/zap.jpg", "Plasma Research: Z-pinch Experiment", "/research/zap/", "ZaP Endview of ZaP Tank and Outer Electrode"); break;
		
		case 2:  eventPic = new Array("/images/homebanner/tcs.jpg", "Plasma Research: TCS Facility", "/research/rppl/", "Student working on TCS apparatus"); break;

	case 1:  eventPic = new Array("/images/homebanner/dbf.jpg", "Undergraduates Design Build and Fly", "/research/dbf.html", "Design Build Fly team with plane"); break;  //put in holding tank 10/09

			case 2:  eventPic = new Array("/images/homebanner/jarboeHITSI.jpg", "Plasma Research: HIT-SI", "/research/HITsi/", "Prof. Thomas Jarboe with HIT-SI machine"); break;
			case 3: eventPic = new Array("/images/homebanner/composites.jpg",   "Hands on Experience: Composite Lab", "/research/structures/index.html", "A&amp;A Students Testing Materials"); break;

*/



/* RETIRED IMAGES



*/








