function Navi() {
  
  this._mainNaviClass = "main-navi-element";
  this._mainNaviIEDiff = 312;
  this._mainNaviMarginLeft = 301;
  this._mainNaviRightIEDiff = 119;
  this._mainNaviRightMarginLeft = 857;
  this._lastPointer = null;
  
  this.Navi = function() { }
  
  this.showLastSubNavi = function(rightFloat) {
    
    this.showSubNavi(this._lastPointer, rightFloat);
    
    return true;
    
  }
  
  this.hideLastSubNavi = function() {
    
    this.hideSubNavi(this._lastPointer);
    
    return true;
    
  }
  
  this.showSubNavi = function(pointer, rightFloat) {
    
    var newPosition, marginLeft, IEDiff;
    
    if (!pointer.nextSibling)
      return false;
    
    this._lastPointer = pointer;
    
    if (rightFloat) {
      
      marginLeft = this._mainNaviRightMarginLeft;
      IEDiff = this._mainNaviRightIEDiff;
      
    } else {
      
      marginLeft = this._mainNaviMarginLeft;
      IEDiff = this._mainNaviIEDiff;
      
    }
    
    if (this._isIE())
      newPosition = this._getPosition(pointer).x - marginLeft - IEDiff;
    else
      newPosition = this._getPosition(pointer).x - marginLeft;
    
    // IFrame
    if (this._isIE())
      with (document.getElementById("main-navi-iframe").style) {
        
        display = "block";
        
        var tempPosition = newPosition;
        
        if (rightFloat)
          tempPosition += 368;
        
        marginLeft = tempPosition.toString() + "px";
        // Prototype insert
        height = Element.getHeight(pointer.nextSibling).toString() + "px";
        
      }
    
    with (pointer.nextSibling.style) {
      
      display = "block";
      marginLeft = newPosition.toString() + "px";
      
    }
    
    eval(pointer.getElementsByTagName("a")[0].onmouseover.toString().match(/over\(.*?\);/i)[0]);
    
    var actMenu = "";
    
    if (pointer.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointer.className = this._mainNaviClass + actMenu + " hover";
    
    return true;
    
  }
  
  this.hideSubNavi = function(pointer) {
    
    if (!pointer.nextSibling)
      return false;
    
    eval(pointer.getElementsByTagName("a")[0].onmouseout.toString().match(/out\(.*?\);/i)[0]);
    
    var actMenu = "";
    
    if (pointer.className.indexOf("act") != -1)
      actMenu = " act";
    
    pointer.className = this._mainNaviClass + actMenu;
    
    // IFrame
    if (this._isIE())
      document.getElementById("main-navi-iframe").style.display = "none";
    
    pointer.nextSibling.style.display = "none";
    
    return true;
    
  }
  
  this._isIE = function() {
    
    if (navigator.appName.search(/internet\sexplorer/i) != -1)
      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;
    
  }
  
}