// bubi
var show_activ = 0;
var hide_activ = 0;

function getTipLayer() {
	return document.getElementById("csshelp") || {style:{}};
}

function _showTip(myDir) {
	getTipLayer().style.visibility = 'visible';
    if(myDir=='right') {   		document.getElementById("bubbleTop").src='images/bubble_top.gif';
	} else {
	document.getElementById("bubbleTop").src='images/bubble_top.gif';
	}
}

function _hideTip() {
	getTipLayer().style.visibility = 'hidden';
}

var _to = null;

function getPositionLeft(This){
 var el = This;var pL = 0;
 while(el){pL+=el.offsetLeft;el=el.offsetParent;}
 return pL
}
function getPositionTop(This){
 var el = This;var pL = 0;
 while(el){pL+=el.offsetTop;el=el.offsetParent;}
 return pL
}

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 tipOverM(text, imgname, direction, plusx, plusy) {
	if(direction=='left')  {
	bubbleDir=1
	} 
	if(direction=='right') {
	bubbleDir=0
	}
	var aaa = findPos(imgname);
	var x = aaa[0];
	var y = aaa[1];
	var xxx = document.getElementById("csshelp");
	var yyy = document.getElementById("csshelptext");
	yyy.innerHTML = text;
	x -= plusx;
	y += plusy;
	xxx.style.left = x+"px";
	xxx.style.top = y+"px";
	_showTip(direction);
}

function tipOutM() {
  _hideTip();
}
function tipOut() {
  _hideTip();
}

