var images = new Array();
var caption = new Array();


images[0] = "/depts/music/images/rotated/rotated1.jpg";
images[1] = "/depts/music/images/rotated/rotated2.jpg";
images[2] = "/depts/music/images/rotated/rotated3.jpg";
images[3] = "/depts/music/images/rotated/rotated4.jpg";
images[4] = "/depts/music/images/rotated/rotated5.jpg";
images[5] = "/depts/music/images/rotated/rotated6.jpg";
images[6] = "/depts/music/images/rotated/rotated7.jpg";
images[7] = "/depts/music/images/rotated/rotated8.jpg";
images[8] = "/depts/music/images/rotated/rotated9.jpg";
images[9] = "/depts/music/images/rotated/rotated10.jpg";
images[10] = "/depts/music/images/rotated/rotated11.jpg";
images[11] = "/depts/music/images/rotated/rotated12.jpg";
images[12] = "/depts/music/images/rotated/rotated13.jpg";
images[13] = "/depts/music/images/rotated/rotated14.jpg";
images[14] = "/depts/music/images/rotated/rotated15.jpg";
images[15] = "/depts/music/images/rotated/rotated16.jpg";
images[16] = "/depts/music/images/rotated/rotated17.jpg";
images[17] = "/depts/music/images/rotated/rotated18.jpg";


caption[0] = "UM Opera Theatre performs <em>Tartuffe</em>";
caption[1] = "Welcome to the UM Department of Music!";
caption[2] = "The UM Marching Band";
caption[3] = "Welcome to the UM Department of Music!";
caption[4] = "Welcome to the UM Department of Music!";
caption[5] = "The Ford Center for the Performing Arts at UM";
caption[6] = "The Ford Center for the Performing Arts at UM";
caption[7] = "Scruggs Hall";
caption[8] = "Trumpet lesson";
caption[9] = "Singing lesson";
caption[10] = "Flute class";
caption[11] = "African Drum and Dance Ensemble";
caption[12] = "The Mississippians Jazz Ensemble";
caption[13] = "Pride of the South Drumline";
caption[12] = "Concert at Paris-Yates Chapel";
caption[12] = "Trumpet Soloist";
caption[12] = "The Mississippians at Ford Center";

function ShowImg() {
var number = images.length;
increment = Math.floor(Math.random() * number);
var strTemp ='<img src="' + images[increment] + '" width="360" height="250">';
document.write(strTemp);

}
function ShowCap() {
var text_cap = caption[increment];
document.write(text_cap);
}

var rotate = 5000; 
var count = 0;

function RotateImg(myImage){
 myImage.src=images[count];
 count++;
 if(count==images.length){count = 0;}
 setTimeout("RotateImg(myImage)",rotate);
} 
