// JavaScript Document

	function findPosX(obj) {
		var curleft = 0;
		if (obj.offsetParent) {
			while (obj.offsetParent) {
				curleft += obj.offsetLeft
				obj = obj.offsetParent;
			}
		} else if (obj.x) curleft += obj.x;
		return curleft;
	}	
	function findPosY(obj) {
		var curtop = 0;
		if (obj.offsetParent) {
			while (obj.offsetParent) {
				curtop += obj.offsetTop
				obj = obj.offsetParent;
			}
		}
		else if (obj.y) curtop += obj.y;
		return curtop;
	}
	function show_tip(elem, msg) {
		var tip = document.getElementById("tip");
		if (tip) {
			tip.innerHTML = msg;
			tip.style.display = "block";
			tip.style.left = (findPosX(elem) + 5) + "px";
			tip.style.top = (findPosY(elem) - tip.offsetHeight + 5) + "px";
		}
	}
	function hide_tip() {
		var tip = document.getElementById("tip");
		if (tip) tip.style.display = "none";
	}