function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}
function es_deleteApt(idApt, showTitle, owner) {
	divContenido = document.getElementById('apts');
	ajax=objetoAjax();
	ajax.open("GET", "es_del_apts.php?id="+idApt+"&title="+showTitle+"&owner="+owner);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			divContenido.innerHTML = ajax.responseText
		}
	}
	ajax.send(null)
}
function noFeeApts() {
	divContenido = document.getElementById('nofeecontent');
	ajax=objetoAjax();
	ajax.open("GET", "paginador_nofee.php");
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			divContenido.innerHTML = ajax.responseText
		}
	}
	ajax.send(null)
	
}
function deleteApt(idApt, showTitle, owner) {
	divContenido = document.getElementById('apts');
	ajax=objetoAjax();
	ajax.open("GET", "del_apts.php?id="+idApt+"&title="+showTitle+"&owner="+owner);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			divContenido.innerHTML = ajax.responseText
		}
	}
	ajax.send(null)
}
function Pagina(nropagina,atp_type,apm_area,price_range,upscale,order_by,apm_no_fee){
	divContenido = document.getElementById('contenido');
	ajax=objetoAjax();
	ajax.open("GET", "paginador.php?pag="+nropagina+"&atp_type="+atp_type+"&apm_area="+apm_area+"&price_range="+price_range+"&upscale="+upscale+"&order_by="+order_by+"&apm_no_fee="+apm_no_fee);
	divContenido.innerHTML= '<div id="loading">Loading...</div>';
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			divContenido.innerHTML = ajax.responseText
		}
	}
	ajax.send(null)
}
