var url = "muestra.php?"; // The server-side script
function cargando(carga) {
	if (carga) {
	//	document.getElementById(idDiv).innerHTML = "<img src=\"img/load.gif\" height=\"54\" width=\"55\" /><br>";
	} else {
	}
}
var isWorking = false;
function shows(id,tipo){	
	if (!isWorking && http) {	
		http.open("GET", url + "id=" + escape(id)+"&tipo="+escape(tipo), true);
		http.onreadystatechange = function() {
			if (http.readyState == 1) {
				cargando(true);
			} else if (http.readyState == 4) {
				if (http.responseText.indexOf('invalid') == -1) {
					var xmlDocument = http.responseXML;
					var contenido = xmlDocument.getElementsByTagName('seccion').item(0).firstChild.data;
					document.getElementById('center').innerHTML = contenido;
					//document.getElementById('pregunta'+idp).setAttribute("onClick","javascript:news("+escape(idCategoria)+","+escape(idTema)+",'"+idiv+"','False',"+idp+");");
					cargando(false);
					isWorking = false;
				}
			}
		}
		cargando(true);
		isWorking = true;
		http.send(null);
		}
	} 
	
function getHTTPObject() {
var httprequest=false
if (window.XMLHttpRequest){ // if Mozilla, Safari etc
httprequest=new XMLHttpRequest()
if (httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')
}
else if (window.ActiveXObject){ // if IE
try {
httprequest=new ActiveXObject("Msxml2.XMLHTTP");
} 
catch (e){
try{
httprequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
return httprequest

 
}


var http = getHTTPObject(); // We create the HTTP Object
