current = 0;

function next() {
	setCursor("wait");
	if (photos[current+1]) {
		document.images.show.src = photos[++current];
		initusemap();
   	}
	else first();
}

function previous() {
	setCursor("wait");
	if (current-1 >= 0) {
		document.images.show.src = photos[--current];
		initusemap();
   	}
	else last();
}

function first() {
	current = 0;
	document.images.show.src = photos[0];
	initusemap();
}

function last() {
	current = photos.length-1;
	document.images.show.src = photos[current];
	initusemap();
}

function gotoslide(slidenum) {
	setCursor("wait");
	current = slidenum;
	document.images.show.src = photos[current];
	initusemap();
}

function initusemap() {
	if (document.images.show.src.indexOf("thumbnails") >= 0) {
		document.images.show.useMap = "#thumbnails";
	}
	else document.images.show.useMap = "";
}

function defocus(x) {
	if (navigator.appName == 'Microsoft Internet Explorer' || document.all) {
		x.blur();
	}
}

function setCursor(type) {
	if (navigator.appName == 'Microsoft Internet Explorer' || document.all)
		for (var i=0; i<document.all.length; i++)
			document.all(i).style.cursor = type;
}

function show(photos) {
var left = (screen.width-600)/2+25;
var top = (screen.height-475)/2-25;
var attr = "height=475,width=600,location=no,menubar=no,resizable=no,status=no,toolbar=no,left=" + left + ",top=" + top;
window.open(photos,'',attr);
}

function newURL(u) {
window.location.href = u
}

function menuOvr (imgName)  {
rollOvr(imgName);
document["thumb"].src = eval (imgName + "thmb.src");
}

function rollOvr (imgName)  {
document [imgName] .src = eval (imgName + "ovr.src");
}

function rollOff (imgName) {
document [imgName] .src = eval (imgName + "off.src");
}