//---------------------------------------------------------------
// dbgtData.js v.1.4
// 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.
//---------------------------------------------------------------


//
// create the global resource object
//
dbgtResource = new RESOURCE('');
dbgtResource.iconPath = 'dbGroupToc/';                   // path to icon images
dbgtResource.swatchPath = 'dbGroupToc/';                 // path to swatch images
dbgtResource.legendPath = 'dbGroupToc/';                 // path to legend images
dbgtResource.iconPixel = 'icon_pixel.gif';               // single transparent pixel
dbgtResource.iconBlank = 'icon_blank.gif';               // all transparent placeholder
dbgtResource.iconClosed = 'icon_closed.gif';             // closed group folder
dbgtResource.iconOpened = 'icon_opened.gif';             // opened group folder
dbgtResource.iconChild = 'icon_child.gif';               // connecting line to child item (continued)
dbgtResource.iconChildLast = 'icon_childlast.gif';       // connecting line to child item (last one)
dbgtResource.iconSibling = 'icon_sibling.gif';           // vertical connector to sibling item
dbgtResource.iconLabelOn = 'icon_labelon.gif';           // labelling enabled
dbgtResource.iconLabelOff = 'icon_labeloff.gif';         // labelling disabled
dbgtResource.iconLayer = 'icon_layer.gif';               // map layer icon
dbgtResource.iconHidden = 'icon_hidden.gif';             // layer not visible, unselected checkbox
dbgtResource.iconVisible = 'icon_visible.gif';           // layer visible, selected checkbox
dbgtResource.iconVisscale = 'icon_visscale.gif';         // layer visible, but not at this scale
dbgtResource.iconTristate = 'icon_tristate.gif';         // tri-state checkbox, some layers visible
dbgtResource.iconActive = 'icon_active.gif';             // selected radio
dbgtResource.iconInactive = 'icon_inactive.gif';         // unselected radio
dbgtResource.iconHelp = 'icon_help.gif';                 // not currently used

// SAMPLE DATA AND USAGE REMINDERS:
// 1. create the toc object, TOC( title_of_toc, name_of_toc, auto_refresh_map )
// 2. add groups to toc, GROUP( name_of_group, startup_opened )
// 3. add layers to groups, LAYER( name_of_layer, url_of_swatch_image, url_of_legend_image, label_field )
// repeat 2 & 3 as necessary

// v.1.4 note that "addGroup" and "addLayer" are deprecated - "addItem" is
// preferred in all cases.  However, they are left here in this sample data
// to test compatibility with older versions.

var toc = new TOC('', ' LAYERS', true);
	var grpSOD = toc.addGroup( new GROUP(' Sudden Oak Death Data Layers',true) );
		grpSOD.addLayer( new LAYER('Current SOD confirmations (official)','../images/leg_SODconf.gif') );
		grpSOD.addLayer( new LAYER('Symptomatic Trees Submitted Via OakMapper','../images/leg_submittals.gif') );
		grpSOD.addLayer( new LAYER('1/4 mile buffer around SOD confirmations','../images/leg_buffer.gif') );
		grpSOD.addLayer( new LAYER('Link to Photos','../images/leg_camera.gif') );
		var grpAerial = grpSOD.addGroup( new GROUP(' Aerial Survey Data', false) );
			grpAerial.addLayer( new LAYER('Areas of tree mortality from aerial survey, 2001','','../images/leg_mort2001.gif',"","") );
			grpAerial.addLayer( new LAYER('Areas of tree mortality from aerial survey, 2002','','../images/leg_mort2002.gif',"","") );
			grpAerial.addLayer( new LAYER('Flight Lines, Aerial Survey 2002','../images/leg_flightlines2002.gif') );
			grpAerial.addLayer( new LAYER('Areas of tree mortality from aerial survey, 2003','','../images/leg_mort2003.gif',"","") );
			grpAerial.addLayer( new LAYER('Flight Lines, Aerial Survey 2003','../images/leg_flightlines2003.gif') );
			grpAerial.addLayer( new LAYER('Areas of tree mortality from aerial survey, 2004','','../images/leg_mort2004.gif',"","") );
			grpAerial.addLayer( new LAYER('Flight Lines, Aerial Survey 2004','../images/leg_flightlines2004.gif') );
			grpAerial.addLayer( new LAYER('Areas of tree mortality from aerial survey, 2005','','../images/leg_mort2005.gif',"","") );
			grpAerial.addLayer( new LAYER('Flight Lines, Aerial Survey 2005','../images/leg_flightlines2005.gif') );
			grpAerial.addLayer( new LAYER('Areas of tree mortality from aerial survey, 2006','','../images/leg_mort2006.gif',"","") );
			grpAerial.addLayer( new LAYER('Flight Lines, Aerial Survey 2006','../images/leg_flightlines2006.gif') );

	var grpInfrast = toc.addGroup( new GROUP(' Infrastructure Layers',false) );
		grpInfrast.addLayer( new LAYER('California Streets','../images/leg_streets.gif') );
		grpInfrast.addLayer( new LAYER('Highways &amp; Interstates','../images/leg_green.gif','../images/leg_roads.gif') );
		grpInfrast.addLayer( new LAYER('Urban areas','../images/leg_urban.gif') );

	var grpPhysical = toc.addGroup( new GROUP(' Physical Environment Layers',false) );
		grpPhysical.addLayer( new LAYER('Rivers &amp; Streams','../images/leg_rivers.gif') );

	var grpVeg = toc.addGroup( new GROUP(' Vegetation/Land Cover Layers',true) );
		grpVeg.addLayer( new LAYER('Foliar Host Species Affected','../images/leg_hosts.gif') );
		grpVeg.addLayer( new LAYER('Tree Host Species Affected','../images/leg_species.gif') );
		grpVeg.addLayer( new LAYER('Redwood and Douglas-fir Species','../images/leg_redwoods.gif') );

	var grpAdmin = toc.addGroup( new GROUP(' Administrative Boundary Layers',true) );
		grpAdmin.addLayer( new LAYER('Federal, State and Regional Parks','../images/leg_parks.gif') );
		grpAdmin.addLayer( new LAYER('Township, Range, Section','../images/leg_trs.gif') );
		grpAdmin.addLayer( new LAYER('USGS Topo 1:24,000 Quad Boundaries','../images/leg_quad.gif') );
		grpAdmin.addLayer( new LAYER('USGS Topo 1:100,000 Quad Boundaries','../images/leg_quad.gif') );
		grpAdmin.addLayer( new LAYER('Counties with confirmed SOD','../images/leg_countiesSOD.gif') );

	var grpImages = toc.addGroup( new GROUP(' Background Images',false) );
		grpImages.addLayer( new LAYER('Risk of Establishment &amp; Spread of SOD in CA','','../images/leg_risk.gif') );
		grpImages.addLayer( new LAYER('Shaded Relief','../images/leg_relief.gif') );
		grpImages.addLayer( new LAYER('USGS Topo 1:24,000 (7.5min)','../images/leg_24000.gif') );
		grpImages.addLayer( new LAYER('USGS Topo 1:100,000','../images/leg_100000.gif') );
		grpImages.addLayer( new LAYER('USGS Topo 1:250,000','../images/leg_250000.gif') );