var i = 1;

header= new Image();
header.src = "mpp/images/index/rotating/header.jpg";

daSlideshow1= new Image();
daSlideshow1.src = "mpp/images/index/rotating/back.jpg";
daSlideshow2 = new Image();
daSlideshow2.src = "mpp/images/index/rotating/TomDouglas.jpg";
daSlideshow3 = new Image();
daSlideshow3.src = "mpp/images/index/rotating/stop.jpg";
daSlideshow4 = new Image();
daSlideshow4.src = "mpp/images/index/rotating/ElizabethSeatedNude.jpg";
daSlideshow5 = new Image();
daSlideshow5.src = "mpp/images/index/rotating/kitchen.jpg";

description = new Array
description[1] = ""
description[2] = ""
description[3] = ""
description[4] = ""
description[5] = ""

function startTime(){

        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=3;	// How many seconds til the next rotation
        Timer();

}

function Timer(){
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        curTime=hours*3600+mins*60+secs
        if (curTime>=closeTime){
		if (i < 5){	// The number of daSlideshows
			i++;
			document.daSlideshow.src = "mpp/images/index/rotating/pixel2.gif";
			document.daSlideshow.src = eval("daSlideshow" + i + ".src");
		}
		else{
			i = 1;
			document.daSlideshow.src = "mpp/images/index/rotating/pixel2.gif";
			document.daSlideshow.src = eval("daSlideshow" + i + ".src");
		}
		startTime();
	}
        else{
                window.setTimeout("Timer()",1000)}

}

function descript(){
	window.status = description[i]
}