function getXMLHTTPRequest() {

	var req;

	try {

		req = new XMLHttpRequest();

	} catch(err1) {

		try {

			req = new ActiveXObject("Msxml2.XMLHTTP");

		} catch (err2) {

			try {

				req = new ActiveXObject("Microsoft.XMLHTTP");

			} catch (err3) {

				req = false;

			}

		}

	}

	return req;

}



	objhttp=getXMLHTTPRequest();



	function  gestionaPeticion(file,param,capadiv){

		capa = capadiv;

		x =parseInt(Math.random()*9999999999);

		mensaje="";

		archivo = file+"?x="+x+param;

		objhttp.open("GET", archivo, true);

		objhttp.send(null);

		objhttp.onreadystatechange=gestionaRespuesta;

	}

	

	function gestionaRespuesta(){

		if(objhttp.readyState==4){

			if(objhttp.status==200){

				document.getElementById(capa).innerHTML = objhttp.responseText;

			}

		}else{

			document.getElementById(capa).innerHTML = mensaje;

		}

	}

	

	

	

	

	function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

