function getCountyList(sel, sel_counties) {
    var fipsstate = sel.options[sel.selectedIndex].value;

    $.ajax({
        url: '/ajax_getCounties.php?fipsstate=' + fipsstate,
        success: function(data) {
            var element = document.getElementById(sel_counties);
            $(element).remove();

            $("#county_search").html(data); 
        }
    });
}
/*
function getCountyList(sel, sel_counties) {
    var fipsstate = $(sel).val();
    var fipscounty = document.getElementById(sel_counties);
    $.ajax({
        url: "json_getCounties.php",
        dataType: "json",
        data: "fipsstate=" + fipsstate,
        success: function(data) { createCounties(data, fipscounty); }
    });
}
function createCounties(data, sel_counties) {
    $(sel_counties).children().remove();
    var new_option;
    $.each(data, function(index, value) {
        new_option = '<option value="' + value['value'] + '">' + value['text'] + '</option>';
        $(sel_counties).append(new_option);
    });
}
*/

