Returns a list of page regions related to the overlay.
$type: The type of regions to return. This can either be 'overlay_regions' or 'overlay_supplemental_regions'.
An array of region names of the given type, within the theme that is being used to display the current page.
overlay_supplemental_regions()
function _overlay_region_list($type) {
// Obtain the current theme. We need to first make sure the theme system is
// initialized, since this function can be called early in the page request.
drupal_theme_initialize();
$themes = list_themes();
$theme = $themes[$GLOBALS['theme']];
// Return the list of regions stored within the theme's info array, or an
// empty array if no regions of the appropriate type are defined.
return !empty($theme->info[$type]) ? $theme->info[$type] : array();
}