is_1 = document.getElementById ? true : false;
is_2 = document.all ? true : false;
is_3 = document.layers ? true : false;

function getDOMObject(ObjectId) {
	if (is_1) {
		return document.getElementById(ObjectId);
	}
	else if (is_2) {
		return document.all[ObjectId];
	}
	else if (is_3) {
		return document.layers[ObjectId];
	}
}
	
function ajax() {
	var _xmlhttp;
	var _id;
	
	/*@cc_on @*//*@if (@_jscript_version >= 5)
		var idAX = ["Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];
	for(var i=0; !_xmlhttp && i<idAX.length; i++)
		{try{ _xmlhttp = new ActiveXObject(idAX[i]);}
		catch(ex) { _xmlhttp = false; }
	}@end @*/
	if (!_xmlhttp && typeof XMLHttpRequest != 'undefined') {
		_xmlhttp = new XMLHttpRequest();
	}
	
	function evaluarResultado() {
		if (_xmlhttp.readyState == 1) {
			getDOMObject(_id).innerHTML = "<img src=\"template/puroshow/images/ico_loading.gif\" align=\"absmiddle\"> Procesando...";
		}
		else if (_xmlhttp.readyState == 4) {
			if (_xmlhttp.status == 200) {
				getDOMObject(_id).innerHTML = _xmlhttp.responseText;
			}
			else {
				getDOMObject(_id).innerHTML = "Se gener&oacute; un error:\n" + _xmlhttp.statusText;
			}
		}
	}
	
	this.get = function get(url, id) {
		if (_xmlhttp.readyState == 4 || _xmlhttp.readyState == 0) {
			_id = id;
			_xmlhttp.open("GET", url, true);
			_xmlhttp.onreadystatechange = evaluarResultado;
			_xmlhttp.send(null);
		}
	}
	
	this.post = function post(url, datos, id) {
		if (_xmlhttp.readyState == 4 || _xmlhttp.readyState == 0) {
			_id = id;
			_xmlhttp.open("POST", url, true);
			_xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			_xmlhttp.onreadystatechange = evaluarResultado;
			_xmlhttp.send('&' + datos);
		}
	}
	
	this.limpiar = function limpiar(id) {
		_xmlhttp.abort();
		getDOMObject(id).innerHTML = '';
	}
}

  aj1 = new ajax();
  aj2 = new ajax();
  aj3 = new ajax();
  aj4 = new ajax();
  aj5 = new ajax();
  aj6 = new ajax();
  aj7 = new ajax();
  aj8 = new ajax();
  aj9 = new ajax();
  aj10 = new ajax();
  aj11 = new ajax();
  aj12 = new ajax();
  aj13 = new ajax();
  aj14 = new ajax();
  aj15 = new ajax();