// Script developed by Elemental Works [http://www.elemental-works.com]
var tip_state = "hide";

function tipper(state) {
	tip_state = state;
	if (tip_state == "show") {
		eval_tip(tip_state);
	}
	if (tip_state == "hide") {
		setTimeout("eval_tip(tip_state)", 250);
	}
}

function eval_tip(state) {
	attr = new Array();
	attr = get_attributes(document.getElementById("tipster"));
	if (state == "show") {
		document.getElementById("tip").style.display = "block";
		document.getElementById("tip").style.left = attr[0]+attr[2]/2-125+"px"; //centered relative to the position of tipster
		document.getElementById("tip").style.top = attr[1]+attr[3]+10+"px"; //10 pixels below tipster
	}
	if (state == "hide") {
		document.getElementById("tip").style.display = "none";
	}
}

function get_attributes(obj) {
	var curleft = curtop = curwidth = curheight = 0;
	curwidth = obj.offsetWidth;
	curheight = obj.offsetHeight;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft;
		curtop = obj.offsetTop;
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		}
	}
	return [curleft, curtop, curwidth, curheight];
}