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);

	//alert(name);

	if (flg) {
		if (objref.myFlag == null) {

			//if (bottom_align) {

				y -= objref.scrollHeight - objparent.height;
			//}

			if (document.all) { // IE

				x += findPosX(objparent) + objparent.width;
				y += findPosY(objparent)-20;

				objref.style.posLeft = x;
				objref.style.posTop  = y;

			} else { // MOZILLA

				//if (bottom_align) {
					// Korrektur Affiliate Seiten
					if(top.frames.length>0){

						y += 90;
						x += (document.body.clientWidth-766)/2 + 190;
					}
				//}
				x += objparent.x + objparent.width;
				y += objparent.y;

				objref.style.left = x + 'px';
				objref.style.top  = y + 'px';
			}

			objref.myFlag = true;
		}
		objref.style.visibility = 'visible';
	} else {
		objref.style.visibility = 'hidden';
	}
}      */


function _i_showLink(name, flg, x, y, bottom_align)
{
	var objref    = document.getElementById('hlpEc_' + name);
	var objparent = document.getElementById('hLink_' + name);


	if (document.all) {
		x += findPosX(objparent) + objparent.width;
		if (bottom_align) {
			y -= objref.scrollHeight - objparent.height;
		}
		y += findPosY(objparent)-20;
		objref.style.posLeft = x;
		objref.style.posTop  = y;
	} else {
		x += objparent.offsetLeft + objparent.width;
		if (bottom_align) {
			y -= objparent.height;
		}
		y += findPosY(objparent)-20;
		objref.style.left = x + 'px';
		objref.style.top  = y + 'px';
	}

	if (flg) {
		if (objref.myFlag == null) {
			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);
}

