function Navi() {
  
  this._mainNaviClass = "navi-element";
  this._mainNaviIEDiff = 497;
  this._mainNaviMarginLeft = 467;
  this._lastPointer = null;
  
  this.Navi = function() { }
  
  this.showLastSubNavi = function() {
    
    this.showSubNavi(this._lastPointer);
    
    return true;
    
  }
  
  this.hideLastSubNavi = function() {
    
    this.hideSubNavi(this._lastPointer);
    
    return true;
    
  }
  
  this.showSubNavi = function(pointer) {
    
    var newPosition, marginLeft, IEDiff;
    
    var actMenu = "";
    
    if (pointer.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointer.className = this._mainNaviClass + actMenu + " hover";
    
    if (!pointer.nextSibling || pointer.nextSibling.className.indexOf("navi-sub-element") < 0)
      return false;
    
    this._lastPointer = pointer;
    
    if (this._isIE())
      // Prototype insert
      newPosition = Element.viewportOffset(pointer).left - this._mainNaviMarginLeft - this._mainNaviIEDiff;
    else
      newPosition = this._getPosition(pointer).x - this._mainNaviMarginLeft;
    
    // #main-navi-Position
    newPosition -= document.getElementById("main-navi").offsetLeft;
    
    // IE fix
    if (Prototype.Browser.IE) {
      
      // IE 6
      if (navigator.appVersion.search(/msie\s6/i) != -1)
        $$("div#body select").invoke("setStyle", { visibility: "hidden" });
      
      // IE 6, 7
      if (navigator.appVersion.search(/msie\s6/i) != -1 || navigator.appVersion.search(/msie\s7/i) != -1)
        $$("div.expand-teaser a").invoke("setStyle", { visibility: "hidden" });
      
    }
    
    with (pointer.nextSibling.style) {
      
      display = "block";
      marginLeft = newPosition.toString() + "px";
      
    }
    
    return true;
    
  }
  
  this.hideSubNavi = function(pointer) {
    
    var actMenu = "";
    
    if (pointer.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointer.className = this._mainNaviClass + actMenu;
    
    if (!pointer.nextSibling || pointer.nextSibling.className.indexOf("navi-sub-element") < 0)
      return false;
    
    pointer.nextSibling.style.display = "none";
    
    // IE fix
    if (Prototype.Browser.IE) {
      
      // IE 6
      if (navigator.appVersion.search(/msie\s6/i) != -1)
        $$("div#body select").invoke("setStyle", { visibility: "visible" });
      
      // IE 6, 7
      if (navigator.appVersion.search(/msie\s6/i) != -1 || navigator.appVersion.search(/msie\s7/i) != -1)
        $$("div.expand-teaser a").invoke("setStyle", { visibility: "visible" });
      
    }
    
    return true;
    
  }
  
  this._isIE = function() {
    
    if (navigator.appName.search(/internet\sexplorer/i) != -1 && navigator.appVersion.search(/msie\s8/i) < 0)
      return true;
    
    return false;
    
  }
  
  this._getPosition = function(element) {
    
    var x = 0, y = 0;
    
    while ((typeof(element) == "object") && (typeof(element.tagName) != "undefined")) {
      
      x += element.offsetLeft;
      y += element.offsetTop;
      
      if (element.tagName.toLowerCase() == "body")
        element = 0;
      
      if (typeof(element) == "object")
        if (typeof(element.offsetParent) == "object")
          element = element.offsetParent;
      
    }
    
    var position = new Object();
    
    position.x = x;
    position.y = y;
    
    return position;
    
  }
  
  this.setIEDiff = function(value) {
    
    this._mainNaviIEDiff = value;
    
    return true;
    
  }
  
}
