tip = null;
document.onmousemove = updateTip;

function updateTip(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y : e.pageY;
	xfrontier = screen.width - 340;
	yfrontier = screen.height - 150;
	if (tip != null) {
		if (x > xfrontier) {
			if (y > yfrontier) {
				tip.style.left = (x - 400) + "px";
				tip.style.top  = (y - 100) + "px";
			} else {
				tip.style.left = (x - 400) + "px";
				tip.style.top  = (y + 10) + "px";
			}
		} else {
			tip.style.left = (x + 10) + "px";
			tip.style.top  = (y + 10) + "px";
		}
	}
}

function showTip(id, content) {
	tip = document.getElementById(id);
	tip.innerHTML = content;
	tip.style.display = "block";
}

function hideTip() {
	document.getElementById('tooltip').style.display = "none";
}

function showhide(name) {
	document.getElementById(name).style.display = (document.getElementById(name).style.display == 'block') ? 'none' : 'block';
}

function toggle(name,pic) {
	bildPfad = document.images[pic].src;
	bildPfadPosition = bildPfad.lastIndexOf("/")
	path = bildPfad.substr(0, (bildPfadPosition))
	document.getElementById(name).style.display = (document.getElementById(name).style.display == 'none') ? 'block' : 'none';
	document.images[pic].src = (document.images[pic].src == path+"/navi-left_link-more.gif") ? path+"/navi-left_link-less.gif" : path+"/navi-left_link-more.gif";
}

function openWindow(url,name,breite,hoehe) {
	links = (screen.width/2)-(breite/2);
	oben = (screen.height/2)-(hoehe/2);
	window.open(url,name,"height="+hoehe+",width="+breite+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,titlebar=no,scrollbars=no,fullscreen=no,top ="+oben+",left ="+links);
}
