function MasterData()
{
	this.despuesDeProcesar = null;
	this.phpLink = null;
	this.json = {};
	
	this.agregarAlJson = function(nombre, valor)
	{
		this.json[nombre] = valor;
	}	
	
	this.correr = function()
	{
		var jsonTexto = JSON.stringify(this.json);
		
		var thisObj = this;
		
		var xmlhttp = new XMLHttpRequest();
		xmlhttp.onreadystatechange = function()
		{
			if(xmlhttp.readyState == 4)
			{
				var objetoInfo = JSON.parse(xmlhttp.responseText);
				
				thisObj.despuesDeProcesar(objetoInfo);
			};
		};
		
		var texto = this.phpLink + jsonTexto
		xmlhttp.open("GET", texto, true);
		xmlhttp.send(null);		
	}	
}

