mo = [];
mo.images = [];
mo.base = 'template/gfx/menu/';

mo.enter = function(el) {
   if (el.firstChild && this.images[el.firstChild.name]) {
      el.firstChild.src = this.images[el.firstChild.name][1].src;
   }
}

mo.exit = function(el) {
   if (el.firstChild && this.images[el.firstChild.name]) {
      el.firstChild.src = this.images[el.firstChild.name][0].src;
   }
}

mo.preload = function(name, normal, hover) {
   mo.images[name] = [];
   mo.images[name][0] = new Image()
   mo.images[name][0].src = this.base + normal;
   mo.images[name][1] = new Image()
   mo.images[name][1].src = this.base + hover;
}

/* --- Preload images --------------------------------------------- */

function popUp(fileName, popUpWidth, popUpHeight) {
   margeLeft = (screen.width - popUpWidth) / 2;
   margeTop = (screen.height - popUpHeight) / 2;
   
   parameterString = "width=" + popUpWidth + ",height=" + popUpHeight + ",left=" + margeLeft + ",top=" + margeTop + ",scrollbars=yes";
   popWindow = window.open(fileName, "_blank", parameterString);
   popWindow.focus();
}

  function exp(id)
      {
         document.documentElement.style.backgroundImage = 'none';
         el = document.getElementById(id);
      
   if (el.style.display && el.style.display != 'block')
      {
         el.style.display = 'block';
      }
   else
      {
         el.style.display = 'none';
      }
   }