		var http;
		var idControl;
		
		function enviaQuery(id, archivo)
		{
			http= getXmlHttpObject();
			http.open("GET",archivo,true);
			
			idControl=id;
			http.onreadystatechange = handleHttpResponse;
			http.send(null);
		}
		
		function getXmlHttpObject()
		{
			var xmlhttp;
				try
				{
					xmlhttp= new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch (e)
				{
					try
					{
						xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
					}
					
				catch (e)
				{
					try
					{
						xmlhttp = new XMLHttpRequest();
					}
					catch (e)
					{
						xmlhttp =false;
						alert('error');
					}
				}
			}
		return xmlhttp;
	}
	
	function handleHttpResponse()
	{
		if (http.readyState ==4)
		{
			results = http.responseText;
			document.getElementById(idControl).innerHTML = results;
		}
	}