// ArcIMSparam.js
// javascript file with parameters specific to calling page

//***************************************************************************
//*			parameters File for HTML Template		    *
//***************************************************************************
// get machine name
var hostName = document.location.host;
// make URL for getting mapservice catalog
var catURL = "http://" + hostName + "/MerrickIMS/ims?ServiceName=catalog";
// make prefix for URL
var serverURL  = "http://" + hostName + "/MerrickIMS/ims?ServiceName=";


//*********************************************************************
//*			parameters set by Designer			                     *
//*********************************************************************


// AMS: some customizations to keep multiple copies of website
var amsIsDev = false;
var amsIsLocal = true;
var rootPath = '/website/commcity';   // 20040124: the path to the application's root


if (document.location.toString().toLowerCase().indexOf('commcity-dev') > 0) { amsIsDev = true; }
if ( hostName.indexOf('maps.merrick.com') >= 0 ) { amsIsLocal = false; }

if ( amsIsDev && amsIsLocal ) {    // local development
  var imsURL = 'http://localhost/MerrickIMS/ims?ServiceName=ccMainDev';
  var imsOVURL =  'http://localhost/MerrickIMS/ims?ServiceName=ccOverDev';
  rootPath = '/website/commcity-dev';
} 

if ( !amsIsDev && amsIsLocal ) {   // local production (copy)
  //var imsURL = 'http://localhost/MerrickIMS/ims?ServiceName=ccMainProd';
  //var imsOVURL =  'http://localhost/MerrickIMS/ims?ServiceName=ccOverProd';
  var imsURL = 'http://maps2.merrick.com/MerrickIMS/ims?ServiceName=ccMainProd';
  var imsOVURL =  'http://maps2.merrick.com/MerrickIMS/ims?ServiceName=ccOverProd';

} 

if ( amsIsDev && !amsIsLocal ) {   // merrick server development
  var imsURL = 'http://maps.merrick.com/MerrickIMS/ims?ServiceName=ccMainDev';
  var imsOVURL =  'http://maps.merrick.com/MerrickIMS/ims?ServiceName=ccOverDev';
  rootPath = '/website/commcity-dev';
}

if ( !amsIsDev && !amsIsLocal ) {    // merrick server production
  //var imsURL = 'http://maps.merrick.com/MerrickIMS/ims?ServiceName=ccMainProd';
  //var imsOVURL =  'http://maps.merrick.com/MerrickIMS/ims?ServiceName=ccOverProd';
  var imsURL = 'http://maps2.merrick.com/MerrickIMS/ims?ServiceName=ccMainProd';
  var imsOVURL =  'http://maps2.merrick.com/MerrickIMS/ims?ServiceName=ccOverProd';

}

 //alert('amsIsLocal: ' + amsIsLocal + "\n" + 'amsIsDev: ' + amsIsDev + "\n" + 'imsURL: ' + imsURL + "\n" + 'imsOVURL: ' + imsOVURL + "\n" + 'rootPath: ' + rootPath);

var imsQueryURL = '';
var imsGeocodeURL = '';

// variables for setting component colors

var mapBackColor = '235,235,235';     // '180,180,255';
var ovBoxColor = '#000000';
var ovBoxSize = 3;
var zoomBoxColor = '#33ff33';

// variables for using individual components

var hasOVMap = true;
var hasTOC = true;
var useModeFrame = true;

//initial map extent
var startLeft =     3147000     // 3149000.0;
var startRight =    3217000     // 3235895.5;
var startTop =      1762000     // 1764500.0;
var startBottom =   1709000     // 1710500.00;
//maximum map extent
var limitLeft =  3149000.0;
var limitRight = 3237000    // 3235895.5;
var limitTop = 1764500.0;
var limitBottom = 1710500.00;

var usePan=true;
var usePanNorth=true;
var usePanWest=true;
var usePanEast=true;
var usePanSouth=true;
var useZoomIn=true;
var useZoomOut=true;
var useFullExtent=true;
var useZoomActive=true;
var useZoomLast=true;
var useIdentify=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;

var MapUnits = "Feet";
var ScaleBarUnits = "Feet";



// End of Designer set parameters


var useHyperLink=false;
var useHyperLinkAny=false;
var useIdentifyAll=false;
var useBufferShape=false; 
var hasToolBarOnLayer=true;
	// 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 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 = 25/100;
// margin margin factor for zooming in on selected points - based on full extent. . . margin will be selectPointMargin * fullWidth or fullHeight
var selectPointMargin =  1;   //500/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;

//variables for MapDrawing
	// North Arrow
var drawNorthArrow = true;
var NorthArrowType = "6";
var NorthArrowSize = "15";
var NorthArrowCoords = "25 22";
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 = "TRUE";
var ScaleBarBackColor = "0,0,0";
var ScaleBarFontColor = "255,255,255";
var ScaleBarColor = "192,192,192";
var ScaleBarFont = "verdana, arial, helvetica";
var ScaleBarStyle = "Bold";
var ScaleBarRound = "1";
var ScaleBarSize = "14";
var ScaleBarWidth = "7";
var ScaleBarPrecision = 2;
var numDecimals = ScaleBarPrecision;
	// Copyright blurb
var drawCopyright = true;
var CopyrightFont = "verdana, arial, helvetica";
var CopyrightStyle = "Bold";
var CopyrightSize = "8";
var CopyrightCoords = "55 4";
var CopyrightColor = "0,0,0";
var CopyrightBackground = "False";
var CopyrightBGColor = "255,255,255";
var CopyrightGlow = "True";
var CopyrightGlowColor = "255,255,255";
var CopyrightText = "Copyright (C) 2003 Commerce City"
	// Mode on Map
var drawModeOnMap = false;
var modeRefreshMap = false;
var modeMapColor = "255,255,255";
var modeMapGlow = "128,0,255";

var ovImageVar;
var ovBorderWidth = 2;
var ovExtentBoxSize = 2;

// 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) {
		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 = "#ff0000";

// index of initial active layer. . . if more than or equal to layer count top layer used
var ActiveLayerIndex=36;  // AMS: make parcels the active layer. KLR: This NEEDS TO BE SET

// variables for using individual components
var useTextFrame=true;
// use external window for dialogs
var useExternalWindow=false;

// colors for tables 
var textFrameBackColor="#6789DB";
var tableBackColor="White";
var textFrameTextColor="Black";
var textFrameLinkColor="Blue";
var textFrameFormColor="Gray";

// 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();


//***** also see toc.htm
// NOTE THAT THIS ARRAY WORKS ON LAYER ORDER, **NOT** LAYER ID
// There is a (commented out) debug message in toc.htm that shows the layer info when you click the update layers button. 

/*
 noListLayer[0] = true;     // parcel labels
 noListLayer[1] = true;     // RR labels
 noListLayer[2] = true;     // River labels
 noListLayer[3] = true;     // street labels
 noListLayer[4] = false;    // city outline
 noListLayer[5] = true;     // trails
 noListLayer[6] = true;     // trail heads
 noListLayer[7] = true;     // spot elevations
 noListLayer[8] = true;     // rep. dist. (ADCOM)
 noListLayer[9] = true;     // schools
 noListLayer[10] = true;    // fire stations
 noListLayer[11] = true;    // snow routes
 noListLayer[12] = false;   // township/range
 noListLayer[13] = false;   // sections
 noListLayer[14] = false;   // quarter sections
 noListLayer[15] = false;   // street cent
 noListLayer[16] = false;   // rr
 noListLayer[17] = true;    // topo (index only)
 noListLayer[18] = true;    // topo
 noListLayer[19] = true;    // bldg
 noListLayer[20] = true;    // open space
 noListLayer[21] = true;    // parks
 noListLayer[22] = true;    // cemeteries
 noListLayer[23] = false;   // parcels
 noListLayer[24] = true;    // snow removal dist
 noListLayer[25] = true;    // FEMA
 noListLayer[26] = true;    // urban renewal buffer
 noListLayer[27] = true;    // gen imp dist
 noListLayer[28] = true;    // fire prot dist
 noListLayer[29] = true;    // zip
 noListLayer[30] = true;    // RM Arsenal
 noListLayer[31] = true;    // school districts
 noListLayer[32] = true;    // surrounding cities
 noListLayer[33] = true;    // UP dist
 noListLayer[34] = true;    // urban renewal
 noListLayer[35] = true;    // water & sanitation
 noListLayer[36] = true;    // transp
 noListLayer[37] = true;    // school prop
 noListLayer[38] = false;   // hydrology
 noListLayer[39] = false;    // hydrology lines
 noListLayer[40] = true;    // census blocks
 noListLayer[41] = true;    // wards
 noListLayer[42] = true;    // SID
 noListLayer[43] = true;    // police dist
 noListLayer[44] = true;    // TAZ
 noListLayer[45] = false;    // trash districts
 noListLayer[46] = true;    // current land use
 noListLayer[47] = true;    // future land use
 noListLayer[48] = false;    // zoning
 noListLayer[49] = false;    // air photo
 noListLayer[50] = false;    // hydrology
 noListLayer[51] = false;    // hydrology lines
 noListLayer[52] = false;    // city limits poly
 noListLayer[53] = true;    // runways
 noListLayer[54] = true;    // airports
*/
 
 noListLayer[0] = false;     // parcel labels
 noListLayer[1] = false;     // RR labels
 noListLayer[2] = false;     // River labels
 noListLayer[3] = false;     // street labels
 noListLayer[4] = false;    // city outline
 noListLayer[5] = false;     // trails
 noListLayer[6] = false;     // trail heads
 noListLayer[7] = false;     // spot elevations
 noListLayer[8] = false;     // rep. dist. (ADCOM)
 noListLayer[9] = false;     // schools
 noListLayer[10] = false;    // fire stations
 noListLayer[11] = false;    // snow routes
 noListLayer[12] = false;   // township/range
 noListLayer[13] = false;   // sections
 noListLayer[14] = false;   // quarter sections
 noListLayer[15] = false;   // street cent
 noListLayer[16] = false;   // rr
 noListLayer[17] = false;    // topo (index only)
 noListLayer[18] = false;    // topo
 noListLayer[19] = false;    // bldg
 noListLayer[20] = false;    // open space
 noListLayer[21] = false;    // parks
 noListLayer[22] = false;    // cemeteries
 noListLayer[23] = false;   // parcels
 noListLayer[24] = false;    // snow removal dist
 noListLayer[25] = false;    // FEMA
 noListLayer[26] = false;    // urban renewal buffer
 noListLayer[27] = false;    // gen imp dist
 noListLayer[28] = false;    // fire prot dist
 noListLayer[29] = false;    // zip
 noListLayer[30] = false;    // RM Arsenal
 noListLayer[31] = false;    // school districts
 noListLayer[32] = false;    // surrounding cities
 noListLayer[33] = false;    // UP dist
 noListLayer[34] = false;    // urban renewal
 noListLayer[35] = false;    // water & sanitation
 noListLayer[36] = false;    // transp
 noListLayer[37] = false;    // school prop
 noListLayer[38] = false;   // hydrology
 noListLayer[39] = false;    // hydrology lines
 noListLayer[40] = false;    // census blocks
 noListLayer[41] = false;    // wards
 noListLayer[42] = false;    // SID
 noListLayer[43] = false;    // police dist
 noListLayer[44] = false;    // TAZ
 noListLayer[45] = false;    // trash districts
 noListLayer[46] = false;    // current land use
 noListLayer[47] = false;    // future land use
 noListLayer[48] = false;    // zoning
 noListLayer[49] = false;    // air photo
 noListLayer[50] = false;    // hydrology
 noListLayer[51] = false;    // hydrology lines
 noListLayer[52] = false;    // city limits poly
 noListLayer[53] = false;    // runways
 noListLayer[54] = false;    // airports
 


	// Mode on floating layer
var drawFloatingMode = false;
var modeLayerOn = false;
var modeLayerColor = "White";
var modeLayerShadowColor = "White";
var modeLayerFont = "verdana, arial, helvetica";
var modeLayerSize = "4";

	// does the overview map a layer on top of map?... 
var ovMapIsLayer=false;

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=5;
// color of selected features in decimal RGB format
var selectColor="255,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.4";
	// zoom to selected feature if only one is returned?
var zoomToSingleSelect = 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;          // AMS 20040817: changed from false
// 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

//KLR:
//for (var i=0; i<=54; i++) {
 // selFieldList[i] =  "#ALL#";
//}
//selFieldList[23] = "PIN PARCELNB OWNER ADDRESS_1 CITY STATE ZIPCODE #ID# #SHAPE#";
selFieldList[0]="NAME ACRES #ID# #SHAPE#";//arsenal10
selFieldList[1]="NAME #ID# #SHAPE#";  //trailhead0
selFieldList[2]="NAME #ID# #SHAPE#"; //urban0
selFieldList[3]="NAME CITY #ID# #SHAPE#"; //Prairie0
selFieldList[4]="NAME #ID# #SHAPE#"; //Stapleton0
selFieldList[5]="NAME #ID# #SHAPE#"; //Redev0
selFieldList[6]="NAME #ID# #SHAPE#"; //retailarea0
selFieldList[7]="#ALL#";  //0  which is parcels 
selFieldList[8]="NAME PIN #ID# #SHAPE#"; //OpenSpace
selFieldList[9]="#ALL#"; //1  which is RR_Names
selFieldList[10]="#ALL#"; //2 which is rivertext
selFieldList[11]="#ALL#"; //3 which is stname
selFieldList[12]="#ALL#";  //5 which is trail
selFieldList[13]="#ALL#"; //6 which is trailhead 
selFieldList[14]="#ALL#"; //7 which is spot elevations
selFieldList[15]="#ALL#"; //8 which is policedistricts
selFieldList[16]="#ALL#";  //55 which is pollinglocations
selFieldList[17]="NAME";  //9 which is schools_pt
selFieldList[18]="NAME PIN #ID# #SHAPE#"; //60 which is policestation_pt
selFieldList[19]="NAME PIN #ID# #SHAPE#"; //10 which is fire_station_pt 
selFieldList[20]="#ALL#";  //11 which is snowroutesstreetclassifications2
selFieldList[21]="#ALL#";  //48 which is twnrng
selFieldList[22]="#ALL#";  //49 which is sections
selFieldList[23]="#ALL#";  //12 which is qtrsection
selFieldList[24]="#ALL#";   //survey 
selFieldList[25]="#ALL#";  //63 which is streetclunderconstruction_trf
selFieldList[26]="#ALL#";  //13 which is streetcl_classified
selFieldList[27]="#ALL#";  //14 which is rail
selFieldList[28]="#ALL#";  //47 which is topo_index
selFieldList[29]="#ALL#";  //15 which is topo2
selFieldList[30]="#ALL#";  //16 which is bl
selFieldList[31]="#ALL#";  //17 which is parks  and openspace
selFieldList[32]="#ALL#";   //18 which is parks and openspace
selFieldList[33]="#ALL#"; //20 which is cemetary
selFieldList[34]="#ALL#";  //57 which is grow_bndry
selFieldList[35]="#ALL#";  //56 which is precincts
selFieldList[36]="#ALL#";  //21 which is parcels
selFieldList[37]="#ALL#";  //22 which is snowdist
selFieldList[38]="#ALL#";  //23 which is fema_flooddata
selFieldList[39]="#ALL#";  //24 which is urbanrenewaldistbuff
selFieldList[40]="#ALL#";  //25 whic is gid_polygons
selFieldList[41]="#ALL#"; //59 which is prairiegatewayarea
selFieldList[42]="#ALL#";  //26 which is fireprotectdist 
selFieldList[43]="#ALL#";  //27 which is ZIPCodes
selFieldList[44]="#ALL#"; //28 which is rocky mtn arsenal
selFieldList[45]="#ALL#"; //29 which is schooldistricts
selFieldList[46]="#ALL#"; //30 which is surroundingcities
selFieldList[47]="#ALL#";  //58 which is enclave
selFieldList[48]="#ALL#";  //31 which is unitedpowerdistrict 
selFieldList[49]="#ALL#";  //redev
selFieldList[50]="#ALL#";  //stapleton
selFieldList[51]="#ALL#";  //32 which is urbanrenewaldist
selFieldList[52]="#ALL#";  //retailarea
selFieldList[53]="#ALL#";  //33 which is water sanitationdist
selFieldList[54]="#ALL#";  //34 which is trans 
selFieldList[55]="#ALL#";  //61 which is policestations
selFieldList[56]="#ALL#";  //62 which is firestation
selFieldList[57]="#ALL#";  //45 which is schools
selFieldList[58]="#ALL#";  //36 which is census83
selFieldList[59]="#ALL#";  //37 which is wards
selFieldList[60]="#ALL#";  //38 which is sid_areas  
selFieldList[61]="#ALL#";  //39 which is policedistricts
selFieldList[62]="#ALL#";  //40 which is newtaz
selFieldList[63]="#ALL#";  //census2000
selFieldList[64]="#ALL#";  //census2003
selFieldList[65]="#ALL#";  //54 which is trashdistricts
selFieldList[66]="#ALL#";  //52 which landuse-by-parcel
selFieldList[67]="#ALL#";  //53 which is futurelanduse
selFieldList[68]="#ALL#";  //41 which is zoning
selFieldList[69]="NAME";  //44 which is hydro
selFieldList[70]="#ALL#";  //51 which is hydro_arc
selFieldList[71]="CITY #ID# #SHAPE#";  //43 which is citylimits
selFieldList[72]="#ALL#";  //42 which is comm_city.sid
selFieldList[73]="#ALL#";  //46 which is dia-runways
selFieldList[74]="#ALL#";  //19 which is dia_airport_bndry


// 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[1]="NAME:Name|#ID#:ID|#SHAPE#:SHAPE";  //trailhead0
fieldAliasList[2]="NAME:Name|#ID#:ID|#SHAPE#:SHAPE"; //urban0
fieldAliasList[3]="NAME:Name|CITY:City|#ID#:ID|#SHAPE#:SHAPE"; //Prairie0
fieldAliasList[4]="NAME:Name|#ID#:ID|#SHAPE#:SHAPE"; //Stapleton0
fieldAliasList[5]="NAME:Name|#ID#:ID|#SHAPE#:SHAPE"; //Redev0
fieldAliasList[6]="NAME:Name|#ID#:ID|#SHAPE#:SHAPE"; //retailarea0
fieldAliasList[7]="";  //0  which is parcels 
fieldAliasList[8]="NAME:Name|PIN:PIN|#ID#:ID|#SHAPE#:SHAPE"; //OpenSpace
fieldAliasList[9]=""; //1  which is RR_Names
fieldAliasList[10]=""; //2 which is rivertext
fieldAliasList[11]=""; //3 which is stname
fieldAliasList[12]="";  //5 which is trail
fieldAliasList[13]=""; //6 which is trailhead 
fieldAliasList[14]=""; //7 which is spot elevations
fieldAliasList[15]=""; //8 which is policedistricts
fieldAliasList[16]="";  //55 which is pollinglocations
fieldAliasList[17]="NAME:Name|#ID#:ID|#SHAPE#:SHAPE";  //9 which is schools_pt
fieldAliasList[18]="NAME:Name|PIN:PIN|#ID#:ID|#SHAPE#:SHAPE"; //60 which is policestation_pt
fieldAliasList[19]="NAME:Name|PIN:PIN|#ID#:ID|#SHAPE#:SHAPE"; //10 which is fire_station_pt 
fieldAliasList[20]="";  //11 which is snowroutesstreetclassifications2
fieldAliasList[21]="";  //48 which is twnrng
fieldAliasList[22]="";  //49 which is sections
fieldAliasList[23]="";  //12 which is qtrsection
fieldAliasList[24]="";   //survey 
fieldAliasList[25]="";  //63 which is streetclunderconstruction_trf
fieldAliasList[26]="";  //13 which is streetcl_classified
fieldAliasList[27]="";  //14 which is rail
fieldAliasList[28]="";  //47 which is topo_index
fieldAliasList[29]="";  //15 which is topo2
fieldAliasList[30]="";  //16 which is bl
fieldAliasList[31]="";  //17 which is parks  and openspace
fieldAliasList[32]="";   //18 which is parks and openspace
fieldAliasList[33]=""; //20 which is cemetary
fieldAliasList[34]="";  //57 which is grow_bndry
fieldAliasList[35]="";  //56 which is precincts
fieldAliasList[36]="";  //21 which is parcels
fieldAliasList[37]="";  //22 which is snowdist
fieldAliasList[38]="";  //23 which is fema_flooddata
fieldAliasList[39]="";  //24 which is urbanrenewaldistbuff
fieldAliasList[40]="";  //25 whic is gid_polygons
fieldAliasList[41]=""; //59 which is prairiegatewayarea
fieldAliasList[42]="";  //26 which is fireprotectdist 
fieldAliasList[43]="";  //27 which is ZIPCodes
fieldAliasList[44]=""; //28 which is rocky mtn arsenal
fieldAliasList[45]=""; //29 which is schooldistricts
fieldAliasList[46]=""; //30 which is surroundingcities
fieldAliasList[47]="";  //58 which is enclave
fieldAliasList[48]="";  //31 which is unitedpowerdistrict 
fieldAliasList[49]="";  //redev
fieldAliasList[50]="";  //stapleton
fieldAliasList[51]="";  //32 which is urbanrenewaldist
fieldAliasList[52]="";  //retailarea
fieldAliasList[53]="";  //33 which is water sanitationdist
fieldAliasList[54]="";  //34 which is trans 
fieldAliasList[55]="";  //61 which is policestations
fieldAliasList[56]="";  //62 which is firestation
fieldAliasList[57]="";  //45 which is schools
fieldAliasList[58]="";  //36 which is census83
fieldAliasList[59]="";  //37 which is wards
fieldAliasList[60]="";  //38 which is sid_areas  
fieldAliasList[61]="";  //39 which is policedistricts
fieldAliasList[62]="";  //40 which is newtaz
fieldAliasList[63]="";  //census2000
fieldAliasList[64]="";  //census2003
fieldAliasList[65]="";  //54 which is trashdistricts
fieldAliasList[66]="";  //52 which landuse-by-parcel
fieldAliasList[67]="";  //53 which is futurelanduse
fieldAliasList[68]="";  //41 which is zoning
fieldAliasList[69]="NAME:Name|#ID#:ID|#SHAPE#:SHAPE";  //44 which is hydro
fieldAliasList[70]="";  //51 which is hydro_arc
fieldAliasList[71]="CITY:City|#ID#:ID|#SHAPE#:SHAPE";  //43 which is citylimits
fieldAliasList[72]="";  //42 which is comm_city.sid
fieldAliasList[73]="";  //46 which is dia-runways
fieldAliasList[74]="";  //19 which is dia_airport_bndry

// 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] = "Image";
hyperLinkFields[0] = "HOT";
hyperLinkPrefix[0] = "/gisdata/world/images/";
hyperLinkSuffix[0] = ".jpg";

// will the returned data be displayed in text frame?
var showSelectedData=true; //KLR
// will the returned features be drawn?
var showSelectedFeatures=true;
// maximum number of features returned from query
var maxFeaturesReturned=500;  //KLR: 030306: 2500
// 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=160;             // AMS: was 120
var legHeight=300;
var legFont="verdana, arial, helvetica";
var legTitle="Legend";
var legBackGround = '103,137,219';

/**************************************
* 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";
// custom functions needed for Reverse Geocoding
var useReverseGeocode = 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 = parent.OverviewFrame.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 (parent.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 (parent.MapFrame.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 (!parent.MapFrame.aimsBufferPresent) {
		useBuffer=false;
	}
	if (!parent.MapFrame.aimsQueryPresent) {
		aimsBufferPresent=false;
		useQuery=false;
		useFind=false;
		useBuffer=false;
		useStoredQuery=false;
	}
	if (!parent.MapFrame.aimsSelectPresent) {
		aimsQueryPresent=false;
		aimsBufferPresent=false;
 		useSelect=false;
		useQuery=false;
		useFind=false;
		useBuffer=false;
		useStoredQuery=false;
		useClearSelect=false;
	}
	if (!parent.MapFrame.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 (!parent.MapFrame.aimsGeocodePresent) {
		useGeocode=false;
		useReverseGeocode=false;
	}
	if (!parent.MapFrame.aimsPrintPresent) {
		usePrint=false;
	}
	if (!parent.MapFrame.aimsOptionsPresent) {
		parent.MapFrame.allowOptions=false;
	}
	if ((parent.MapFrame.aimsXMLPresent) && (parent.MapFrame.aimsMapPresent)) {
		if (parent.MapFrame.aimsClickPresent) clickFunction("zoomin");
		if (parent.ToolFrame!=null) parent.ToolFrame.document.location="toolbar.htm";
		startMap();
	} else {
		alert(msgList[0]);
	}
}


