  var menu = new Array();
  var menuActivo = null;
  // Objeto Menu
  function am() {
    if (menuActivo != this) {
      if (menuActivo) menuActivo.ocultar();
      menuActivo = this;
      this.mostrar();
    }
  }
  function mm() {
    eval(this.capaRefStr + this.estiloRefStr + '.visibility = "visible"');
    this.domRef.style.display = "block";
  }
  function om() {
    eval(this.capaRefStr + this.estiloRefStr + '.visibility = "hidden"');
    this.domRef.style.display = "none";
  }
  function cpm(top, left) {
    eval(this.capaRefStr + this.estiloRefStr + this.topRefStr + ' = top');
    eval(this.capaRefStr + this.estiloRefStr + this.leftRefStr + ' = left');
    this.domRef.style.display = "none";
  }
  function Menu(capaID, top, left, width) {
    this.activar = am;
    this.mostrar = mm;
    this.ocultar = om;
    this.cambiarPosicion = cpm;
    this.domRef = document.getElementById(capaID);
    this.domRef.style.width = width;
    //this.capaRefStr = 'document.all["'+capaID+'"]';
	this.capaRefStr = capaID;
    this.estiloRefStr = '.style';
    this.topRefStr = '.pixelTop';
    this.leftRefStr = '.pixelLeft';
    this.cambiarPosicion(top, left);
  }
  // Manejo de eventos
  function oma(e) {
    if (menuActivo) {
      menuActivo.ocultar();
      menuActivo = null;
    }
  }
  //Calculo de posicion
  function grl(imgElem) {
    xPos = eval(imgElem).offsetLeft;
    tempEl = eval(imgElem).offsetParent;
    while (tempEl != null) {
      xPos += tempEl.offsetLeft;
      tempEl = tempEl.offsetParent;
    }
    return xPos;
  }
  function grt(imgElem) {
    yPos = eval(imgElem).offsetTop;
    tempEl = eval(imgElem).offsetParent;
    while (tempEl != null) {
      yPos += tempEl.offsetTop;
      tempEl = tempEl.offsetParent;
    }
    return yPos;
  }
  function findObj(n, d) { //v3.0
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
    }
