window.onerror=new Function("return true");

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;
}

http = getXMLHTTPRequest();

function getHTTP(archivo,vars,divid){
	myRand = parseInt(Math.random()*999999999999999);
	var modurl = archivo +"?rand=" + myRand + vars; //GET
    //alert(modurl);
	http.open("GET", modurl, true);//GET
	mydiv = divid;//GET
	http.onreadystatechange = useHTTP;//GET
	http.send(null);//GET
}

function useHTTP() {
	if (http.readyState == 4) {
		if(http.status == 200) {
			var miTexto = http.responseText;//GET
			//alert(miTexto);
			document.getElementById(mydiv).innerHTML = (miTexto);//GET
		}
	} else {
		document.getElementById(mydiv).innerHTML = "<div align='center'><img align='center' src='../image/cargando.gif' width='22' height='22'></div>";
	}
}


