    menuloaded = false
    function m_init(front) {
      for (i=1;i<=6;i++) {
        eval('menulayer'+i+' = new layerObj("menudiv'+i+'")')
      }
      layerCount = 6
      if (is.ns4) {
        for (i=1;i<=6;i++) {
          eval('menulayer'+i+'.elm.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)')
        }
      }
      for (i=1;i<=6;i++) {
        eval('menulayer'+i+'.elm.onmouseover = m_over')
        eval('menulayer'+i+'.elm.onmouseout = m_out')
      }
      closeTimer = ''
      selected = ''
      widthCheck = getInsideWindowWidth();
      heightCheck = getInsideWindowHeight();
      window.onresize = resizeFix
      menuPlaceArr = new Array(37,162,316,412,502,665)
      if (front=='kurv') {
        menulayer1.menuy = 0
      } else {
        menulayer1.menuy = (front)? 492 : 491+60;
      }
      menulayer1.front = front
      placeMenu(794,menulayer1.menuy,widthCheck,heightCheck)
      hidelayer0 = new layerObj("layer0")
      menuloaded = true
    }
    function placeMenu(width,height,screenwidth,screenheight) {
      for (i=1; i<=layerCount; i++) {
        if (screenwidth<width) {
          x = menuPlaceArr[i-1]
        } else {
          x = Math.round((screenwidth / 2) - (width / 2)) + menuPlaceArr[i-1]
        }
        y = Math.round((screenheight / 2) - (height / 2)) + 81
        if (height==0 || screenheight<450) {
          y = (menulayer1.front==true)? 53 : 24
        }
        eval("menulayer"+i+".moveTo("+x+","+y+")")
      }
    }
    function menuShow(i) {
      selected = i
      eval("menuobj = menulayer"+i)
      if (i==1 || i==2) {
        hidelayer0.hide()
      }
      menuobj.show()
      inc = 10
      h = menuobj.getHeight()
      if (is.ie) {
        menuobj.onWipeEnd = new Function("selected = "+i)
      } else {
        menuobj.onWipeEnd = new Function("selected = "+i)
      }
      if (is.ie) {
      }
    }
    function menuHide(i) {
      selected = ''
      eval("menuhideobj = menulayer"+i)
      inc = 10
      h = menuhideobj.getHeight()
      menuhideobj.onWipeEnd = new Function("menuhideobj.hide")
      menuhideobj.hide()
      hidelayer0.show()
    }
    function m_over() {
      clearTimeout(closeTimer)
    }
    function m_out() {
      if (menuloaded) {
        closeTimer = setTimeout('m_close('+selected+')',500)
      }
    }
    function m_open(i) {
      if (menuloaded) {
        clearTimeout(closeTimer)
        for (j=1; j<=layerCount; j++) {
          if (j!=i) {
            menuHide(j)
          }
        }
        menuShow(i)
      }
    }
    function m_close(i) {
      clearTimeout(closeTimer)
      menuHide(i)
    }
    function menuOver(which,ncolor) {
      if (!which.contains(event.fromElement)) {
        which.style.cursor = 'hand'
        which.bgColor = ncolor
      }
    }
    function menuOut(which,ncolor) {
      if (!which.contains(event.toElement)) {
        which.style.cursor = 'default'
        which.bgColor = ncolor
      }
    }
    function menuClick(which,ncolor,url) {
      if (!which.contains(event.fromElement)) {
        which.style.cursor = 'hand'
        which.bgColor = ncolor
      }
      document.location.href = url
    }
    function resizeFix(front) {
      var width = getInsideWindowWidth();
      var height = getInsideWindowHeight();
      if (widthCheck != width || heightCheck != height) {
        placeMenu(794,menulayer1.menuy,width,height,front)
        widthCheck = getInsideWindowWidth();
        heightCheck = getInsideWindowHeight();
      }
    }

