var curimg=0
function rotateimages(){
	if ( document.getElementById("protator") != null ) {
		document.getElementById("protator").setAttribute("src", galleryarray[curimg]);
		document.getElementById("protatorcap").innerHTML = galleryarraycap[curimg];
		curimg=(curimg<galleryarray.length-1)? curimg+1 : 0;
	}
}

function rotateImage(){
	if ( document.getElementById("protator") != null ) {
		setInterval("rotateimages()", 60000);
	}
}

addOnloadHook(rotateImage);
