function icon_tooltip (text, cx, cy, angle, radius) {
	// console.log("icon_tt: ", text);
	var ttdiv = document.getElementById("icontooltip");
	if (text) {
		// calculate a lovely box position for the tip div
		var x = cx + (Math.cos(angle) * radius);
		var y = cy - (Math.sin(angle) * radius);
	
		var divwidth = 100;
		var sx = 1 - ((Math.cos(angle) + 1) / 2);
		var divx = x - (sx * divwidth);
		var divy = y;
		ttdiv.style.left = divx + "px";
		ttdiv.style.top = divy + "px";
		ttdiv.style.visibility = "visible";
		ttdiv.innerHTML = text;
	} else {
		ttdiv.style.visibility = "hidden";		
		ttdiv.innerHTML = "";
	}
}

function cat_tooltip(name, left, top) {
	// console.log("cat_tooltip", name);
	var ttdiv = document.getElementById("cattooltip");
	if (name) {
		ttdiv.style.left = left + "px";
		ttdiv.style.top = (top-20) + "px";
		ttdiv.style.visibility = "visible";
		ttdiv.innerHTML = name;
	} else {
		ttdiv.style.visibility = "hidden";		
		ttdiv.innerHTML = "";
	}
}


