function loadXMLDoc2(url) {
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange2;
        req.open("GET", url, true);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange2;
            req.open("GET", url, true);
            req.send();
        }
    }
}

function processReqChange2() 
{
    // only if req shows "complete"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
            // ...processing statements go here...
			response = req.responseXML.documentElement;
			rld=response.getElementsByTagName('reload')[0];
			
			if (rld.getAttribute("need")==1)
			{
				window.location.href=rld.getAttribute("qstr");
			}else{
				document.getElementById("geoquest").style.display="none";
			}

        } else {
            alert("There was a problem retrieving the XML data:\n" + req.statusText);
        }
    }
}

function geoPost()
{
    url  = '/geopost.php?qstr=' + encodeURI(window.location.href) + '&city=' + document.getElementsByName("city")[0].value;
//	alert(url);
    loadXMLDoc2(url);
}
