function showPopup(hoveritem, text) {
	hp = document.getElementById("hoverpopup");
	pos = findPos(hoveritem);
	hp.style.top = (pos[1] + 28) + "px";
	hp.style.left = (pos[0] - 210) + "px";
	ht = document.getElementById("hovertext");
	ht.firstChild.data = text;
	hp.style.visibility = "Visible";
}

function hidePopup() {
	hp = document.getElementById("hoverpopup");
	hp.style.visibility = "Hidden";
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function out(s) {
	console.log(s);
}