function ventanaG(URL,ancho,alto) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+ ancho +',height='+ alto +',left = 400,top = 100');");
}

function nuevoAjax() { 
   /* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por 
   lo que se puede copiar tal como esta aqui */ 
   var xmlhttp=false; 
   try    { 
      // Creacion del objeto AJAX para navegadores no IE 
      xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
   } 
   catch(e)    { 
      try       { 
         // Creacion del objet AJAX para IE 
         xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
      } 
      catch(E) { xmlhttp=false; } 
   } 
   if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); } 
   return xmlhttp; 
} 

function cargaContenido(atm,entidad) {
   	//var valor=document.getElementById("buscar").value; 
   	ajax=nuevoAjax();
	//ajax.open("GET", "busca.php?var="+valor, true); 
	ajax.open("GET", "internos/busca.php?atm="+atm+"&entidad="+entidad, true);
	ajax.onreadystatechange=function()	{ 
	if (ajax.readyState==4) { 
		document.getElementById("centerI").innerHTML=ajax.responseText; 
		}	
	}
    ajax.send(null); 	
} 
