function Navi() {
  
  this._mainNaviId = "main_navigation";
  this._mainNaviSubClass = "sub_navi";
  this._mainNaviIEDiff = 0;
  this._mainNaviMarginLeft = 13;
  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;
    
    if (!pointer.getElementsByTagName("div")[0])
      return false;
    
    this._lastPointer = pointer;
    
    if (this._isIE())
      newPosition = this._mainNaviIEDiff - pointer.getElementsByTagName("img")[0].width;
    else
      newPosition = this._getPosition(pointer).x - this._mainNaviMarginLeft;
    
    newPosition -= document.getElementById(this._mainNaviId).offsetLeft;
    
    with (pointer.getElementsByTagName("div")[0].style) {
      
      display = "block";
      marginLeft = newPosition.toString() + "px";
      
    }
    
    eval(pointer.getElementsByTagName("a")[0].onmouseover.toString().match(/over\(.*?\);/i)[0]);
    pointer.className = this._mainNaviSubClass + " act";
    
    return true;
    
  }
  
  this.hideSubNavi = function(pointer) {
    
    if (!pointer.getElementsByTagName("div")[0])
      return false;
    
    eval(pointer.getElementsByTagName("a")[0].onmouseout.toString().match(/out\(.*?\);/i)[0]);
    pointer.className = this._mainNaviSubClass;
    
    pointer.getElementsByTagName("div")[0].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;
    
  }
  
}