function showTip(h,t,obj){
	
	if(h==""){return;}
	
	document.getElementById("tool_header").innerHTML = h;
	document.getElementById("tool_text").innerHTML = t;
	document.getElementById("tool").style.visibility = "visible";
	document.getElementById("arrow").style.visibility = "visible";
	
	p = findPos(obj);
	w = findWidth(obj);
	w = (w-26)/2;
	n = findPos(document.getElementById("nav"));
	var ab = p[0];
	n[0] =n[0]+900;
	
	
	if((p[0]+280)>n[0]){
		p[0] = n[0]-285;	
	}
	
	document.getElementById("tool").style.left = p[0]+"px";
	document.getElementById("arrow").style.left = (ab+w)+"px";
	
}

function hideTip(){
	
	document.getElementById("tool_header").innerHTML = "";
	document.getElementById("tool_text").innerHTML = "";
	document.getElementById("tool").style.visibility = "hidden";
	document.getElementById("arrow").style.visibility = "hidden";
	
}

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

function findWidth(obj){
	
	return obj.offsetWidth;
	
}


