function Navi() {
  
  this._mainNaviClass = "navi-element";
  this._mainNaviIEDiff = 637;
  this._mainNaviMarginLeft = 10;
  this._lastPointer = null;
  this._lastSubPointer = null;
  this._lock = false;
  
  this.Navi = function() { }
  
  this.showLastSubNavi = function() {
    
    this.showSubNavi(this._lastPointer);
    
    return true;
    
  }
  
  this.showLastSubSubNavi = function() {
    
    this.showSubSubNavi(this._lastSubPointer);
    
    return true;
    
  }
  
  this.hideLastSubNavi = function() {
    
    this.hideSubNavi(this._lastPointer);
    
    return true;
    
  }
  
  this.hideLastSubSubNavi = function() {
    
    this.hideSubSubNavi(this._lastSubPointer);
    
    return true;
    
  }
  
  this.showSubNavi = function(pointer) {
    
    var newPosition, marginLeft, IEDiff;
    
    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;
    
    with (pointer.nextSibling.style) {
      
      display = "block";
      marginLeft = newPosition.toString() + "px";
      
    }
    
    var actMenu = "";
    
    if (pointer.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointer.className = this._mainNaviClass + actMenu + " hover";
    
    return true;
    
  }
  
  this.showSubSubNavi = function(pointer) {
    
    this._lock = true;
    
    var pointerLast = pointer;
    var pointer = pointer.parentNode;
    
    if (!pointer.nextSibling || pointer.nextSibling.className.indexOf("navi-sub-sub-element") < 0)
      return false;
    
    this._lastSubPointer = pointerLast;
    
    pointer.nextSibling.style.display = "block";
    
    var actMenu = "";
    
    if (pointerLast.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointerLast.className = "navi-sub-sub-element" + actMenu + " hover";
    
    return true;
    
  }
  
  this.hideSubNavi = function(pointer) {
    
    if (this._lock)
      return false;
    
    if (!pointer.nextSibling || pointer.nextSibling.className.indexOf("navi-sub-element") < 0)
      return false;
    
    pointer.nextSibling.style.display = "none";
    
    var actMenu = "";
    
    if (pointer.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointer.className = this._mainNaviClass + actMenu;
    
    return true;
    
  }
  
  this.hideSubSubNavi = function(pointer) {
    
    this._lock = false;
    
    var pointerLast = pointer;
    var pointer = pointer.parentNode;
    
    if (!pointer.nextSibling || pointer.nextSibling.className.indexOf("navi-sub-sub-element") < 0)
      return false;
    
    pointer.nextSibling.style.display = "none";
    
    var actMenu = "";
    
    if (pointerLast.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointerLast.className = "navi-sub-sub-element" + actMenu;
    
    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;
    
  }
  
}