//returns the position of any element on the screen
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 showGlossary(id, ele) {
	var pos = findPos(ele);
	document.getElementById(id).style.left = (pos[0]+50) + 'px';
	document.getElementById(id).style.top = (pos[1]-200) + 'px';
	document.getElementById(id).style.display='block';
}

function hideGlossary(id) {
	document.getElementById(id).style.display='none';
}