set define '^' verify off
prompt ...epg_install_images_nocdb.sql
--------------------------------------------------------------------------------
--
--  Copyright (c) Oracle Corporation 1999 - 2020. All Rights Reserved.
--
--    NAME
--      epg_install_images_nocdb.sql
--
--    DESCRIPTION
--      Install image files for EPG
--
--    MODIFIED   (MM/DD/YYYY)
--    hfarrell    07/23/2020 - Created
--
--------------------------------------------------------------------------------

begin
    execute immediate 'drop directory APEX_IMAGES';
exception when others then
    null;
end;
/

create directory APEX_IMAGES as '^1/images';

set serveroutput on

declare
    upload_directory_name   varchar2(30) default 'APEX_IMAGES';
    repository_folder_path  varchar2(30);
    directory_path          varchar2(256);
    resource_path           varchar2(256);
    content_bfile           bfile;
    directory_exists        boolean default false;
    result                  boolean;
    l_directories           dbmsoutput_linesarray;
    l_files                 dbmsoutput_linesarray;
    ro_anonymous_acl        varchar2(80) := '/sys/acls/ro_anonymous_acl.xml';

begin
  if wwv_flow_utilities.db_version_is_at_least('11') then
    repository_folder_path := '/images/';
  else
    repository_folder_path := '/i/';
  end if;

  l_directories := dbmsoutput_linesarray (
               'flashchart/anychart_6/swf/fonts',
               'flashchart/anychart_6/swf/maps',
               'flashchart/anychart_6/swf/maps/africa',
               'flashchart/anychart_6/swf/maps/asia',
               'flashchart/anychart_6/swf/maps/custom',
               'flashchart/anychart_6/swf/maps/europe',
               'flashchart/anychart_6/swf/maps/north_america',
               'flashchart/anychart_6/swf/maps/oceania',
               'flashchart/anychart_6/swf/maps/south_america',
               'flashchart/anychart_6/swf/maps/usa',
               'flashchart/anychart_6/swf/maps/usa/country',
               'flashchart/anychart_6/swf/maps/usa/regions',
               'flashchart/anychart_6/swf/maps/usa/regions/states',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3',
               'flashchart/anychart_6/swf/maps/usa/states',
               'flashchart/anychart_6/swf/maps/usa/states/counties',
               'flashchart/anychart_6/swf/maps/usa/states/zip3',
               'flashchart/anychart_6/swf/maps/usa/sub_regions',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3',
               'flashchart/anychart_6/swf/maps/world' );
  
  l_files := dbmsoutput_linesarray (
               'flashchart/anychart_6/swf/OracleAnyChart.swf',
               'flashchart/anychart_6/swf/Preloader.swf',
               'flashchart/anychart_6/swf/fonts/Arial.swf',
               'flashchart/anychart_6/swf/fonts/Arial_Bold.swf',
               'flashchart/anychart_6/swf/fonts/Arial_Bold_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Arial_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Courier-New.swf',
               'flashchart/anychart_6/swf/fonts/Courier-New_Bold.swf',
               'flashchart/anychart_6/swf/fonts/Courier-New_Bold_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Courier-New_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Lucida-Sans.swf',
               'flashchart/anychart_6/swf/fonts/Lucida-Sans_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Trebuchet-MS.swf',
               'flashchart/anychart_6/swf/fonts/Trebuchet-MS_Bold.swf',
               'flashchart/anychart_6/swf/fonts/Trebuchet-MS_Bold_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Trebuchet-MS_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Verdana.swf',
               'flashchart/anychart_6/swf/fonts/Verdana_Bold.swf',
               'flashchart/anychart_6/swf/fonts/Verdana_Bold_Italic.swf',
               'flashchart/anychart_6/swf/fonts/Verdana_Italic.swf',
               'flashchart/anychart_6/swf/maps/africa/algeria.amap',
               'flashchart/anychart_6/swf/maps/africa/algeria.xml',
               'flashchart/anychart_6/swf/maps/africa/angola.amap',
               'flashchart/anychart_6/swf/maps/africa/angola.xml',
               'flashchart/anychart_6/swf/maps/africa/benin.amap',
               'flashchart/anychart_6/swf/maps/africa/benin.xml',
               'flashchart/anychart_6/swf/maps/africa/botswana.amap',
               'flashchart/anychart_6/swf/maps/africa/botswana.xml',
               'flashchart/anychart_6/swf/maps/africa/burkina_faso.amap',
               'flashchart/anychart_6/swf/maps/africa/burkina_faso.xml',
               'flashchart/anychart_6/swf/maps/africa/burundi.amap',
               'flashchart/anychart_6/swf/maps/africa/burundi.xml',
               'flashchart/anychart_6/swf/maps/africa/cameroon.amap',
               'flashchart/anychart_6/swf/maps/africa/cameroon.xml',
               'flashchart/anychart_6/swf/maps/africa/central_african_republic.amap',
               'flashchart/anychart_6/swf/maps/africa/central_african_republic.xml',
               'flashchart/anychart_6/swf/maps/africa/chad.amap',
               'flashchart/anychart_6/swf/maps/africa/chad.xml',
               'flashchart/anychart_6/swf/maps/africa/congo.amap',
               'flashchart/anychart_6/swf/maps/africa/congo.xml',
               'flashchart/anychart_6/swf/maps/africa/djibouti.amap',
               'flashchart/anychart_6/swf/maps/africa/djibouti.xml',
               'flashchart/anychart_6/swf/maps/africa/egypt.amap',
               'flashchart/anychart_6/swf/maps/africa/egypt.xml',
               'flashchart/anychart_6/swf/maps/africa/equatorial_guinea.amap',
               'flashchart/anychart_6/swf/maps/africa/equatorial_guinea.xml',
               'flashchart/anychart_6/swf/maps/africa/eritrea.amap',
               'flashchart/anychart_6/swf/maps/africa/eritrea.xml',
               'flashchart/anychart_6/swf/maps/africa/ethiopia.amap',
               'flashchart/anychart_6/swf/maps/africa/ethiopia.xml',
               'flashchart/anychart_6/swf/maps/africa/gabon.amap',
               'flashchart/anychart_6/swf/maps/africa/gabon.xml',
               'flashchart/anychart_6/swf/maps/africa/gambia.amap',
               'flashchart/anychart_6/swf/maps/africa/gambia.xml',
               'flashchart/anychart_6/swf/maps/africa/ghana.amap',
               'flashchart/anychart_6/swf/maps/africa/ghana.xml',
               'flashchart/anychart_6/swf/maps/africa/guinea.amap',
               'flashchart/anychart_6/swf/maps/africa/guinea_bissau.amap',
               'flashchart/anychart_6/swf/maps/africa/guinea_bissau.xml',
               'flashchart/anychart_6/swf/maps/africa/guinea.xml',
               'flashchart/anychart_6/swf/maps/africa/ivory_coast.amap',
               'flashchart/anychart_6/swf/maps/africa/ivory_coast.xml',
               'flashchart/anychart_6/swf/maps/africa/kenya.amap',
               'flashchart/anychart_6/swf/maps/africa/kenya.xml',
               'flashchart/anychart_6/swf/maps/africa/lesotho.amap',
               'flashchart/anychart_6/swf/maps/africa/lesotho.xml',
               'flashchart/anychart_6/swf/maps/africa/liberia.amap',
               'flashchart/anychart_6/swf/maps/africa/liberia.xml',
               'flashchart/anychart_6/swf/maps/africa/madagascar.amap',
               'flashchart/anychart_6/swf/maps/africa/madagascar.xml',
               'flashchart/anychart_6/swf/maps/africa/malawi.amap',
               'flashchart/anychart_6/swf/maps/africa/malawi.xml',
               'flashchart/anychart_6/swf/maps/africa/mali.amap',
               'flashchart/anychart_6/swf/maps/africa/mali.xml',
               'flashchart/anychart_6/swf/maps/africa/mauritania.amap',
               'flashchart/anychart_6/swf/maps/africa/mauritania.xml',
               'flashchart/anychart_6/swf/maps/africa/morocco.amap',
               'flashchart/anychart_6/swf/maps/africa/morocco.xml',
               'flashchart/anychart_6/swf/maps/africa/mozambique.amap',
               'flashchart/anychart_6/swf/maps/africa/mozambique.xml',
               'flashchart/anychart_6/swf/maps/africa/namibia.amap',
               'flashchart/anychart_6/swf/maps/africa/namibia.xml',
               'flashchart/anychart_6/swf/maps/africa/niger.amap',
               'flashchart/anychart_6/swf/maps/africa/nigeria.amap',
               'flashchart/anychart_6/swf/maps/africa/nigeria.xml',
               'flashchart/anychart_6/swf/maps/africa/niger.xml',
               'flashchart/anychart_6/swf/maps/africa/rwanda.amap',
               'flashchart/anychart_6/swf/maps/africa/rwanda.xml',
               'flashchart/anychart_6/swf/maps/africa/senegal.amap',
               'flashchart/anychart_6/swf/maps/africa/senegal.xml',
               'flashchart/anychart_6/swf/maps/africa/sierra_leone.amap',
               'flashchart/anychart_6/swf/maps/africa/sierra_leone.xml',
               'flashchart/anychart_6/swf/maps/africa/somalia.amap',
               'flashchart/anychart_6/swf/maps/africa/somalia.xml',
               'flashchart/anychart_6/swf/maps/africa/south_africa.amap',
               'flashchart/anychart_6/swf/maps/africa/south_africa.xml',
               'flashchart/anychart_6/swf/maps/africa/sudan.amap',
               'flashchart/anychart_6/swf/maps/africa/sudan.xml',
               'flashchart/anychart_6/swf/maps/africa/swaziland.amap',
               'flashchart/anychart_6/swf/maps/africa/swaziland.xml',
               'flashchart/anychart_6/swf/maps/africa/tanzania.amap',
               'flashchart/anychart_6/swf/maps/africa/tanzania.xml',
               'flashchart/anychart_6/swf/maps/africa/togo.amap',
               'flashchart/anychart_6/swf/maps/africa/togo.xml',
               'flashchart/anychart_6/swf/maps/africa/tunisia.amap',
               'flashchart/anychart_6/swf/maps/africa/tunisia.xml',
               'flashchart/anychart_6/swf/maps/africa/uganda.amap',
               'flashchart/anychart_6/swf/maps/africa/uganda.xml',
               'flashchart/anychart_6/swf/maps/africa/zaire.amap',
               'flashchart/anychart_6/swf/maps/africa/zaire.xml',
               'flashchart/anychart_6/swf/maps/africa/zambia.amap',
               'flashchart/anychart_6/swf/maps/africa/zambia.xml',
               'flashchart/anychart_6/swf/maps/asia/afghanistan.amap',
               'flashchart/anychart_6/swf/maps/asia/afghanistan.xml',
               'flashchart/anychart_6/swf/maps/asia/bahrain.amap',
               'flashchart/anychart_6/swf/maps/asia/bahrain.xml',
               'flashchart/anychart_6/swf/maps/asia/bangladesh.amap',
               'flashchart/anychart_6/swf/maps/asia/bangladesh.xml',
               'flashchart/anychart_6/swf/maps/asia/bhutan.amap',
               'flashchart/anychart_6/swf/maps/asia/bhutan.xml',
               'flashchart/anychart_6/swf/maps/asia/cambodia.amap',
               'flashchart/anychart_6/swf/maps/asia/cambodia.xml',
               'flashchart/anychart_6/swf/maps/asia/china.amap',
               'flashchart/anychart_6/swf/maps/asia/china.xml',
               'flashchart/anychart_6/swf/maps/asia/cyprus.amap',
               'flashchart/anychart_6/swf/maps/asia/cyprus.xml',
               'flashchart/anychart_6/swf/maps/asia/india.amap',
               'flashchart/anychart_6/swf/maps/asia/india.xml',
               'flashchart/anychart_6/swf/maps/asia/indonesia.amap',
               'flashchart/anychart_6/swf/maps/asia/indonesia.xml',
               'flashchart/anychart_6/swf/maps/asia/iran.amap',
               'flashchart/anychart_6/swf/maps/asia/iran.xml',
               'flashchart/anychart_6/swf/maps/asia/iraq.amap',
               'flashchart/anychart_6/swf/maps/asia/iraq.xml',
               'flashchart/anychart_6/swf/maps/asia/israel.amap',
               'flashchart/anychart_6/swf/maps/asia/israel.xml',
               'flashchart/anychart_6/swf/maps/asia/japan.amap',
               'flashchart/anychart_6/swf/maps/asia/japan_second_level.amap',
               'flashchart/anychart_6/swf/maps/asia/japan_second_level.xml',
               'flashchart/anychart_6/swf/maps/asia/japan.xml',
               'flashchart/anychart_6/swf/maps/asia/jordan.amap',
               'flashchart/anychart_6/swf/maps/asia/jordan.xml',
               'flashchart/anychart_6/swf/maps/asia/kazakhstan.amap',
               'flashchart/anychart_6/swf/maps/asia/kazakhstan.xml',
               'flashchart/anychart_6/swf/maps/asia/kuwait.amap',
               'flashchart/anychart_6/swf/maps/asia/kuwait.xml',
               'flashchart/anychart_6/swf/maps/asia/laos.amap',
               'flashchart/anychart_6/swf/maps/asia/laos.xml',
               'flashchart/anychart_6/swf/maps/asia/lebanon.amap',
               'flashchart/anychart_6/swf/maps/asia/lebanon.xml',
               'flashchart/anychart_6/swf/maps/asia/malaysia.amap',
               'flashchart/anychart_6/swf/maps/asia/malaysia.xml',
               'flashchart/anychart_6/swf/maps/asia/maldives.amap',
               'flashchart/anychart_6/swf/maps/asia/maldives.xml',
               'flashchart/anychart_6/swf/maps/asia/mongolia.amap',
               'flashchart/anychart_6/swf/maps/asia/mongolia.xml',
               'flashchart/anychart_6/swf/maps/asia/myanmar.amap',
               'flashchart/anychart_6/swf/maps/asia/myanmar.xml',
               'flashchart/anychart_6/swf/maps/asia/nepal.amap',
               'flashchart/anychart_6/swf/maps/asia/nepal.xml',
               'flashchart/anychart_6/swf/maps/asia/north_korea.amap',
               'flashchart/anychart_6/swf/maps/asia/north_korea.xml',
               'flashchart/anychart_6/swf/maps/asia/pakistan.amap',
               'flashchart/anychart_6/swf/maps/asia/pakistan.xml',
               'flashchart/anychart_6/swf/maps/asia/philippines.amap',
               'flashchart/anychart_6/swf/maps/asia/philippines.xml',
               'flashchart/anychart_6/swf/maps/asia/russia.amap',
               'flashchart/anychart_6/swf/maps/asia/russia.xml',
               'flashchart/anychart_6/swf/maps/asia/saudi_arabia.amap',
               'flashchart/anychart_6/swf/maps/asia/saudi_arabia.xml',
               'flashchart/anychart_6/swf/maps/asia/south_korea.amap',
               'flashchart/anychart_6/swf/maps/asia/south_korea.xml',
               'flashchart/anychart_6/swf/maps/asia/syria.amap',
               'flashchart/anychart_6/swf/maps/asia/syria.xml',
               'flashchart/anychart_6/swf/maps/asia/taiwan.amap',
               'flashchart/anychart_6/swf/maps/asia/taiwan.xml',
               'flashchart/anychart_6/swf/maps/asia/thailand.amap',
               'flashchart/anychart_6/swf/maps/asia/thailand.xml',
               'flashchart/anychart_6/swf/maps/asia/turkey.amap',
               'flashchart/anychart_6/swf/maps/asia/turkey.xml',
               'flashchart/anychart_6/swf/maps/asia/united_arab_emirates.amap',
               'flashchart/anychart_6/swf/maps/asia/united_arab_emirates.xml',
               'flashchart/anychart_6/swf/maps/asia/vietnam.amap',
               'flashchart/anychart_6/swf/maps/asia/vietnam.xml',
               'flashchart/anychart_6/swf/maps/asia/yemen.amap',
               'flashchart/anychart_6/swf/maps/asia/yemen.xml',
               'flashchart/anychart_6/swf/maps/custom/sydney.amap',
               'flashchart/anychart_6/swf/maps/custom/sydney.xml',
               'flashchart/anychart_6/swf/maps/custom/usa_states.amap',
               'flashchart/anychart_6/swf/maps/custom/usa_states.xml',
               'flashchart/anychart_6/swf/maps/europe/albania.amap',
               'flashchart/anychart_6/swf/maps/europe/albania.xml',
               'flashchart/anychart_6/swf/maps/europe/austria.amap',
               'flashchart/anychart_6/swf/maps/europe/austria_second_level.amap',
               'flashchart/anychart_6/swf/maps/europe/austria_second_level.xml',
               'flashchart/anychart_6/swf/maps/europe/austria.xml',
               'flashchart/anychart_6/swf/maps/europe/belgium.amap',
               'flashchart/anychart_6/swf/maps/europe/belgium_second_level.amap',
               'flashchart/anychart_6/swf/maps/europe/belgium_second_level.xml',
               'flashchart/anychart_6/swf/maps/europe/belgium.xml',
               'flashchart/anychart_6/swf/maps/europe/bulgaria.amap',
               'flashchart/anychart_6/swf/maps/europe/bulgaria.xml',
               'flashchart/anychart_6/swf/maps/europe/byelarus.amap',
               'flashchart/anychart_6/swf/maps/europe/byelarus.xml',
               'flashchart/anychart_6/swf/maps/europe/czech_republic.amap',
               'flashchart/anychart_6/swf/maps/europe/czech_republic.xml',
               'flashchart/anychart_6/swf/maps/europe/denmark.amap',
               'flashchart/anychart_6/swf/maps/europe/denmark.xml',
               'flashchart/anychart_6/swf/maps/europe/finland.amap',
               'flashchart/anychart_6/swf/maps/europe/finland.xml',
               'flashchart/anychart_6/swf/maps/europe/france.amap',
               'flashchart/anychart_6/swf/maps/europe/france_second_level.amap',
               'flashchart/anychart_6/swf/maps/europe/france_second_level.xml',
               'flashchart/anychart_6/swf/maps/europe/france.xml',
               'flashchart/anychart_6/swf/maps/europe/germany.amap',
               'flashchart/anychart_6/swf/maps/europe/germany_second_level.amap',
               'flashchart/anychart_6/swf/maps/europe/germany_second_level.xml',
               'flashchart/anychart_6/swf/maps/europe/germany.xml',
               'flashchart/anychart_6/swf/maps/europe/greece.amap',
               'flashchart/anychart_6/swf/maps/europe/greece.xml',
               'flashchart/anychart_6/swf/maps/europe/hungary.amap',
               'flashchart/anychart_6/swf/maps/europe/hungary.xml',
               'flashchart/anychart_6/swf/maps/europe/iceland.amap',
               'flashchart/anychart_6/swf/maps/europe/iceland.xml',
               'flashchart/anychart_6/swf/maps/europe/ireland.amap',
               'flashchart/anychart_6/swf/maps/europe/ireland.xml',
               'flashchart/anychart_6/swf/maps/europe/italy.amap',
               'flashchart/anychart_6/swf/maps/europe/italy_second_level.amap',
               'flashchart/anychart_6/swf/maps/europe/italy_second_level.xml',
               'flashchart/anychart_6/swf/maps/europe/italy.xml',
               'flashchart/anychart_6/swf/maps/europe/netherlands.amap',
               'flashchart/anychart_6/swf/maps/europe/netherlands.xml',
               'flashchart/anychart_6/swf/maps/europe/norway.amap',
               'flashchart/anychart_6/swf/maps/europe/norway_second_level.amap',
               'flashchart/anychart_6/swf/maps/europe/norway_second_level.xml',
               'flashchart/anychart_6/swf/maps/europe/norway.xml',
               'flashchart/anychart_6/swf/maps/europe/poland.amap',
               'flashchart/anychart_6/swf/maps/europe/poland.xml',
               'flashchart/anychart_6/swf/maps/europe/portugal.amap',
               'flashchart/anychart_6/swf/maps/europe/portugal.xml',
               'flashchart/anychart_6/swf/maps/europe/romania.amap',
               'flashchart/anychart_6/swf/maps/europe/romania.xml',
               'flashchart/anychart_6/swf/maps/europe/spain.amap',
               'flashchart/anychart_6/swf/maps/europe/spain.xml',
               'flashchart/anychart_6/swf/maps/europe/sweden.amap',
               'flashchart/anychart_6/swf/maps/europe/sweden_second_level.amap',
               'flashchart/anychart_6/swf/maps/europe/sweden_second_level.xml',
               'flashchart/anychart_6/swf/maps/europe/sweden.xml',
               'flashchart/anychart_6/swf/maps/europe/switzerland.amap',
               'flashchart/anychart_6/swf/maps/europe/switzerland.xml',
               'flashchart/anychart_6/swf/maps/europe/uk_england.amap',
               'flashchart/anychart_6/swf/maps/europe/uk_england.xml',
               'flashchart/anychart_6/swf/maps/europe/uk_northern_ireland.amap',
               'flashchart/anychart_6/swf/maps/europe/uk_northern_ireland.xml',
               'flashchart/anychart_6/swf/maps/europe/ukraine.amap',
               'flashchart/anychart_6/swf/maps/europe/ukraine.xml',
               'flashchart/anychart_6/swf/maps/europe/uk_scotland.amap',
               'flashchart/anychart_6/swf/maps/europe/uk_scotland.xml',
               'flashchart/anychart_6/swf/maps/europe/uk_wales.amap',
               'flashchart/anychart_6/swf/maps/europe/uk_wales.xml',
               'flashchart/anychart_6/swf/maps/europe/united_kingdom.amap',
               'flashchart/anychart_6/swf/maps/europe/united_kingdom.xml',
               'flashchart/anychart_6/swf/maps/north_america/belize.amap',
               'flashchart/anychart_6/swf/maps/north_america/belize.xml',
               'flashchart/anychart_6/swf/maps/north_america/canada.amap',
               'flashchart/anychart_6/swf/maps/north_america/canada.xml',
               'flashchart/anychart_6/swf/maps/north_america/costa_rica.amap',
               'flashchart/anychart_6/swf/maps/north_america/costa_rica.xml',
               'flashchart/anychart_6/swf/maps/north_america/cuba.amap',
               'flashchart/anychart_6/swf/maps/north_america/cuba.xml',
               'flashchart/anychart_6/swf/maps/north_america/el_salvador.amap',
               'flashchart/anychart_6/swf/maps/north_america/el_salvador.xml',
               'flashchart/anychart_6/swf/maps/north_america/greenland.amap',
               'flashchart/anychart_6/swf/maps/north_america/greenland.xml',
               'flashchart/anychart_6/swf/maps/north_america/guatemala.amap',
               'flashchart/anychart_6/swf/maps/north_america/guatemala.xml',
               'flashchart/anychart_6/swf/maps/north_america/haiti.amap',
               'flashchart/anychart_6/swf/maps/north_america/haiti.xml',
               'flashchart/anychart_6/swf/maps/north_america/honduras.amap',
               'flashchart/anychart_6/swf/maps/north_america/jamaica.amap',
               'flashchart/anychart_6/swf/maps/north_america/jamaica.xml',
               'flashchart/anychart_6/swf/maps/north_america/mexico.amap',
               'flashchart/anychart_6/swf/maps/north_america/mexico.xml',
               'flashchart/anychart_6/swf/maps/north_america/nicaragua.amap',
               'flashchart/anychart_6/swf/maps/north_america/nicaragua.xml',
               'flashchart/anychart_6/swf/maps/north_america/panama.amap',
               'flashchart/anychart_6/swf/maps/north_america/panama.xml',
               'flashchart/anychart_6/swf/maps/north_america/usa_and_canada.amap',
               'flashchart/anychart_6/swf/maps/north_america/usa_and_canada.xml',
               'flashchart/anychart_6/swf/maps/north_america/usa_canada_and_mexico.amap',
               'flashchart/anychart_6/swf/maps/north_america/usa_canada_and_mexico.xml',
               'flashchart/anychart_6/swf/maps/oceania/australia.amap',
               'flashchart/anychart_6/swf/maps/oceania/australia.xml',
               'flashchart/anychart_6/swf/maps/oceania/new_zealand.amap',
               'flashchart/anychart_6/swf/maps/oceania/new_zealand.xml',
               'flashchart/anychart_6/swf/maps/oceania/papua_new_guinea.amap',
               'flashchart/anychart_6/swf/maps/oceania/papua_new_guinea.xml',
               'flashchart/anychart_6/swf/maps/south_america/argentina.amap',
               'flashchart/anychart_6/swf/maps/south_america/argentina.xml',
               'flashchart/anychart_6/swf/maps/south_america/bolivia.amap',
               'flashchart/anychart_6/swf/maps/south_america/bolivia.xml',
               'flashchart/anychart_6/swf/maps/south_america/brazil.amap',
               'flashchart/anychart_6/swf/maps/south_america/brazil.xml',
               'flashchart/anychart_6/swf/maps/south_america/chile.amap',
               'flashchart/anychart_6/swf/maps/south_america/chile.xml',
               'flashchart/anychart_6/swf/maps/south_america/colombia.amap',
               'flashchart/anychart_6/swf/maps/south_america/colombia.xml',
               'flashchart/anychart_6/swf/maps/south_america/ecuador.amap',
               'flashchart/anychart_6/swf/maps/south_america/ecuador.xml',
               'flashchart/anychart_6/swf/maps/south_america/french_guiana.amap',
               'flashchart/anychart_6/swf/maps/south_america/french_guiana.xml',
               'flashchart/anychart_6/swf/maps/south_america/guyana.amap',
               'flashchart/anychart_6/swf/maps/south_america/guyana.xml',
               'flashchart/anychart_6/swf/maps/south_america/paraguay.amap',
               'flashchart/anychart_6/swf/maps/south_america/paraguay.xml',
               'flashchart/anychart_6/swf/maps/south_america/peru.amap',
               'flashchart/anychart_6/swf/maps/south_america/peru.xml',
               'flashchart/anychart_6/swf/maps/south_america/suriname.amap',
               'flashchart/anychart_6/swf/maps/south_america/suriname.xml',
               'flashchart/anychart_6/swf/maps/south_america/uruguay.amap',
               'flashchart/anychart_6/swf/maps/south_america/uruguay.xml',
               'flashchart/anychart_6/swf/maps/south_america/venezuela.amap',
               'flashchart/anychart_6/swf/maps/south_america/venezuela.xml',
               'flashchart/anychart_6/swf/maps/usa/country/states_48.amap',
               'flashchart/anychart_6/swf/maps/usa/country/states_48.xml',
               'flashchart/anychart_6/swf/maps/usa/country/states.amap',
               'flashchart/anychart_6/swf/maps/usa/country/states.xml',
               'flashchart/anychart_6/swf/maps/usa/country/sub_regions.amap',
               'flashchart/anychart_6/swf/maps/usa/country/sub_regions.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/states/midwest.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/states/midwest.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/states/northeast.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/states/northeast.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/states/south.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/states/south.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/states/west.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/states/west.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/midwest.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/midwest.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/northeast.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/northeast.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/south.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/south.xml',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/west.amap',
               'flashchart/anychart_6/swf/maps/usa/regions/zip3/west.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ak.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ak.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/al.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/al.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ar.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ar.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/az.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/az.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ca.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ca.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/co.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/co.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ct.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ct.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/de.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/de.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/fl.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/fl.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ga.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ga.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/hi.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/hi.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ia.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ia.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/id.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/id.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/il.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/il.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/in.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/in.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ks.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ks.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ky.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ky.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/la.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/la.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ma.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ma.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/md.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/md.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/me.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/me.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mi.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mi.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mn.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mn.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mo.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mo.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ms.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ms.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mt.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/mt.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nc.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nc.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nd.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nd.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ne.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ne.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nh.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nh.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nj.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nj.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nm.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nm.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nv.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/nv.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ny.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ny.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/oh.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/oh.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ok.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ok.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/or.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/or.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/pa.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/pa.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ri.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ri.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/sc.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/sc.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/sd.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/sd.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/tn.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/tn.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/tx.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/tx.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ut.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/ut.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/va.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/va.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/vt.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/vt.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wa.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wa.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wi.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wi.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wv.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wv.xml',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wy.amap',
               'flashchart/anychart_6/swf/maps/usa/states/counties/wy.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ak.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ak.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/al.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/al.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ar.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ar.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/az.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/az.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ca.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ca.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/co.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/co.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ct.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ct.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/dc.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/dc.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/de.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/de.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/fl.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/fl.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ga.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ga.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/hi.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/hi.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ia.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ia.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/id.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/id.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/il.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/il.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/in.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/in.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ks.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ks.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ky.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ky.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/la.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/la.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ma.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ma.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/md.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/md.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/me.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/me.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mi.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mi.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mn.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mn.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mo.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mo.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ms.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ms.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mt.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/mt.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nc.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nc.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nd.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nd.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ne.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ne.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nh.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nh.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nj.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nj.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nm.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nm.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nv.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/nv.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ny.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ny.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/oh.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/oh.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ok.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ok.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/or.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/or.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/pa.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/pa.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/pr.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/pr.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ri.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ri.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/sc.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/sc.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/sd.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/sd.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/tn.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/tn.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/tx.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/tx.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ut.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/ut.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/va.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/va.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/vt.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/vt.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wa.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wa.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wi.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wi.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wv.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wv.xml',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wy.amap',
               'flashchart/anychart_6/swf/maps/usa/states/zip3/wy.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/east_north_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/east_north_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/east_south_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/east_south_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/middle_atlantic.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/middle_atlantic.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/mountain.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/mountain.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/new_england.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/new_england.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/pacific.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/pacific.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/south_atlantic.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/south_atlantic.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/west_north_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/west_north_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/west_south_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/counties/west_south_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/east_north_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/east_north_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/east_south_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/east_south_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/middle_atlantic.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/middle_atlantic.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/mountain.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/mountain.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/new_england.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/new_england.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/pacific.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/pacific.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/south_atlantic.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/south_atlantic.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/west_north_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/west_north_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/west_south_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/states/west_south_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/east_north_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/east_north_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/east_south_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/east_south_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/middle_atlantic.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/middle_atlantic.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/mountain.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/mountain.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/new_england.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/new_england.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/pacific.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/pacific.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/south_atlantic.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/south_atlantic.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/west_north_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/west_north_central.xml',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/west_south_central.amap',
               'flashchart/anychart_6/swf/maps/usa/sub_regions/zip3/west_south_central.xml',
               'flashchart/anychart_6/swf/maps/world/africa.amap',
               'flashchart/anychart_6/swf/maps/world/africa.xml',
               'flashchart/anychart_6/swf/maps/world/americas.amap',
               'flashchart/anychart_6/swf/maps/world/americas.xml',
               'flashchart/anychart_6/swf/maps/world/europe.amap',
               'flashchart/anychart_6/swf/maps/world/europe_without_russia.amap',
               'flashchart/anychart_6/swf/maps/world/europe_without_russia.xml',
               'flashchart/anychart_6/swf/maps/world/europe.xml',
               'flashchart/anychart_6/swf/maps/world/north_america.amap',
               'flashchart/anychart_6/swf/maps/world/north_america.xml',
               'flashchart/anychart_6/swf/maps/world/south_america.amap',
               'flashchart/anychart_6/swf/maps/world/south_america.xml',
               'flashchart/anychart_6/swf/maps/world/world.amap',
               'flashchart/anychart_6/swf/maps/world/world_wo_gr.amap',
               'flashchart/anychart_6/swf/maps/world/world_wo_gr.xml',
               'flashchart/anychart_6/swf/maps/world/world.xml',               
               'flashchart/anygantt_4/swf/AnyGantt.swf',
               'flashchart/anygantt_4/swf/Preloader.swf' );

  --
  -- For each directory, create it
  --
  dbms_output.put_line('...Create Flash directory structure');
  for i in 1..l_directories.count loop
      directory_path := repository_folder_path || l_directories(i);
      begin
          for c1 in (select any_path
                       from xdb.resource_view
                      where any_path like directory_path )
          loop
              if xdb.dbms_xdb.existsResource(c1.any_path) then
                  directory_exists := true;
              end if;
          end loop;  
      
          if not directory_exists then
              result := xdb.dbms_xdb.createfolder(directory_path);
          end if;
      end;
  end loop;

  --
  -- For each file, first remove it, then recreate it and apply the existing RO ACL
  --
  for i in 1..l_files.count loop

    resource_path := repository_folder_path || l_files(i);

    begin
        dbms_output.put_line('...Create file:' || resource_path);
        content_bfile := bfilename(upload_directory_name,l_files(i));
        if xdb.dbms_xdb.existsresource(resource_path) then
            xdb.dbms_xdb.deleteresource(resource_path,1);
        end if;
        
        if sys.dbms_lob.getlength(content_bfile) > 0 then
            result := dbms_xdb.createresource(resource_path,content_bfile,nls_charset_id('AL32UTF8'));
        end if;
    end;

    begin
        if wwv_flow_utilities.db_version_is_at_least('11') then
            dbms_xdb.setACL( resource_path, ro_anonymous_acl );
        end if;
    exception when others then
        dbms_output.put_line('.....Error applying ACL to file: ' || l_files(i));
    end;
  end loop;

end;
/

commit;

drop directory APEX_IMAGES;
