var IntranetAjax =
{
	constructor : function()
	{
		this.xmlhttp = false;
	 	try 
	 	{
	 		this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	 	} 
	 	catch (e) 
	 	{
	 		try 
	 		{
	 			this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	 		} 
	 		catch (E) 
	 		{
	 			this.xmlhttp = false;
	 		}
	  	}
	
		if (!this.xmlhttp && typeof XMLHttpRequest!='undefined') 
		{
	 		this.xmlhttp = new XMLHttpRequest();
		}
		
		return this.xmlhttp;
	},
	
	ajaxRequestSend : function(url, params, method, f)
	{
		ajax = this.constructor();
		if (method == "GET")
		{
	
			
			ajax.open(method, url + '?' + params, true);
	
			ajax.onreadystatechange=function() 
			{
				if (ajax.readyState == 4) 
				{
					rta = ajax.responseText;
					/*alert(rta+' algo');
					return;		*/
					if (rta != 'false')
					{	
						f.onResponse(rta);
					}
				}
			}
			ajax.send(null);
		}
		else
		{
			alert("Metodo "+ method +" no implementado.")
		}
	}
}

