
// Global variables

// get machine name
    var hostName = document.location.host;
	
// build the URL
	//var serverURL  = "http://" + hostName + "/servlet/com.esri.esrimap.Esrimap?ServiceName=";
	var serverURL  = "http://" + hostName + "/ETARCIMSCONNECTOR/ims?ServiceName=";

	var theService = 'PSMurlo';  
	var cVersion = "&ClientVersion=3.1";
	var ovService = 'confcom';  //su arcims confcom    
	var ovURL = serverURL + ovService + cVersion;
	var CustomService = "&CustomService=Query";
	var imsURL = serverURL + theService + cVersion;
	var appDir = getPath(document.location.pathname);
	var path = "http://" + hostName + appDir;  //geoserver.consorzioterrecablate.it/website/genericsite/


// current extent vars
	var left;
	var bottom;
	var right;
	var top;

// full extent vars
	var startLeft;
	var startRight;
	var startTop;
	var startBottom;
	
// last extent vars 

	 var numberLastExtent = 10;//grandezza memoria
    var counterLastExtent = -1; //contatore 
    var lastLeft = new Array();
	var lastRight = new Array();
	var lastTop = new Array();
	var lastBottom = new Array();


// variabili per l'estensione dell'overview
	var ovLeft;
	var ovRight;
	var ovTop;
	var ovBottom;

// variabili per l'estensione totale dell'overview
	var ovStartLeft;
	var ovStartRight;
	var ovStartTop;
	var ovStartBottom;

// var containing a double quote ... used in string extraction
	var dQuote = '"'

	//var okToRefresh = true;
	
//variabile  per il controllo del checkbox tuttiTemi nel tocFrame
	var okTuttiTemi = false;
	var firstMultipla=true;
	
	//var immagineStampa = "";
	
//global vars that determine which image to use for the tool bar.
//Gives the effect that a certain tool is "active" by changing the image
	var useZoomIn;
	var useZoomOut;
	var usePan;
	var useRett;
	var useCircle;
	var usePoly;
	var useKm;
	var useFind;
	var usePoint;
	var useMultipla;
	var useMultiplaStampa;
	
		
//global var that determine which tool was selected

	var toolMode;   
	
//global vars that determine the dimensions of MapFrame and ovFrame 		
	var altezza=0;
	var larghezza=0;
	var ovAltezza=0;
	var ovLarghezza=0;
		
// if it is true an ov image is design else the ov image will be refresh	
    var disegnaov= true;  
	

//Variabile di appoggio per la visualizzazione dei dati selezionati
    var xmlEndPos = 1;
	
// functions activated by the applet

	var click1_2p = true;   // funzione utilizzata nel caso di una funzionalitą con un click solo
	var clickPointX = new Array();
	var clickPointY = new Array();
	var useCircle = false;
	var useKm = false;
	var totMisura = 0;
	var totMisura = 0; //distanza totale quandi si usa la linea
    
//Variabili per la scala

    var fatt_scala = 0;
    var config_scala =11000 ;  //<--- Inserire il valore minscale del Layer stabilito
    var StatusScala = "";


//Array per la memorizzazione delle estensioni dei singoli elementi
	var leftEnv = new Array();
	var rightEnv = new Array();
	var topEnv = new Array();
	var bottomEnv = new Array();
	var selectPoints = new Array();
	var selectFieldID = new Array();

//Variabili per la visualizzazione dei risultati	
	var beginRecord = 1;
	var featureLimit = 25;
	var stillMore = false;
	var stillPrevious = false;

	var progettisti=true;
	
	var larghezzaStampa=0;
    var altezzaStampa=0;
    var immagineStampa="";
