//---------------------------------------------------------------
// 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
*/


//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// 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',true,'swatch_layers.gif');
	var grpCult = toc.addGroup( new GROUP('Cultural resources',true) );
		var grpSites = grpCult.addGroup( new GROUP('Sites',true) );
			grpSites.addLayer( new LAYER('Site labels',null) );
			grpSites.addLayer( new LAYER('Sites',null,'swatch_sites.gif') );
		var grpInv = grpCult.addGroup( new GROUP('Inventories',true) );
			grpInv.addLayer( new LAYER('Inventory labels',null) );
			grpInv.addLayer( new LAYER('Inventories',null,'swatch_inventories.gif') );
		grpCult.addLayer( new LAYER('Digitizing status',null,'swatch_status.gif') );
	var grpTrans = toc.addGroup( new GROUP('Transportation',false) );
		var grpRoads = grpTrans.addGroup( new GROUP('Roads',true) );
			grpRoads.addLayer( new LAYER('Interstates',null,'swatch_interstate.gif') );
			grpRoads.addLayer( new LAYER('US highways',null,'swatch_ushwy.gif') );
			grpRoads.addLayer( new LAYER('State highways',null,'swatch_sthwy.gif') );
	var grpPolitical = toc.addGroup( new GROUP('Political boundaries',false) );
		var grpCounties = grpPolitical.addGroup( new GROUP('Counties',true) );
			grpCounties.addLayer( new LAYER('County labels',null) );
			grpCounties.addLayer( new LAYER('County borders',null,'swatch_counties.gif') );
		var grpBLM = grpPolitical.addGroup( new GROUP('BLM districts',true) );
			grpBLM.addLayer( new LAYER('BLM office labels',null) );
			grpBLM.addLayer( new LAYER('BLM office boundaries',null,'swatch_blm.gif') );
	var grpUSGS = toc.addGroup( new GROUP('USGS quadrangles',false) );
		var grp24kquads = grpUSGS.addGroup( new GROUP('1:24K quads',true) );
			grp24kquads.addLayer( new LAYER('1:24K quad labels',null) );
			grp24kquads.addLayer( new LAYER('1:24K USGS quad boundaries',null,'swatch_24quads.gif') );
			grp24kquads.addLayer( new LAYER('1:24K USGS DRGs',null,'swatch_drgs.gif') );
		var grp100kquads = grpUSGS.addGroup( new GROUP('1:100K quads',true) );
			grp100kquads.addLayer( new LAYER('1:100K quad labels',null) );
			grp100kquads.addLayer( new LAYER('1:100K USGS quad boundaries',null,'swatch_100quads.gif') );
			grp100kquads.addLayer( new LAYER('1:100K USGS DRGs',null,'swatch_drgs.gif') );
		var grp250kquads = grpUSGS.addGroup( new GROUP('1:250K quads',true) );
			grp250kquads.addLayer( new LAYER('1:250K quad labels',null) );
			grp250kquads.addLayer( new LAYER('1:250K USGS quad boundaries',null,'swatch_250quads.gif') );
			grp250kquads.addLayer( new LAYER('1:250K USGS DRGs',null,'swatch_drgs.gif') );
	toc.addLayer( new LAYER('Populated places',null,'swatch_towns.gif','legend_towns.gif') );
	toc.addLayer( new LAYER('PLSS grid',null,'swatch_plss.gif') );
	toc.addLayer( new LAYER('Shaded relief',null,'swatch_shadedrelief.gif') );
	toc.addLayer( new LAYER('Zone 13',null,'swatch_zone.gif') );
