if (document.images)  version = "n4";  
else if (navigator.userAgent.indexOf("Mozilla/2.0") != -1) version = "n3";
else version = "n2";
function on_img(imgName) {
	if (version == "n4") {
		img = eval(imgName + "_on.src");
		document [imgName].src = img;
	}
}
function off_img(imgName) {
	if (version == "n4") {
		img = eval(imgName + "_off.src");
		document [imgName].src = img;
	}
}

function message(text) {
	window.status = text;
	return true;
}

var winOpts = "toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,height=400,width=600,copyhistory=0,"
var smallwindow = null;
function setEvent() {
	return false;
}
function historywin(filename) {
	fileURL = filename;
	if (parseInt(navigator.appVersion) < 4) {
		if (smallwindow != null) smallwindow.close();
	}  
	timerID= setTimeout('opener(fileURL)',100);
}
function windowFocus() {
	if (navigator.appVersion.indexOf("2.") == -1 && navigator.appVersion.indexOf("MSIE") == -1) smallwindow.focus();
}
function openit(winName) {
	filename = winName;
	winName = "historywin"
	smallwindow = window.open(filename,winName,winOpts)
	if (navigator.appVersion.indexOf("(X11") != -1  || navigator.appVersion.indexOf("(Mac") != -1) {
		smallwindow = window.open(filename,winName,winOpts)
	}
	if (navigator.appVersion.indexOf("MSIE") == -1) {
		smallwindow.mainWin = this;
		windowFocus();
	}
}

var _x, _y;
var isIE = document.all?true:false;
if (!isIE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMousePosition;
function getMousePosition() {
	if (!isIE) {
		_x = e.pageX; _y = e.pageY;
	}
	if (isIE) {
		_x = event.clientX + document.body.scrollLeft; _y = event.clientY + document.body.scrollTop;
	}
}
// You need to tell Mozilla to start listening:
if (window.Event && document.captureEvents) { document.captureEvents(Event.MOUSEMOVE); }
// Then assign the mouse handler
document.onmousemove = getMousePosition();
// Then your mouseover function can just read mouseX and mouseY directly.

function showSpan (val, i) {
	// alert(val)
	document.all.span1.style.left = _x;
	document.all.span1.style.top = _y;
	document.all.span1.innerHTML = val;
	document.all.span1.style.visibility = "visible";
}
function hideSpan () {
	document.all.span1.innerHTML = ""
	document.all.span1.style.visibility = "hidden";
}
function rollAreas(i) {
	//document.OnePhoto.src = aryAreas[i].src;
	showSpan (aryAreaDesc[i], i);
	callTimer('c');
}
function rollOffAreas() {
	callTimer('s');
}
function callTimer(x) {
	if (x == "c") {
		if(typeof(t) != 'undefined') window.clearTimeout(t);
	} else if (x == "s") {
		t = window.setTimeout('hideSpan();', 450);
	}
}