
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0

if(ns){doc = "document."; sty = ""}
if(ie){doc = "document.all."; sty = ".style"}

var initialize = 0
var Ex, Ey, TitelFarbe, TextFarbe, ContentInfo


if(ie)
{
	Ex = "event.x"
	Ey = "event.y"

	TitelFarbe = "red"
	TextFarbe = "#FFCC33"
}
if(ns)
{
	Ex = "e.pageX"
	Ey = "e.pageY"
	window.captureEvents(Event.MOUSEMOVE)
	window.onmousemove=Starten

	TitelFarbe = "red"
	TextFarbe = "#FFCC33"
}

function ToolTipBewegen(layerName, FromTop, FromLeft, e)
{
	if(ie)
	{
		eval(doc + layerName + sty + ".top = " + (eval(FromTop) + document.body.scrollTop));
	}
	if(ns)
	{
		eval(doc + layerName + sty + ".top = " + eval(FromTop));
	}
	eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 15));
}

function InhaltErsetzen(layerName)
{
	if(ie)
	{
		document.all[layerName].innerHTML = ContentInfo;
	}
	if(ns)
	{
		with(document.layers[layerName].document)
		{ 
			open();
			write(ContentInfo);
			close();
		}
	}
}

function Aktivieren()
{
	initialize=1;
}
function Deaktivieren()
{
	initialize=0;
}

function Starten(e)
{
	if(initialize)
	{
		ToolTipBewegen("ToolTip", Ey, Ex, e);
		eval(doc + "ToolTip" + sty + ".visibility = 'visible'");
	}
	else
	{
		ToolTipBewegen("ToolTip", 0, 0);
		eval(doc + "ToolTip" + sty + ".visibility = 'hidden'");
	}
}

function ToolTip(layerName, TTitel, TInhalt)
{
	ContentInfo = '<table border="0" width="260" cellspacing="0" cellpadding="0">'+'<tr><td width="100%" bgcolor="#000000">'+'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+'<tr><td width="100%" bgcolor='+TitelFarbe+'>'+'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+'<tr><td width="100%">'+'<font class="ToolTipTitel"> '+TTitel+'</font>'+'</td></tr>'+'</table>'+'</td></tr>'+'<tr><td width="100%" bgcolor='+TextFarbe+'>'+'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+'<tr><td width="100%">'+'<font class="ToolTipInhalt">'+TInhalt+'</font>'+'</td></tr>'+'</table>'+'</td></tr>'+'</table>'+'</td></tr>'+'</table>';
	InhaltErsetzen(layerName);
}

function change_area_detail(area_detail)
{
	window.area_detail_data.innerHTML = area_detail;
}