function is_array(input){
 return typeof(input)=='object'&&(input instanceof Array);
}

function findRegionAndCounty(countyName) {
 for (regId in counties) {
  var reg = counties[regId];
  if (!is_array(reg)) continue;
   for (countyId in reg) {
    var county = reg[countyId];
    if (typeof(county) == 'function') continue;
    if (county.indexOf(countyName) != -1) return [regId, countyId]
   }
 }
 return false
}

