var hostName = document.location.host;
var localhostName= "carto.mairie-meudon.fr";
var catURL = "http://carto.mairie-meudon.fr/servlet/com.esri.esrimap.Esrimap?ServiceName=catalog";
var serverURL  = "http://carto.mairie-meudon.fr/servlet/com.esri.esrimap.Esrimap?ServiceName=";
var imsURL = "http://carto.mairie-meudon.fr/servlet/com.esri.esrimap.Esrimap?ServiceName=PlanMeudon";
var imsOVURL =  "http://carto.mairie-meudon.fr/servlet/com.esri.esrimap.Esrimap?ServiceName=PlanSituation";
var imsQueryURL = '';
var imsGeocodeURL = '';
var mapBackColor = '225,225,225';
var ovBoxColor = '#ff0000';
var ovBoxSize = 3;
var zoomBoxColor = '#ff0000';
var hasOVMap = true;
var hasTOC = true;
var useModeFrame = true;
var startLeft = 587133.7699137118;
var startRight = 596514.4025136683;
var startTop = 128072.54214210679;
var startBottom = 118740.56910305381;
var MSstartLeft = 587133.7699137118;
var MSstartRight = 596514.4025136683;
var MSstartTop = 128072.54214210679;
var MSstartBottom = 118740.56910305381;var InActiveArea=true;
var limitLeft = 587133.7699137118;
var limitRight = 596514.4025136683;
var limitTop = 128072.54214210679;
var limitBottom = 118740.56910305381;
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=true;
var useZoomLast=true;
var useIdentify=true;
var useMeasure=true;
var useSetUnits=true;
var useSelect=true;
var useQuery=true;
var useFind=true;
var useGeocode=false;
var useStoredQuery=false;
var useClearSelect=true;
var usePrint=true;
var useGeoNetwork=false;
var useBuffer=true;
var useExtract=false;
var MapUnits = "Meters";
var ScaleBarUnits = "Kilometers";
var useHyperLink=false;
var useHyperLinkAny=false;
var useIdentifyAll=false;
var useBufferShape=false; 
var hasToolBarOnLayer=false;
if (useHyperLink) useHyperLinkAny=false;
if (useIdentify) useIdentifyAll=false;
var setDebug=true;
var hspc = 0;
var vspc = 0;
var panFactor = 85/100;
var zoomFactor = 2
var selectMargin = 25/100;
var selectPointMargin = 25/1000
var showScalePercent=true;
var showXYs=false;
var doURLencode = false;
var drawNorthArrow = true;
var NorthArrowType = "6";
var NorthArrowSize = "20";
var NorthArrowCoords = "600 190";
var NorthArrowAngle="0";
var drawScaleBar = false;
var setMapUnits=false;
var drawCopyright = false;
var CopyrightFont = "Arial";
var CopyrightStyle = "Bold";
var CopyrightSize = "11";
var CopyrightCoordsY = 0.20;
var CopyrightCoordsX = 0.35;
var CopyrightCoords = "";
var CopyrightColor = "255,255,255";
var CopyrightBackground = "True";
var CopyrightBGColor = "0,0,0";
var CopyrightGlow = "False";
var CopyrightGlowColor = "255,255,255";
var CopyrightText = "Source: InterAtlas (c) 2005";
var drawModeOnMap = false;
var modeLayerOn = false;
var modeLayerColor = "Black";
var modeLayerShadowColor = "White";
var modeLayerFont = "Arial";
var modeLayerSize = "4";
var ovImageVar;
var ovBorderWidth = 2;
var ovExtentBoxSize = 2;
var mapTransparent=false;
var isIE = false;
var isNav = (navigator.appName.indexOf("Netscape")>=0);
var isNav4 = false;
var isIE4 = false;
var is5up = false;
if (isNav) {
	if (parseFloat(navigator.appVersion)<5) {
		isNav4=true;
	} else {
		is5up = true;
	}
} else {
	isIE4=true;
	isIE=true;
	if (navigator.appVersion.indexOf("MSIE 5")>0) {
		isIE4 = false;
		is5up = true;
	}
}	
var ovHspc =0;
var ovVspc = 0;
var ActiveLayerIndex=99;
var useTextFrame=true;
var useExternalWindow=false;
var textFrameBackColor="Silver";
var tableBackColor="White";
var textFrameTextColor="Black";
var textFrameLinkColor="Blue";
var textFrameFormColor="Gray";
var showTOC=true;
var toggleVisible = true;
var toggleOVVisible = false;
var listAllLayers = false;
var hideLayersFromList=false;
var noListLayer = new Array();
var drawFloatingMode = false;
var modeLayerOn = false;
var ovMapIsLayer=true;
var webParams = "";
if (parent.MapFrame!=null) {
	webParams = parent.document.location.search;
} else {
	webParams = document.location.search;
}
var clickMarkerColor="255,0,0";
var clickMarkerType="Circle";
var clickMarkerSize="6";
var pixelTolerance=2;
var selectColor="255,0,0";
var highlightColor="255,0,0";
var transparentLevel = "0.5";
var zoomToSingleSelect = false;
var selectFields= "#ALL#";
var swapSelectFields=false;
var useFieldAlias=false;
var hideIDFieldData = false;
var hideShapeFieldData = false;
var showSelectedData=true;
var showSelectedFeatures=true;
var maxFeaturesReturned=250;
var listAllLayersInIDAll = false;
var numberDataSamples = 50;

function checkParams() {
	appDir = getPath(document.location.pathname);
	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;
	hasTOC = false;
	useModeFrame = false;
	
	if (isIE)	{
		if (hasLayer("theTop")) document.all.theTop.style.cursor = "crosshair";
		if (hasOVMap) ovImageVar.style.cursor = "hand";
	}
		
	if (hasOVMap) {
		i2Width =  parseInt(ovImageVar.width);
		i2Height = parseInt(ovImageVar.height);
		forceNewOVMap =false;
		ovMapLeft=iWidth - 9/10* i2Width;
		ovMapTop =-1/20*i2Width;
		ovHspc=ovMapLeft;
	}
	if (webParams!="") {
		getCommandLineParams(webParams);
	}
	if ((startLeft!=0) && (startRight!=0)) getStartingExtent=false;
	if ((limitLeft!=0) && (limitRight!=0)) {
		getLimitExtent=false;
		enforceFullExtent=true;
	}
	// modif max 2003/09
	enforceFullExtent = false;
	if (ovBoxColor=="") ovBoxColor = "255,0,0";
	checkCoords();
	if (aimsNavigationPresent) {
		if (isNav4) {
			document.captureEvents(Event.MOUSEMOVE);
			document.captureEvents(Event.MOUSEDOWN);
			document.captureEvents(Event.MOUSEUP);
		}
		document.onmousemove = getMouse;
		document.onmousedown = mapTool;
		document.onmouseup = chkMouseUp;
	} else {
		usePan=false;
		usePanNorth=false;
		usePanWest=false;
		usePanEast=false;
		usePanSouth=false;
		useMeasure=false;
		useZoomIn=false;
		useZoomOut=false
		useZoomActive=false;
	}	
	if (!aimsSelectPresent) {
		aimsQueryPresent=false;
 		useSelect=false;
		useQuery=false;
		useFind=false;
		useBuffer=false;
		useStoredQuery=false;
		useClearSelect=false;
	}
	if ((aimsXMLPresent) && (aimsMapPresent)) {
		if (parent.ToolFrame!=null) parent.ToolFrame.document.location="toolbar.htm";
		startMap();
	} else {
		alert(msgList[0]);
	}
}
var MinDis=700;
