function WindowCenter (url,ancho, alto, stl) {
  var width = ancho
  var height = alto
  var x=(640 - width)/2
  var y=(480-height)/2

  if(screen) {
	  y=(screen.availHeight - height)/2
	  x=(screen.availWidth - width)/2
  }

  if(screen.availWidht > 1800)
	  x=((screen.availWidth/2) - width)/2

  window.width=width
  window.height=height
  window.x=x
  window.y=y

  estilo = stl ? stl : "toolbar=0, status=0, location=0, directories=0, menubar=0, scrollbars=0, resize=0,resizable=0"
  window.open(url,"newwin", estilo + ",width=" + width + "px,height=" + height + "px,top=" + y + "px,left=" + x + "px")
}

function WindowCenterScroll (url,ancho, alto, stl) {
  var width = ancho
  var height = alto
  var x=(640 - width)/2
  var y=(480-height)/2

  if(screen) {
	  y=(screen.availHeight - height)/2
	  x=(screen.availWidth - width)/2
  }

  if(screen.availWidht > 1800)
	  x=((screen.availWidth/2) - width)/2

  window.width=width
  window.height=height
  window.x=x
  window.y=y

  estilo = stl ? stl : "toolbar=0, status=0, location=0, directories=0, menubar=0, scrollbars=1, resize=1,resizable=1"
  window.open(url,"newwin", estilo + ",width=" + width + "px,height=" + height + "px,top=" + y + "px,left=" + x + "px")
}

function cargar_contenido(page,target,id)
{
    document.getElementById(target).innerHTML = '<p align="center"><img src="images/load.gif"><br /><span style="color:#ff4d21; text-decoration: blink;">Cargando ...</span></p>';
    var myConn = new XHConn();
        if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
        var peticion = function (oXML) {  document.getElementById(target).innerHTML = oXML.responseText; };
        myConn.connect(page , "GET", "id=" + id , peticion);
} 

function cargar_contenido_escrutar(page,target,p1)
{
    document.getElementById(target).innerHTML = '<p align="center"><img src="images/load.gif"><br /><span style="color:#ff4d21; text-decoration: blink;">Cargando ...</span></p>';
    var myConn = new XHConn();
        if (!myConn) alert("XMLHTTP no esta disponible. Inténtalo con un navegador más actual.");
        var peticion = function (oXML) {  document.getElementById(target).innerHTML = oXML.responseText; };
        myConn.connect(page , "GET", "p1=" +p1 , peticion);
}
