window.onload = function() {
 reveal();
 prepareLink()
}

function prepareLink() {
if (!document.getElementById) return false;
if (!document.getElementById("historyhref")) return false;
document.getElementById("historyhref").onclick = function() {
  showPic(this);
  return false;
}
}


// Show 'change photo' on javascript enabled pages  
function reveal () {
if (!document.getElementById) return false;
  var revealchange = document.getElementById("change");
  revealchange.style.display = "inline";
}


// images and cutline
var images = Array();
images[0] =  "http://www.iastate.edu/~isu150/img/historic/movein.jpg";
images[1] =  "http://www.iastate.edu/~isu150/img/historic/garyThompson.jpg";
images[2] =  "http://www.iastate.edu/~isu150/img/historic/chalkboard.jpg";
images[3] =  "http://www.iastate.edu/~isu150/img/historic/orr.jpg";
images[4] =  "http://www.iastate.edu/~isu150/img/historic/chalkboard1983.jpg";
images[5] =  "http://www.iastate.edu/~isu150/img/historic/students88.jpg";
images[6] = "http://www.iastate.edu/~isu150/img/historic/homecoming.jpg";
images[7] =  "http://www.iastate.edu/~isu150/img/historic/nawal.jpg";
images[8] =  "http://www.iastate.edu/~isu150/img/historic/chemistry.jpg";
images[9] =  "http://www.iastate.edu/~isu150/img/historic/hansen.jpg";
images[10] = "http://www.iastate.edu/~isu150/img/historic/studentsOutside.jpg";
images[11] = "http://www.iastate.edu/~isu150/img/historic/chrisTaylor.jpg";
images[12] = "http://www.iastate.edu/~isu150/img/historic/torchtubes.jpg";
images[13] = "http://www.iastate.edu/~isu150/img/historic/yell1987.jpg";
images[14] = "http://www.iastate.edu/~isu150/img/historic/wbbchamps.jpg";
images[15] = "http://www.iastate.edu/~isu150/img/historic/campaniling.jpg";
images[16] = "http://www.iastate.edu/~isu150/img/historic/beardshear.jpg";


var cutline = Array();
cutline[0] = "Moving onto campus, 1951.";
cutline[1] = "Roland Rocket Gary Thompson.";
cutline[2] = "50s scholars work a problem.";
cutline[3] = "Heeeeeeeeee-re's Johnny.";
cutline[4] = "Iowa State classroom, 1983.";
cutline[5] = "Students on central campus, 1988.";
cutline[6] = "Students cheer during ISU Homecoming.";
cutline[7] = "Track star Nawal El-Moutawakel.";
cutline[8] = "Chemistry students, 1950s.";
cutline[9] = "Prof. Robert Hansen, young scholar.";
cutline[10] = "Students en route to class.";
cutline[11] = "Cyclone, Olympian Chris Taylor.";
cutline[12] = "Iowa State classroom, 1960s.";
cutline[13] = "'Yell Like Hell competition,' 1987.";
cutline[14] = "Big 12 tourney champs, 2001.";
cutline[15] = "Campaniling, an ISU tradition.";
cutline[16] = "Sesquicentennial banners at Beardshear Hall.";
var currentImg = 0;


function showPic() {
if (!document.getElementById) {
   return false;
   }

  var limit = (images.length - 1);  
   if (currentImg == limit) {
      currentImg = 0;
      } else {
      currentImg++;
      }
   var source = images[currentImg]; 
   var historypic = document.getElementById("historypic");
   historypic.setAttribute("src",source); 

   var text = cutline[currentImg];
   var historycut = document.getElementById("historycut");
   historycut.firstChild.nodeValue = text;
   historypic.setAttribute("alt",text); 
}


// toggles answer on for ISU IQ

function toggle( targetid ){
  if (document.getElementById){
		target = document.getElementById( targetid );
			if (target.style.display == "none"){
				target.style.display = "block";
			} else {
				target.style.display = "none";
			}
	}
}



























