// Script to display an image chosen at random
// From Craig Grannell "Web Designer's Reference"

function randomContent()
{
var chosenImage=new Array();
// filenames of images in this array
chosenImage[1]="slide1.jpg";
chosenImage[2]="slide2.jpg";
chosenImage[3]="slide3.jpg";
chosenImage[4]="slide4.jpg";
chosenImage[5]="slide5.jpg";
chosenImage[6]="slide6.jpg";
var chosenAltCopy=new Array();
// title and alt copy for images goes here
chosenAltCopy[1]="teaching slide";
chosenAltCopy[2]="teaching slide";
chosenAltCopy[3]="Macrophage Activation";
chosenAltCopy[4]="Th2 cytokines are responsible for the expulsion of worms from the gut"
chosenAltCopy[5]="teaching slide"
chosenAltCopy[6]="Acute Inflammatory Response"

var getRan=Math.floor(Math.random()*chosenImage.length);
if (getRan==0)
getRan=1;

document.write('<img src=\"pix/teaching/'+chosenImage[getRan]+'" alt=\"'+chosenAltCopy[getRan]+'\" title=\"'+chosenAltCopy[getRan]+'\" width=\"246\" height=\"184\"  />');
}
