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


images[0] = "images/front_a.jpg";
images[1] = "images/front_b.jpg";
images[2] = "images/front_e.jpg";
images[3] = "images/front_f.jpg";
images[4] = "images/front_g.jpg";
images[5] = "images/front_h.jpg";
images[6] = "images/front_i.jpg";
images[7] = "images/front_j.jpg";
images[8] = "images/front_k.jpg";
images[9] = "images/front_l.jpg";


caption[0] = "Members of Mock Court";
caption[1] = "Professor Winkle teaching class outside";
caption[2] = "Professor King teaching class";
caption[3] = "Ventress Hall";
caption[4] = "Students outside Deupree Hall";
caption[5] = "Graduate students";
caption[6] = "Graduate students";
caption[7] = "Graduate students meeting with department chair, Dr. Forgette";
caption[8] = "Graduate students";
caption[9] = "Graduate students";


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

}
function ShowCap() {
var text_cap = '<div style="font-size:.7em; margin:0 0 0 0;">' + caption[increment] + '</div>';
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);
} 

