// Random image function and display scripts
// Modified from the Homepage script
// Built by Jacob Dolan, jake@montana.edu, Communications and Public Affairs
// For the College of Letters and Science

function Randum(N) { return  (N*(Math.random()%1))|0 }
				
function displayContent()
{
	// input to Randum is number of images - returns 0-N, so num must be incremented 
	var num = Randum(5);
	num++;

	if (num == 1) {
	  image="http://www.montana.edu/lettersandscience/Images/rotate_cbn.jpg";
	  url="http://neuron.montana.edu/";
	  headline="Cell Biology and Neuroscience";
	  content="In the fall of 2002 the Howard Hughes Medical Institute granted Montana State University a $1.9 million grant over four years to enhance the undergraduate program in the biological sciences. Through this effort, the undergraduate biology curriculum at Montana State University is being enhanced to offer students a multidisciplinary, quantitative approach to undergraduate biology.";
	 }
	 else if (num == 2) {
	  image="http://www.montana.edu/lettersandscience/Images/chembldg2.jpg";
	  url="http://www.chemistry.montana.edu/";
	  headline="Chemistry and Biochemistry";
	  content="Construction is well underway on the new Chemistry Research Building, a $23 million project that one day will house chemists and biochemists working on such cutting-edge advances as anti-cancer therapies, drugs that combat bacteria and fungi and ways to protect eyes from laser damage. The building, located adjacent to Linfield Hall, is expected to be completed in 2007.";
	 }	
	 else if (num == 3) {
	  image="http://www.montana.edu/lettersandscience/Images/esci_fieldtrip.jpg";
	  url="http://www.montana.edu/wwwes/";
	  headline="Earth Sciences";
	  content="Earth Science students have many opportunities to participate in field trips that facilitate the study of earth processes, earth resources, earth history, and environments that people have modified. Field work is a very important component of our instructional programs at both the undergraduate and graduate levels and field trips are an integral part of many courses.";
	 }	
	 else if (num == 4) {
	  image="http://www.montana.edu/lettersandscience/Images/ynp_students.jpg";
	  url="http://www.montana.edu/ecology/";
	  headline="Ecology";
	  content="Montana State University leads the country in the number of research projects in Yellowstone National Park. In recent years, MSU received more than five times the number of National Science Foundation grants for Yellowstone studies than its nearest competition, Stanford and UCLA According to David Roberts, head of MSU's ecology department, the Greater Yellowstone Ecosystem is the highest quality natural laboratory in North America.";
	 }	
	 else if (num == 5) {
	  image="http://www.montana.edu/lettersandscience/Images/tyler.jpg";
	  url="http://www.montana.edu/history/";
	  headline="History and Philosophy";
	  content="The Department of History and Philosophy offers a unique undergraduate option, as well as a Ph.D. emphasis, in Science, the Environment, Technology, and Society (SETS). Building on the strength of several faculty members' research interests, the SETS program integrates the humanities and the sciences in areas such as environmental science, the history of medicine, and public policy research." ;
	 }	
	 
	 /* REMEMBER TO INCREMENT the line "var num = Randum(x)" where x is the number of possible options
	 else if (num == 3) {
	  image="";
	  url="http://www.montana.edu/";
	  headline="Test of the Random Content";
	  content="Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test";
	 }	
	 */
	document.write('<!-- Begin Random Content --><table width="250" border="0" align="right" cellpadding="0" cellspacing="15" bordercolor="#FFFFFF" class="borderLeft"><tr><td valign="top"><img src="' + image + '"></td></tr><tr><td class="blue11"><div align="justify"><p align="center"><strong><a href="' + url + '" target="_blank">' + headline + '</a></strong></p><p>' + content + '</p></div></td></tr></table><!-- End Random Content -->');
	
}