//---------------------------------------------------------------
// dbgtData.js v.1.5a
// 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 grpvot = toc.addGroup( new GROUP('Precincts',false,'polygon.jpg') );
 		 	grpvot.addLayer( new LAYER('Precincts',null,'line.jpg') );
			grpvot.addLayer( new LAYER('Voting District Lines',null,'line.jpg') );


	toc.addLayer( new LAYER('Polling Locations',null,'point.jpg') );

	var grpPub = toc.addGroup( new GROUP('Roads',false,'line.jpg') );
 		 	grpPub.addLayer( new LAYER('Roads',null) );
			grpPub.addLayer( new LAYER('Roads Local',null,'line.jpg') );
toc.addLayer( new LAYER('City Limits',null,'polygon.jpg') );
toc.addLayer( new LAYER('Commission Districts',null,'polygon.jpg') );
toc.addLayer( new LAYER('Civil Townships',null,'polygon.jpg') );
toc.addLayer( new LAYER('Fire Protection Districts',null,'polygon.jpg') );
toc.addLayer( new LAYER('Legislative Districts',null,'polygon.jpg') );
toc.addLayer( new LAYER('Library Districts',null,'polygon.jpg') );
toc.addLayer( new LAYER('Road Districts',null,'polygon.jpg') );
toc.addLayer( new LAYER('School Districts',null,'polygon.jpg') );
toc.addLayer( new LAYER('Wards',null,'polygon.jpg') );
toc.addLayer( new LAYER('Water Districts',null,'polygon.jpg') );

toc.addLayer( new LAYER('County Boundary',null,'polygon.jpg') );
