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


images[0] = "images/bell_tower.jpg";
images[1] = "images/desoto_center.jpg";
images[2] = "images/lyceum.jpg";
images[3] = "images/quadrangle.jpg";


caption[0] = "The Peddle-Bell Tower";
caption[1] = "The Desoto Center";
caption[2] = "The Historic Lyceum";
caption[3] = "The New Quadrangle";


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 20px 0 20px;">' + 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);
} 
