function ajaxcidade(){ //function ajax de consulta de dominio
var cidade;
try {
// Firefox, Opera 8.0+, Safari
cidade=new XMLHttpRequest();
} catch (e) {
// Internet Explorer
try {
cidade=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e){
try {
cidade=new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Seu navegador não suporta AJAX!");
return false;
}
}
}
cidade.onreadystatechange=function() {
if(cidade.readyState==4) {
//document.myForm.time.value=cidade.responseText;
document.getElementById("saida_cidade").innerHTML=cidade.responseText;
}else{
// é mostrado enquanto a função é executada
//document.getElementById("s_whois").innerHTML='<img src="img/spinner.gif" width="16" height="16"> <font size="2" color="#83AE00">Processando...</font>';
}
}
var estado = document.fbusca.estado.value;
var url = "modulos/ajaxcidade.php";
url=url+"?id_estado="+estado;
url=url+"&sid="+Math.random();
cidade.open("GET",url,true);
cidade.send(null);
}
//funcao que exibe as imagens de destaque
function imgdestaque(id_img){ //function ajax de consulta de dominio
var imgdestaque;
try {
// Firefox, Opera 8.0+, Safari
imgdestaque=new XMLHttpRequest();
} catch (e) {
// Internet Explorer
try {
imgdestaque=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e){
try {
imgdestaque=new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Seu navegador não suporta AJAX!");
return false;
}
}
}
imgdestaque.onreadystatechange=function() {
if(imgdestaque.readyState==4) {
//document.myForm.time.value=imgdestaque.responseText;
document.getElementById("saidadestaque").innerHTML=imgdestaque.responseText;
}else{
// é mostrado enquanto a função é executada
document.getElementById("saidadestaque").innerHTML='Aguarde carregando...';
}
}
var url = "modulos/ajaxdestaque.php";
url=url+"?uid="+id_img;
url=url+"&sid="+Math.random();
imgdestaque.open("GET",url,true);
imgdestaque.send(null);
}
