// FILE: /assets/js/rotate.js 
// by Andy Taylor
// This script rotates the images on the Milner home page

// Place all that will be rotated inside this directory:
var path = '/assets/img/rotate/';

// Include the names of the files to be rotated below. 
var images = new Array(
                 "cook.gif", 
                 "williams.gif",
                 "lib-avmilner.png",
                 "milner.gif",
                 "old-main.gif",
                 "berlo-rotate.png", 
                 "bone-rotate.png",
                 "boschini-rotate.png",
                 "bowman-rotate.png",
		         "braden-rotate.png",
                 "brown-rotate.png",
                 "budig-rotate.png",
				 "cook-rotate.png",
                 "edwards-rotate.png",
                 "fairchild-rotate.png",
                 "felmley-rotate.png",
				 "hewett-rotate.png",
				 "hovey-rotate.png",
				 "lib-caelzy.png",
				 "lib-ewwelch.png",
				 "lib-fmpeterson.png",
				 "lib-jwkraus.png",
				 "lib-rrhertel.png",
				 "north.gif",
				 "strand-rotate.png",
				 "tompkins-rotate.png",
				 "wallace-rotate.png",
				 "watkins-rotate.png"
);

// That's it! 
function rotate() {
    var newimage = images[Math.round(Math.random() * (images.length - 1))];
    document.getElementById("rotate_img").src = path + newimage;
}
window.onload = rotate;
