/*******************************
	rotate.js
	
	Rotates the main image on the IHM homepage

*******************************/


// Variables
var imagePath = 'images/'; // Path to images

var imageChoices = new Array(); // Create our container for all image arrays

imageChoices[0] = new Array('A012584-ihm.jpg','500','612','Francesco Diedo (1410-1491), Angel applying healing salve to wounded leg of Saint Roch, c. 1494-95');
imageChoices[1] = new Array('A013153-ihm.jpg','499','444','Honor&#233; Daumier (1808-1879), Inspection attentive de la langue. [An attentive inspection of the tongue], 1841. A doctor peers at the tongue of a patient seated before him.');
imageChoices[2] = new Array('A025820-ihm.jpg','500','627','Mary Cassatt (1844-1926), The art of mothering- - breastfeed your baby, [Poster artwork reproduction of Cassatts Mother and Child], c. 1905');
imageChoices[3] = new Array('A013217-ihm.jpg','500','540','Plague Doctor - Illustrated in Bartholin, Thomas Hafniae, 1654-1661 Historiarum anatomicarum, c. 1654. Person wearing a hat, a mask suggestive of a bird beak, goggles or glasses, and a long gown. The clothing identifies the person as a plague doctor and is intended as protection.');
imageChoices[4] = new Array('A021033-ihm.jpg','500','360','Der Apothecker. Stuttgart, Germany. Deutscher Apothecker-Verlag. Interior view of an early 19th century pharmacy.');

function chooseImage(choices) {
	// Pick a random number between 0 and number of images
	var selection = Math.floor(Math.random() * choices.length);	
	var myImage = choices[selection];
	
	document.write('<a href="'+ myImage[4] +'"><img src="'+ imagePath + myImage[0] +'" alt="'+ myImage[3] +'" width="'+ myImage[1] +'" height="'+ myImage[2] +'" border="0" /></a>');


}
chooseImage(imageChoices)
