function ajaxInit() {
  var xmlhttp;
  try {
     xmlhttp = new XMLHttpRequest();
  } catch(ee) {
     try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     } catch(e) {
        try {
           xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch(E) {
           xmlhttp = false;
        }
     }
  }
  return xmlhttp;
}
function getCidades() {
  sEstado = document.getElementById("estado").value;
  ajax = ajaxInit();
  if (ajax) {
	 ajax.open("GET", "cidades.php?estado=" + sEstado, true);
     ajax.onreadystatechange = function () {
        if (ajax.readyState == 4) {
           if (ajax.status == 200) {
              cidades.innerHTML = ajax.responseText;
           } else {
              alert(ajax.status);
           }
        }
     }
     ajax.send(null);
  }
}