var ie = 0;
var ns = 0;
var ns6 = 0;
var hideMenu = null;
var ContentInfo = '';

detectBrowser();
function detectBrowser() {
	if (document.all) { ie = 1; }
	else if (document.layers) { ns = 1; }
	else if (document.getElementById) { ns6 = 1; }
	else { ns = 1; }
}

function ShowL(div){
	if (ie) { eval('document.all.'+div+'.style.visibility = "visible"'); }
	if (ns)	{ eval('document.layers.'+div+'.visibility="show"');}
	if (ns6)	eval('document.getElementById("'+div+'").style.visibility="visible"');
}

function HideL(div){
	if (ie) { eval('document.all.'+div+'.style.visibility="hidden"'); }
	if (ns) { eval('document.layers.'+div+'.visibility="hide"'); }
	if (ns6) {eval('document.getElementById("'+div+'").style.visibility="hidden"');}
}

if (ie == 1) {doc = "document.all."; sty = ".style"}
if (ns == 1) {doc = "document."; sty = ""; }
if (ns6 == 1) {doc = "document.getElementById('"; sty = "').style"; }

var initialize = 0
var Ex, Ey, topColor, subColor, ContentInfo

if(ie){
	Ex = "event.x"
	Ey = "event.y"
	topColor = "#808080"
	subColor = "#FFFFE1"
}

if (ns){
	Ex = "e.pageX"
	Ey = "e.pageY"
	window.captureEvents(Event.MOUSEMOVE)
	window.onmousemove=overhere
	topColor = "#808080"
	subColor = "#FFFFE1"
}

if (ns6){
	Ex = "e.pageX"
	Ey = "e.pageY"
	window.captureEvents(Event.MOUSEMOVE)
	window.onmousemove=overhere
	topColor = "#808080"
	subColor = "#FFFFE1"
}

function MoveToolTip(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)))}
	if(ns6){eval(doc + layerName + sty + ".top = "  + (eval(FromTop)))}
	eval( doc + layerName + sty + ".left = " + (eval(FromLeft) + 15))
}

function ReplaceContent(layerName){
	if (ie == 1) { document.all[layerName].innerHTML = ContentInfo; }
	if (ns6 == 1) { document.getElementById('ToolTip').innerHTML = ContentInfo; }
	if (ns == 1) {
		with(document.layers[layerName].document) 
		{ 
			open(); 
		   	write(ContentInfo); 
		   	close(); 
		}
	}
}

function Activate(){initialize=1}
function deActivate(){initialize=0}

function overhere(e){
	if(initialize){
		ShowL("ToolTip");
		MoveToolTip("ToolTip", Ey , Ex, e)
	}
	else{
		MoveToolTip("ToolTip", 0, 0)
		HideL("ToolTip");
	}
}

function EnterContent(layerName, TTitle, TContent){
	ContentInfo = '<table border="0" width="190" 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="center">'+
	'<tr><td width="100%">'+
	'<font class="tooltipcontent">'+TContent+'</font>'+
	'</td></tr>'+
	'</table>'+
	'</td></tr>'+
	'</table>'+
	'</td></tr>'+
	'</table>';
	ReplaceContent(layerName)
}

function Position(Ereignis)
{
if (ns6 == 1) {
 	Ex = Ereignis.pageX;
 	Ey = Ereignis.pageY;
	}
}
document.onmousemove = Position;


