<!--
maximum = imagearray.length;

//var rotation = (maximum - 1);  // initialize
var mydelay = 7000; // milliseconds between slides
var pause = 0; // pause flag

function fullGo() {
	form = document.getElementById('bigpic');
	form.i.value = rotation;
	form.submit();
}

function setPP(val) {
	if(elm = document.getElementById("pp")) elm.innerHTML = val;
}

function chgImage() {
	if (document.images) { document.images.rotate.src = showdir+imagearray[rotation]; }
	else { document.all.rotate.src = showdir+imagearray[rotation]; }
	if(elm = document.getElementById('imgd')) elm.innerHTML = '<em>'+descarray[rotation]+'</em>';
	if(elm = document.getElementById('imgn')) elm.innerHTML = imagearray[rotation];
}	

function nextImage() {
	pause = 1;
	setPP("Play");
	rotation++;
	if (rotation == maximum) {rotation = 0;}
	chgImage();
}

function priorImage() {
	pause = 1;
	setPP("Play");
	if (rotation == 0) {rotation = maximum;}
	rotation--;
	chgImage();
}
function rotate(){
	if (pause == 1);
	else {
	  rotation++;
	  if (rotation == maximum) rotation = 0; 
	  chgImage();
		mytimer = setTimeout("rotate()", mydelay);
	}
}

function pausePlay() {
	if (pause == 1) {
		pause = 0;
		setPP("Pause");
		rotate();
	}
	else {
		setPP("Play");
		pause = 1;
	}
}

function showInit() {
	rotation++;
	if (rotation == maximum) {rotation = 0;}
	if (pause == 1);
	else {mytimer = setTimeout("rotate()", mydelay);}
	window.focus();
}
//-->

