function showTTip(evt) {
	evt = (evt) ? evt : ((window.event) ? window.event : "");
	var elem = (evt.target) ? evt.target : evt.srcElement;
	var link = (elem.nodeName == 'A') ? elem : elem.parentNode;	
	var bdy = document.getElementsByTagName("body").item(0);
	var tipp = document.createElement("div");
	elem.setAttribute('title','');
	elem.setAttribute('alt','');
	tipp.setAttribute('id','ttip');
	tipp.setAttribute('class','tip');
	tipp.setAttribute('className','tip');
	tipp.style.top = (findPosY(link) + link.offsetHeight + 15) + 'px';
	tipp.style.left = (findPosX(link) + link.offsetWidth - 100) + 'px';
	if(link.className == 'infos-stoerer' || link.className == 'infos-auszeichnung-2' ) {
		tipp.style.top = (findPosY(link) + link.offsetHeight + 6) + 'px';
		tipp.style.left = (findPosX(link) + link.offsetWidth - 100) + 'px';
	}
	if(link.className == 'infos-auszeichnung-1' ) {
		tipp.style.top = (findPosY(link) + link.offsetHeight + 6) + 'px';
		tipp.style.left = (findPosX(link) + link.offsetWidth - 200) + 'px';
	}	
	if(link.className == 'infos' && link.parentNode.nodeName == 'LI' ) {
		tipp.style.top = (findPosY(link) + link.offsetHeight + 6) + 'px';
		tipp.style.left = (findPosX(link) + link.offsetWidth - 200) + 'px';
		}
	if(link.className == 'infos formularueberschrift' && link.parentNode.nodeName == 'H4' ) {
		tipp.style.top = (findPosY(link) + link.offsetHeight + 6) + 'px';
		tipp.style.left = (findPosX(link) + link.offsetWidth - 45) + 'px';
		}
	if(link.className == 'infos formularueberschrift berufesuche' && link.parentNode.nodeName == 'H4' ) {
		tipp.style.top = (findPosY(link) + link.offsetHeight + 6) + 'px';
		tipp.style.left = (findPosX(link) + link.offsetWidth - 260) + 'px';
		}
	if(link.className == 'infos langausgabe') {
		tipp.style.top = (findPosY(link) + link.offsetHeight + 6) + 'px';
		tipp.style.left = (findPosX(link) + link.offsetWidth - 260) + 'px';
		}	
	tipp.style.position = 'absolute';	
	tipp.style.zIndex = 999;	
	tipp.innerHTML = link.innerHTML;	
	tipp.style.display = 'block';	
	bdy.appendChild(tipp);
}

function findPosX(obj) {
  	var curleft = 0;
  	if (obj.offsetParent) {
    	while (obj.offsetParent) {
      		curleft += obj.offsetLeft;
      		if (obj.scrollLeft) {
       			 curleft -= obj.scrollLeft;
      		}
      			obj = obj.offsetParent;
    		}
  	} else if (obj.x) {
    		curleft += obj.x;
  	}
  	return curleft;
}

function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop;
			if (obj.scrollTop) {
				curtop -= obj.scrollTop;
			};
			obj = obj.offsetParent;
		}
	} else if (obj.y) {
		curtop += obj.y;
	}
	return curtop;
}

function hideTTip() {
	var bdy = document.getElementsByTagName("body").item(0);
	tipp = document.getElementById("ttip");
	bdy.removeChild(tipp);		
}

function initTooltips() {
	var tips = document.getElementsByTagName("a");
	for (var i = 0; i < tips.length; i++) {
		if (tips[i].className.indexOf("infos") == - 1) continue;
		if (tips[i].className != "bild-mit-infos") {
			tips[i].onmouseover = showTTip;
			tips[i].onmouseout = hideTTip;	
		}		
	}
}	