// Browserpruefung

this.ie=true;
this.nn=false;

var mouse_X;
var mouse_Y;

document.getElementById?this.dom=1:this.dom=0;
document.all?this.ie=1:this.ie=0;
document.layers?this.nn=1:this.nn=0;

if(!nn && !ie && !dom)
{
    alert("Sie setzen einen Browser ein, der keinem Standard entspricht. Die Darstellung dieser Seiten ist daher möglicherweise auch nicht standardgerecht.");
}

with(document)
{
    (dom)?writeln('<div id="overDiv" style="background-color:#ffffff;position:absolute;visibility:hidden;z-index:100;overflow:auto;border:3px ridge;"></div>'):ie?writeln('<div id="overDiv" border="2" style="background-color:#ffffff;position:absolute;visibility:hide;z-index:100;overflow:auto;border:3px ridge;"></div>'):writeln('<layer id="overDiv" visibility="hide"></layer>');
}

var snow = 0;
var sw = 0;
var cnt = 0;

function scc(text,title,popupwidth,popupheight,popuptitlecolor)
{
	if ( (nn) || (ie) || (dom) )
	{
	    if (nn) over = document.overDiv;
	    if ((ie)&&(dom)) over = overDiv.style;
	    if ((dom)&&(!ie)) over = document.getElementById("overDiv").style;
	}
    stc(text,title,popupwidth,popupheight,popuptitlecolor);
}

function nd()
{
    if ( cnt >= 1 ) { sw = 0 };
    if ( (nn) || (ie) )
    {
        if ( sw == 0 )
        {
            snow = 0;
            hideObject(over);
        }
        else
        {
            cnt++;
        }
    }
}

function stc(text, title, popupwidth, popupheight, popuptitlecolor)
{
	var width=popupwidth;
    var height=popupheight;
    cnt = 0;
    txt = "<table align='left' valign='top' width=\""+width+"\" style=\""+width+"\" height=\""+height+"\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\" align=\"top\"><tr><td bgcolor=\""+popuptitlecolor+"\">"+title+"</td></tr><tr><td valign=\"top\" bgcolor=\""+fcolor+"\" align=\"left\">"+text+"</td></tr></table>"
    layerWrite(txt,popupwidth,popupheight);
    disp(popupwidth,popupheight);
    snow = 0;
}

function getMouseXY(e) 
{
	if (!ie) 
	{ // 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;}
}

function disp(popupwidth,popupheight)
{
    if ( (nn) || (ie) || (dom) )
    {
        if (snow == 0)
        {
			document.onclick = getMouseXY;

			var evt = evt ? evt : window.event;

		    var pos = new Object(); 
		    var b = (window.document.compatMode && window.document.compatMode == "CSS1Compat") ?  
			   window.document.documentElement : window.document.body || null; 

			if (ie)
			{
		        mouse_X= evt.clientX + b.scrollLeft; 
		        mouse_Y = evt.clientY + b.scrollTop; 
			}


			if (mouse_X > 580){mouse_X = mouse_X -popupwidth;}

	        moveTo(over,mouse_X + "px",mouse_Y + "px");

	        var width=popupwidth;
	        var height=popupheight;

            showObject(over,width,height);
            snow = 1;
        }
    }
}


function cClick()
{
    hideObject(over);
    sw=0;
}

function layerWrite(txt)
{
    if (nn)
    {
        var lyr = document.overDiv;
        lyr.write(txt);
        lyr.close();
    }
    if ((ie) && (dom)) document.all["overDiv"].innerHTML = txt;
    if ((dom)&&(!ie))
    {
    	document.getElementById("overDiv").innerHTML = txt;
    }
}

function showObject(obj,popupwidth,popupheight)
{
	var width=popupwidth;
    var height=popupheight;

    if (nn) obj.visibility = "show"
    else if ((ie) || (dom))
    {
    obj.height = height;
    obj.width = width;
    obj.visibility = "visible";
	}
}

function hideObject(obj)
{
    if (nn) obj.visibility = "hide"
    else if ((ie) || (dom)) obj.visibility = "hidden"
}

function moveTo(obj,xL,yL)
{
	obj.left = xL
	obj.top = yL
}

var x = 0;
function listboxenweg(x)
{
    var zaehler = x;
    for(var i = 1; i <= zaehler; i++)
    {
        listboxen = "listboxen" + i;
        document.getElementById(listboxen).style.visibility='hidden';
    }
}

function listboxenzeigen(x)
{
    var zaehler = x;
    for(var i = 1; i <= zaehler; i++)
    {
        listboxen = "listboxen" + i;
        document.getElementById(listboxen).style.visibility='visible';
    }
}

function popupschliessen(datei,target)
{
    var datei=datei;
    var target=target;
    cClick();
    self.location.href=datei+'#'+target;
}