function loadXMLDoc()
{
	if (window.XMLHttpRequest)
	{// codigo para IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
	}
else
	{// codigo para IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		document.getElementById("cidade").innerHTML=xmlhttp.responseText;
		document.getElementById("bairro").innerHTML="";
		document.getElementById("atualiza").innerHTML="";
		
		}
	}
		var indice = document.estado.escolheUf.selectedIndex;
		var ufestado = document.estado.escolheUf.options[indice].value;
		xmlhttp.open("GET","http://www.divineshen.com.br/wp-content/themes/divineshen/consultarCidade.php?codigoUf="+ufestado,true);
		xmlhttp.send();
}

function loadXMLDocBairro()
{
	if (window.XMLHttpRequest)
	{// codigo para IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
	}
else
	{// codigo para IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		document.getElementById("bairro").innerHTML=xmlhttp.responseText;
		}
	}
		var indiceB = document.cidades.escolheCidade.selectedIndex;
		var cidade = document.cidades.escolheCidade.options[indiceB].value;
		//alert(cidade);
		xmlhttp.open("GET","http://www.divineshen.com.br/wp-content/themes/divineshen/consultarBairro.php?cidade="+cidade,true);
		xmlhttp.send();
}

function loadXMLDocLista()
{
	if (window.XMLHttpRequest)
	{// codigo para IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest();
	}
else
	{// codigo para IE6, IE5
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		document.getElementById("atualiza").innerHTML=xmlhttp.responseText;
		}
	}
		var indiceP = document.bairros.escolheBairro.selectedIndex;
		var bairro = document.bairros.escolheBairro.options[indiceP].value;
		var indiceG = document.cidades.escolheCidade.selectedIndex;
		var cidadeG = document.cidades.escolheCidade.options[indiceG].value;
		
		//alert(cidade);
		xmlhttp.open("GET","http://www.divineshen.com.br/wp-content/themes/divineshen/consultarParceiros.php?bairro="+bairro+"&cidade="+cidadeG,true);
		xmlhttp.send();
}