var x = 0;
var y = 0;
var showit = 0;

// Welchen Broser haben wir denn...
ns = (document.layers)? true:false
ie4 = (document.all)? true:false
ie5 = false;
if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) {
		ie5 = true;
	}
	if (navigator.userAgent.indexOf('MSIE 6')>0) {
		ie5 = true;
	}
}

if ( (ns) || (ie4) ) {
	if (ns) over = document.popDiv
	if (ie4) over = popDiv.style
	document.onmousemove = mouseMove
	if (ns) document.captureEvents(Event.MOUSEMOVE)
}

function wtl(txt) {
	if (ns) {
		var lll = document.popDiv.document
		lll.write(txt)
		lll.close()
	} else {
		if (ie4) document.all["popDiv"].innerHTML = txt
	}
}

function show(obj) {
	if (ns) obj.visibility = "show"
	else if (ie4) obj.visibility = "visible"
}

function hide(obj) {
	if (ns) obj.visibility = "hide"
	else if (ie4) obj.visibility = "hidden"
}

function moveTo(obj,lx,ly) {
	obj.left = lx
	obj.top = ly
}

function hideit() {
	if ( (ns) || (ie4) ) {
		showit = 0;
		hide(over);
	}
}

// Popup zusammenbasteln
function rpopi(txt) {
//	txt = "<table border=5 cellpadding=0 cellspacing=0 bordercolor=#999999><tr><td><img src=/img/" + bild + "></td></tr></table>";
	wtl(txt);
	display_it();
}

function popi(parameter) {
	rpopi(parameter);
}

// ...und jetzt anzeigen
function display_it() {
	if ( (ns) || (ie4) ) {
		if (showit == 0) 	{
			moveTo(over,(document.body.clientWidth-780)/2+120,y);
			show(over);
			showit = 1;
		}
	}
}

// Auf mousemoves reagieren
function mouseMove(e) {
	if (ns) {x=e.pageX; y=e.pageY;}
	if (ie4) {x=event.x; y=event.y;}
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
	if (ie5) {x=event.x+document.body.scrollLeft; y=document.body.scrollTop+10;}
	if (showit) {
		moveTo(over,(document.body.clientWidth-780)/2+120,y);
	}
}


