ContentInfo = "";

topColor = "#FFFFE1"
subColor = "#FFFFE1"

var mouse_X;
var mouse_Y;

var tip_active = 0;

var Jobboerse = "<p class='tooltipcontent' style='float:left;'>Juristen:&nbsp;</p><iframe style='float:left;' width='150' height='14' src='/job/JobAnzahl.asp?anzeige=erklaer' marginwidth='0' marginheight='0' scrolling='no' frameborder='0'></iframe><br clear='all'>";
Jobboerse = Jobboerse + "<p class='tooltipcontent' style='float:left;'>Stationsreferendare:&nbsp;</p><iframe style='float:left;' width='150' height='14' src='/refjob/refJobAnzahl.asp?anzeige=erklaer' marginheight='0' marginwidth='0' scrolling='no' frameborder='0'></iframe>";

function update_tip_pos()
{
	document.getElementById('ToolTip').style.left = mouse_X + 20 + "px";
	document.getElementById('ToolTip').style.top  = mouse_Y + "px";
}

var ie = document.all?true:false;
if (!ie) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

function getMouseXY(e) 
{
	if (ie) 
	{ // grab the x-y pos.s if browser is IE
		// Geändert wg. Fehler in IE/05.02.2008/DQ
		//vorher:
		//mouse_X = event.clientX + document.body.scrollLeft;
		//mouse_Y = event.clientY + document.body.scrollTop;
		//nachher:
		mouse_X = event.clientX + document.documentElement.scrollLeft;
		mouse_Y = event.clientY + document.documentElement.scrollTop;
	}
	else 
	{ // grab the x-y pos.s if browser is NS
		mouse_X = e.pageX;
		mouse_Y = e.pageY;
	}
	if (mouse_X < 0){mouse_X = 0;}
	if (mouse_Y < 0){mouse_Y = 0;}
	if(tip_active){update_tip_pos();}
}

function EnterContent(TTitle, TContent)
{
	ContentInfo = '<table border="0" width="300" cellspacing="0" cellpadding="0"><tr><td width="100%" bgcolor="#000000">'+
	'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
//	'<tr><td width="100%" bgcolor='+topColor+'>'+
//	'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+
//	'<tr><td width="100%">'+
//	'<font class="tooltiptitle">&nbsp;'+TTitle+'</font>'+
//	'</td></tr>'+
//	'</table>'+
//	'</td></tr>'+
	'<tr><td width="100%" bgcolor='+subColor+'>'+
	'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="left">'+
	'<tr><td width="100%">'+
	'<font class="tooltipcontent">'+TContent+'</font>'+
	'</td></tr>'+
	'</table>'+
	'</td></tr>'+
	'</table>'+
	'</td></tr>'+
	'</table>';
}

function tip_it(which, TTitle, TContent)
{
	if(which)
	{
		update_tip_pos();
		tip_active = 1;
		document.getElementById('ToolTip').style.visibility = "visible";
		EnterContent(TTitle, TContent);
		document.getElementById('ToolTip').innerHTML = ContentInfo;
	}
	else
	{
		tip_active = 0;
		document.getElementById('ToolTip').style.visibility = "hidden";
	}
}

