/* ©2009 Tecnofiber. Desenvolvido por iD Studio - www.idstudio.art.br */


function es4(a4, a2, a1, a3, a5) {
  var _2 = "&#64;", d = "&#46;", l = "<", g = ">", s = "/";
  s = l + "a" + " href=\"&#109;&#97;" + "&#105;&#108;" + "&#116;&#111;" + "&#58;" + a1 + _2 + a2 + d + a3 + "\"" + (a5 ? " class=\"" + a5 + "\"" : "") + g + (a4 ? a4 : a1 + _2 + a2 + d + a3) + l + s + "a" + g;
  document.write(s);
}

hs.Expander.prototype.onBeforeExpand = function() {
  hs.close(); // close previously expanded picture before opening a new one
}


// Submenu Navigation

var navDelay = 250, currentMenu = defaultMenu = -1, topNav = currentSub = hoverObj = navTimer = null, navFocus = 0;

function SetupNav() {
  // Initiates variables and opens the default submenu.
  // prepares default variables
  defaultMenu = currentParent == -1 ? currentPage : currentParent;
  topNav = document.getElementById("topnav").getElementsByTagName("a");
  // opens default submenu
  Nav(defaultMenu);
}

function Nav(n) {
  // Function to change submenus. Also used to revert to default.
  // ignore if submenu is already open and just renews focus
  if (n == currentMenu) return Light(n, true);
  // unsets current submenu
  if (currentSub) currentSub.style.display = "none";
  if (hoverObj) hoverObj.className = hoverObj.className.replace("active", "");
  // obtain objects for new one
  hoverObj = topNav.item(n);
  currentSub = document.getElementById("subnav" + n);
  // turns it on
  hoverObj.className += " active";
  if (currentSub) currentSub.style.display = "block";
  currentMenu = n;
  // sets a temporary focus if this is not the default submenu
  if (n != defaultMenu) {
    clearTimeout(navTimer);
    navFocus = 2;
  } else navFocus = 0;
}

function Light(n, state) {
  // Registers focus, or lack of, in submenus other than the default.
  if (n == defaultMenu) return;
  if (state) {
    clearTimeout(navTimer);
    navFocus = 2;
  } else {
    navFocus = 1;
    navTimer = setTimeout("Nav(defaultMenu)", navDelay);
  }
}