// ArcIMSparam.js
// javascript file with parameters specific to calling page

//***************************************************************************
//*			parameters File for HTML Template		    *
//***************************************************************************

// get machine name
var hostName = document.location.host;
// common portion of url
var esriBlurb = "/servlet/com.esri.esrimap.Esrimap?ServiceName="
// make URL for getting mapservice catalog
var catURL = "http://" + hostName + esriBlurb + "catalog";
// make prefix for URL
var serverURL  = "http://" + hostName + esriBlurb;



var imsURL = 'http://gis.msa-ps.com/servlet/com.esri.esrimap.Esrimap?ServiceName=CottageGroveSubscription';
var imsOVURL =  'http://gis.msa-ps.com/servlet/com.esri.esrimap.Esrimap?ServiceName=CottageGroveSubscription';
var imsQueryURL = '';
var imsGeocodeURL = '';

//initial map extent
var startLeft = 846518.000;
var startRight = 895550.000;
var startTop = 506348.000;
var startBottom = 470970.000;
//maximum map extent
var limitLeft = 846518.000;
var limitRight = 895550.000;
var limitTop = 506348.000;
var limitBottom = 470970.000;


var usePan=true;
var usePanNorth=false;
var usePanWest=false;
var usePanEast=false;
var usePanSouth=false;
var useZoomIn=true;
var useZoomOut=true;
var useFullExtent=true;
var useZoomActive=false;
var useZoomLast=true;
var useIdentify=false;
var useHelp=true;
var useMeasure=true;
var useSetUnits=false;
var useSelect=true;
var useQuery=true;
var useFind=false;
var useGeocode=false;
var useStoredQuery=false;
var useClearSelect=true;
var usePrint=true;
var useGeoNetwork=false;
var useBuffer=true;
var useExtract=false;
//TIM CODE ADDED TO ZOOM TO BUFFER EXTENT
var buffpresent=false;

var MapUnits = "Feet";
var ScaleBarUnits = "Feet";

// End of Designer set parameters

// begin northbrook
var useNorthbrook = true;  // enable toolbar stuff
var theParcelLayerName = "Parcels";
var theStormlineLayerName = "Stormwater Sewer Pipes";
//var theStormcatchbasinLayerName = "Storm - Catch Basin*";
//var theStorminletLayerName = "Storm - Inlet*";
//var theStormmanholeLayerName = "Storm - Manhole*";
var theSanmainLayerName = "Sanitary Mains";
var theSanmanholeLayerName = "Sanitary Manholes";
var theWaterpipesLayerName = "Water Mains";
var theHydrantLayerName = "Water Hydrants";
var theTreeLayerName = "Tree Inventory";
var theRoadLayerName = "Roads";
var labelsDocument = "http://gis.msa-ps.com/website/MAPS/WI/Cities/CottageGrove/SubscriptionViewer/labels_5160.doc";
//var labelFieldIndexes = "2,3";  // this string will be written to VBScript as an Array()
var labelFieldIndexes = "2,3";  // this string will be written to VBScript as an Array()
var labelLastIndex = "3";
// end northbrook


var useHyperLink=false;
var useHyperLinkAny=false;
var useIdentifyAll=false;
var useBufferShape=false; 
var hasToolBarOnLayer=false;
	// useHyperLink takes priority - both cannot be true
if (useHyperLink) useHyperLinkAny=false;
	// useIdentify takes priority - both cannot be true
if (useIdentify) useIdentifyAll=false;
	// allow debugging
var setDebug=true;


/**************************************
* Basic Map parameters
**************************************/

// variables for setting component colors
var mapBackColor = "255,255,255";
var ovBoxColor = "#ff0000";
var ovBoxSize = 3;
var zoomBoxColor = "#ff0000";

// variables for using individual components
var hasOVMap = false;
var hasTOC = true;
var useModeFrame = true;

// variables for map pixel offset from upper left corner of frame
	// horizontal offset
var hspc = 0;
	// vertical offset
var vspc = 0;

//panning factor for arrow buttons
var panFactor = 85/100;
//zoom factors for v.3
var zoomFactor = 2

// margin factor for zooming in on selected lines and polygons - based on feature width and height. . . margin will be selectMargin * width or height
var selectMargin = 90/100;
// margin margin factor for zooming in on selected points - based on full extent. . . margin will be selectPointMargin * fullWidth or fullHeight
var selectPointMargin = 25/1000

// show the scale factor
var showScalePercent=true;
// display coords in status line
var showXYs=true;

// Have ArcXML responses URL encoded? Will not work with multi-byte characters
var doURLencode = false;

// automatically adjust for ArcMapServer, if necessary
	// North Arrow size is smaller from ArcMapServer
var autoAdjustForArcMapServer = true;

//variables for MapDrawing
	// North Arrow
var drawNorthArrow = true;
var NorthArrowType = "4";
var NorthArrowSize = "15";
var NorthArrowCoords = "20 35";
var NorthArrowAngle = "0";
	// Scale Bar
var drawScaleBar = true;
	// MapUnits=DEGREES,FEET,METERS
	// can MapUnits be changed by user?
var setMapUnits=false;
	// ScaleBarUnits=KILOMETERS,METERS,MILES,FEET
var ScaleBarBackground = "false";
var ScaleBarBackColor = "0,0,0";
var ScaleBarFontColor = "0,0,0";
var ScaleBarColor = "128,128,128";
var ScaleBarFont = "";
var ScaleBarStyle = "Regular";
var ScaleBarRound = "1";
var ScaleBarSize = "9";
var ScaleBarWidth = "5";
var ScaleBarPrecision = 2;
var numDecimals = ScaleBarPrecision;
	// Scale Bar 2
var drawScaleBar2 = false;
var ScaleBar2Units = "FEET";
var ScaleBar2Background = "false";
var ScaleBar2BackColor = "0,0,0";
var ScaleBar2FontColor = "0,0,0";
var ScaleBar2Color = "128,128,128";
var ScaleBar2Font = "";
var ScaleBar2Style = "Regular";
var ScaleBar2Round = "1";
var ScaleBar2Size = "9";
var ScaleBar2Width = "5";
var ScaleBar2Precision = 2;

	// Copyright blurb
var drawCopyright = true;
var CopyrightFont = "";
var CopyrightStyle = "Regular";
var CopyrightSize = "8";
var CopyrightCoords = "3 3";
var CopyrightColor = "0,0,0";
var CopyrightBackground = "False";
var CopyrightBGColor = "255,255,255";
var CopyrightGlow = "False";
var CopyrightGlowColor = "255,255,255";
var CopyrightShadow = "False";
var CopyrightShadowColor = "32,32,32";
var CopyrightText = "Parcel Data, Current as of 4/21/2009";

	// place bar behind Copyright text and scalebars
var drawBottomBar = false;
var bottomBarColor = "255,255,255";
var bottomBarOutline = "0,0,0";
var bottomBarHeight = "18";

	// Mode on Map
var drawModeOnMap = false;
var modeRefreshMap = false;
var modeMapColor = "255,255,255";
var modeMapGlow = "128,0,255";

var ovImageVar;
var ovBorderWidth = 4;
var ovExtentBoxSize =4;

// map image background transparent? - requires gif or png8 types
var mapTransparent=false;

// setup test for Nav 4.0
var isIE = false;
var isNav = (navigator.appName.indexOf("Netscape")>=0);
var isNav4 = false;
var isIE4 = false;
var is5up = false;
//alert(navigator.appVersion);
if (isNav) {
	
	if (parseFloat(navigator.appVersion)<5) {
		isNav4=true;
		//alert("Netscape 4.x or older");
	} else {
		is5up = true;
	}
} else {
	isIE4=true;
	isIE=true;
	if ((navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE 6")>0)) {
		isIE4 = false;
		is5up = true;
		//alert("IE5");
	}
}	
		
/**************************************
* Extended Map parameters
**************************************/

// variables for ovmap offset
var ovHspc = 0;
var ovVspc = 0;

// color for Main Map zoombox in html hex RGB format
var zoomBoxColor = "Black";

// index of initial active layer. . . if more than or equal to layer count top layer used
var ActiveLayerIndex=28;
var ParcelLayerIndex=28;

// variables for using individual components
var useTextFrame=true;
// use external window for dialogs
var useExternalWindow=false;

// colors for tables 
var textFrameBackColor="#008080";
var tableBackColor="White";
var textFrameTextColor="Black";
var textFrameLinkColor="Blue";
var textFrameFormColor="#008080";

// LayerList visible at service load
var showTOC=true;
// set layer visibility according to LayerList or by custom programming
var toggleVisible = true;
// set layer visibility of OVMap according to LayerList or by custom programming
	// imsURL must equal imsOVMap - depends on one LayerList
var toggleOVVisible = false;
// will the LayerList show all layers, not just those available at current scale
var listAllLayers = false;

// toggle the check of non-listing of layers in LayerList and Legend
// if true, noListLayer array must have an element defined for each layer
var hideLayersFromList=true;
// layers that will be listed in the LayerList or Legend
	// Note: This does not affect map display
var noListLayer = new Array();

noListLayer[0] = false;			//AREAS OF INTEREST
noListLayer[1] = false;			//TREE INVENTORY
noListLayer[2] = true;			//HIGHWAYS
noListLayer[3] = true;			//CORP LIMITS
noListLayer[4] = false;			//Water Hydrants
noListLayer[5] = false;			//Water Valves
noListLayer[6] = false;			//Inlet
noListLayer[7] = false;			//Intake
noListLayer[8] = false;			//Manhole
noListLayer[9] = false;			//Outfall
noListLayer[10] = false;	  		//Yard Drain
noListLayer[11] = false;			//Sanitary Manholes
noListLayer[12] = false;			//Sanitary Laterals
noListLayer[13] = false;			//Sanitary Mains
noListLayer[14] = false;			//Water Mains
noListLayer[15] = false;		//Stormwater Sewer Pipes
noListLayer[16] = false;		//Stormwater Detention Basins
noListLayer[17] = true;			//Building Footprints
noListLayer[18] = true;			//BIKE TRAIL
noListLayer[19] = true;			//RAILROAD
noListLayer[20] = true;			//HIGHWAY LABELS
noListLayer[21] = true;			//ROAD ROW PROPOSED
noListLayer[22] = true;			//ROAD ROW
noListLayer[23] = false;			//ROADS
noListLayer[24] = true;		//RIVERS/CREEKS
noListLayer[25] = true;		//PONDS
noListLayer[26] = false;		//PARKS
noListLayer[27] = true;			//SECTIONS
noListLayer[28] = false;		//PARCELS
noListLayer[29] = false;		//PARCELS-MAILING LABELS
noListLayer[30] = false;		//MCD
noListLayer[31] = true;    	//ETJ LIMITS
noListLayer[32] = false;		//2005 AERIAL PHOTO
noListLayer[33] = true;  		//2008 USDA Color Photo
	
// Mode on floating layer
var drawFloatingMode = false;
var modeLayerOn = false;
var modeLayerColor = "Black";
var modeLayerShadowColor = "White";
var modeLayerFont = "Arial";
var modeLayerSize = "4";

	// does the overview map a layer on top of map?... 
var ovMapIsLayer=true;

var webParams = "";
if (parent.MapFrame!=null) {
	webParams = parent.document.location.search;
} else {
	webParams = document.location.search;
}

/**************************************
* Interactive Map parameters
**************************************/

// Click points - Measure/Shape Select/Shape Buffer
var clickMarkerColor="255,0,0";
var clickMarkerType="Circle";
var clickMarkerSize="6";


/**************************************
* Identify/Select/Query/Buffer parameters
**************************************/

// search tolerance in pixels around click
var pixelTolerance=2;
// color of selected features in decimal RGB format
var selectColor="0,255,0";
// color of highlighted feature in decimal RGB format
var highlightColor="255,0,0";
// level of transparency of selected and highlighted color
var transparentLevel = "0.5";
	// zoom to selected feature if only one is returned?
var zoomToSingleSelect = true;
	// use only unique values in sample field value lists
var onlyUniqueSamples = true;
	// are string queries case insensitive?
		// false by default to match Java Viewer and ArcExplorer
var queryCaseInsensitive=true;

// fields to be returned in identify/selection/query request. . . #ALL#=all fields
//var selectFields= "#ALL#";
var selectFields= "#ID# #SHAPE#";
// swap out the list of returned fields? 
//If true, a list must be defined in selFieldList[n] for each layer to update selectFields
var swapSelectFields=true;
// array for each layer's returned fields if swapSelectFields=true
var selFieldList = new Array();
// sample set for world - if not #ALL#, id and shape fields required. Separate with a space
selFieldList[0]="#ID# #SHAPE# Name";			//AREAS OF INTEREST
selFieldList[1]="#ID# #SHAPE# SPEC_NAM CONDITION ADDRSNUM STREETNAM";			//TREE INVENTORY
selFieldList[2]="#ID# #SHAPE#";			//HIGHWAYS
selFieldList[3]="#ID# #SHAPE#";			//CORPORATE LIMITS
selFieldList[4]="#ID# #SHAPE# ADDRQUAL BM_ELEV OWN XCOORD YCOORD";			//Water Hydrants
selFieldList[5]="#ID# #SHAPE# ADDRQUAL VALVESZ PIPETYPE XCOORD YCOORD";			//Water Valves
selFieldList[6]="#ID# #SHAPE# ADDRQUAL DIAM ELEV XCOORD YCOORD COST";			//INLET
selFieldList[7]="#ID# #SHAPE# ADDRQUAL DIAM ELEV XCOORD YCOORD COST";			//INTAKE
selFieldList[8]="#ID# #SHAPE# ADDRQUAL DIAM ELEV XCOORD YCOORD COST";			//MANHOLE
selFieldList[9]="#ID# #SHAPE# ADDRQUAL DIAM ELEV XCOORD YCOORD COST";			//OUTFALL
selFieldList[10]="#ID# #SHAPE# ADDRQUAL DIAM ELEV XCOORD YCOORD COST";			//YARD DRAIN
selFieldList[11]="#ID# #SHAPE# ADDRQUAL RIMELEV S_INVERT N_INVERT SW_INVERT E_INVERT W_INVERT NW_INVERT NE_INVERT SE_INVERT XCOORD YCOORD";			//Sanitart Manholes
selFieldList[12]="#ID# #SHAPE# ADDRQUAL PIPEDIAM ELEV";			//Sanitary Laterals
selFieldList[13]="#ID# #SHAPE# ADDRQUAL PIPEDIAM MHUP MHDN UPSDPTH DWNDPTH UPSELEV DWNELEV";			//Sanitary Mains
selFieldList[14]="#ID# #SHAPE# ADDRQUAL PIPEDIAM PIPETYPE";			//Water Mains
selFieldList[15]="#ID# #SHAPE# PIPEDIAM ADDRQUAL SLP UPSELEV DWNELEV COST";			//STORMWATER SEWER PIPES
selFieldList[16]="#ID# #SHAPE# Type BasinType";			//STORMWATER DETENTION BASINS
selFieldList[17]="#ID# #SHAPE#";			//Building Footprints
selFieldList[18]="#ID# #SHAPE#";			//BIKE TRAIL
selFieldList[19]="#ID# #SHAPE#";			//RAILROAD
selFieldList[20]="#ID# #SHAPE#";			//HIGHWAYS
selFieldList[21]="#ID# #SHAPE#";	  		//ROAD ROW PROPOSED
selFieldList[22]="#ID# #SHAPE#";			//ROAD ROW
selFieldList[23]="#ID# #SHAPE# STNAME_C";			//ROADS
selFieldList[24]="#ID# #SHAPE#";		//RIVERS/CREEKS
selFieldList[25]="#ID# #SHAPE#";		//PONDS
selFieldList[26]="#ID# #SHAPE# Name";		//PARKS
selFieldList[27]="#ID# #SHAPE#";		//SECTIONS
selFieldList[28]="#ID# #SHAPE# PARCELNO CONCTOWNER PROPERTYADDRESS BILLINGSTREETADDRESS BILLINGCTYSTZIP MUNICIPALITY LOT PLATDESCRIPTION SCHOOLDISTRICT ASSESSED_ACRES SUM_LANDVALUE SUM_IMPROVEMENTVALUE";		//PARCELS
selFieldList[29]="#ID# #SHAPE# PARCELNO CONCTOWNER PROPERTYADDRESS BILLINGSTREETADDRESS BILLINGCTYSTZIP MUNICIPALITY LOT PLATDESCRIPTION SCHOOLDISTRICT ASSESSED_ACRES SUM_LANDVALUE SUM_IMPROVEMENTVALUE";		//PARCEL Mailing Labels
selFieldList[30]="#ID# #SHAPE# NAME";    	//MCD
selFieldList[31]="#ID# #SHAPE#";		//ETJ LIMITS
selFieldList[32]="#ID# #SHAPE#";		//2005 AERIAL PHOTO
selFieldList[33]="#ID# #SHAPE#";		//2008 USDA Color Photo

// use the field alias in the data display? 
//If true, a list must be defined in fieldAliasList[n] for each layer defining aliases for those fields needing them
var useFieldAlias=true;
// array for aliases for each layer's returned fields if useFieldAlias=true
var fieldAliasList  = new Array();
// sample set for world - fieldname:alias pairs separated by a bar (|)... if no aliases, use empty string ("")
fieldAliasList[0]="Name:Name";		//AREAS OF INTEREST
fieldAliasList[1]="SPEC_NAM:Species|CONDITION:Condition|ADDRSNUM:Address|STREETNAM:Street";		//TREE INVENTORY
fieldAliasList[2]="";		//HIGHWAYS
fieldAliasList[3]="";		//CORPORATE LIMITS
fieldAliasList[4]="ADDRQUAL:Street|BM_ELEV:Benchmark Elevation|OWN:Owner|XCOORD:Easting|YCOORD:Northing";		//Water Hydrants
fieldAliasList[5]="ADDRQUAL:Street|VALVESZ:Valve Size|PIPETYPE:Pipe Type|XCOORD:Easting|YCOORD:Northin";		//Water Valves
fieldAliasList[6]="ADDRQUAL:Street|DIAM:Diameter|ELEV:Elevation|XCOORD:Easting|YCOORD:Northing|COST:Cost";		//INLET
fieldAliasList[7]="ADDRQUAL:Street|DIAM:Diameter|ELEV:Elevation|XCOORD:Easting|YCOORD:Northing|COST:Cost";		//INTAKE
fieldAliasList[8]="ADDRQUAL:Street|DIAM:Diameter|ELEV:Elevation|XCOORD:Easting|YCOORD:Northing|COST:Cost";		//MANHOLE
fieldAliasList[9]="ADDRQUAL:Street|DIAM:Diameter|ELEV:Elevation|XCOORD:Easting|YCOORD:Northing|COST:Cost";		//OUTFALL
fieldAliasList[10]="ADDRQUAL:Street|DIAM:Diameter|ELEV:Elevation|XCOORD:Easting|YCOORD:Northing|COST:Cost";	//YARD DRAIN
fieldAliasList[11]="ADDRQUAL:Street|RIMELEV:Rim Elevation|S_INVERT:S Invert|N_INVERT:N Invert|SW_INVERT:SW Invert|E_INVERT:E Invert|W_INVERT:W Invert|NW_INVERT:NW Invert|NE_INVERT:NE Invert|SE_INVERT:SE Invert|XCOORD:Easting|YCOORD:Northing";		//Sanitary Manholes
fieldAliasList[12]="ADDRQUAL:Street|DIAM:Diameter|ELEV:Elevation";		//Sanitary Laterals
fieldAliasList[13]="ADDRQUAL:Street|PIPEDIAM:Diameter|MHUP:Upstream MH|MHDN:Downstream MH|UPSDPTH:Upstream Depth|DWNDPTH:Downstream Depth|UPSELEV:Upstream Elevation|DWNELEV:Downstream Elevation";		//Sanitary Mains
fieldAliasList[14]="ADDRQUAL:Street|PIPEDIAM:Diameter|PIPETYPE:Material";		//Water Mains
fieldAliasList[15]="PIPEDIAM:Diameter|ADDRQUAL:Street|SLP:Slope|UPSELEV:Upstream Elevation|DWNELEV:Downstream Eelvation|COST:Cost";		//STORMWATER SEWER PIPES
fieldAliasList[16]="Type:Feature Type|BasinType:Basin Type";		//STORMWATER DETENTION BASINS
fieldAliasList[17]="";		//Building Footprints
fieldAliasList[18]="";		//BIKE TRAIL
fieldAliasList[19]="";		//RAILROAD
fieldAliasList[20]="";		//HIGHWAYS
fieldAliasList[21]="";	  	//ROAD ROW PROPOSED
fieldAliasList[22]="";		//ROAD ROW
fieldAliasList[23]="STNAME_C:Road Name";	//ROADS
fieldAliasList[24]="";		//RIVERS/CREEKS
fieldAliasList[25]="";		//PONDS
fieldAliasList[26]="Name:Park Name";		//PARKS
fieldAliasList[27]="";		//SECTIONS
fieldAliasList[28]="PARCELNO:Parcel Number|CONCTOWNER:Owner|PROPERTYADDRESS:Address|BILLINGSTREETADDRESS:Mail Address|BILLINGCTYSTZIP:City State ZIP|MUNICIPALITY:Municipality|LOT:Lot|PLATDESCRIPTION:Legal Descripiton|ASSESSED_ACRES:Acreage|SUM_LANDVALUE:Land Value|SUM_IMPROVEMENTVALUE:Improvement Value";		//PARCELS
fieldAliasList[29]="PARCELNO:Parcel Number|CONCTOWNER:Owner|PROPERTYADDRESS:Address|BILLINGSTREETADDRESS:Mail Address|BILLINGCTYSTZIP:City State ZIP|MUNICIPALITY:Municipality|LOT:Lot|PLATDESCRIPTION:Legal Descripiton|ASSESSED_ACRES:Acreage|SUM_LANDVALUE:Land Value|SUM_IMPROVEMENTVALUE:Improvement Value";		//PARCEL Mailing Labels
fieldAliasList[30]="NAME:MCD Name";    	//MCD
fieldAliasList[31]="";		//ETJ LIMITS
fieldAliasList[32]="";		//2005 AERIAL PHOTO
fieldAliasList[33]="";		//2008 USDA Color Photo

// Hide the ID field display? The ID Field must be included in field list, but we don't have to show it.
var hideIDFieldData = true;
// Hide the shape field display? The Shape Field must be included in field list, but we don't have to show it.
var hideShapeFieldData = true;


// parameters for setting up hyperlinks in data display
var hyperLinkLayers = new Array(); // layers to have hyperlink
var hyperLinkFields = new Array();	// field in those layers to be used for hyperlink
var hyperLinkPrefix = new Array();  // prefix (if any) to place before field value to make hyperlink url
var hyperLinkSuffix = new Array();  // suffix (if any) to place after field value to make hyperlink url
///*
hyperLinkLayers[0] = "Street Signs";
hyperLinkFields[0] = "IMSPATH";
hyperLinkPrefix[0] = "";
hyperLinkSuffix[0] = "";

hyperLinkLayers[1] = "Street Projects";
hyperLinkFields[1] = "FullPath";
hyperLinkPrefix[1] = "";
hyperLinkSuffix[1] = "";
//*/
/*
hyperLinkLayers[0] = "Winners";
hyperLinkFields[0] = "MISC.SAG.ID";
hyperLinkPrefix[0] = "http://gis.esri.com/uc2001/sag/display/index.cfm?id=";
hyperLinkSuffix[0] = "";
*/


// will the returned data be displayed in text frame?
var showSelectedData=true;
// will the returned features be drawn?
var showSelectedFeatures=true;
// maximum number of features returned from query
var maxFeaturesReturned=50;
// for ID All - List all visible layers in response - default is false
	// if false only visible layers with idenitified features written to table
	// if true the names of all visible layers will be diplayed even if no features returned
var listAllLayersInIDAll = false;


// number of data samples retrieved for query form
var numberDataSamples = 50;



/**************************************
* Legend parameters - aimsLegend.js
**************************************/

// legend map size
var legWidth=170;
var legHeight=300;
var legFont="Arial";
var legTitle="Legend";

// Added variables for Group Layers.
// List the layers to group together, each group name being
//  an item in the groupName array. List the layers in the groupLayers 
//  array, each group's layer in a comma-delimited list.
var groupVisible = false;
var groupName = new Array();
var groupLayers = new Array();
groupName[0] = "City Maps";
groupLayers[0] = "Tree Inventory,Building Footprints,Parcels,Parcel Mailing Labels,Areas of Interest,Bike Trail,Parks";
groupName[1] = "Transportation Maps";
groupLayers[1] = "Highways,Roads,Road ROW,Road ROW (Proposed),Railroad";
groupName[2] = "Storm Sewer Utilities";
groupLayers[2] = "Stormwater Sewer Pipes,Inlet,Intake,Manhole,Outfall,Storm Pump Manhole,Yard Drain,Stormwater Detention Basins";  
groupName[3] = "Sanitary Sewer Utilities";
groupLayers[3] = "Sanitary Mains,Sanitary Laterals,Sanitary Manholes";
groupName[4] = "Water Utilities";
groupLayers[4] = "Water Mains,Water Hydrants,Water Valves";
groupName[5] = "Base Maps";
groupLayers[5] = "Corporate Limits,ETJ Limits,Rivers/Creeks,Ponds,Sections,2005 Aerial Photo,2008 USDA Color Photo";
/**************************************
* Options parameters - aimsOptions.js
**************************************/

// allowing user to set options
var allowOptions=false;

/**************************************
* ClassRender parameters - aimsClassRender.js
**************************************/

// parameters for custom class rendering... overrides default renderer
var ClassRenderLayer = new Array();  // layers to have custom renderers
var ClassRenderString = new Array(); // initial custom renderer XML string for the layers
ClassRenderLayer[0] = "Cities";
ClassRenderString[0] = "";
/*
ClassRenderString[0] ='<VALUEMAPRENDERER lookupfield="population">\n<RANGE LOWER="0" UPPER="1000000">\n<SIMPLEMARKERSYMBOL color="255,0,255" type="circle" size="4" />\n</RANGE>';
ClassRenderString[0] = ClassRenderString[0] + '<RANGE LOWER="1000000" UPPER="2500000">\n<SIMPLEMARKERSYMBOL color="255,0,255" type="circle" size="6" />\n</RANGE>';
ClassRenderString[0] = ClassRenderString[0] + '<RANGE LOWER="2500000" UPPER="5000000">\n<SIMPLEMARKERSYMBOL color="255,0,255" type="circle" size="9" />\n</RANGE>';
ClassRenderString[0] = ClassRenderString[0] + '<RANGE LOWER="5000000" UPPER="10000000">\n<SIMPLEMARKERSYMBOL color="255,0,255" type="circle" size="12" />\n</RANGE>';
ClassRenderString[0] = ClassRenderString[0] + '<RANGE LOWER="10000000" UPPER="30000000">\n<SIMPLEMARKERSYMBOL color="255,0,255" type="circle" size="16" />\n</RANGE>\n</VALUEMAPRENDERER>';
*/

/**************************************
* Geocode parameters - aimsGeocode.js
**************************************/

// maximum geocode candidates returned - default = 20
var maxGeocodeCandidates=20;
// minimal acceptable geocode score for candidate
var minGeocodeScore=50;
var geocodePointColor = "255,0,0";
var geocodePointSize = "15";
var geocodeLabelSize = "12";
var geocodePointType = "star";
var currentGeocodePointIndex = 0;

// custom functions needed for Reverse Geocoding - RouteServer extension required
var useReverseGeocode = false;
var useRoute=false;

// the starting point. . . it all starts here on loading
function checkParams() {
	appDir = getPath(document.location.pathname);
	// global for overview map. . . change if not on same frame as Map
	ovImageVar = document.ovImage;
	debugOn = 0;
	if (parent.TextFrame==null) {
		useTextFrame = false;
		useExternalWindow=true;
	}
	if (!hasLayer("measureBox")) useMeasure=false;
	if ((!useMeasure) && (!drawScaleBar)) useSetUnits=false;
	if (ovImageVar==null) hasOVMap = false;
	if (top.TOCFrame==null) hasTOC = false;
	if (parent.ModeFrame==null) useModeFrame = false;
	
	
	if (isIE)	{
		if (hasLayer("theTop")) document.all.theTop.style.cursor = "crosshair";
		if (hasOVMap) ovImageVar.style.cursor = "hand";
	}
		
	if (hasOVMap) {
		// size of ov map image
		i2Width = parseInt(ovImageVar.width);
		i2Height = parseInt(ovImageVar.height);
		forceNewOVMap = false;
		// position of ov map
		//ovMapLeft = iWidth - (i2Width + 6);
		//ovMapTop = 2;
	}
	if (webParams!="") {
		//alert(webParams);
		getCommandLineParams(webParams);
	}
	// if starting extents zero'd then flag to get start from mapservice
	if ((startLeft!=0) && (startRight!=0)) getStartingExtent=false;
	// if limit extents zero'd then flag to get max from mapservice
	if ((limitLeft!=0) && (limitRight!=0)) {
		getLimitExtent=false;
		enforceFullExtent=true;
	}
	if (ovBoxColor=="") ovBoxColor = "255,0,0";
	//ovBoxColor = convertHexToDec(ovBoxColor);
	checkCoords();
	if (aimsNavigationPresent) {
		// Set up event capture for mouse movement
		if (isNav4) {
			document.captureEvents(Event.MOUSEMOVE);
			document.captureEvents(Event.MOUSEDOWN);
			document.captureEvents(Event.MOUSEUP);
			//document.captureEvents(Event.MOUSEOUT);
		}
		document.onmousemove = getMouse;
		//document.onmousedown = chkMouseDown;
		document.onmousedown = mapTool;
		document.onmouseup = chkMouseUp;
		//document.onmouseout = chkMouseOut;
	} else {
		usePan=false;
		usePanNorth=false;
		usePanWest=false;
		usePanEast=false;
		usePanSouth=false;
		useMeasure=false;
		useZoomIn=false;
		useZoomOut=false
		//useFullExtent=false;
		useZoomActive=false;
		//useZoomLast=false;	
	}
	
	if (!aimsBufferPresent) {
		useBuffer=false;
	}
	if (!aimsQueryPresent) {
		aimsBufferPresent=false;
		useQuery=false;
		useFind=false;
		useBuffer=false;
		useStoredQuery=false;
	}
	if (!aimsSelectPresent) {
		aimsQueryPresent=false;
		aimsBufferPresent=false;
 		useSelect=false;
		useQuery=false;
		useFind=false;
		useBuffer=false;
		useStoredQuery=false;
		useClearSelect=false;
	}
	if (!aimsIdentifyPresent) {
		aimsSelectPresent=false;
		aimsQueryPresent=false;
		aimsBufferPresent=false;
		canQuery=false;
		useIdentify=false;
 		useSelect=false;
		useQuery=false;
		useFind=false;
		useBuffer=false;
		useStoredQuery=false;
		useHyperLink=false;
		useHyperLinkAny=false;
		useIdentifyAll=false;
	}
	if (!aimsGeocodePresent) {
		useGeocode=false;
		useReverseGeocode=false;
	}
	if (!aimsPrintPresent) {
		usePrint=false;
	}
	if (!aimsOptionsPresent) {
		allowOptions=false;
	}
	if ((aimsXMLPresent) && (aimsMapPresent)) {
		if (aimsClickPresent) clickFunction("zoomin");
		if (parent.ToolFrame!=null) parent.ToolFrame.document.location="toolbar.htm";
		if (parent.HelpFrame!=null) parent.HelpFrame.document.location="help.htm";
		startMap();
	} else {
		alert(msgList[0]);
	}
}



