function reloadPage(init)
{
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}

reloadPage(true);

var isNav4, isNav6, isIE
var isBrand = navigator.appName
var agt = navigator.userAgent.toLowerCase()
var navVer = parseInt(navigator.appVersion)

var vorne, hinten

isNav4 = (isBrand == "Netscape" && navVer < 5) ? true : false
isNav6 = (isBrand == "Netscape" && navVer >= 5) ? true : false
isIE = ((agt.indexOf("msie") != -1) && (parseInt(navVer) >= 4)) ? true : false

if (isNav4)
{
        vorne = ".layers['";
        hinten = "']";
}
else if (isNav6)
{
        vorne = ".getElementById('";
        hinten = "').style";
}
else if (isIE)
{
        vorne = ".all.";
        hinten = ".style";
}


function show(obj)
{
        var theObj = eval("document" + vorne + obj + hinten);
        theObj.visibility = "visible";
        if (isNav4)
        {
                window.setTimeout("hide('" + obj + "')", 4000);
        }
}

function hide(obj)
{
        var theObj = eval("document" + vorne + obj + hinten);
        theObj.visibility = "hidden";
}

function hideall()
{
        hide('Unternehmen');
        hide('Transaktionen');
        hide('Nachfolge');
        hide('Kooperationen');
        hide('Kontakt');
}

function MM_openBrWindow(theURL,winName,features)
{
          window.open(theURL,winName,features);
}

// ----------------------------------
// set mouse capturing
// ----------------------------------
// If NS -- that is, !IE -- then set up for mouse capture
if (!isIE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempx = 0
var tempy = 0

// Main function to retrieve mouse x-y pos.s
function getMouseXY(e) {
  if (isIE) { // grab the x-y pos.s if browser is IE
    tempx = event.clientX + document.body.scrollLeft
    tempy = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempx = e.pageX
    tempy = e.pageY
  }
  // catch possible negative values in NS4
  if (tempx < 0){tempx = 0}
  if (tempy < 0){tempy = 0}
}


function checkPos()
{
        // ----------------------------      check for events -------------------------#
        if(tempx <= 60)
        {
                var theObj = eval("document" + vorne + "Unternehmen" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempx >= 160)
        {
                var theObj = eval("document" + vorne + "Unternehmen" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy <= 100)
        {
                var theObj = eval("document" + vorne + "Unternehmen" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy >= 260)
        {
                var theObj = eval("document" + vorne + "Unternehmen" + hinten);
                theObj.visibility = "hidden";
        }

        // ----------------------------      check for clubs  -------------------------#
        if(tempx <= 120)
        {
                var theObj = eval("document" + vorne + "Transaktionen" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempx >= 245)
        {
                var theObj = eval("document" + vorne + "Transaktionen" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy <= 100)
        {
                var theObj = eval("document" + vorne + "Transaktionen" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy >= 220)
        {
                var theObj = eval("document" + vorne + "Transaktionen" + hinten);
                theObj.visibility = "hidden";
        }

        // ----------------------------      check for gastro -------------------------#
        if(tempx <= 252)
        {
                var theObj = eval("document" + vorne + "Nachfolge" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempx >= 348)
        {
                var theObj = eval("document" + vorne + "Nachfolge" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy <= 100)
        {
                var theObj = eval("document" + vorne + "Nachfolge" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy >= 220)
        {
                var theObj = eval("document" + vorne + "Nachfolge" + hinten);
                theObj.visibility = "hidden";
        }

        // ----------------------------      check for community -------------------------#
        if(tempx <= 350)
        {
                var theObj = eval("document" + vorne + "Kooperation" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempx >= 460)
        {
                var theObj = eval("document" + vorne + "Kooperation" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy <= 100)
        {
                var theObj = eval("document" + vorne + "Kooperation" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy >= 285)
        {
                var theObj = eval("document" + vorne + "Kooperation" + hinten);
                theObj.visibility = "hidden";
        }

        // ----------------------------      check for kontakt -------------------------#
        if(tempx <= 430)
        {
                var theObj = eval("document" + vorne + "kontakt" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempx >= 575)
        {
                var theObj = eval("document" + vorne + "kontakt" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy <= 100)
        {
                var theObj = eval("document" + vorne + "kontakt" + hinten);
                theObj.visibility = "hidden";
        }
        if(tempy >= 240)
        {
                var theObj = eval("document" + vorne + "kontakt" + hinten);
                theObj.visibility = "hidden";
        }
}