//---------------------------------------------------------------
// dbgtData.js v.1.5
// Copyright (C) 2002 David Bollinger (davebollinger@hotmail.com)
//
// Support code for the 'dbGroupToc' modification - A grouped
// table of contents for ArcIMS 3.1+ HTML viewer sites.
//
// Notice:   This code may be freely distributed, used and
//           modified provided that this comment remains intact.
//---------------------------------------------------------------


// THERE MUST EXIST A SINGLE GLOBAL INSTANCE OF THE "TOC" CLASS NAMED 'toc'


// THREE METHODS TO DEFINE THE TOC ARE SHOWN BELOW,
// COMMENT OR UNCOMMENT AND CUSTOMIZE IF NECESSARY


//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// FIRST METHOD, SIMPLEST POSSIBLE, JUST DEFINE THE TOC.
// ALL LAYERS WILL BE AUTOMATICALLY ADDED IN A VERY SIMPLE
// NON-GROUPED FORMAT THAT ROUGHLY MIMICS ESRI'S ORIGINAL TOC
// (this sample for use with any mapservice)

/*
var toc = new TOC('LAYERS','All Layers',true,'swatch_layers.gif');
*/


//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// SECOND METHOD, MEDIUM COMPLEXITY, DEFINE THE TOC AND AN
// ARRAY DESCRIBING THE GROUP OF EACH LAYER.   ALL LAYERS
// WILL BE AUTOMATICALLY ADDED IN A GROUPED FORMAT.  DOES
// NOT SUPPORT NESTED GROUPS OR SWATCHES/LEGENDS/ETC.
// (this sample for use with 'sanfrancisco' sample mapservice)
//

/*
var toc = new TOC('LAYERS','All Layers',true,'swatch_layers.gif');
toc.LayersGroups[0] = 'Public Locations';  // Art Galleries
toc.LayersGroups[1] = 'Public Locations';  // Museums
toc.LayersGroups[2] = 'Private Locations'; // Theaters
toc.LayersGroups[3] = 'Private Locations'; // Agencies
toc.LayersGroups[4] = '';                  // Highways
toc.LayersGroups[5] = 'Base Map Layers';   // Zipcodes
toc.LayersGroups[6] = 'Base Map Layers';   // County
*/


/*
var toc = new TOC('LAYERS','All Layers',true,'swatch_layers.gif');
toc.LayersGroups[0] = 'Mineral Rights';  // Mineral Rights - Boundaries
toc.LayersGroups[1] = 'Mineral Rights';  // Mineral Rights - Status
toc.LayersGroups[2] = 'Mineral Rights'; // Mineral Rights - Type
toc.LayersGroups[3] = ''; // Counties
*/

/*
var toc = new TOC('LAYERS','All Layers',true,'swatch_layers.gif');


toc.LayersGroups[0] = 'Places'; // Places
toc.LayersGroups[1] = 'Places'; // Gazetteer


toc.LayersGroups[2] = 'Mineral Rights (Oct_31_2009)';  // Mineral Rights - Boundaries
toc.LayersGroups[3] = 'Mineral Rights (Oct_31_2009)';  // Mineral Rights - Status
toc.LayersGroups[4] = 'Mineral Rights (Oct_31_2009)';  // Mineral Rights - Type


toc.LayersGroups[5] = 'Grids';  // 50k Map Sheet Index
toc.LayersGroups[6] = 'Grids';  // 50k Map Sheet Labels

toc.LayersGroups[7] = 'Grids'; // 10k Map Sheet Index
toc.LayersGroups[8] = 'Grids'; // 10k Map Sheet Index Labels

toc.LayersGroups[9] = 'Grids'; // Claim Reference Maps
toc.LayersGroups[10] = 'Grids'; // Claim Reference Maps Labels

toc.LayersGroups[11] = 'Grids'; // Petroleum Reservation Grid
toc.LayersGroups[12] = 'Grids'; // Petroleum Reservation Grid Labels

toc.LayersGroups[13] = 'Grids'; // Mining Tract Grid
toc.LayersGroups[14] = 'Grids'; // Mining Tract Grid Labels

toc.LayersGroups[15] = 'Grids'; // Claim Grid
toc.LayersGroups[16] = 'Grids'; // Claim Grid Labels


toc.LayersGroups[17] = ''; // Mineral Occurrences


toc.LayersGroups[18] = ''; // Abandoned Mines/Shafts


toc.LayersGroups[19] = ''; // Diamond Drillholes


toc.LayersGroups[20] = 'Base Layers'; // Coastline (10k)
toc.LayersGroups[21] = 'Base Layers'; // Roads and Utilities (10k)
toc.LayersGroups[22] = 'Base Layers'; // Streams (10k)
toc.LayersGroups[23] = 'Base Layers'; // Lakes (10k)
toc.LayersGroups[24] = 'Base Layers'; // Contours (10k)
toc.LayersGroups[25] = 'Base Layers'; // Wetlands (50k)
toc.LayersGroups[26] = 'Base Layers'; // Coastline (250k)
toc.LayersGroups[27] = 'Base Layers'; // Contours (250k)
toc.LayersGroups[28] = 'Base Layers'; // Streams (250k)
toc.LayersGroups[29] = 'Base Layers'; // Roads (250k)
toc.LayersGroups[30] = 'Base Layers'; // Wetlands (250k)
toc.LayersGroups[31] = 'Base Layers'; // Lakes (250k)
toc.LayersGroups[32] = 'Base Layers'; // County Boundaries (500K)
toc.LayersGroups[33] = 'Base Layers'; // Roads (500k)
toc.LayersGroups[34] = 'Base Layers'; // Streams  (500k)
toc.LayersGroups[35] = 'Base Layers'; // Lakes (500k)


toc.LayersGroups[36] = 'Geology'; // Age Data Locations
toc.LayersGroups[37] = 'Geology'; // Geologic Contacts
toc.LayersGroups[38] = 'Geology'; // Faults and Dykes
toc.LayersGroups[39] = 'Geology'; // Formation Labels
toc.LayersGroups[40] = 'Geology'; // Geology by Formation


toc.LayersGroups[41] = 'Shaded Relief Images'; // s0004505
toc.LayersGroups[42] = 'Shaded Relief Images'; // s0004510
toc.LayersGroups[43] = 'Shaded Relief Images'; // s0454505
toc.LayersGroups[44] = 'Shaded Relief Images'; // s0454510
toc.LayersGroups[45] = 'Shaded Relief Images'; // s0904505
toc.LayersGroups[46] = 'Shaded Relief Images'; // s0904510
toc.LayersGroups[47] = 'Shaded Relief Images'; // s1354505
toc.LayersGroups[48] = 'Shaded Relief Images'; // s1354510
toc.LayersGroups[49] = 'Shaded Relief Images'; // s1804505
toc.LayersGroups[50] = 'Shaded Relief Images'; // s1804510
toc.LayersGroups[51] = 'Shaded Relief Images'; // s2254505
toc.LayersGroups[52] = 'Shaded Relief Images'; // s2254510
toc.LayersGroups[53] = 'Shaded Relief Images'; // s2704505
toc.LayersGroups[54] = 'Shaded Relief Images'; // s2704510
toc.LayersGroups[55] = 'Shaded Relief Images'; // s3154505
toc.LayersGroups[56] = 'Shaded Relief Images'; // s3154510

toc.LayersGroups[57] = ''; // Backdrop

*/

//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// THIRD METHOD, MOST COMPLEX, MOST CUSTOMIZABLE, DEFINE THE
// TOC AND *MANUALLY* ADD GROUPS AND LAYERS AS DESIRED.
// NO LAYERS WILL BE ADDED AUTOMATICALLY.  FULL CONTROL OF
// CAPTIONS/SWATCHES/LEGENDS/ETC.
// (this sample for use with 'sanfrancisco' sample mapservice)

/*
var toc = new TOC('LAYERS','All Layers',false,'swatch_layers.gif');
	var grpLoc = toc.addGroup( new GROUP('Locations',true,'swatch_locations.gif') );
		var grpPub = grpLoc.addGroup( new GROUP('Public',true) );
			grpPub.addLayer( new LAYER('Art Galleries',null,'swatch_artgalleries.gif') );
			grpPub.addLayer( new LAYER('Museums',null,'swatch_museums.gif','','axl_string_to_use_for_label_renderer') );
		var grpPri = grpLoc.addGroup( new GROUP('Private',true,'swatch_theaters_agencies.gif') );
			grpPri.addLayer( new LAYER('Theaters',null,'swatch_theaters.gif') );
			grpPri.addLayer( new LAYER('Agencies',null,'swatch_agencies.gif') );
	toc.addLayer( new LAYER('Highways',null,'swatch_highways.gif','legend_streets.gif') );
 	var grpBas = toc.addGroup( new GROUP('Base Map',true) );
    grpBas.addLayer( new LAYER('Zipcodes',null,'swatch_zipcodes.gif') );
    grpBas.addLayer( new LAYER('County',null,'swatch_county.gif') );
*/

var toc = new TOC('LAYERS','All Layers',true,'swatch_layers.gif');
	var grpPlaces = toc.addGroup( new GROUP('Places',false) );
               grpPlaces.addLayer( new LAYER('Places',null) ); 
               grpPlaces.addLayer( new LAYER('Gazetteer',null) );  
	var grpMinRight = toc.addGroup( new GROUP('Mineral Rights (Oct_31_2009)',false) );
               grpMinRight.addLayer( new LAYER('Boundaries',null,'gm_mr_bnd.gif') );
               grpMinRight.addLayer( new LAYER('Status',null,'swatch_drop_legend.gif','gm_mr_status.gif') );
               grpMinRight.addLayer( new LAYER('Type',null,'swatch_drop_legend.gif','gm_mr_type.gif') );
	var grpGrids = toc.addGroup( new GROUP('Grids',false) );
               grpGrids.addLayer( new LAYER('50k Map Sheets',null) );
               grpGrids.addLayer( new LAYER('50k Map Sheet Labels',null) );
               grpGrids.addLayer( new LAYER('10k Map Sheet Grid',null) );
               grpGrids.addLayer( new LAYER('10k Map Sheet Labels',null) );
               grpGrids.addLayer( new LAYER('Claim Reference Maps',null) );
               grpGrids.addLayer( new LAYER('Claim Reference Map Labels',null) );
               grpGrids.addLayer( new LAYER('Petroleum Reservations',null) );
               grpGrids.addLayer( new LAYER('Petroleum Reservation Labels',null) );
               grpGrids.addLayer( new LAYER('Mining Tracts',null) );
               grpGrids.addLayer( new LAYER('Mining Tract Labels',null) );
               grpGrids.addLayer( new LAYER('Claims',null) );
               grpGrids.addLayer( new LAYER('Claim Labels',null) );
        toc.addLayer( new LAYER('Mineral Occurrences (v10, 2009)',null,'mo_stars_dropleg.gif','gm_mo_legend.gif') );
        toc.addLayer( new LAYER('Abandoned Mines/Shafts (v4, 2009)',null,'shaft_red_triangle.gif') );
        toc.addLayer( new LAYER('Diamond Drillholes (v2, 2000)',null,'ddh_black_dot.gif') );
        var grpBaseLayers = toc.addGroup( new GROUP('Base Layers',false) );
               grpBaseLayers.addLayer( new LAYER('Coastline (10K)',null) );
               grpBaseLayers.addLayer( new LAYER('Roads and Utilities (10k)',null) );
               grpBaseLayers.addLayer( new LAYER('Streams (10k)',null) );
               grpBaseLayers.addLayer( new LAYER('Lakes (10k)',null) );
               grpBaseLayers.addLayer( new LAYER('Contours (10k)',null) );
               grpBaseLayers.addLayer( new LAYER('Wetlands (50k)',null) );
               grpBaseLayers.addLayer( new LAYER('Coastline (250k)',null) );
               grpBaseLayers.addLayer( new LAYER('Contours (250k)',null) );
               grpBaseLayers.addLayer( new LAYER('Streams (250k)',null) );
               grpBaseLayers.addLayer( new LAYER('Roads (250k)',null) );
               grpBaseLayers.addLayer( new LAYER('Wetlands (250k)',null) );
               grpBaseLayers.addLayer( new LAYER('Lakes (250k)',null) );
               grpBaseLayers.addLayer( new LAYER('County Boundaries (500K)',null) );
               grpBaseLayers.addLayer( new LAYER('Roads (500k)',null) );
               grpBaseLayers.addLayer( new LAYER('Streams (500k)',null) );
               grpBaseLayers.addLayer( new LAYER('Lakes (500k)',null) );
        var grpGeology = toc.addGroup( new GROUP('Bedrock Geology (Keppie, 2000)- Points, Lines, Labels',false) );
              grpGeology.addLayer( new LAYER('Age Date Locations',null,'gm_gp_age.gif') );
              grpGeology.addLayer( new LAYER('Geologic Contacts',null,'gm_gl_contact.gif') );
              grpGeology.addLayer( new LAYER('Faults and Dykes',null,'gm_gl_fltdk.gif') );
              grpGeology.addLayer( new LAYER('Formation Labels',null) );
/*              grpGeology.addLayer( new LAYER('Geology by Formation (Keppie, 2000)',null) );  */
        var grpShdRlfImg = toc.addGroup( new GROUP01('Shaded Relief Images',false) );
              grpShdRlfImg.addLayer( new LAYER('Az_000-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_000-Alt_45-Z_10',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_045-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_045-Alt_45-Z_10',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_090-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_090-Alt_45-Z_10',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_135-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_135-Alt_45-Z_10',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_180-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_180-Alt_45-Z_10',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_225-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_225-Alt_45-Z_10',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_270-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_270-Alt_45-Z_10',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_315-Alt_45-Z_05',null) );
              grpShdRlfImg.addLayer( new LAYER('Az_315-Alt_45-Z_10',null) );
        toc.addLayer( new LAYER('Bedrock Geology by Formation (Keppie, 2000)',null) );

/*        toc.addLayer( new LAYER('Backdrop',null) );    */
        var grpBackdrop = toc.addGroup( new GROUP('Backdrop Layers',false) );
              grpBackdrop.addLayer( new LAYER('Backdrop NS Detail',null) );
              grpBackdrop.addLayer( new LAYER('Backdrop NS',null) );
              grpBackdrop.addLayer( new LAYER('Backdrop',null) );
