//<script>
// ArcIMSparam.js
// javascript file with parameters specific to calling page

//***************************************************************************
//*			parameters File for HTML Template		    *
//***************************************************************************
// get machine name


//var hostName = "www.ngi.be";
//var hostName = document.location.host;
var hostName = parent.document.location.host;

// make URL for getting mapservice catalog
	//var catURL = "http://" + hostName + "/arcims/servlet/riki?ServiceName=catalog";
// make prefix for URL
	//var serverURL  = "http://"mm + hostName + "/arcims/servlet/riki?ServiceName=";

//var catURL = "http://" + hostName + "/servlet/com.esri.esrimap.Esrimap?ServiceName=catalog";
//var serverURL  = "http://" + hostName + "/servlet/com.esri.esrimap.Esrimap?ServiceName=";
var catURL = "http://" + hostName + "/arcims4/servlet/riki4?ServiceName=catalog";
var serverURL  = "http://" + hostName + "/arcims4/servlet/riki4?ServiceName=";

//*********************************************************************
//*			parameters set by Designer			                     *
//*********************************************************************

var imsURL = "";
var imsOVURL = "";

//andere axl-file voor intranet <--> internet
if(hostName.indexOf("ngi.be")>-1){
	//imsURL = 'http://www.ngi.be/arcims1/servlet/riki1?ServiceName=gdoc';
	//imsOVURL = 'http://www.ngi.be/arcims1/servlet/riki1?ServiceName=gdoc_ov';	
	imsURL = 'http://'+ hostName +'/arcims4/servlet/riki4?ServiceName=gdoc';
	imsOVURL = 'http://'+ hostName +'/arcims4/servlet/riki4?ServiceName=gdoc_ov';	
}else{	
	//imsURL = 'http://webgis.int.ngi.be/servlet/com.esri.esrimap.Esrimap?ServiceName=gdoc_intra';//'http://www.ngi.be/arcims/servlet/riki?ServiceName=gdoc';
	//imsOVURL = 'http://webgis.int.ngi.be/servlet/com.esri.esrimap.Esrimap?ServiceName=gdoc_ov'; // 'http://www.ngi.be/arcims/servlet/riki?ServiceName=gdoc';
	imsURL = 'http://'+ hostName +'/arcims4/servlet/riki4?ServiceName=gdoc_intra';
	imsOVURL = 'http://'+ hostName +'/arcims4/servlet/riki4?ServiceName=gdoc_ov';	
}

var imsQueryURL = '';
var imsGeocodeURL = '';

// variables for setting component colors

var mapBackColor = "232,239,240";
var ovBoxColor = '#ff0000';
var ovBoxSize = 2;
var zoomBoxColor = '#ff6600';

// variables for using individual components
var hasOVMap = true;
// -- dfl -- 30/10/02
//this application  doesn't need a layers list. The toggle legend/list must be suppressed in toolbar.htm
//therefore, hasTOC is set to false in ArcIMSparam.js, but then the legend is displayed in a separated window
// in the current js.
//To display it in the right frame, hasTOC must be set to true,  in AimsLegend.js
var hasTOC = false;
var showTOC = false;
var useModeFrame = false;

/*
var startLeft = 20500.0; //0.0
var startRight = 300080.0;//307080.0;
var startTop = 247700.0; //267700.0;
var startBottom = 10000.0;//15000.0;
//maximum map extent

var limitLeft = 0.0; //0.0
var limitRight = 300080.0;//307080.0;
var limitTop = 247700.0; //267700.0;
var limitBottom = 10000.0//15000.0;
*/

var startLeft = 502600.0;
var startRight = 817200.0;
var startTop = 746950.0;
var startBottom = 510780.0;
//maximum map extent

var limitLeft = 502600.0;
var limitRight = 817200.0;
var limitTop = 746950.0;
var limitBottom = 510780.0;

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=false;
var useZoomLast=true;
var useIdentify=false;
var useMeasure=true;
var useSetUnits=false;
var useSelect=true;
var useQuery=false;
var useFind=false;
var useGeocode=false;
var useStoredQuery=false;
var useClearSelect=true;
var usePrint=false;
var useGeoNetwork=false;
var useBuffer=false;
var useExtract=false;
//pve: legendtoggle
var useLegend=false;
var useHideLegend=false;
var MapUnits = "Meters";
var ScaleBarUnits = "Kilometers";

// End of Designer set parameters
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 map pixel offset from upper left corner of frame
	// horizontal offset
var hspc = 16;
	// vertical offset
var vspc =16;

//panning factor for arrow buttons
var panFactor = 33/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 = 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;

//variables for MapDrawing
	// North Arrow
var drawNorthArrow = false;
var NorthArrowType = "4";
var NorthArrowSize = "15";
var NorthArrowCoords = "20 30";
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 = "255,255,255";
var ScaleBarFontColor = "102,102,102";
var ScaleBarColor = "255,134,9";
var ScaleBarFont = "Arial";
var ScaleBarStyle = "Regular";
var ScaleBarRound = "10";
var ScaleBarSize = "10";
var ScaleBarWidth = "5";
var ScaleBarPrecision = 2;
var numDecimals = 2;
	// Copyright blurb
var drawCopyright = true;
var CopyrightFont = "Arial";
var CopyrightStyle = "normal";
var CopyrightSize = "10";
var CopyrightCoords = "5 4";
var CopyrightColor = "102,102,102";
var CopyrightBackground = "false";
var CopyrightBGColor = "255,255,255";
var CopyrightGlow = "False";
var CopyrightGlowColor = "255,255,255";
var CopyrightShadow = "False";
var CopyrightShadowColor = "32,32,32";
//r CopyrightText = "© NGI-IGN 2007. Reproductions or adaptations in any form are forbidden.";
var CopyrightText = "&#169; NGI-IGN 2007";

	// place bar behind Copyright text and scalebars
var drawBottomBar = true;
var bottomBarColor = "187,206,212";
var bottomBarOutline = "255,255,255";
var bottomBarHeight = "18";
//pve nieuwe variabele
var bottombartransparency = "0.7";


	// Mode on Map
var drawModeOnMap = false;
var modeRefreshMap = true;
var modeMapColor = "255,255,255";
var modeMapGlow = "128,0,255";

var ovImageVar;
var ovBorderWidth = 0;
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 = 1;
var ovVspc = 31;

// 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=99;

// variables for using individual components
var useTextFrame=true;
// use external window for dialogs
//CHANGED BY DLE on 12/06
var useExternalWindow=false;

// colors for tables 
var textFrameBackColor="Silver";
var tableBackColor="";
var textFrameTextColor="Black";
var textFrameLinkColor="Blue";
var textFrameFormColor="Gray";

// LayerList visible at service load
var showTOC=false;
// 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=false;
// layers that will be listed in the LayerList or Legend
	// Note: This does not affect map display
var noListLayer = new Array();
/*noListLayer[0] = true;
noListLayer[1] = true;
noListLayer[2] = false;
noListLayer[3] = true;
noListLayer[4] = true;
noListLayer[5] = true;
noListLayer[6] = false;
noListLayer[7] = true;
noListLayer[8] = false;
noListLayer[9] = true
noListLayer[10] = true;
noListLayer[11] = true;
noListLayer[12] = false;
noListLayer[13] = true;
noListLayer[14] = true;
noListLayer[15] = true;
*/

// 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=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="30,49,111";
var clickMarkerType="Circle";
var clickMarkerSize="7";


/**************************************
* Identify/Select/Query/Buffer parameters
**************************************/

// search tolerance in pixels around click
var pixelTolerance=2;
// color of selected features in decimal RGB format
var selectColor="255,102,0";
// color of highlighted feature in decimal RGB format
var highlightColor="255,102,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;

// fields to be returned in identify/selection/query request. . . #ALL#=all fields
var selectFields= "#ALL#";
//var selectFields= "#ID# NAME";
// 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;
var changeDisplayOrder=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

//planimetrische punten
selFieldList[0]="IMS_USER.PLANI_VIEW.NR IMS_USER.PLANI_VIEW.COM_FUS IMS_USER.PLANI_VIEW.COMMUNE IMS_USER.PLANI_VIEW.PLACE IMS_USER.PLANI_VIEW.NEW10_IGN IMS_USER.PLANI_VIEW.POINT IMS_USER.PLANI_VIEW.OWNER IMS_USER.PLANI_VIEW.ACCESS_ IMS_USER.PLANI_VIEW.X IMS_USER.PLANI_VIEW.Y IMS_USER.PLANI_VIEW.H_DOUBLE IMS_USER.PLANI_VIEW.PHI_ETRS IMS_USER.PLANI_VIEW.LAMBDA_ETRS IMS_USER.PLANI_VIEW.H_ETRS IMS_USER.PLANI_VIEW.DATIDENT IMS_USER.PLANI_VIEW.DATCHECK IMS_USER.PLANI_VIEW.TYP_D IMS_USER.PLANI_VIEW.MEASURES_D IMS_USER.PLANI_VIEW.GPS_D IMS_USER.PLANI_VIEW.ORIENT1 IMS_USER.PLANI_VIEW.ORIENT2 IMS_USER.PLANI_VIEW.XYDEF1 IMS_USER.PLANI_VIEW.XYDEF2 IMS_USER.PLANI_VIEW.XYDEF3 IMS_USER.PLANI_VIEW.XYDEF4 IMS_USER.PLANI_VIEW.HDEF IMS_USER.PLANI_VIEW.SKET1 IMS_USER.PLANI_VIEW.F1_PUB IMS_USER.PLANI_VIEW.F2_PUB IMS_USER.PLANI_VIEW.F3_PUB IMS_USER.PLANI_VIEW.X2008 IMS_USER.PLANI_VIEW.Y2008 #SHAPE#"; //#ID#
selFieldList[1]="IMS_USER.PLANI_VIEW.NR IMS_USER.PLANI_VIEW.COM_FUS IMS_USER.PLANI_VIEW.COMMUNE IMS_USER.PLANI_VIEW.PLACE IMS_USER.PLANI_VIEW.NEW10_IGN IMS_USER.PLANI_VIEW.POINT IMS_USER.PLANI_VIEW.OWNER IMS_USER.PLANI_VIEW.ACCESS_ IMS_USER.PLANI_VIEW.X IMS_USER.PLANI_VIEW.Y IMS_USER.PLANI_VIEW.H_DOUBLE IMS_USER.PLANI_VIEW.PHI_ETRS IMS_USER.PLANI_VIEW.LAMBDA_ETRS IMS_USER.PLANI_VIEW.H_ETRS IMS_USER.PLANI_VIEW.DATIDENT IMS_USER.PLANI_VIEW.DATCHECK IMS_USER.PLANI_VIEW.TYP_D IMS_USER.PLANI_VIEW.MEASURES_D IMS_USER.PLANI_VIEW.GPS_D IMS_USER.PLANI_VIEW.ORIENT1 IMS_USER.PLANI_VIEW.ORIENT2 IMS_USER.PLANI_VIEW.XYDEF1 IMS_USER.PLANI_VIEW.XYDEF2 IMS_USER.PLANI_VIEW.XYDEF3 IMS_USER.PLANI_VIEW.XYDEF4 IMS_USER.PLANI_VIEW.HDEF IMS_USER.PLANI_VIEW.SKET1 IMS_USER.PLANI_VIEW.F1_PUB IMS_USER.PLANI_VIEW.F2_PUB IMS_USER.PLANI_VIEW.F3_PUB IMS_USER.PLANI_VIEW.X2008 IMS_USER.PLANI_VIEW.Y2008 #SHAPE#"; //#ID#
selFieldList[2]="IMS_USER.PLANI_VIEW.NR IMS_USER.PLANI_VIEW.COM_FUS IMS_USER.PLANI_VIEW.COMMUNE IMS_USER.PLANI_VIEW.PLACE IMS_USER.PLANI_VIEW.NEW10_IGN IMS_USER.PLANI_VIEW.POINT IMS_USER.PLANI_VIEW.OWNER IMS_USER.PLANI_VIEW.ACCESS_ IMS_USER.PLANI_VIEW.X IMS_USER.PLANI_VIEW.Y IMS_USER.PLANI_VIEW.H_DOUBLE IMS_USER.PLANI_VIEW.PHI_ETRS IMS_USER.PLANI_VIEW.LAMBDA_ETRS IMS_USER.PLANI_VIEW.H_ETRS IMS_USER.PLANI_VIEW.DATIDENT IMS_USER.PLANI_VIEW.DATCHECK IMS_USER.PLANI_VIEW.TYP_D IMS_USER.PLANI_VIEW.MEASURES_D IMS_USER.PLANI_VIEW.GPS_D IMS_USER.PLANI_VIEW.ORIENT1 IMS_USER.PLANI_VIEW.ORIENT2 IMS_USER.PLANI_VIEW.XYDEF1 IMS_USER.PLANI_VIEW.XYDEF2 IMS_USER.PLANI_VIEW.XYDEF3 IMS_USER.PLANI_VIEW.XYDEF4 IMS_USER.PLANI_VIEW.HDEF IMS_USER.PLANI_VIEW.SKET1 IMS_USER.PLANI_VIEW.F1_PUB IMS_USER.PLANI_VIEW.F2_PUB IMS_USER.PLANI_VIEW.F3_PUB IMS_USER.PLANI_VIEW.X2008 IMS_USER.PLANI_VIEW.Y2008 #SHAPE#"; //#ID#
//altimetrische punten
selFieldList[3]="IMS_USER.ALTI_VIEW.MATRICULE IMS_USER.ALTI_VIEW.COMMUNE_FUS IMS_USER.ALTI_VIEW.L1_DEFINITION IMS_USER.ALTI_VIEW.SHEET_ IMS_USER.ALTI_VIEW.PLACING_DATE IMS_USER.ALTI_VIEW.REVIS_DATE IMS_USER.ALTI_VIEW.SURVEY_DATE IMS_USER.ALTI_VIEW.X_COORD IMS_USER.ALTI_VIEW.Y_COORD IMS_USER.ALTI_VIEW.Z_HEIGHT IMS_USER.ALTI_VIEW.DESCRIPTION IMS_USER.ALTI_VIEW.REMARK IMS_USER.ALTI_VIEW.L3_DEFINITION IMS_USER.ALTI_VIEW.L4_DEFINITION IMS_USER.ALTI_VIEW.LANGUE_USER IMS_USER.ALTI_VIEW.AUTHORIZED IMS_USER.ALTI_VIEW.X_2008 IMS_USER.ALTI_VIEW.Y_2008 #SHAPE#"; //#ID#
selFieldList[4]="IMS_USER.ALTI_VIEW.MATRICULE IMS_USER.ALTI_VIEW.COMMUNE_FUS IMS_USER.ALTI_VIEW.L1_DEFINITION IMS_USER.ALTI_VIEW.SHEET_ IMS_USER.ALTI_VIEW.PLACING_DATE IMS_USER.ALTI_VIEW.REVIS_DATE IMS_USER.ALTI_VIEW.SURVEY_DATE IMS_USER.ALTI_VIEW.X_COORD IMS_USER.ALTI_VIEW.Y_COORD IMS_USER.ALTI_VIEW.Z_HEIGHT IMS_USER.ALTI_VIEW.DESCRIPTION IMS_USER.ALTI_VIEW.REMARK IMS_USER.ALTI_VIEW.L3_DEFINITION IMS_USER.ALTI_VIEW.L4_DEFINITION IMS_USER.ALTI_VIEW.LANGUE_USER IMS_USER.ALTI_VIEW.AUTHORIZED IMS_USER.ALTI_VIEW.X_2008 IMS_USER.ALTI_VIEW.Y_2008 #SHAPE#"; //#ID#
selFieldList[5]="IMS_USER.ALTI_VIEW.MATRICULE IMS_USER.ALTI_VIEW.COMMUNE_FUS IMS_USER.ALTI_VIEW.L1_DEFINITION IMS_USER.ALTI_VIEW.SHEET_ IMS_USER.ALTI_VIEW.PLACING_DATE IMS_USER.ALTI_VIEW.REVIS_DATE IMS_USER.ALTI_VIEW.SURVEY_DATE IMS_USER.ALTI_VIEW.X_COORD IMS_USER.ALTI_VIEW.Y_COORD IMS_USER.ALTI_VIEW.Z_HEIGHT IMS_USER.ALTI_VIEW.DESCRIPTION IMS_USER.ALTI_VIEW.REMARK IMS_USER.ALTI_VIEW.L3_DEFINITION IMS_USER.ALTI_VIEW.L4_DEFINITION IMS_USER.ALTI_VIEW.LANGUE_USER IMS_USER.ALTI_VIEW.AUTHORIZED IMS_USER.ALTI_VIEW.X_2008 IMS_USER.ALTI_VIEW.Y_2008 #SHAPE#"; //#ID#

//selFieldList[9]="#SHAPE# AREA PERIMETER COMMUNE_ COMMUNE_ID INS ADMSTAT TOWN LOC LANG NAME1 NAME2 UPD UPD_ID UPDDATE"
//plaatsnamen:
selFieldList[8]="NAME NAME1 NAME2 INS #ID# #SHAPE#"; //#ALL#

// 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]="";
fieldAliasList[1]="";
fieldAliasList[2]="";
fieldAliasList[3]="";
fieldAliasList[4]="";
fieldAliasList[5]="";
fieldAliasList[8]="#ID# #SHAPE# NAME NAME1 NAME2 INS";//fieldAliasList[5]="NAME:CountryName";
fieldAliasList[6]="";

// 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;
// will the returned features be drawn?
var showSelectedFeatures=true;
// maximum number of features returned from query
var maxFeaturesReturned=5;
// 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="Garamond";
var legTitle=" ";
var legtitlefontsize=16;
var layerfontsize=12;
var valuefontsize=10;

/**************************************
* 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;

//pve variabelen voor geodetische punten
var	plani = false;
var	alti = false;
var	habit = false;
var point;
// the starting point. . . it all starts here on loading

function checkParams() {
	appDir = getPath(document.location.pathname);
	//alert (appDir);
	// global for overview map. . . change if not on same frame as Map
	ovImageVar = parent.LOCFrame.document.ovImage //pve: document.ovImage;
	//ovImageVar = parent.LOCFrame.document.ovImage //pve: 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"; //
		 ovImageVar.style.cursor = "hand"; //if (hasOVMap)
	}
		
	if (hasOVMap) {
		// size of ov map image
		i2Width = parseInt(ovImageVar.width);
		
		i2Height = parseInt(ovImageVar.height);
		forceNewOVMap = true;
		// 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 = hideMouseString;
	} else {
		usePan=false;
		usePanNorth=true;
		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'); //selectbox
		  if (parent.ToolFrame!=null) parent.ToolFrame.document.location="toolbar.htm";
		startMap();		
	} else {
		alert(msgList[0]);
	}
}