var reqStateCounties = null;

function sendRequestStateCounties(url, params, HttpMethod) {
  if (!HttpMethod) {
    HttpMethod = "GET";
  }
  reqStateCounties = initXMLHTTPRequest();
  if (reqStateCounties) {
    // this is to ensure that no caching is taking place
    url = url + "&seed=" + (new Date()).getTime();

    reqStateCounties.onreadystatechange = onReadyStateStateCounties;
    reqStateCounties.open(HttpMethod, url, true);
    reqStateCounties.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    reqStateCounties.send(params);
  }
}

function onReadyStateStateCounties() {
  var ready = reqStateCounties.readyState;
  var data = null;
  if (ready == READY_STATE_COMPLETE) {
    data = reqStateCounties.responseText;
    var xmlDoc = reqStateCounties.responseXML.documentElement;
    fillSelect(data, xmlDoc);
  }
}

