var ua = navigator.userAgent;
var isMSIE6 = (navigator.appName == "Microsoft Internet Explorer") && (ua.indexOf('MSIE 6') != -1);

function getPosition(an)
{
	var cleft = 0;
	var ctop = 0;
	var obj = an;

	while (obj.offsetParent)
	{
		cleft += obj.offsetLeft;
		ctop += obj.offsetTop;
		obj = obj.offsetParent;
	}

	ctop += an.offsetHeight + 0;

	// nach Layout Änderung nicht mehr notwendig, 08.07.08 
	/*if (isMSIE6) {
		cleft = cleft - 7;
	}
*/
	// Handle Internet Explorer body margins,
	// which affect normal document, but not
	// absolute-positioned stuff.
	//if (document.body.currentStyle && document.body.currentStyle['marginTop'])
	//	ctop += parseInt(document.body.currentStyle['marginTop']);

	/* Objekt mit x und y zurueckgeben */
	position = new Object();
	position.x = cleft;
	position.y = ctop;
	return position;
}

var relobj = false;
var regex = new RegExp('menu_aktiv', '');
var as = document.getElementsByTagName('a');
for (i = 0 ; i < as.length ; i++ )
{
	if (as[i].className.match(regex))
	{
		relobj = as[i];
		break;
	}
}

var pos_from = false;
if (relobj)
	pos_from = getPosition(relobj);

var obj = document.getElementById('menu_aktiv')
if (pos_from && obj)
{

	obj.style.left = pos_from.x + 'px';
	obj.style.top = pos_from.y + 'px';

	obj.style.visibility = 'visible';
 }
