// determinano il browser e la versione
var isIE = (document.all?true:false);
var isNav = !isIE;
var isNav4 = false;
var isIE4 = false;
var is5up = false;
var isMoz = (((navigator.userAgent.indexOf("Gecko") >= 0) &&(navigator.userAgent.indexOf("Netscape") < 0))?true:false);

if (isNav) {
	if (parseFloat(navigator.appVersion)<5) {isNav4=true;}
	else{is5up = true;}
} 
else {
	if (navigator.appVersion.indexOf("MSIE 5")>0) {is5up = true;}
	else{isIE4 = false;}	
}	

// dimensione del bordo del rettangolo della overview
var ovBoxSize = 2;
// colore del rettangolo per la zoom box
var zoomBoxColor = '#ff0000';
// offset orizzontale
var hspc = 0;
// tolleranza per la selezione
var pixelTolerance=2;
// offset verticale
var vspc = 0;
var panFactor = 85/100;
var zoomFactor = 2

	
var layerTag = (isNav4?"layer":"div");
var flagLayer = false;
var layerBgColor = "#65C4C5";		
var hostName = window.location.host;

var usePan=true;
var useZoomIn=true;
var useZoomOut=true;
var useFullExtent=true;
var useZoomActive=true;
var useZoomLast=true;
var useIdentify=true;
var useSelect=true;
var useFind=true;

var useIdentifyAll=false;
if (useIdentify) useIdentifyAll=false;

var ScaleBarPrecision = 2;
var numDecimals = ScaleBarPrecision;

function checkParams() {
	if (isNav4) {
		document.captureEvents(Event.MOUSEMOVE);
		document.captureEvents(Event.MOUSEDOWN);
		document.captureEvents(Event.MOUSEUP);
	}
	document.onmousemove = getMouse;
	document.onmousedown = mapTool;
	document.onmouseup = chkMouseUp;
	//alert(parent.PostFrame.document.theForm.toolName.value);
	clickFunction(parent.PostFrame.document.theForm.toolName.value);
	
}

function openLinkCore() {
    var newWin=new Object();
    newWin=window.open('http://www.corenet.it','','');
    newWin.focus();
}	

