function findPosX(obj)
{
	if (obj.x) {
		return obj.x;
	}

	var curleft = 0;
	while (obj.offsetParent) {
		curleft += obj.offsetLeft
		obj = obj.offsetParent;
	}

	return curleft;
}


function findPosY(obj)
{
	if (obj.y) {
		return obj.y;
	}

	var curtop = 0;
	while (obj.offsetParent) {
		curtop += obj.offsetTop
		obj = obj.offsetParent;
	}

	return curtop;
}


function _i_showLink(name, flg, x, y, bottom_align)
{
	var objref    = document.getElementById('hlpEc_' + name);
	var objparent = document.getElementById('hLink_' + name);

	if (flg) {
		if (objref.myFlag == null) {
			if (bottom_align) {
				y -= objref.scrollHeight - objparent.height;
			}

			if (document.all) {
				x += findPosX(objparent) + objparent.width;
				y += findPosY(objparent);

				objref.style.posLeft = x + 5;
				objref.style.posTop  = y + 20;
			} else {
				x += objparent.x + objparent.width;
				y += objparent.y;

				objref.style.left = x + 5 + 'px';
				objref.style.top  = y + 20 + 'px';
			}
			objref.myFlag = true;
		}
		objref.style.visibility = 'visible';
	} else {
		objref.style.visibility = 'hidden';
	}
}


function showLink(img, name)
{
	img.alt   = '';
	img.title = '';
	_i_showLink(name, true, 5, 0, false);
}

function showLinkBottom(img, name)
{
	img.alt   = '';
	img.title = '';
	_i_showLink(name, true, 5, 0, true);
}

function hideLink(name)
{
	_i_showLink(name, false);
}

