var x = 0;
var xx=0;
var yy=15
var y = 0;
var showit = 0;
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
              && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
              && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav2 = (is_nav && (is_major == 2));
var is_nav3 = (is_nav && (is_major == 3));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                      (agt.indexOf("; nav") != -1)) );
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_gecko = (agt.indexOf('gecko') != -1);
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
var is_aol   = (agt.indexOf("aol") != -1);
var is_aol3  = (is_aol && is_ie3);
var is_aol4  = (is_aol && is_ie4);
var is_aol5  = (agt.indexOf("aol 5") != -1);
var is_aol6  = (agt.indexOf("aol 6") != -1);
var is_opera = (agt.indexOf("opera") != -1);
var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
var is_webtv = (agt.indexOf("webtv") != -1); 
var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
var is_AOLTV = is_TVNavigator;
var is_hotjava = (agt.indexOf("hotjava") != -1);
var is_hotjava3 = (is_hotjava && (is_major == 3));
var is_hotjava3up = (is_hotjava && (is_major >= 3));
if ( navigator.platform.substring(0,3).toUpperCase() == "MAC" && is_ie )  {
	mac = true;
} else {
	mac = false;
}
function wtl(txt, popid) {
    	if ((is_nav) && (is_nav4) && (!is_nav6) && (!is_nav6up) && (!is_gecko)) {
    		var lll = document.popDiv.document
    		lll.write(txt)
		lll.close()
    	}
		else {
		if (document.getElementById){document.getElementById("popDiv").innerHTML = txt;}
		else if (document.all) {document.all["popDiv"].innerHTML = txt;}
		}
}
if(document.layers) {
        window.captureEvents(Event.MOUSEMOVE);
        window.onmousemove=mouseMove;
} else {
       document.onmousemove=mouseMove;
}
function show() {
	if (is_nav6up){document.getElementById("popDiv").style.visibility="visible";}
	else if ((is_nav) && (is_nav4) && (!is_nav6) && (!is_nav6up) && (!is_gecko)) {document.popDiv.visibility = "show";}
	else {popDiv.style.visibility = "visible";}
}
function hide() {
	if (is_nav6up){document.getElementById("popDiv").style.visibility="hidden";}
	else if ((is_nav) && (is_nav4) && (!is_nav6) && (!is_nav6up) && (!is_gecko)) {document.popDiv.visibility = "hide";}
	else {popDiv.style.visibility = "hidden";}
}
function moveTo(lx,ly) {
	if (document.layers) {
		document.popDiv.left = lx;
		document.popDiv.top = ly;
	}
	if (document.all) {
		popDiv.style.left = lx;
		popDiv.style.top = ly;
	}
	if (document.getElementById) {
		document.getElementById('popDiv').style.left = lx+"px";
    	document.getElementById('popDiv').style.top = ly+"px";
	}
}

function HideInfoPop() {
	if (mac) {return;}
	showit = 0;
	hide();
}
function ShowInfoPop(popid, html, dx, dy) {
	if (mac) {return;}
	xx = dx;
	yy = dy;
	wtl(termin[html]);
	display_it();
}
function display_it() {
	if (showit == 0){
		moveTo(x+xx,y+yy);
		show();
		showit = 1;
	}
}
function mouseMove(e) {
	if (is_nav) {x=e.pageX; y=e.pageY;}
	if (is_ie4){x=event.x; y=event.y;}
	if (is_ie5up){x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
	if (showit) {moveTo(x+xx,y+yy);}
}

function OeffneFenster(url, name, breite, hoehe) {
	if(!breite) { breite = 610; }
	if(!hoehe) { hoehe = 450; }
	breite = breite + 16;
	hoehe = hoehe + 16;
	var oBrowser = new BrowserProps();//
	var iWidth = oBrowser.ScreenAvailWidth;
	var iHeight = oBrowser.ScreenAvailHeight;
	var iLeft = (iWidth-breite)/2;
	var iTop = (iHeight-hoehe)/2;
	if (iLeft<0) iLeft = 0;
	if (iTop<0) iTop = 0;
	var win = window.open(url, name, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,dependent=yes,hotkeys=no,width="+breite+",height="+hoehe+",screenX=" + iLeft + ",screenY=" + iTop + ",left=" + iLeft + ",top=" + iTop);
	win.focus();
}

function BrowserProps() {
	if (navigator.userAgent.indexOf("Opera")>-1) {
		this.ScreenAvailWidth = top.window.innerWidth;
		this.ScreenAvailHeight = top.window.innerHeight;
	} else {
		this.ScreenAvailWidth = screen.availWidth;
		this.ScreenAvailHeight = screen.availHeight;
	}
}

