// bubi
var show_activBubi = 0;
var hide_activBubi = 0;

function getTipLayerBubi() {
	return document.getElementById("csshelp") || {style:{}};
}

function _showTipBubi(myDir) {
	getTipLayerBubi().style.visibility = 'visible';
    if(myDir=='right') {   		document.getElementById("bubbleTop").src='images/bubble_top.gif';
	} else {
	document.getElementById("bubbleTop").src='images/bubble_top.gif';
	}
}

function _hideTipBubi() {
	getTipLayerBubi().style.visibility = 'hidden';
}

var _to = null;

function getPositionLeftBubi(This){
 var el = This;var pL = 0;
 while(el){pL+=el.offsetLeft;el=el.offsetParent;}
 return pL
}
function getPositionTopBubi(This){
 var el = This;var pL = 0;
 while(el){pL+=el.offsetTop;el=el.offsetParent;}
 return pL
}

function findPosBubi(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 tipOverMBubi(text, img, imgname, direction, plusx, plusy) {
	if(direction=='left')  {
	bubbleDir=1
	} 
	if(direction=='right') {
	bubbleDir=0
	}
	var aaa = findPosBubi(imgname);
	var x = aaa[0];
	var y = aaa[1];
	var xxx = document.getElementById("csshelp");
	var yyy = document.getElementById("csshelptext");
	ih = "";
	if(img != '')ih += '<div class="csshelp_kep"><img src="'+img+'" alt="" /></div>';
	ih += '<div class="csshelp_szov">'+text+'</div>';
	ih += '<div class="clear"></div>';
	yyy.innerHTML = ih;
	//x -= plusx;
	x = 780 - x;
	y += plusy;
	xxx.style.left = x+"px";
	xxx.style.top = y+"px";
	_showTipBubi(direction);
}

function tipOutMBubi() {
  _hideTipBubi();
}
function tipOutBubi() {
  _hideTipBubi();
}
