// JavaScript Document

var xmlhttp = false;

try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
	try {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
		xmlhttp = false;
	}
}

if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
	xmlhttp = new XMLHttpRequest();
}


function getFile(serverPage, objId) {
	var obj = document.getElementById(objId);
	xmlhttp.open("GET", serverPage);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);
}

function tooltip(file,w,h,e) {
	obj = document.getElementById("tooltip-interior");
	tooltipDiv = document.getElementById("tooltip");
	if (file == "" && w == "" && h == "" && e == "") {
		tooltipDiv.style.display = "none";
	} else {
		x = e.clientX + window.scrollX;
		y = e.clientY + window.scrollY;
		xmlhttp.open("GET", file);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				obj.innerHTML = xmlhttp.responseText;
				tooltipDiv.style.display = "block";
				tooltipDiv.style.top = (y - h - "20") + "px";
				tooltipDiv.style.left = (x - (".5" * w)) + "px";
				obj.style.width = w + "px";
				obj.style.height = h + "px";
			}
		}
		xmlhttp.send(null);
	}
}