var xmlhttp;

function getShowResults(){
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null){
		return;
	}
		
	var url="callGetResults.php";
	url=url+"?cid="+document.form2.continent.options[document.form2.continent.selectedIndex].value;
	url=url+"&rid="+document.form2.region.options[document.form2.region.selectedIndex].value;
	xmlhttp.onreadystatechange=stateChanged;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function stateChanged(){
	if (xmlhttp.readyState==4){
		document.getElementById("ajax-results").style.display = "inline";
		if(xmlhttp.responseText.length > 0){
			document.getElementById("ajax-number").innerHTML=xmlhttp.responseText;
		} else {
			document.getElementById("ajax-number").innerHTML='0';
		}
	}
}

function GetXmlHttpObject(){
	if (window.XMLHttpRequest){
		return new XMLHttpRequest();
	}
	
	if (window.ActiveXObject){
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	return null;
}