

function CreateXmlHttp()
{
	//Creating object of XMLHTTP in IE
	try
	{
		XmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			XmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch(oc)
		{
			XmlHttp = null;
		}
	}
	//Creating object of XMLHTTP in Mozilla and Safari 
	if(!XmlHttp && typeof XMLHttpRequest != "undefined") 
	{
		XmlHttp = new XMLHttpRequest();
	}
}

function HandleResponse()
{
	// To make sure receiving response data from server is completed
	
	if(XmlHttp.readyState == 4)
	{
		
		// To make sure valid response is received from the server, 200 means response received is OK
		if(XmlHttp.status == 200)
		{		
		
			//alert(XmlHttp.responseText);
			//HabilitarFiltro(XmlHttp.responseText);
			habilitar_Objeto(XmlHttp.responseText);
			
		} 
		else
		{
			alert("Existen Problemas con los datos recepcionados por el Servidor." );
		}
	}
}
function habilitar_Objeto(textoHtml)
{
	var vax_Matricula=document.getElementById('objeto_Ajax');
	vax_Matricula.innerHTML=textoHtml;
}
function cargar_Matriculas(IdObjeto_Rut)
{

	var vax_RutUsuario=document.getElementById(IdObjeto_Rut);
	var txt_Rut=vax_RutUsuario.value;
	
		
	if (txt_Rut.replace(" ","")!="" )
	{
	
			requestUrl="../../Consultas_Notas/AjaxServidor/MxAjax_Usuario.aspx?RUT_USUARIO="+txt_Rut;		
		CreateXmlHttp();
	
		if (XmlHttp)
		{
			XmlHttp.onreadystatechange = HandleResponse;
			//Initializes the request object with GET (METHOD of posting), 
			//Request URL and sets the request as asynchronous.
			XmlHttp.open("GET", requestUrl,  true);
			//Sends the request to server
			XmlHttp.send(null);		
		}
	
	}


}
