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.
*/

var _x, _y; /* var cX = 0; var cY = 0; */ var rX = 0; var rY = 0;
function UpdateCursorPosition(e) { _x = e.pageX; _y = e.pageY; }
function UpdateCursorPositionDocAll(e) { _x = event.clientX; _y = event.clientY; }
if (document.all) {
	document.onmousemove = UpdateCursorPositionDocAll; 
} else { 
	document.onmousemove = UpdateCursorPosition;
}
function AssignPosition(d) {
	if(self.pageYOffset) {
		rX = self.pageXOffset;
		rY = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) {
		rX = document.documentElement.scrollLeft;
		rY = document.documentElement.scrollTop;
	} else if (document.body) {
		rX = document.body.scrollLeft;
		rY = document.body.scrollTop;
	}
	if(document.all) {
		_x += rX; _y += rY; /* cX += rX; cY += rY; */
	}
	d.style.left = (_x+1)+"px";
	d.style.top  = (_y+1)+"px";
}

function showSpan (val, i) {
	// alert(val)
	/* document.all.span1.style.left = _x;
	document.all.span1.style.top = _y; */
	var dd = document.getElementById('span1');
	AssignPosition(dd);
	dd.innerHTML = val;
	dd.style.display = "block";
	dd.style.visibility = "visible";
	/* document.all.span1.innerHTML = val;
	document.all.span1.style.visibility = "visible"; */
}
function hideSpan () {
	var dd = document.getElementById('span1');
	AssignPosition(dd);
	dd.innerHTML = "";
	dd.style.display = "none";
	dd.style.visibility = "hidden";
	/* 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);
	}
}
