marbu: Pulldown Menu mit Opera und Mozilla funzt nicht

Beitrag lesen

Hallo,

ich hoffe mir kann jemand helfen. Mit Internet-Explorer funktioniert alles
aber Opera und Mozilla machen mir Probleme. Ich weiß nicht mehr weiter, denn
jetzt war ich so lang drüber. Und jetzt geht's nicht. Vielen Dank für euere Hilfe.

Danke

menue.js
--------------------------------------------------------------------
    version = '0';
     var isMacIE = ( (navigator.userAgent.indexOf("IE 4") > -1) && (navigator.userAgent.indexOf("Mac")  > -1) );
     browserName = navigator.appName;
     browserVer = parseInt(navigator.appVersion);
        if (browserName == "Netscape" && browserVer >= 4)version = "n4";
        else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";

if (version == "n4" || version == "e4" && !isMacIE)
  {
  document.write('' +

'<div id=menu1 class="menu"><a href="http://www.test.de/pulldown/" onmouseover=timer(1); onmouseout=timer(0);>Test</a>

}
----------------------------------------------------------------------

layer.js
-----------------------------------------------------------------------
var unself
if (_version != '1.2') {
    window.onerror = new Function("return true;");
}
        var isNS = (navigator.appName == "Netscape");
        var isMacIE = ( (navigator.userAgent.indexOf("IE 4") > -1) && (navigator.userAgent.indexOf("Mac")  > -1) );
        var layerRef = (isNS) ? "document" : "document.all";
        var styleRef = (isNS) ? "" : ".style";
        var isDynamic = ( ((document.layers && document.layers['layerTest']) || (document.all && document.all['layerTest'])) && !isMacIE );

function getXCoord(imgID) {
        if (isNS) xPos = document.images[imgID].x;
        else xPos = getIEXCoord(imgID)
        return xPos;
}

function getYCoord(imgID) {
  if (isNS) yPos = document.images[imgID].y;
  else yPos = getIEYCoord(imgID);
  return yPos;
}

function getIEXCoord(imgElem) {
        xPos = eval(imgElem).offsetLeft;
        tempEl = eval(imgElem).offsetParent;
        while (tempEl != null) {
                xPos += tempEl.offsetLeft;
                tempEl = tempEl.offsetParent;
        }
        return xPos;
}

function getIEYCoord(imgElem) {
        yPos = eval(imgElem).offsetTop;
        tempEl = eval(imgElem).offsetParent;
        while (tempEl != null) {
                yPos += tempEl.offsetTop;
                tempEl = tempEl.offsetParent;
        }
        return yPos;
}

var activeMenu = 0;

function activateMenu(menuLayerRef, imageName, left, top) {
var lightsout
    if (isDynamic && activeMenu != menuLayerRef) {
        if (activeMenu) hideMenu("menu" + activeMenu);
        menuID = "menu" + menuLayerRef;
        activeMenu = menuLayerRef;

if (isNS) {
            document[menuID].left = getXCoord(imageName) + left;
            document[menuID].top = getYCoord(imageName) + top;
        } else {
            document.all[menuID].style.pixelLeft = getXCoord(imageName) + left;
            document.all[menuID].style.pixelTop = getYCoord(imageName) + top;
        }
        showMenu(menuID, left, top)
    }
}

function showMenu(layerID, left, top) {
    eval(layerRef + '["' + layerID + '"]' +
    styleRef + '.visibility = "visible"');
}

function hideMenu(layerID) {
    eval(layerRef + '["' + layerID + '"]' +
    styleRef + '.visibility = "hidden"');
}

// check if there's a menu active
function turnOff() {
    if (activeMenu) {
        menuID = "menu" + activeMenu;
        hideMenu(menuID);
        activeMenu = 0;
    }
}

// kills menu on clickup
function init() {
    if (isDynamic) {
        if (isNS) {
            document.captureEvents(Event.mouseup);
        }
        document.onmouseup = turnOff;
    }
}

// this function needs to be called from the sub menus DIV
function hideMe() {
    if (activeMenu) {
        menuID = "menu" + activeMenu;
        hideMenu(menuID);
        activeMenu = 0;
    }
}

// Work-around Netscape resize bug
if (isDynamic && isNS) {
    origWidth = innerWidth;
    origHeight = innerHeight;
}

function reDo() {
    if (innerWidth != origWidth || innerHeight != origHeight) {
        location.reload();
    }
}

if (isDynamic && isNS) {
    onresize = reDo;
}

function timer(offon)  {
if (offon == 0) {
    unself = setTimeout('turnOff()', 1200);
    }
if (offon ==1) {
 clearTimeout(unself);
 }
}
--------------------------------------------------------------------------