/*
 *	SCRIPT DESAROLLADO EN ARGENTINA POR MAT
 *	mat.hack@gmail.com
 *	LOPEZ, MATIAS
 */



// DEVUELVE UNA NUEVA INSTANCIA DE "XMLHTTP"
function getXMLHttpRequest()
{
	var xmlhttp = false;
	try
	{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");  // PARA IEXPLORER
	}
	catch(e)
	{
		try
		{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");  // PARA IEXPLORER
		}
		catch(E)
		{
			xmlhttp = false;
		}
	}

	if( ( !xmlhttp ) && ( typeof XMLHttpRequest != 'undefined' ) )
	{
		xmlhttp = new XMLHttpRequest();  // PARA NAVEGADORES EXCEPTO IEXPLORER
	}

	return xmlhttp;
}


// EJECUTA EN AJAX LA PAGINA PASADA COMO PARAMETRO
// CON LA CADENA DE PARAMETROS PASADA COMO PARAMETRO
function xmlhttpPost(strURL, cadenaPost, funcionVerificarEstado)
{
	var self = this;
	var xmlHttpReq = null;
	self.xmlHttpReq = getXMLHttpRequest();	// PEDIMOS UN NUEVO XMLHTTP

	self.xmlHttpReq.open("POST", strURL, true);	// INDICAMOS EL METODO, LA URL DE LA APLICACION Y EL MODO ASINCRONO
	self.xmlHttpReq.onreadystatechange = function(){ funcionVerificarEstado( self.xmlHttpReq ); };	// INDICAMOS LA ACCION A REALIZAR AL FINALIZAR
	self.xmlHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");	// INDICAMOS QUE VAMOS A ENVIAR UN FORMULARIO
	self.xmlHttpReq.send( cadenaPost );  // ENVIAMOS LA INFORMACION AL SERVIDOR PARA SER ANALIZADA
	
	return true;
}



/*
 *	SCRIPT DESAROLLADO EN ARGENTINA POR MAT
 *	mat.hack@gmail.com
 *	LOPEZ, MATIAS
 */
