So what I finally ended up doing was below. It takes either the defined activitymap.regionIDAtttribute or uses "region_id". If it can't find either of those and hit 'id' first it uses that. All else fails it returns 'body'
e.region = function (a) {
for (var d, b = e.regionIDAttribute || "region_id"; a && (a = a.parentNode);) {
if (d = q(a, b, b, b)) return d;
if (d = q(a, 'id', 'id','id')) return d;
if ("BODY" == a.nodeName) return "BODY"
}
}