  var fecha=new Date();
  dia=fecha.getDate();
  mes=fecha.getMonth()+1;
  anio=fecha.getYear();
  anio=anio%100;
  if (dia<10) dia="0"+dia;
  if (mes<10) mes="0"+mes;
  if (anio<10) anio="0"+anio;
  document.MM_returnValue = false;


  // Ventana emergente totalmente configurable por parametros
  function openAWindow( pageToLoad, winName, width, height, center, location, menubar, resizable, scrollbars, status, titlebar, toolbar, hotkeys) {
  xposition=0; yposition=0;
  if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
  xposition = (screen.width - width) / 2;
  yposition = (screen.height - height) / 2;
  }
  args = "width=" + width + ","
  + "height=" + height + ","
  + "location=" + location + ","
  + "menubar=" + menubar + ","
  + "resizable=" + resizable + ","
  + "scrollbars=" + scrollbars + ","
  + "status=" + status + ","
  + "titlebar=" + titlebar + ","
  + "toolbar=" + toolbar + ","
  + "hotkeys=" + hotkeys + ","
  + "screenx=" + xposition + "," //NN Only
  + "screeny=" + yposition + "," //NN Only
  + "left=" + xposition + "," //IE Only
  + "top=" + yposition; //IE Only
  window.open( pageToLoad,winName,args );
}

function openPopup(ppage, pname, pwidth, pheight, pt, pl, ptol, pr, ps, ploc) {
    newwin = window.open(ppage, pname, "toolbar=" + ptol + ",location=" + ploc + ", resizable=" + pr + ",scrollbars=" + ps + ",width=" + pwidth + ",height=" + pheight + ",top=" + pt + ",left=" + pl)
    if(newwin.opener == null)
      newwin.opener = self;
  }
