﻿function getAreasByCountyID(CountyID, ctrl) {
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "/Services/Areas.asmx/RetrieveAreastringByCountyID",
        data: "{'countyID':'" + CountyID + "'}",
        dataType: "json",
        async: true,
        success: function(msg) {
            document.getElementById(ctrl).innerHTML = "";
            $("#" + ctrl).append(msg.d);
        }
    });
}

function getAreasByRegionID(RegionID, ctrl) {
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "/Services/Areas.asmx/RetrieveAreastringByRegionID",
        data: "{'regionID':'" + RegionID + "'}",
        dataType: "json",
        async: true,
        success: function(msg) {
            document.getElementById(ctrl).innerHTML = "";
            $("#" + ctrl).append(msg.d);
        }
    });
}
