//<![CDATA[
function $$$(id) {
	var ret = document.getElementById(id);
	if (ret == 'undefined')
	    ret = null;
	return ret;
}
function $$a(mex) {	return alert(mex); }
function $$c(mex) {	return confirm(mex); }

String.prototype.htmlEncode = function() {
	var me = this;
	me = me.replace(/</g,"&lt;");
	me = me.replace(/>/g,"&gt;");
	return me;
}

function onReturn(ptr, ev) {
	if (ev.keyCode == 13)
		ptr.value += '<br/>';
}

function maiuscolize(ptr) {
	var stringa = ptr.value;
	if ((stringa.charAt(stringa.length-2) == ' ') || (stringa.length == 1)) {
		if (stringa.length == 0)
			ptr.value = stringa[0].toUpperCase();
		else
			ptr.value = stringa.substr(0, stringa.length-1) + stringa.charAt(stringa.length-1).toUpperCase(); // mette la maiuscola...
	}
}

var GJX_heimin = 2;
var GJX_heimax = 46;

function areaset(ptr) {
	if (ptr.rows==GJX_heimin)
		ptr.rows=Math.floor(GJX_heimax/2);
	else if (ptr.rows==Math.floor(GJX_heimax/2))
		ptr.rows=GJX_heimax;
	else
		ptr.rows=GJX_heimin;
}

function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else {
		if (obj.x)
			curleft += obj.x;
	}
	return curleft;
}

function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else {
		if (obj.y)
			curtop += obj.y;
	}
	return curtop;
}

function showhide(ptr) {
	ptr2 = ptr.parentNode.parentNode.nextSibling;
	if (ptr2.className == 'divshow') {
		ptr2.className = 'divhide';
		ptr.src='images/gjx_add.gif';
	}
	else {
		ptr2.className = 'divshow';
		ptr.src='images/gjx_sub.gif';
	}
}

function centerLocation(myo)
{
	if (myo.lat != 0 && myo.lng != 0) {	// se ho gią definito la locazione...
		GJX_map.setCenter(new GLatLng(myo.lat, myo.lng)); //...allora centro la mappa sulla locazione
	}
	else {	// se l'icona č ancora priva di coordinate, metto quelle attuali
		myo.lat = GJX_map.getCenter().lat();
		myo.lng = GJX_map.getCenter().lng();
	}
}

function initPosition(gmap, xmlObj) {
	gmap.setCenter(new GLatLng(xmlObj.config.lat,xmlObj.config.lng));
	gmap.setZoom(xmlObj.config.zoomlev);
}

// ###################### OGGETTO DOCUMENTO XML (RADICE) ######################
function objXMLdoc(XSDfile, XMLencoding, configuration, placesArray) {
	this.__ver__ = '1.1j';
	this.XSDfile = XSDfile || '';
	this.encoding = XMLencoding || 'ISO-8859-1'; // ho messo come default iso-8859-1
	this.config = configuration || new objConfig();
	this.places  = placesArray || new Array();
}
	objXMLdoc.prototype.getPlace = function(placeIdx) {
		if (placeIdx>=0 && placeIdx<this.placeNum()) {
			return(this.places[placeIdx]);
		}
		else {
			return(null);
		}
	}
	objXMLdoc.prototype.placeNum = function() {
		return (this.places.length);
	}
	objXMLdoc.prototype.showGMap = function(gmap, init) {
		gmap.clearOverlays();
		if (init!=null)
			initPosition(gmap, this);
		//GJX_centerPoint = putIcon(GJX_map, gmap.getCenter(), 'images/pointer.gif', GJX_centerP, GJX_centerP, null);
		
		
		
		for (var i=0; i<this.places.length; i++) {
			this.places[i].showGMap(gmap);
		}
		return (true);
	}

	
function objConfig(lat,lng,zlev,wid,hei,ctrl,zoom,ahyb,mtype,oview,drag) {
	this.lat 	  = lat   || 44.53096338116764;
	this.lng 	  = lng   || 11.368210315704346;
	this.zoomlev  = zlev  || 13;
	this.width 	  = wid   || 580;
	this.height   = hei   || 320;
	this.controls = ctrl  || 2;
	this.zoomable = zoom  || 'true';
	this.ahybrid  = ahyb  || 'false';
	this.maptypes = mtype || 'true';
	this.overview = oview || 'false';
	this.draggable= drag  || 'true';
}

function objPlace(iconArray, info, polyArray) {
	this.icon = iconArray || new Array();
	this.info = info || new objInfo();
	this.poly = polyArray || new Array();
}
	objPlace.prototype.getOverlays = function()	{
		var overlays = Array();
		for (var i=0; i<this.icon.length; i++)
			overlays.push(this.icon[i].overlay);
		for (var i=0; i<this.poly.length; i++)
			overlays.push(this.poly[i].overlay);
		return (overlays);
	}
	objPlace.prototype.removeItem = function(itemName, itemIdx)	{
		switch (itemName) {
			case GJX_ICON:
							this.icon.splice(itemIdx,1);
							break;
			case GJX_INFO:
							this.info.removeTab(itemIdx);
							break;
			case 'poligono':
							this.poly.splice(itemIdx,1);
							break;
		}
	}
	objPlace.prototype.addIcon = function(myIcon) {
		this.icon.push(myIcon || new objIcon());
	}
	objPlace.prototype.getIcon = function(myIdx) {
		if (myIdx>=0 && myIdx<this.iconNum())
			return(this.icon[myIdx]);
		else
			return(null);
	}
	objPlace.prototype.iconNum = function()	{
		return (this.icon.length);
	}
	objPlace.prototype.addInfo = function(myInfo) {
	    if (this.icon.length < 1)
			this.addIcon();
		this.info.addTab(myInfo);
	}
	objPlace.prototype.getInfo = function(myIdx) {
		if (myIdx>=0 && myIdx<this.infoNum())
			return(this.info.getInfo(myIdx));
		else
			return(null);
	}
	objPlace.prototype.infoNum = function() {
		return (this.info.infoNum());
	}
	objPlace.prototype.addPoly = function(myPoly) {
		this.poly.push(myPoly || new objPoly());
	}
	objPlace.prototype.getPoly = function(myIdx) {
		if (myIdx>=0 && myIdx<this.polyNum())
			return(this.poly[myIdx]);
		else
			return(null);
	}
	objPlace.prototype.polyNum = function() {
		return (this.poly.length);
	}
	objPlace.prototype.getObject = function(item, Opath) {
		var myIdx = Opath.toString().split('/')[1];
		if (item == GJX_ICON)
			return (this.getIcon(myIdx));
		else if (item == GJX_INFO)
			return (this.getInfo(myIdx));
		else if (item == 'poligono') {
			return (this.getPoly(myIdx));
		}
		else {
			$$a('[objPlace]>>Error: type['+item+'_'+Opath+'] not valid!');
			return(null);
		}
	}
	objPlace.prototype.showGMap = function(gmap) {
		for (var i=0; i<this.icon.length; i++)
			this.icon[i].showGMap(gmap, this.info.getTabArray());
		for (var i=0; i<this.poly.length; i++)
			this.poly[i].showGMap(gmap);
		return (true);
	}

function objIcon (lat, lng, src, wid, hei) {
	this.lat 	 = lat || 0;
	this.lng 	 = lng || 0;
	this.src 	 = src || 'icons/defmarker.png';
	this.width 	 = wid || 20;
	this.height  = hei || 34;
	this.opath   = '';
}
	objIcon.prototype.showGMap = function(gmap, tabArray) {
		var place = new GLatLng(this.lat, this.lng);
		//var myico = putIcon(gmap, place, 'icons/'+this.src, this.width, this.height, tabArray, this.opath);
		var myico = putIcon(gmap, place, this.src, this.width, this.height, tabArray, this.opath);
		return (true);
	}
	
// ###################### OGGETTO INFORMAZIONE E OGGETTO FIGLIO TAB ###
function objInfo (infoArray) {
	this.info	 = infoArray || new Array();
}
	objInfo.prototype.addTab = function(myTab) {
		if (this.infoNum() < 2)
			this.info.push(myTab || new objTab());
	}
	objInfo.prototype.getInfo = function(myIdx)	{
		if (myIdx>=0 && myIdx<this.infoNum())
			return(this.info[myIdx]);
		else
			return(null);
	}
	objInfo.prototype.infoNum = function() {
		return (this.info.length);
	}
	objInfo.prototype.removeTab = function(tabIdx) {
		if (this.infoNum() > 0)//1) // il minimo numero di info (tab) ora č 0
			this.info.splice(tabIdx,1);
	}
	objInfo.prototype.getTabArray = function() {
		var tabInfo = new Array();
		if (this.info.length > 0) {	// metto il contenuto solo se č presente!
			for(var i=0; i<this.info.length; i++)
				tabInfo.push(new GInfoWindowTab(this.info[i].caption, this.info[i].content));
		}
		return (tabInfo);
	}
	function objTab (caption, content) {
		this.caption = caption || '';
		this.content = content || '';
		this.opath = '';
	}

// ###################### OGGETTO POLIGONO E OGGETTO FIGLIO PUNTO ###
function objPoly (color, size, alpha, filled, closure, pointsArray) {
	this.color 	 = color || '#0000FF';
	this.size	 = size || 3;
	this.alpha	 = alpha || 0.4;
	this.filled  = filled || false;
	this.closure = closure || false;
	this.points  = pointsArray || new Array();
	this.drawpoints = pointsArray || new Array();
	this.opath 	 = '';
}
		objPoly.prototype.saveDrawPoints = function() {	// §§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§ DA CONTROLLARE
			this.points = this.drawpoints;
			for(var i=0; i<this.numDPoints(); i++) {
				this.points[i].lat = this.drawpoints[i].lat;
				this.points[i].lng = this.drawpoints[i].lng;
			}
		}
	objPoly.prototype.clearPoints = function() {
	    this.points = [];
	}
		objPoly.prototype.clearDPoints = function() {
			this.drawpoints = [];
		}
	objPoly.prototype.addPoint = function(lat, lng) {
		this.points.push(new objPoint(lat, lng));
	}
		objPoly.prototype.addDPoint = function(lat, lng) {
			this.drawpoints.push(new objPoint(lat, lng));
		}
	objPoly.prototype.hasPoints = function() {
		if (this.numPoints() > 0)
			return (true);
		return (false);
	}
		objPoly.prototype.hasDPoints = function() {
			if (this.numDPoints() > 0)
				return (true);
			return (false);
		}
	objPoly.prototype.numPoints = function() {
		return (this.points.length);
	}
		objPoly.prototype.numDPoints = function() {
			return (this.drawpoints.length);
		}

	objPoly.prototype.getPolyArray = function()	{
		var polyArr = new Array();
		for (var i=0; i<this.points.length; i++)
			polyArr.push(this.points[i].getCoords());
		return(polyArr);
	}
	objPoly.prototype.showGMap = function(gmap, editing) {
	    editing = editing || false;
		if (this.hasPoints()) {
			var p = new Array();
			p['pc'] = this.color;
			p['ps'] = parseInt(this.size);
			p['pa'] = parseFloat(this.alpha);
			p['pf'] = this.filled;
			p['pl'] = this.closure;
			var polygons;
			var myPoly = this.getPolyArray();
			
			if (editing) {
			    for (var pt in this.points) {
				    this.points[pt].showGMap(gmap);
				}
			}
			
			if (p['pl']) {
				myPoly.push(this.points[0].getCoords());
			}
			if (p['pf']) {
				polygons = new GPolygon(myPoly, p['pc'], p['ps'], p['pa'], p['pc'], p['pa']);
			}
			else {
				polygons = new GPolyline(myPoly, p['pc'], p['ps'], p['pa']);
			}
			gmap.addOverlay(polygons);
		}
		return (true);
	}
	function objPoint (lat, lng) {
		this.lat = lat || 0;
		this.lng = lng || 0;
	}
		objPoint.prototype.getCoords = function() {
			return(new GLatLng(this.lat, this.lng));
		}
		objPoint.prototype.showGMap = function(gmap) {
			var place = new GLatLng(this.lat, this.lng);
			var myico = putIcon(gmap, place, 'images/vertex.gif', 9, 9, new Array(), null, 2);
		}

function Trim() {return this.replace(/\s+$|^\s+/g,"");}
function LTrim(){return this.replace(/^\s+/,"");}
function RTrim(){return this.replace(/\s+$/,"");}
String.prototype.Trim = Trim;
String.prototype.RTrim = RTrim;
String.prototype.LTrim = LTrim;

// ###################### LETTURA ATTRIBUTO NEL FORMATO CORRETTO ###
function $rat(node, attr, defValue, numeric) {
	var attribute = defValue;
	if (node.getAttribute(attr) != null) {
		if (numeric == true)
			attribute = parseFloat(node.getAttribute(attr));
		else
			attribute = node.getAttribute(attr);
	}
	return (attribute);
}

/*****************************************************************************************************************
								GMAPS E DERIVATI
*****************************************************************************************************************/
var GJX_mapVersion	= "1.1f"; // versione script
var GJX_zoom		= 13;
var GJX_centerLat	= 44.53096338116764;
var GJX_centerLng	= 11.368210315704346;
var GJX_centerP 	= 12;

var GJX_mapBounds;
var GJX_mapCenter;
var GJX_mapZoom;

var GJX_firstPoint 	= null;
var GJX_lastPoint 	= null;
var GJX_lastLine	= null;
var GJX_lineList	= new Array();
var GJX_lastPoly	= new Array();
var GJX_oldOverlay	= null;


function checkBounds() {
	if (! GJX_mapBounds.containsBounds(GJX_map.getBounds()))
		GJX_map.returnToSavedPosition();
	else
		GJX_map.savePosition();
}

function putIcon (gmap, position, iconFile, width, height, infoTabs, opath, notDraggable) {
	notDraggable = notDraggable || null;
	var icona = new GIcon();
	if (iconFile && width && height) {
		icona.image 		   = iconFile;
		icona.iconSize 		   = new GSize(width, height);
		/*if (notDraggable!=false || notDraggable>0) {
		    if (notDraggable==2)
				icona.iconAnchor 	   = new GPoint(width/2, height/2);
			else
   				icona.iconAnchor 	   = new GPoint(width-1, height-1);
		}
		else {
			icona.iconAnchor 	   = new GPoint(width/2, height-1);
		}
		icona.infoWindowAnchor = new GPoint(width/2, height-2);*/
		icona.iconAnchor 	   = new GPoint(Math.round(width/2), Math.round(height/2));
		icona.infoWindowAnchor = new GPoint(Math.round(width/2), Math.round(height/2));
	}
	var inerte = false;
	if (infoTabs &&infoTabs.length > 0)
		inerte = true;
	var marker;
		marker = new GMarker(position, {icon:icona});
		marker.opath = opath;

	GEvent.addListener(marker, 'click',
						function() {
							if (inerte)
								marker.openInfoWindowTabsHtml(infoTabs);
						});

	
	gmap.addOverlay(marker);
	return (marker);
}

function getPolyParms() {
	var polyparm = new Array();
	polyparm['pc'] = $$$('pcolor').value;
	polyparm['ps'] = parseInt($$$('psize').value);
	polyparm['pa'] = parseFloat($$$('palpha').value);
	polyparm['pf'] = $$$('pfilled').checked;
	polyparm['pl'] = $$$('pclosure').checked;
	return(polyparm);
}

function loadmap(GJX_mapID) {
	//, GJX_mapDragging, GJX_mapControl, GJX_mapType, GJX_mapOverview
	var GJX_mapDragging	= GJX_myDoc.config.draggable;
	var GJX_mapControl  = GJX_myDoc.config.controls;
	var GJX_mapType     = GJX_myDoc.config.maptypes;
	var GJX_mapOverview = GJX_myDoc.config.overview;

	var GJX_mapZoom     = GJX_myDoc.config.zoomlev;
	var GJX_minZoom     = 8;
	var GJX_maxZoom     = 18;
	if (''+GJX_myDoc.config.zoomable=='false') {
		GJX_minZoom = GJX_mapZoom;
		GJX_maxZoom = GJX_mapZoom;
	}
	
	var GJX_hybridZoom = 14;
	if (''+GJX_myDoc.config.hybridZoom=='false') {
	    GJX_hybridZoom = GJX_maxZoom+1;
	}
	
	var GJX_mapCenterLat = GJX_myDoc.config.lat;
	var GJX_mapCenterLng = GJX_myDoc.config.lng;
	
	if (GBrowserIsCompatible())	{
		GJX_map = new GMap2($$$(GJX_mapID), {draggableCursor:'crosshair', draggingCursor:'move'});
		var centerPos = new GLatLng(GJX_mapCenterLat,GJX_mapCenterLng);//new GLatLng(GJX_centerLat, GJX_centerLng);
		GJX_mapCenter = centerPos;
		//GJX_mapZoom = GJX_zoom;

		//GJX_map.setCenter(centerPos, GJX_zoom-1);
		//GJX_mapBounds = GJX_map.getBounds();
		GJX_map.setCenter(centerPos, GJX_zoom);
		
		GJX_geo = new GClientGeocoder();
		
		//GKeyboardHandler(GJX_map);
		
		if (''+GJX_mapDragging == 'false')
			GJX_map.disableDragging();
		if (GJX_mapControl  == 1)
			GJX_map.addControl(new GSmallMapControl());
		if (GJX_mapControl  == 2)
			GJX_map.addControl(new GLargeMapControl());
		if (GJX_mapType     == 1)
			GJX_map.addControl(new GMapTypeControl());
		if ((''+GJX_mapOverview == 'true') && (''+GJX_mapDragging == 'true'))
			GJX_map.addControl(new GOverviewMapControl());
			
		GJX_map.enableContinuousZoom();
			//GJX_map.enableScrollWheelZoom();  // se la abilito fa cessare la funzionalitą di visualizzazione linee in creazione poligoni
		//GJX_map.disableInfoWindow();
		//GJX_map.disableDoubleClickZoom(); // NON VA!!

		//GJX_centerPoint = putIcon(GJX_map, centerPos, 'images/pointer.gif', GJX_centerP, GJX_centerP, null, null, true);

		var minZoom = GJX_minZoom;//8;
		var maxZoom = GJX_maxZoom;//18;	// 17;
		var hybridZoom = GJX_hybridZoom;//24;	// 14;
		GEvent.addListener(GJX_map, 'zoomend',	function() { //alert(minZoom+"\n"+maxZoom);
				if (GJX_map.getZoom() < minZoom)
					GJX_map.setZoom(minZoom);
				if (GJX_map.getZoom() > hybridZoom)
					GJX_map.setMapType(G_HYBRID_MAP);
				if (GJX_map.getZoom() <= hybridZoom)
					GJX_map.setMapType(G_NORMAL_MAP);
				if (GJX_map.getZoom() > maxZoom)
					GJX_map.setZoom(maxZoom);
				//checkBounds();
			}
		);
	}
}

function XMLHTTPgetfile(taId, xmlSrc) {
	var area = $$$(taId);
	if (GBrowserIsCompatible()) {
		if (xmlSrc[0] != '<') // Se č un file...
			GDownloadUrl(xmlSrc, function(data, responseCode) {	area.value = data; });
		else
			area.value = xmlSrc;
	}
}

function $get(obj, tag) {
	var c = obj.getElementsByTagName(tag);
	if (c.length>0)
	    return c[0];
	return false;
}

// ##################################################### FUNZIONE CHE GENERA L'ALBERO DI OGGETTI ###
function oBuildXML(xmlSrc) {
	var retObj;
	if (GBrowserIsCompatible()) {
		var xmlDoc = new GXml.parse(xmlSrc);
		
		var config = new objConfig();
		var cfg = $get(xmlDoc.documentElement,"config");
		if (cfg) {
		    var cfg_elem;
			cfg_elem = $get(cfg,"center");
			 config.lat = $rat(cfg_elem, "lat", false, true);
			 config.lng = $rat(cfg_elem, "lng", false, true);
			 config.zoomlev = $rat(cfg_elem, "zoom", 13, true);
			cfg_elem = $get(cfg,"view");
			 config.width = $rat(cfg_elem, "width", false, true);
			 config.height = $rat(cfg_elem, "height", false, true);

			cfg = $get(cfg,"options"); //alert("cfg:"+cfg);
			if (cfg) {
			    var opt;
			    opt = $get(cfg,"draggable");								//alert("draggable:"+opt.firstChild.nodeValue);
			    if (opt)
					config.draggable= ''+opt.firstChild.nodeValue;
                opt = $get(cfg,"controls");									//alert("controls:"+opt.firstChild.nodeValue);
			    if (opt)
					config.controls = ''+opt.firstChild.nodeValue;
				opt = $get(cfg,"zoomable");									//alert("zoomable:"+opt.firstChild.nodeValue);
			    if (opt)
					config.zoomable = ''+opt.firstChild.nodeValue;
				opt = $get(cfg,"autohybrid");								//alert("autohybrid:"+opt.firstChild.nodeValue);
			    if (opt)
					config.ahybrid  = ''+opt.firstChild.nodeValue;
				opt = $get(cfg,"maptypes");									//alert("maptypes:"+opt.firstChild.nodeValue);
			    if (opt)
					config.maptypes = ''+opt.firstChild.nodeValue;
                opt = $get(cfg,"overview");									//alert("overview:"+opt.firstChild.nodeValue);
			    if (opt)
					config.overview = ''+opt.firstChild.nodeValue;
			}
		}
		
		var placeList = new Array();
		var places  = xmlDoc.documentElement.getElementsByTagName("place");
		for (var i=0; i<places.length; i++) {	// per ogni places trovato devo estrarre le informazioni relative
			var tabInfo = ''; // -----------------------------------------
			var pInfo = places[i].getElementsByTagName("info");
			if (pInfo.length > 0) {
				var infoArr = new Array();
				var iTab = pInfo[0].getElementsByTagName("tab");
				for (var j=0; j<iTab.length; j++) {// ciclo sui tab presenti per estrarne i dati
					var caption = '';
					var content = '';
					if (iTab[j].getElementsByTagName("caption")[0].firstChild)
						caption = iTab[j].getElementsByTagName("caption")[0].firstChild.nodeValue;
					if (iTab[j].getElementsByTagName("content")[0].firstChild){
						content = iTab[j].getElementsByTagName("content")[0].firstChild.nodeValue;
					}
					infoArr.push(new objTab(caption,content)); //.firstChild.nodeValue
				}
				tabInfo = new objInfo(infoArr);
			}
			// estraggo le informazioni per l'icona ==============================================
			var iconList = new Array(); // -----------------------------------------
			var pIcon = places[i].getElementsByTagName("icon");
			for (var k=0; k<pIcon.length; k++) {
				var iLat = $rat(pIcon[k], "lat"   , false, true);
				var iLng = $rat(pIcon[k], "lng"   , false, true);
				var iSrc = $rat(pIcon[k], "image" , false, false);
				var iWid = $rat(pIcon[k], "width" , false, true);
				var iHei = $rat(pIcon[k], "height", false, true);
				iconList.push(new objIcon(iLat,iLng, iSrc,iWid,iHei));
			}
			// estraggo le informazioni per le poly ==============================================
			var polyList = new Array(); // -----------------------------------------
			var pPoly = places[i].getElementsByTagName("poly");
			for (var k=0; k<pPoly.length; k++) {
				var pCol = $rat(pPoly[k], "color" , false, false);
				var pSiz = $rat(pPoly[k], "size"  , false, true);
				var pAlp = $rat(pPoly[k], "alpha" , false, true);
				var pFil = false;
				if ($rat(pPoly[k], "filled", false, false) == 'true') { // ritornerebbe 'true' e non true
					pFil = true;
			    }
			    var pClo = false
			    if ($rat(pPoly[k], "closure", false, false) == 'true') { // ritornerebbe 'true' e non true
					pClo = true;
			    }
				// var polyLine = [];
				var pointArr = new Array();
				var pPoint = pPoly[k].getElementsByTagName("point");
				for (var j=0; j<pPoint.length; j++) {	// ciclo sui point presenti per estrarne i dati
					pointArr.push(new objPoint($rat(pPoint[j], "lat", true), $rat(pPoint[j], "lng", true)));
				}
				polyList.push(new objPoly(pCol,pSiz,pAlp,pFil,pClo, pointArr));
			}
			placeList.push(new objPlace(iconList,tabInfo,polyList));
		} // chiusura places
	}
	retObj = new objXMLdoc('', 'ISO-8859-1', config, placeList); // encoding="ISO-8859-1" ||  encoding="UTF-8"
	return (retObj);
}

var GJX_myDoc		= new objXMLdoc();
var GJX_map 		= null;
var GJX_geo			= null;
var GJX_centerPoint = null;
var GJX_gzone		= null;
var GJX_ozone		= null;
//]]>

