// JavaScript Document
//written by Jake Dolan 

function Randum(N) { return  (N*(Math.random()%1))|0 }
				
function displayImage()
{
	// input to Randum is number of images - returns 0-N, so num must be incremented 
	var num = Randum(3);
	num++;	 

        switch(num) {
          case 1:
                  var caption = "<p><strong>Outstanding Native American Student: Lark Real Bird Paz</strong><br><br>Lark Real Bird Paz, Native American Studies, is the 2009 recipient for the Outstanding Native American Student Award. She was also the first ever recipient of the President's Native American Excellence Scholarship for 2008-2009.  Lark believes that if we all took the time to understand one another's culture and history we can make a difference in our attitude towards others who are different from ourselves.</p>";
				  break;
          case 2:
                  var caption = "<p><strong>Outstanding Master's Student: Jerome Schleier</strong><br><br>Jerome Schleier, Ecology, in the Land Resources and Environmental Science department, is the 2009 recipient for the Outstanding Master’s Graduate Achievement Award. Schleier currently has six scientific publications and also won the 2008 Hollandsworth Award for Best Student Paper Presentation at the annual meeting of the American Mosquito Control Association.</p>";
                  break;
 		 case 3:
                  var caption = "<p><strong>Outstanding Doctoral Student: Diego Riveros-Iregui</strong><br><br>Diego Riveros-Iregui, Ecology, in the Land Resources and Environmental Science department, is the 2009 recipient of the Outstanding Doctoral Student Graduate Achievement Award. Riveros-Iregui's disseration research focused on water-carbon cycle research at the Tenderfoot Creek Experimental Forest in central Montana.</p>";
                  break;	
			  
          default:
                  var caption = "Default Caption";
        }	
	
//this builds the path to the image src and appends a randomly selected number and the file type .jpg to the end of 
//the file "pic_frame" and then writes it to the page where displayImage() is called. 
 
	document.write("<!-- Begin Random Image --><table cellpadding=\"0\" cellspacing=\"0\" align=\"left\"><tr><td valign=\"top\" class=\"paddingR10\"><img src=\"images/pic_frame_" + num + ".jpg\" alt=\"Graduate Students in the News\" width=\"175\" height=\"210\" border=\"0\" /></td></tr></table>" + caption + "<!-- End Random Image --><br clear=\"all\">");
}
