// ArcIMSparam.js
// BasicMap
// 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 = "";
//var imsOVURL = "";
var imsURL = serverURL + "telecom";
var imsOVURL = serverURL + "overview";

// url for Custom QueryService if not ImageService(imsURL)...otherwise empty quotes
var imsQueryURL = "";
var imsGeocodeURL = "";

var mapBackColor = "255,255,255";
var ovBoxColor = "#FF0000";
var ovBoxSize = 3;

var hasOVMap=true;
var hasTOC=true;
var useModeFrame=false;

//initial map extent
var startLeft = 2533318.000;
var startRight = 2539424.000;
var startTop = 1440941.000;
var startBottom = 1436518.000;
//maximum map extent
var limitLeft = 2487154.43476558;
var limitRight = 2577386.16476558;
var limitTop = 1470335.70780003;
var limitBottom = 1400943.51780003;

//initial map extent
//var startLeft = -122.44;
//var startRight = -122.37;
//var startTop =37.81;
//var startBottom =37.77;
//maximum map extent
//var limitLeft = -122.528090;
//var limitRight = -122.310880;
//var limitTop = 37.840374;
//var limitBottom = 37.634806;

var useZoomHistory=true;
// flag available tools
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=true;
var useMeasure=true;
var useSelect=true;
var useQuery=false;
var useFind=false;
var useClearSelect=true;

var usePrint=false;
var useBuffer=true;

var useGeocode=false;
var useExtract=false;

var MapUnits = "Feet";
var ScaleBarUnits = "Feet";

var useDumpURL=false;
var useSetUnits=true;
var useStoredQuery=false;
var useHyperLink=false;
var useHyperLinkAny=false;
var useIdentifyAll=true;
var useBufferShape=true; 
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=false;

/**************************************
* 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 = 50/100;
// margin margin factor for zooming in on selected points - based on full extent. . . margin will be selectPointMargin * fullWidth or fullHeight
var selectPointMargin = 50/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 2-byte characters
var doURLencode = false;

// automatically adjust for ArcMapServer, if necessary
	// North Arrow size is smaller from ArcMapServer
var autoAdjustForArcMapServer = true;
// if it is an ArcMap Service, is it using a Personal Database?
	// critical for correct sql expression on queries on date fields
	// Syntax for date fields is different for layers from a Personal Database than for other ArcMap Service data sources
var isPersonalDatabase = false;

//variables for MapDrawing
	// North Arrow
var drawNorthArrow = true;
var NorthArrowType = "4";
var NorthArrowSize = "8";
var NorthArrowCoords = "10 10";
var NorthArrowAngle = "0";
	// Scale Bar
var drawScaleBar = true;
	// MapUnits=FEET
	// can MapUnits be changed by user?
var setMapUnits=true;
	// ScaleBarUnits=KILOMETERS,METERS,MILES,FEET
var ScaleBarBackground = "false";
var ScaleBarBackColor = "0,0,0";
var ScaleBarFontColor = "0,0,0";
var ScaleBarFontGlow = "True";
var ScaleBarFontGlowColor = "255,255,255";
var ScaleBarColor = "0,0,0";
var ScaleBarFont = "";
var ScaleBarGlow = "True";
var ScaleBarGlowColor = "255,255,255";
var ScaleBarStyle = "Regular";
var ScaleBarRound = "1";
var ScaleBarSize = "10";
var ScaleBarWidth = "5";
var ScaleBarPrecision = 2;
var numDecimals = ScaleBarPrecision;
	// Scale Bar 2
var drawScaleBar2 = false;
var ScaleBar2Units = "KILOMETERS";
var ScaleBar2Background = "false";
var ScaleBar2BackColor = "0,0,0";
var ScaleBar2FontColor = "0,0,0";
var ScaleBar2Color = "0,0,0";
var ScaleBar2Font = "";
var ScaleBar2Style = "Regular";
var ScaleBar2Round = "1";
var ScaleBar2Size = "9";
var ScaleBar2Width = "5";
var ScaleBar2Precision = 2;

	// Copyright blurb
var drawCopyright = false;
var CopyrightFont = "Arial";
var CopyrightStyle = "Regular";
var CopyrightSize = "10";
var CopyrightCoords = "23 3";
var CopyrightColor = "0,0,0";
var CopyrightBackground = "False";
var CopyrightBGColor = "255,255,255";
var CopyrightGlow = "True";
var CopyrightGlowColor = "255,255,255";
var CopyrightShadow = "False";
var CopyrightShadowColor = "32,32,32";
var CurrentYear = new Date().getFullYear();
var CopyrightText = "Map by University Architects GIS " +  CurrentYear;

	// 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 = 1;
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) || (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 = "#FF0000";

// index of initial active layer. . . if more than or equal to layer count top layer used
var ActiveLayerIndex=19;

// variables for using individual components
var useTextFrame=true;
// use external window for dialogs
var useExternalWindow=false;

// colors for tables 
var textFrameBackColor="#CCCCCC";
var tableBackColor="White";
var textFrameTextColor="Black";
var textFrameLinkColor="#FF0000";
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 = true;
// 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;// computer labs
noListLayer[1] = false;// paws - interior zones
noListLayer[2] = false;// paws - exterior zones
noListLayer[3] = false;// automatic doors
noListLayer[4] = false;// automatic lifts
noListLayer[5] = false;// key card gates
noListLayer[6] = false;// hc parking spaces
noListLayer[7] = false;// curb cuts
noListLayer[8] = false;// ramps
noListLayer[9] = false;// hc accessible sidewalks
noListLayer[10] = false;// call boxes
noListLayer[11] = false;// memorials
noListLayer[12] = false;// recycling bins
noListLayer[13] = false;// topography
noListLayer[14] = true;// uga property lines - this one will not be listed
noListLayer[15] = false;// georgia counties
noListLayer[16] = false;// streets
noListLayer[17] = false;// railroads
noListLayer[18] = true;// road names - this one will not be listed
noListLayer[19] = false;// uga buildings
noListLayer[20] = false;// parking lots
noListLayer[21] = false;// sidewalks
noListLayer[22] = false;// recreation areas
noListLayer[23] = false;// water features
noListLayer[24] = false;// acc buildings
noListLayer[25] = false;// uga property
noListLayer[26] = true;// acc orthophoto

// toggle the listing of layers in the legend, does not affect layerlist
// if true, noListLegend array must have an element defined for each layer
//var hideLayersFromLegend=true;
// put true for layers to be omitted from legend only, does not affect map
//var noListLegend = new Array();
// noListLegend[0] = false;// automatic doors
 //noListLegend[1] = false;// automatic lifts
 //noListLegend[2] = false;// call boxes
 //noListLegend[3] = false;// key card gates
 //noListLegend[4] = false;// recycling bins
 //noListLegend[5] = false;// topography
 //noListLegend[6] = true;// uga property lines - this one will not be listed
// noListLegend[7] = true;// streets - this one will not be listed
 //noListLegend[8] = true;// railroads - this one will not be listed
// noListLegend[9] = true;// road names - this one will not be listed
// noListLegend[10] = true;// coliseum - this one will not be listed
// noListLegend[11] = false;// uga buildings
 //noListLegend[12] = false;// parking lots
 //noListLegend[13] = false;// sidewalks
 //noListLegend[14] = false;// recreation areas
 //noListLegend[15] = false;// water features
// noListLegend[16] = false;// acc buildings
// noListLegend[17] = false;// georgia counties
// noListLegend[18] = false;// uga property

 
	// Mode on floating layer
var drawFloatingMode = true;
var modeLayerOn = false;
var modeLayerColor = "White";
var modeLayerShadowColor = "#808080";
var modeLayerFont = "Arial";
var modeLayerSize = "3";

	// 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="#990000";
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="220,223,18"
// color of highlighted feature in decimal RGB format
var highlightColor="220,223,18"
// level of transparency of selected and highlighted color
var transparentLevel = "5";
	// zoom to selected feature if only one is returned?
var zoomToSingleSelect = true;
	// use only unique values in sample field value lists
var onlyUniqueSamples = false;
	// 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]="NAME #ID# #SHAPE#";// paws - computer labs
selFieldList[1]="NAME #ID# #SHAPE#";// paws - interior zones
selFieldList[2]="NAME #ID# #SHAPE#";// paws - exterior zones
selFieldList[3]="PHOTO OPENTYPE SENSOR OPENTIME #ID# #SHAPE#";// automatic doors
selFieldList[4]="PHOTO #ID# #SHAPE#";// auto lifts
selFieldList[5]="#ID# #SHAPE#";// key card gates
selFieldList[6]="#ID# #SHAPE#";// hc parking spaces
selFieldList[7]="#ID# #SHAPE#";// curb cuts
selFieldList[8]="#ID# #SHAPE#";// ramps
selFieldList[9]="#ID# #SHAPE#";// hc accessible sidewalks
selFieldList[10]="#ID# #SHAPE#";// call boxes
selFieldList[11]="NAME TYPE COMMENTS MAP #ID# #SHAPE#";// memorials
selFieldList[12]="SUBTYPE_NAME #ALL#";// recycling bins
selFieldList[13]="ELEV #ID# #SHAPE#";// topography
selFieldList[14]="#ID# #SHAPE#";// uga property lines
selFieldList[15]="COUNTY #ID# #SHAPE#";// georgia counties
selFieldList[16]="#ID# #SHAPE#";// streets
selFieldList[17]="#ID# #SHAPE#";// rail roads
selFieldList[18]="NAME NUMBER PHOTOCODE ADDRESS_1 CITY STATE ZIP GROSS_SQFT FLOORS BASEMENTS LOCATIONMA HC_LOCATIO #ID# #SHAPE#"; //uga buildings
selFieldList[19]="NAME NUMBER PHOTOCODE ADDRESS_1 CITY STATE ZIP GROSS_SQFT FLOORS BASEMENTS LOCATIONMA HC_LOCATIO #ID# #SHAPE#"; //uga buildings
selFieldList[20]="#ALL#";// parking lots
selFieldList[21]="TYPE #ALL#";// sidewalks
selFieldList[2]="#ID# #SHAPE#";// recreation areas
selFieldList[23]="NAME #ID# #SHAPE#";// water features
selFieldList[24]="#ID# #SHAPE#";// acc buildings
selFieldList[25]="NAME #ID# #SHAPE#";// uga property

// 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;

// 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";//computer labs
fieldAliasList[1]="NAME:Name";//paws - interior zones
fieldAliasList[2]="NAME:Name";//paws - exterior zones
fieldAliasList[3]="PHOTO:Photo|OPENTYPE:Door Type|SENSOR:Sensor Type|OPENTIME:Opening Time in Seconds";//auto doors
fieldAliasList[4]="PHOTO:Photo";//auto lifts
fieldAliasList[5]="";//key card gates
fieldAliasList[6]="";//hc parking spaces
fieldAliasList[7]="";//curb cuts
fieldAliasList[8]="";//ramps
fieldAliasList[9]="";//hc accessible sidewalks
fieldAliasList[10]="";//call boxes
fieldAliasList[11]="NAME:Name|TYPE:Type|COMMENTS:Comments|MAP:Location Map";//memorials
fieldAliasList[12]="UGA.OUAGIS.RECYCLINGBINS.SUBTYPE_NAME:Type";//recycling bins
fieldAliasList[13]="ATHENS.OUAGIS.TOPOGRAPHY.ELEV:Elevation in Feet";//topography
fieldAliasList[14]="UGA.OUAGIS.PARCELS.NAME:UGA Property Name";// uga property lines
fieldAliasList[15]="";//georgia counties
fieldAliasList[16]="";//streets
fieldAliasList[17]="";//railroads
fieldAliasList[18]="NAME:Building Name|NUMBER:Building Number|ADDRESS_1:Street Address|CITY:City|STATE:State|ZIP:Zip Code|GROSS_SQFT:Gross Square Feet|FLOORS:Number of Floors|BASEMENTS:Basement|PHOTOCODE:Photo|LOCATIONMA:Location Map|HC_LOCATIO:HC Location Map";// uga buildings
fieldAliasList[19]="NAME:Building Name|NUMBER:Building Number|ADDRESS_1:Street Address|CITY:City|STATE:State|ZIP:Zip Code|GROSS_SQFT:Gross Square Feet|FLOORS:Number of Floors|BASEMENTS:Basement|PHOTOCODE:Photo|LOCATIONMA:Location Map|HC_LOCATIO:HC Location Map";// uga buildings
fieldAliasList[20]="";//parking lots
fieldAliasList[21]="UGA.OUAGIS.SIDEWALK.TYPE:Sidewalk Type";// sidewalks
fieldAliasList[22]="";//recreation areas
fieldAliasList[23]="";//water features
fieldAliasList[24]="";//acc buildings
fieldAliasList[25]="UGA.OUAGIS.PARCELS.NAME:UGA Property Name";// uga properties



// 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] = "UGA Buildings";
hyperLinkFields[0] = "PHOTOCODE";
hyperLinkPrefix[0] = "http://maps.uga.edu/website/htmlviewer/hyperlink/images/buildings/";
hyperLinkSuffix[0] = "";
hyperLinkLayers[1] = "Auto Doors";
hyperLinkFields[1] = "PHOTO";
hyperLinkPrefix[1] = "http://maps.uga.edu/website/htmlviewer/hyperlink/images/doors/";
hyperLinkSuffix[1] = "";
hyperLinkLayers[2] = "Auto Lifts";
hyperLinkFields[2] = "PHOTO";
hyperLinkPrefix[2] = "http://maps.uga.edu/website/htmlviewer/hyperlink/images/lifts/";
hyperLinkSuffix[2] = "";
hyperLinkLayers[3] = "Memorials";
hyperLinkFields[3] = "MAP";
hyperLinkPrefix[3] = "http://maps.uga.edu/website/htmlviewer/hyperlink/images/memorials/";
hyperLinkSuffix[3] = "";
hyperLinkLayers[4] = "UGA Buildings";
hyperLinkFields[4] = "LOCATIONMA";
hyperLinkPrefix[4] = "http://maps.uga.edu/website/htmlviewer/hyperlink/images/location_maps/";
hyperLinkSuffix[4] = "";
hyperLinkLayers[5] = "UGA Buildings";
hyperLinkFields[5] = "HC_LOCATIO";
hyperLinkPrefix[5] = "http://maps.uga.edu/website/htmlviewer/hyperlink/images/hc_location/";
hyperLinkSuffix[5] = "";

// 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=60;

// 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=60;




/**************************************
* Legend parameters - aimsLegend.js
**************************************/
// 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 = true;
//var groupName = new Array();
//var groupLayers = new Array();
//groupName[0] = "Misc Features";
//groupLayers[0] = "Atomatic Doors,Auto Lifts,Recycling Bins,Topography";
	//groupName[1] = "Hawaii";
	//groupLayers[1] = "Roads,Census Tracts";

// legend map size
var legWidth=170;
var legHeight=300;
var legFont="Arial";
var legTitle="Graphic Legend";

/**************************************
* Options parameters - aimsOptions.js
**************************************/

// allowing user to set options
var allowOptions=true;

/**************************************
* 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>';
*/
var numStatDecimals = 4;


/**************************************
* Geocode parameters - aimsGeocode.js
**************************************/

	// maximum geocode candidates returned - default = 5
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
var useReverseGeocode = true;
var useRoute=true;

// 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;
	formTitle = parent.PostFrame.document.title;
	if (parent.PostFrame.document.theForm!=null) formExists = true;
	//alert(tURL);
	if (parent.TextFrame==null) {
		useTextFrame = true;
		useExternalWindow=false;
	}
	if (!hasLayer("measureBox")) useMeasure=false;
	if ((!useMeasure) && (!drawScaleBar)) useSetUnits=false;
	if (ovImageVar==null) hasOVMap = false;
	if (parent.TOCFrame==null) hasTOC = true;
	if (parent.ModeFrame==null) useModeFrame = false;
	
	if (!isNav)	{
		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 = "#FF0000";
	//ovBoxColor = convertHexToDec(ovBoxColor);
	checkCoords();
	if (aimsNavigationPresent) {
		// Set up event capture for mouse movement
			if (!customZoomHistoryPresent) {
		useZoomHistory=false;
	}

	if (isNav) {
			document.captureEvents(Event.MOUSEMOVE);
			document.captureEvents(Event.MOUSEDOWN);
			document.captureEvents(Event.MOUSEUP);
			//document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
		}
		document.onmousemove = getMouse;
		//document.onmousedown = chkMouseDown;
		document.onmousedown = mapTool;
		document.onmouseup = chkMouseUp;
	} 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";
		startMap();
	} else {
		alert("Unable to load one of the following Javascript Libraries:\naimsCommon.js\naimsXML.js\naimsMap.js");
	}
}


