// Funcion para abrir ventanas centradas

function abrirVentana(url, name, width, height) 
{
  var str = "scrollbars=no, height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  window.open(url, name, str);
}

function abrirVentanaScroll(url, name, width, height) 
{
  var str = "scrollbars=yes, height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  window.open(url, name, str);
}

  function abrirProgreso(){
       winProgr = window.open("/intranet/utiles/progreso00.asp", "Procesando", "status=no,scrollbars=no,menubar=no,location=no,resizable=no,height=150,innerHeight=150,width=280,innerWidth=280,left=431,screenX=431,top=316,screenY=316");
  }


/*
function abrirVentanaVerif(url, name, width, height, sistema) 
{
  if (ifrm.jsSelRow == null)
    alert("Debe seleccionar un registro.")
  else	
    if ((sistema != null) &&
        (ifrm.jsSelRow.cells(sistema).innerText == 'si'))
       alert('Registro del sistema. No se lo puede modificar.');
	else   
       abrirVentana(url, name, width, height) 
}

//window.open(donde,"","toolbar=no,location=no,directories=no,satus=no,menubar=no,scrollbars=no,resizable=yes,width=250,height=120");
function abrirVentanaH(url, name, width, height) 
{
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {

    var xc = screen.availWidth + width;
    var yc = screen.availHeight + height;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  window.open(url, name, str);
}

function Nuevo_Dialogo(w_in, pagina, ancho, alto)
{
  return w_in.showModalDialog(pagina,'', 'center:yes;dialogWidth:' + ancho.toString() + ';dialogHeight:' + alto.toString());
}

function Nuevo_DialogoH(w_in, pagina, ancho, alto)
{
  return w_in.showModalDialog(pagina,'', 'center:yes;dialogWidth:' + ancho.toString() + ';dialogHeight:' + alto.toString() + ';dialogTop:300000;dialogLeft:300000');
}

*/
