//---------------------------------------------------------------
// 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
*/


var toc = new TOC('LAYERS','All Layers',true,'swatch_layers.gif');
toc.LayersGroups[0] = 'Points of Interest';  // Fire Houses
toc.LayersGroups[1] = 'Points of Interest';  // Police Stations
toc.LayersGroups[2] = 'Points of Interest';  // Hospitals
toc.LayersGroups[3] = 'Points of Interest';  // Libraries
toc.LayersGroups[4] = 'Liquor Licenses';  // liquor_license
toc.LayersGroups[5] = 'Liquor Licenses';  // liquor_buffer
toc.LayersGroups[6] = 'Bikeways'; // On-Street Bikeways
toc.LayersGroups[7] = 'Bikeways'; // Planned/Proposed Bikeways
toc.LayersGroups[8] = 'Bikeways'; // Other Trails
toc.LayersGroups[9] = 'Bikeways'; // Oak Leaf Trail
toc.LayersGroups[10] = 'Transportation/Infrastructure'; // Street Paving Program
toc.LayersGroups[11] = 'Transportation/Infrastructure'; // Freeways
toc.LayersGroups[12] = 'Transportation/Infrastructure'; // Major Streets
toc.LayersGroups[13] = 'Transportation/Infrastructure'; // Streets
toc.LayersGroups[14] = 'Transportation/Infrastructure'; // Railroads
toc.LayersGroups[15] = 'Transportation/Infrastructure'; // Airports
toc.LayersGroups[16] = 'General Reference'; // Land Use Symbols
toc.LayersGroups[17] = 'General Reference'; // Parcels (Outline)
toc.LayersGroups[18] = 'General Reference'; // Waterways
toc.LayersGroups[19] = 'General Reference'; // Parks and Parkways
toc.LayersGroups[20] = 'Schools';   // Schools
toc.LayersGroups[21] = 'Schools';   // MPS High Schools Districts
toc.LayersGroups[22] = 'Schools';   // MPS Middle School Districts
toc.LayersGroups[23] = 'Schools';   // MPS Elementary School Districts
toc.LayersGroups[24] = 'Schools';   // School Board Districts
toc.LayersGroups[25] = 'Election Info';  // Polling Places
toc.LayersGroups[26] = 'Election Info';  // Voting Wards
toc.LayersGroups[27] = 'Election Info';  // Aldermanic Districts
toc.LayersGroups[28] = 'Election Info';  // County Supervisor Districts
toc.LayersGroups[29] = 'Property and Zoning Data'; // Tax Delinquent Properties
toc.LayersGroups[30] = 'Property and Zoning Data'; // Property Violations
toc.LayersGroups[31] = 'Property and Zoning Data'; // Property Permits
toc.LayersGroups[32] = 'Property and Zoning Data'; // Property Service Requests
toc.LayersGroups[33] = 'Property and Zoning Data'; // Land Use
toc.LayersGroups[34] = 'Property and Zoning Data'; // Parcels
toc.LayersGroups[35] = 'Property and Zoning Data'; // Residential Assessment Neighborhoods
toc.LayersGroups[36] = 'Property and Zoning Data'; // Apartment Assessment Neighborhoods
toc.LayersGroups[37] = 'Property and Zoning Data'; // Commercial Assessment Neighborhoods
toc.LayersGroups[38] = 'Property and Zoning Data'; // Historic Sites
toc.LayersGroups[39] = 'Property and Zoning Data'; // Local Historic Districts
toc.LayersGroups[40] = 'Property and Zoning Data'; // National Historic Districts
toc.LayersGroups[41] = 'Property and Zoning Data'; // Historic Areas
toc.LayersGroups[42] = 'Property and Zoning Data'; // Business Improvement Districts (BID)
toc.LayersGroups[43] = 'Property and Zoning Data'; // Targeted Investment Neighborhoods (TIN)
toc.LayersGroups[44] = 'Property and Zoning Data'; // Tax Incremental Districts (TID)
toc.LayersGroups[45] = 'Property and Zoning Data'; // 2001 Development Zones
toc.LayersGroups[46] = 'Property and Zoning Data'; // Zoning
toc.LayersGroups[47] = 'Property and Zoning Data'; // Neighborhoods
/* toc.LayersGroups[43] = 'City Services';  // Fire Battalions */
toc.LayersGroups[48] = 'City Services';   // Police Districts
toc.LayersGroups[49] = 'City Services';   // Health Districts
toc.LayersGroups[50] = 'City Services';   // Summer Garbage Routes
toc.LayersGroups[51] = 'City Services';   // Winter Garbage Routes
toc.LayersGroups[52] = 'City Services';   // Summer Recycling Routes
toc.LayersGroups[53] = 'City Services';   // Winter Recycling Routes
toc.LayersGroups[54] = 'Base Maps';   // Zip Codes
toc.LayersGroups[55] = 'Base Maps';   // City Limits
toc.LayersGroups[56] = 'Base Maps';   // Watersheds
toc.LayersGroups[57] = 'Base Maps';   // Quarter Sections
toc.LayersGroups[58] = 'Base Maps';   // Orthophoto



//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// 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 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 grpInt = toc.addGroup( new GROUP('Points of Interest',false) );
		grpInt.addLayer( new LAYER('Fire Houses',null) );
		grpInt.addLayer( new LAYER('Police Stations',null) );
		grpInt.addLayer( new LAYER('Hospitals',null) );
		grpInt.addLayer( new LAYER('Libraries',null) );
	var grpLiq = toc.addGroup( new GROUP('Liquor Licenses',false) );
		grpLiq.addLayer( new LAYER('Liquor Licenses',null) );
		grpLiq.addLayer( new LAYER('Liquor License Buffers (ordinance 051177)',null) );
	var grpBike = toc.addGroup( new GROUP('Bikeways',false) );
		grpBike.addLayer( new LAYER('On-Street Bikeways',null) );
		grpBike.addLayer( new LAYER('Planned/Proposed Bikeways',null) );
		grpBike.addLayer( new LAYER('Other Trails',null) );
		grpBike.addLayer( new LAYER('Oak Leaf Trail',null) );
	var grpTrans = toc.addGroup( new GROUP('Transportation/Infrastructure',true) );
		grpTrans.addLayer( new LAYER('Street Paving Program',null) );
		grpTrans.addLayer( new LAYER('Freeways',null) );
		grpTrans.addLayer( new LAYER('Major Streets',null) );
		grpTrans.addLayer( new LAYER('Streets',null) );
		grpTrans.addLayer( new LAYER('Railroads',null) );
		grpTrans.addLayer( new LAYER('Airports',null) );
	var grpGen = toc.addGroup( new GROUP('General Reference',true) );
		grpGen.addLayer( new LAYER('Land Use Symbols',null) );
		grpGen.addLayer( new LAYER('Parcels (Outline)',null) );
		grpGen.addLayer( new LAYER('Waterways',null) );
		grpGen.addLayer( new LAYER('Parks and Parkways',null) );
	var grpSchool = toc.addGroup( new GROUP('Schools',false) );
		grpSchool.addLayer( new LAYER('Schools',null) );
		grpSchool.addLayer( new LAYER('MPS High School Districts',null) );
		grpSchool.addLayer( new LAYER('MPS Middle School Districts',null) );
		grpSchool.addLayer( new LAYER('MPS Elementary School Districts',null) );
		grpSchool.addLayer( new LAYER('School Board Districts',null) );
	var grpElection = toc.addGroup( new GROUP('Election Info',true) );
		grpElection.addLayer( new LAYER('Polling Places',null) );
		grpElection.addLayer( new LAYER('Voting Wards',null) );
		grpElection.addLayer( new LAYER('Aldermanic Districts',null) );
		grpElection.addLayer( new LAYER('County Supervisor Districts',null) );
	var grpProp = toc.addGroup( new GROUP('Property and Zoning Data',true) );
		grpProp.addLayer( new LAYER('Foreclosed Properties',null) );
		grpProp.addLayer( new LAYER('Tax Delinquent Properties',null) );
		grpProp.addLayer( new LAYER('Property Violations',null) );
		grpProp.addLayer( new LAYER('Property Permits',null) );
		grpProp.addLayer( new LAYER('Property Services Requests',null) );
		grpProp.addLayer( new LAYER('Land Use',null) );
		grpProp.addLayer( new LAYER('Parcels',null) );
		var grpAss = grpProp.addGroup( new GROUP('Assessment Neighborhoods',false) );
			grpAss.addLayer( new LAYER('Residential Assessment Neighborhoods',null) );
			grpAss.addLayer( new LAYER('Apartment Assessment Neighborhoods',null) );
			grpAss.addLayer( new LAYER('Commercial Assessment Neighborhoods',null) );
		var grpHist = grpProp.addGroup( new GROUP('Historic Preservation',false) );
			grpHist.addLayer( new LAYER('Historic Sites',null) );
			grpHist.addLayer( new LAYER('National Historic Districts',null) );
			grpHist.addLayer( new LAYER('Local Historic Districts',null) );
			grpHist.addLayer( new LAYER('Historic Areas',null) );
		var grpDCD = grpProp.addGroup( new GROUP('City Development Maps',false) );
			grpDCD.addLayer( new LAYER('Business Improvement Districts',null) );
			grpDCD.addLayer( new LAYER('Targeted Investment Neighborhoods',null) );
			grpDCD.addLayer( new LAYER('Tax Incremental Districts',null) );
			grpDCD.addLayer( new LAYER('2001 Development Zones',null) );
		grpProp.addLayer( new LAYER('Zoning',null) );
		grpProp.addLayer( new LAYER('Neighborhoods',null) );
		grpProp.addLayer( new LAYER('Area Plans',null) );
	var grpServices = toc.addGroup( new GROUP('City Services',false) );
		grpServices.addLayer( new LAYER('Police Districts',null) );
		grpServices.addLayer( new LAYER('Health Districts',null) );
		var grpSan = grpServices.addGroup( new GROUP('Sanitation',false) );
			grpSan.addLayer( new LAYER('Summer Garbage Routes',null) );
			grpSan.addLayer( new LAYER('Winter Garbage Routes',null) );
			grpSan.addLayer( new LAYER('Summer Recycling Routes',null) );
			grpSan.addLayer( new LAYER('Winter Recycling Routes',null) );
	var grpBase = toc.addGroup( new GROUP('Base Maps',false) );
		grpBase.addLayer( new LAYER('Zip Codes',null) );
		grpBase.addLayer( new LAYER('City Limits',null) );
		grpBase.addLayer( new LAYER('Watersheds',null) );
		grpBase.addLayer( new LAYER('Quarter Sections',null) );
		grpBase.addLayer( new LAYER('Orthophoto',null) );