	var map = null;
	var center = new GLatLng(44.721127,5.300076);
	var initZoom = 9;
	var id = '';
	
	//Création de marker pour les fiches
	function createMarker(point, mess, ico) {
		var infoTabs = [
						new GInfoWindowTab("Name", mess)
						];
		var marker = new GMarker(point, ico);
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowTabsHtml(infoTabs);
		});
		return marker;
	}
	
	//Création de marker pour l'OT avec les coordonnées
	function createMarkerOT(point, mess, mess2, ico) {
		var infoTabs = [
						new GInfoWindowTab("Name", mess),
						new GInfoWindowTab("Address", mess2)
						];
		var marker = new GMarker(point, ico);
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowTabsHtml(infoTabs);
		});
		return marker;
	}
	
	function showAddress(address,mess,mess2) {
	 // alert(address);
	 if(mess == "") mess = address;
	 if(mess2 == "") mess2 = address;
	  var geocoder = new GClientGeocoder();
	  geocoder.getLatLng(
		address + " France",
		function(point) {
		  if (!point) {
			alert("Coordonnées inconnues");
		  } else {
			map.setCenter(point, 16);
			map.addOverlay(createMarker(point, mess, mess2));
		  }
		}
	  );
	}
	
	function showPoint(cat){
		//alert(cat);
		map.clearOverlays();
		administrative();
		var tmpCat = convCatTUrl(cat);
		//alert("http://"+gUrl+"/_includes/google-maps/mnet-gMaps.asp?"+tmpCat);
		map.setCenter(center, initZoom);
		if(cat != '')
		{
			afficheResultat(tmpCat,cat,'','','');
		}
	}
	function afficheResultat(paramsUrl,cat,cLat,cLng,proxim){
		//alert("http://"+gUrl+"/_includes/google-maps/mnet-gMaps.asp?"+paramsUrl)
		GDownloadUrl("http://"+gUrl+"/_includes/google-maps/mnet-gMaps.asp?"+paramsUrl,
						function(data, responseCode) {
							var xml = GXml.parse(data);
							//var contenu_html = xml.documentElement.getElementsByTagName("contenu");
							var markers = xml.documentElement.getElementsByTagName("marker");
							if(markers.length == 0) alert('No person receiving benefits seems to answer your research !');
							//alert(tmpCat.substring(5));
							if(document.getElementById('nb') != null){
								document.getElementById('nb').innerHTML = 'Nombre de résultat : ' + markers.length;
							}
							//alert(markers.length);
							for (var i = 0; i < markers.length; i++) {
								var point = new GLatLng((markers[i].getAttribute("lat")),
								(markers[i].getAttribute("lng")));

								var icontype = markers[i].getAttribute("icontype");
								var Ref = markers[i].getAttribute("label");

								var html = decode(markers[i].getElementsByTagName("infowindow"));
								if(proxim != '') document.getElementById('proximite').innerHTML += html + '<hr>';
								//alert(icontype);
								//var html2 = decode(markers[i].getElementsByTagName("infowindow2")); 
								map.addOverlay(createMarker(point,html,iconStyle(icontype)));//, icontype,cat,i
							}
							if(markers.length == 1) map.setCenter(point, 12);
							//map.setCenter(point, 12);
							if(cLat != '' && cLng != ''){
								var point = new GLatLng((cLat),(cLng));
								map.setCenter(point);
							}
						}
					);	
	}
    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"),{mapTypes:[G_NORMAL_MAP,G_HYBRID_MAP,G_SATELLITE_MAP]});
		map.addControl(new GLargeMapControl());
        map.addControl(new GOverviewMapControl());
        map.addControl(new GMapTypeControl());
		
		GEvent.addListener(map, "moveend", 
			function() {
				var tmpcenter = map.getCenter();
				//document.getElementById("message").innerHTML = tmpcenter.toString();
				/*if(tmpcenter.lng()>7.65) map.setCenter(center, initZoom);
				if(tmpcenter.lng()<5.88) map.setCenter(center, initZoom);
				if(tmpcenter.lat()>49.52) map.setCenter(center, initZoom);
				if(tmpcenter.lat()<48.52) map.setCenter(center, initZoom);*/
			});
		
		map.setCenter(center, initZoom);
		
		// poisitionne le CDT/OT etc.
		var point = new GLatLng(44.933398,4.897396);
		map.addOverlay(createMarkerOT(point,"<table><tr><td><img src=\"/img-drome-tourisme/logo-drome-2.gif\"></td><td class=\"ArialTxt10pxGris\">Departmental Tourist Board of the Dr&ocirc;me</td></tr></table>","<span class=\"ArialTxt10pxGris\">8, rue Baudin <br> BP 531 - 26005 Valence Cedex<br>Tel. +33 (0)4 75 82 19 26 / Fax +33 (0)4 75 56 01 65</span>",iconStyle('info')));
		administrative();
      }
    }
	function iconStyle(cat){
		var tmpCat = cat;
		if(tmpCat == '') tmpCat = 'default';
		if(!isNaN(cat)) tmpCat = 'default';
		if(id == cat) tmpCat = 'default';
		if(cat.lastIndexOf(",")>1) tmpCat = 'default';
		var icon = new GIcon();
		icon.image = "/_includes/google-maps/img/gm"+tmpCat+".png";
		icon.shadow = "/_includes/google-maps/img/gm-shadow.png";
		icon.iconSize = new GSize(20, 40);
		icon.shadowSize = new GSize(40, 40);
		icon.iconAnchor = new GPoint(10, 40);
		icon.infoWindowAnchor = new GPoint(10, 1);
		icon.infoShadowAnchor = new GPoint(20, 1);
		return icon;
	}
	function decode(a) {
		var b = "";
		if (a.length > 0) {
			if (a[0]) {
				if (a[0].firstChild) {
				b = a[0].firstChild.nodeValue;
			}
		}
	}
	return b;
	}
	function administrative(){
		var points = [];
		points.push(new GLatLng(45.05616838,5.26633081));
		points.push(new GLatLng(45.05500789000001,5.27242901));
		points.push(new GLatLng(45.05652632000001,5.27525348));
		points.push(new GLatLng(45.05968115,5.2764487));
		points.push(new GLatLng(45.06089200000001,5.28982189));
		points.push(new GLatLng(45.06389562,5.29161969));
		points.push(new GLatLng(45.05845572,5.30688909));
		points.push(new GLatLng(45.05538839000001,5.30579842));
		points.push(new GLatLng(45.05170074,5.31642137));
		points.push(new GLatLng(45.05186159,5.32048097));
		points.push(new GLatLng(45.05517614000001,5.32107764));
		points.push(new GLatLng(45.05869700000001,5.32901372));
		points.push(new GLatLng(45.05999402,5.33335094));
		points.push(new GLatLng(45.06188649,5.340591));
		points.push(new GLatLng(45.04739587000001,5.3478094));
		points.push(new GLatLng(45.04696684999999,5.35233214));
		points.push(new GLatLng(45.04395188,5.36979307));
		points.push(new GLatLng(45.03598022,5.384086190000001));
		points.push(new GLatLng(45.03725007,5.39289061));
		points.push(new GLatLng(45.03833554000001,5.39726695));
		points.push(new GLatLng(45.04896810000001,5.38480822));
		points.push(new GLatLng(45.05509082,5.3854113));
		points.push(new GLatLng(45.04685604000001,5.39383672));
		points.push(new GLatLng(45.0448716,5.40765749));
		points.push(new GLatLng(45.05309075,5.42288072));
		points.push(new GLatLng(45.05450847,5.43240834));
		points.push(new GLatLng(45.06859686,5.44592069));
		points.push(new GLatLng(45.07179356000001,5.44781431));
		points.push(new GLatLng(45.07906283,5.45534869));
		points.push(new GLatLng(45.08166729,5.457489560000001));
		points.push(new GLatLng(45.0869318,5.4639481));
		points.push(new GLatLng(45.08639399,5.47371565));
		points.push(new GLatLng(45.08077800000001,5.48639808));
		points.push(new GLatLng(45.07167091,5.4941917));
		points.push(new GLatLng(45.07304298,5.48456293));
		points.push(new GLatLng(45.07029414000001,5.47578131));
		points.push(new GLatLng(45.04706327000001,5.46512565));
		points.push(new GLatLng(45.04354939,5.46523178));
		points.push(new GLatLng(45.03343704000002,5.47774187));
		points.push(new GLatLng(45.02404218,5.47920519));
		points.push(new GLatLng(45.02279171,5.48361546));
		points.push(new GLatLng(45.01308737,5.48044167));
		points.push(new GLatLng(44.99541724,5.49305739));
		points.push(new GLatLng(44.98966374,5.48835501));
		points.push(new GLatLng(44.97003847,5.479193290000001));
		points.push(new GLatLng(44.96675974,5.4776771));
		points.push(new GLatLng(44.92637757,5.48303293));
		points.push(new GLatLng(44.92301369,5.48356555));
		points.push(new GLatLng(44.89817482,5.48049406));
		points.push(new GLatLng(44.878089,5.47045067));
		points.push(new GLatLng(44.867889,5.47492796));
		points.push(new GLatLng(44.82951915,5.46431305));
		points.push(new GLatLng(44.82597812,5.46379877));
		points.push(new GLatLng(44.82272424,5.4804007));
		points.push(new GLatLng(44.82306869,5.48477102));
		points.push(new GLatLng(44.80793291,5.47511841));
		points.push(new GLatLng(44.79999264,5.46020953));
		points.push(new GLatLng(44.79388241,5.46402616));
		points.push(new GLatLng(44.7919289,5.47797632));
		points.push(new GLatLng(44.78601994,5.48156164));
		points.push(new GLatLng(44.77031928,5.55126662));
		points.push(new GLatLng(44.77648178,5.55355424));
		points.push(new GLatLng(44.78893982,5.54522093));
		points.push(new GLatLng(44.79333002,5.54964327));
		points.push(new GLatLng(44.77972971,5.57790653));
		points.push(new GLatLng(44.77787065,5.58204541));
		points.push(new GLatLng(44.76412905,5.58615123));
		points.push(new GLatLng(44.7558676,5.60769225));
		points.push(new GLatLng(44.75403742,5.62237906));
		points.push(new GLatLng(44.75329802,5.62631516));
		points.push(new GLatLng(44.75038,5.6266629));
		points.push(new GLatLng(44.74479917,5.6290621));
		points.push(new GLatLng(44.73264700000001,5.63987771));
		points.push(new GLatLng(44.73157781,5.64398206));
		points.push(new GLatLng(44.72657853,5.645947160000001));
		points.push(new GLatLng(44.72410342,5.647101500000001));
		points.push(new GLatLng(44.72136401,5.66065178));
		points.push(new GLatLng(44.72468006,5.66799554));
		points.push(new GLatLng(44.72261622,5.691219710000001));
		points.push(new GLatLng(44.72444878,5.69932254));
		points.push(new GLatLng(44.72930040000001,5.70405906));
		points.push(new GLatLng(44.71537316,5.71792914));
		points.push(new GLatLng(44.71267139,5.73636502));
		points.push(new GLatLng(44.69696055,5.75532722));
		points.push(new GLatLng(44.69850098,5.77464442));
		points.push(new GLatLng(44.70556711,5.796839990000001));
		points.push(new GLatLng(44.70678092,5.80147224));
		points.push(new GLatLng(44.70578849,5.808973820000001));
		points.push(new GLatLng(44.70500558,5.81267454));
		points.push(new GLatLng(44.70098124,5.82546431));
		points.push(new GLatLng(44.68795391,5.82862862));
		points.push(new GLatLng(44.68188831,5.81718419));
		points.push(new GLatLng(44.67990517,5.81327561));
		points.push(new GLatLng(44.67812354,5.809253620000001));
		points.push(new GLatLng(44.67482764,5.801025100000001));
		points.push(new GLatLng(44.65329551,5.79062684));
		points.push(new GLatLng(44.65314398,5.78569886));
		points.push(new GLatLng(44.65427487,5.771125790000001));
		points.push(new GLatLng(44.66053135,5.75377461));
		points.push(new GLatLng(44.65107846,5.749150430000001));
		points.push(new GLatLng(44.6400883,5.72550891));
		points.push(new GLatLng(44.64997953,5.68350799));
		points.push(new GLatLng(44.6510548,5.65930933));
		points.push(new GLatLng(44.6552136,5.65154747));
		points.push(new GLatLng(44.65289757,5.649241500000001));
		points.push(new GLatLng(44.65108123,5.64171927));
		points.push(new GLatLng(44.64781922,5.640303900000001));
		points.push(new GLatLng(44.62425849,5.642850480000001));
		points.push(new GLatLng(44.61937769,5.649468270000001));
		points.push(new GLatLng(44.60992845,5.646100420000001));
		points.push(new GLatLng(44.60921967,5.63703629));
		points.push(new GLatLng(44.59496877,5.62748081));
		points.push(new GLatLng(44.58662316,5.626324070000001));
		points.push(new GLatLng(44.58586142,5.62199691));
		points.push(new GLatLng(44.57182724,5.613897460000001));
		points.push(new GLatLng(44.56834686,5.607146720000001));
		points.push(new GLatLng(44.56665606,5.60649425));
		points.push(new GLatLng(44.56346648,5.60448294));
		points.push(new GLatLng(44.54327587,5.59725483));
		points.push(new GLatLng(44.53560419,5.61247712));
		points.push(new GLatLng(44.53277487,5.61499127));
		points.push(new GLatLng(44.53435835,5.62765643));
		points.push(new GLatLng(44.52206109000001,5.642700960000001));
		points.push(new GLatLng(44.52007944,5.64633357));
		points.push(new GLatLng(44.50494742,5.66305166));
		points.push(new GLatLng(44.50189697,5.664506220000002));
		points.push(new GLatLng(44.50197745,5.659769400000002));
		points.push(new GLatLng(44.49932769000001,5.65124943));
		points.push(new GLatLng(44.5021034,5.633201520000001));
		points.push(new GLatLng(44.49777299,5.62633268));
		points.push(new GLatLng(44.49443854,5.62496813));
		points.push(new GLatLng(44.4746376,5.61775157));
		points.push(new GLatLng(44.46549891,5.603644500000001));
		points.push(new GLatLng(44.46626788,5.598975870000001));
		points.push(new GLatLng(44.47658464,5.56910222));
		points.push(new GLatLng(44.47524748,5.56468855));
		points.push(new GLatLng(44.47430178,5.5604245));
		points.push(new GLatLng(44.47989994,5.54971888));
		points.push(new GLatLng(44.4821208,5.54607416));
		points.push(new GLatLng(44.4915104,5.51102709));
		points.push(new GLatLng(44.49202170000001,5.50641492));
		points.push(new GLatLng(44.49121554,5.48313217));
		points.push(new GLatLng(44.49425879,5.4749167));
		points.push(new GLatLng(44.50000014,5.47084829));
		points.push(new GLatLng(44.50033576,5.46633981));
		points.push(new GLatLng(44.49815661,5.45784361));
		points.push(new GLatLng(44.48852333000001,5.45890451));
		points.push(new GLatLng(44.48614196,5.46035768));
		points.push(new GLatLng(44.48282353,5.46153113));
		points.push(new GLatLng(44.47351974,5.46682019));
		points.push(new GLatLng(44.46858702,5.46021256));
		points.push(new GLatLng(44.45205092,5.46383064));
		points.push(new GLatLng(44.44865543,5.4648343));
		points.push(new GLatLng(44.43880376,5.49549167));
		points.push(new GLatLng(44.43095117,5.49502596));
		points.push(new GLatLng(44.42821977,5.493616780000001));
		points.push(new GLatLng(44.42896844,5.48604758));
		points.push(new GLatLng(44.42288004,5.48150002));
		points.push(new GLatLng(44.42094437,5.47272701));
		points.push(new GLatLng(44.43355226,5.4385865));
		points.push(new GLatLng(44.43316685,5.43375468));
		points.push(new GLatLng(44.42477085,5.41839865));
		points.push(new GLatLng(44.42158211,5.42042172));
		points.push(new GLatLng(44.41166437,5.432848440000001));
		points.push(new GLatLng(44.39167874,5.44170183));
		points.push(new GLatLng(44.38126719000001,5.44262267));
		points.push(new GLatLng(44.37533182,5.43134165));
		points.push(new GLatLng(44.36911915,5.43495251));
		points.push(new GLatLng(44.36795239,5.43929194));
		points.push(new GLatLng(44.36774913,5.44392267));
		points.push(new GLatLng(44.36723931000001,5.46278841));
		points.push(new GLatLng(44.35451832,5.46704875));
		points.push(new GLatLng(44.35135283,5.46885592));
		points.push(new GLatLng(44.35022299,5.48158606));
		points.push(new GLatLng(44.33971908000001,5.4904289));
		points.push(new GLatLng(44.33713484,5.49294394));
		points.push(new GLatLng(44.34417526,5.50313248));
		points.push(new GLatLng(44.34952848,5.520565720000001));
		points.push(new GLatLng(44.34451611,5.52704233));
		points.push(new GLatLng(44.3428804,5.53621743));
		points.push(new GLatLng(44.33107503,5.54106322));
		points.push(new GLatLng(44.33077685,5.550313260000001));
		points.push(new GLatLng(44.33415232,5.558254730000001));
		points.push(new GLatLng(44.33285777,5.56675729));
		points.push(new GLatLng(44.33347043,5.57130641));
		points.push(new GLatLng(44.33229699,5.58297536));
		points.push(new GLatLng(44.33203586,5.58692257));
		points.push(new GLatLng(44.33217841,5.588183410000001));
		points.push(new GLatLng(44.33294568,5.62036654));
		points.push(new GLatLng(44.33521875,5.62379684));
		points.push(new GLatLng(44.33394156,5.628261670000001));
		points.push(new GLatLng(44.32785278,5.6302133));
		points.push(new GLatLng(44.31577168,5.61322447));
		points.push(new GLatLng(44.30611767,5.60831479));
		points.push(new GLatLng(44.30937861,5.61606183));
		points.push(new GLatLng(44.30114921,5.629331260000001));
		points.push(new GLatLng(44.30087956,5.633802030000001));
		points.push(new GLatLng(44.29650539000001,5.639774430000001));
		points.push(new GLatLng(44.29164106,5.6357432));
		points.push(new GLatLng(44.28938675,5.632603060000001));
		points.push(new GLatLng(44.28283605,5.6328607));
		points.push(new GLatLng(44.27039498,5.646375660000001));
		points.push(new GLatLng(44.26708869,5.64678301));
		points.push(new GLatLng(44.27422516,5.671678080000001));
		points.push(new GLatLng(44.27588810000001,5.67560955));
		points.push(new GLatLng(44.26882939000001,5.68449713));
		points.push(new GLatLng(44.26606339,5.68665143));
		points.push(new GLatLng(44.26135115,5.68005989));
		points.push(new GLatLng(44.25585870000001,5.67424984));
		points.push(new GLatLng(44.24566576,5.67264583));
		points.push(new GLatLng(44.24016456,5.673309900000001));
		points.push(new GLatLng(44.23367015,5.68202652));
		points.push(new GLatLng(44.23069144,5.68113665));
		points.push(new GLatLng(44.21342046,5.67673588));
		points.push(new GLatLng(44.19720139,5.6858976));
		points.push(new GLatLng(44.19142862,5.676036820000001));
		points.push(new GLatLng(44.18957275,5.651587250000001));
		points.push(new GLatLng(44.18623059,5.65229051));
		points.push(new GLatLng(44.17051906,5.643906030000001));
		points.push(new GLatLng(44.16744568,5.645839240000001));
		points.push(new GLatLng(44.16348712,5.68272704));
		points.push(new GLatLng(44.16062709,5.68149396));
		points.push(new GLatLng(44.14609138,5.67860981));
		points.push(new GLatLng(44.14731963,5.67405795));
		points.push(new GLatLng(44.1481857,5.64532499));
		points.push(new GLatLng(44.14923554,5.64067442));
		points.push(new GLatLng(44.15057666,5.63114237));
		points.push(new GLatLng(44.15394219000001,5.63201212));
		points.push(new GLatLng(44.16628303,5.638794870000001));
		points.push(new GLatLng(44.17408801000001,5.6297726));
		points.push(new GLatLng(44.17862254,5.616956490000001));
		points.push(new GLatLng(44.19070353,5.60932749));
		points.push(new GLatLng(44.19149716,5.60205642));
		points.push(new GLatLng(44.18900482,5.59906083));
		points.push(new GLatLng(44.18814259,5.57691146));
		points.push(new GLatLng(44.17090292,5.56437092));
		points.push(new GLatLng(44.16872291,5.56809724));
		points.push(new GLatLng(44.1551508,5.5811963));
		points.push(new GLatLng(44.14861341,5.57042299));
		points.push(new GLatLng(44.14964536,5.55133478));
		points.push(new GLatLng(44.14924109,5.55131181));
		points.push(new GLatLng(44.13326807000001,5.54214555));
		points.push(new GLatLng(44.12395487,5.51108694));
		points.push(new GLatLng(44.11775601,5.50761658));
		points.push(new GLatLng(44.11571787,5.49878417));
		points.push(new GLatLng(44.11543833,5.493834920000001));
		points.push(new GLatLng(44.11922732,5.45471243));
		points.push(new GLatLng(44.12113752,5.45115774));
		points.push(new GLatLng(44.13675373,5.44756921));
		points.push(new GLatLng(44.13794467000001,5.44303658));
		points.push(new GLatLng(44.1420655,5.43669007));
		points.push(new GLatLng(44.15225128,5.4357485));
		points.push(new GLatLng(44.15151152,5.43105881));
		points.push(new GLatLng(44.15004144,5.42291632));
		points.push(new GLatLng(44.15465066,5.4158325));
		points.push(new GLatLng(44.15233755,5.39694743));
		points.push(new GLatLng(44.15528659,5.38323382));
		points.push(new GLatLng(44.15879684,5.3831979));
		points.push(new GLatLng(44.17926960000001,5.38663911));
		points.push(new GLatLng(44.19238648,5.38128113));
		points.push(new GLatLng(44.19906425,5.3831793));
		points.push(new GLatLng(44.20118611,5.38453199));
		points.push(new GLatLng(44.20291315,5.38035962));
		points.push(new GLatLng(44.20513158,5.37666375));
		points.push(new GLatLng(44.20668054,5.37237997));
		points.push(new GLatLng(44.21342349,5.355703420000001));
		points.push(new GLatLng(44.20396688,5.3357596));
		points.push(new GLatLng(44.20919452,5.31834806));
		points.push(new GLatLng(44.20878226000001,5.30407779));
		points.push(new GLatLng(44.2053941,5.303298240000001));
		points.push(new GLatLng(44.20691995,5.29942667));
		points.push(new GLatLng(44.21464850000001,5.29181237));
		points.push(new GLatLng(44.21979919,5.28067082));
		points.push(new GLatLng(44.22099719,5.2762789));
		points.push(new GLatLng(44.23005745,5.25650247));
		points.push(new GLatLng(44.231132,5.25265354));
		points.push(new GLatLng(44.23111583,5.24853552));
		points.push(new GLatLng(44.23070204,5.24450967));
		points.push(new GLatLng(44.23082711,5.24044901));
		points.push(new GLatLng(44.2273124,5.23998057));
		points.push(new GLatLng(44.21323470000001,5.23814271));
		points.push(new GLatLng(44.21442475,5.20876807));
		points.push(new GLatLng(44.22086072,5.175614020000001));
		points.push(new GLatLng(44.22530758,5.16790451));
		points.push(new GLatLng(44.22635728,5.16350258));
		points.push(new GLatLng(44.23524453,5.14999221));
		points.push(new GLatLng(44.23831084,5.15181069));
		points.push(new GLatLng(44.24287369,5.15874683));
		points.push(new GLatLng(44.24559057,5.161548670000001));
		points.push(new GLatLng(44.24894196,5.1620793));
		points.push(new GLatLng(44.26561885,5.160522180000001));
		points.push(new GLatLng(44.26916777,5.14745126));
		points.push(new GLatLng(44.28188020000001,5.15065185));
		points.push(new GLatLng(44.29224608,5.168418730000001));
		points.push(new GLatLng(44.29873386,5.17010991));
		points.push(new GLatLng(44.30201034,5.16974944));
		points.push(new GLatLng(44.3082111,5.17283011));
		points.push(new GLatLng(44.31412712,5.16884024));
		points.push(new GLatLng(44.31485524,5.16643298));
		points.push(new GLatLng(44.31338682000001,5.16197313));
		points.push(new GLatLng(44.31014706,5.15326585));
		points.push(new GLatLng(44.300652,5.14950807));
		points.push(new GLatLng(44.28036309000001,5.10964624));
		points.push(new GLatLng(44.28393431,5.08647491));
		points.push(new GLatLng(44.28408532,5.07651234));
		points.push(new GLatLng(44.28694032000001,5.07392033));
		points.push(new GLatLng(44.30761603,5.06023919));
		points.push(new GLatLng(44.30539553,5.0565097));
		points.push(new GLatLng(44.29789473,5.029502680000001));
		points.push(new GLatLng(44.29677833,5.02477538));
		points.push(new GLatLng(44.29224199,5.01714365));
		points.push(new GLatLng(44.2910729,5.01307849));
		points.push(new GLatLng(44.28536951,5.00272678));
		points.push(new GLatLng(44.28576974,4.98959451));
		points.push(new GLatLng(44.28551901,4.9854608));
		points.push(new GLatLng(44.27942773,4.97168853));
		points.push(new GLatLng(44.2777279,4.96755174));
		points.push(new GLatLng(44.26940800000001,4.94152093));
		points.push(new GLatLng(44.26245434,4.932023440000001));
		points.push(new GLatLng(44.26210029,4.92722478));
		points.push(new GLatLng(44.25947535,4.90348164));
		points.push(new GLatLng(44.26427806,4.901283640000001));
		points.push(new GLatLng(44.26440522000001,4.89697012));
		points.push(new GLatLng(44.26177252000001,4.88025051));
		points.push(new GLatLng(44.26026929,4.87602662));
		points.push(new GLatLng(44.24598836,4.85708711));
		points.push(new GLatLng(44.24437011,4.8531728));
		points.push(new GLatLng(44.22844516,4.82533888));
		points.push(new GLatLng(44.22888819,4.82089182));
		points.push(new GLatLng(44.23242188,4.81343977));
		points.push(new GLatLng(44.24205937,4.8121353));
		points.push(new GLatLng(44.24520301,4.81311281));
		points.push(new GLatLng(44.25802827,4.81250974));
		points.push(new GLatLng(44.26920516,4.80399769));
		points.push(new GLatLng(44.27483985,4.80585918));
		points.push(new GLatLng(44.27761489,4.80447914));
		points.push(new GLatLng(44.28078966,4.80292607));
		points.push(new GLatLng(44.30390065,4.80456242));
		points.push(new GLatLng(44.30355393,4.79998586));
		points.push(new GLatLng(44.31712445,4.78095629));
		points.push(new GLatLng(44.31754217,4.77190205));
		points.push(new GLatLng(44.32509913,4.76299181));
		points.push(new GLatLng(44.3253267,4.75840217));
		points.push(new GLatLng(44.32659207,4.72166054));
		points.push(new GLatLng(44.32065361000001,4.71301358));
		points.push(new GLatLng(44.32069304,4.67988285));
		points.push(new GLatLng(44.32835019,4.65488354));
		points.push(new GLatLng(44.32980803,4.65060829));
		points.push(new GLatLng(44.33423774,4.64958548));
		points.push(new GLatLng(44.34828498,4.64682798));
		points.push(new GLatLng(44.37307539,4.64907308));
		points.push(new GLatLng(44.39546029,4.66348033));
		points.push(new GLatLng(44.39895014,4.6643648));
		points.push(new GLatLng(44.40432499,4.66333189));
		points.push(new GLatLng(44.40702984,4.66305454));
		points.push(new GLatLng(44.43301812,4.66869853));
		points.push(new GLatLng(44.43670486,4.67597096));
		points.push(new GLatLng(44.4382778,4.68025554));
		points.push(new GLatLng(44.44051355,4.689289720000001));
		points.push(new GLatLng(44.44579182,4.69528867));
		points.push(new GLatLng(44.46938844,4.70041));
		points.push(new GLatLng(44.47295776,4.70010758));
		points.push(new GLatLng(44.4800857,4.69953988));
		points.push(new GLatLng(44.49235091,4.68942135));
		points.push(new GLatLng(44.50293751,4.68787785));
		points.push(new GLatLng(44.51669928,4.69309337));
		points.push(new GLatLng(44.52456323,4.70311952));
		points.push(new GLatLng(44.52788854,4.70454238));
		points.push(new GLatLng(44.53441959,4.70792446));
		points.push(new GLatLng(44.53571347000001,4.70341407));
		points.push(new GLatLng(44.54623199,4.6924947));
		points.push(new GLatLng(44.56307756000001,4.69573063));
		points.push(new GLatLng(44.56360089,4.70445034));
		points.push(new GLatLng(44.57313397,4.70548026));
		points.push(new GLatLng(44.57631736,4.70639497));
		points.push(new GLatLng(44.58200632,4.71086506));
		points.push(new GLatLng(44.58468976,4.72861859));
		points.push(new GLatLng(44.58589305,4.73286121));
		points.push(new GLatLng(44.58667438,4.73746622));
		points.push(new GLatLng(44.58877992,4.74116864));
		points.push(new GLatLng(44.59187607,4.74112492));
		points.push(new GLatLng(44.6008957,4.74419367));
		points.push(new GLatLng(44.60239211,4.74040399));
		points.push(new GLatLng(44.61893661,4.75242547));
		points.push(new GLatLng(44.62183963,4.75421344));
		points.push(new GLatLng(44.63074331,4.758087380000001));
		points.push(new GLatLng(44.633358,4.76070786));
		points.push(new GLatLng(44.64263552000001,4.77290546));
		points.push(new GLatLng(44.65470037,4.77906438));
		points.push(new GLatLng(44.657758,4.77792422));
		points.push(new GLatLng(44.67884948,4.78157921));
		points.push(new GLatLng(44.68236712,4.78120288));
		points.push(new GLatLng(44.70599379,4.7719752));
		points.push(new GLatLng(44.71502825,4.7642155));
		points.push(new GLatLng(44.72902473,4.76402673));
		points.push(new GLatLng(44.73204528,4.76415761));
		points.push(new GLatLng(44.74847962,4.75950338));
		points.push(new GLatLng(44.7595836,4.769317200000001));
		points.push(new GLatLng(44.76798818,4.762368680000001));
		points.push(new GLatLng(44.77122076,4.7610434));
		points.push(new GLatLng(44.77359936000001,4.76176668));
		points.push(new GLatLng(44.77876571,4.7665375));
		points.push(new GLatLng(44.78037641,4.770663070000001));
		points.push(new GLatLng(44.78407585000001,4.78363615));
		points.push(new GLatLng(44.79405183,4.79553469));
		points.push(new GLatLng(44.80398477,4.79722256));
		points.push(new GLatLng(44.80598845,4.80098903));
		points.push(new GLatLng(44.81202801,4.80092639));
		points.push(new GLatLng(44.81478599,4.80838046));
		points.push(new GLatLng(44.81553227000001,4.8128257));
		points.push(new GLatLng(44.81738959,4.82147989));
		points.push(new GLatLng(44.83019501,4.82027842));
		points.push(new GLatLng(44.83949439,4.82332227));
		points.push(new GLatLng(44.84087172,4.83247772));
		points.push(new GLatLng(44.8413152,4.83714079));
		points.push(new GLatLng(44.84546847,4.84411805));
		points.push(new GLatLng(44.86187566,4.8475619));
		points.push(new GLatLng(44.86479928,4.84998487));
		points.push(new GLatLng(44.8695584,4.85676559));
		points.push(new GLatLng(44.87200226,4.859698));
		points.push(new GLatLng(44.87822952,4.86128285));
		points.push(new GLatLng(44.89653069000001,4.85432339));
		points.push(new GLatLng(44.90001428,4.85507552));
		points.push(new GLatLng(44.90993149000001,4.86890882));
		points.push(new GLatLng(44.91673231000001,4.871345080000001));
		points.push(new GLatLng(44.91992174,4.87236386));
		points.push(new GLatLng(44.93665766,4.88659271));
		points.push(new GLatLng(44.93959894,4.88587939));
		points.push(new GLatLng(44.94460753,4.88136749));
		points.push(new GLatLng(44.94743785,4.87921544));
		points.push(new GLatLng(44.95637078,4.87427497));
		points.push(new GLatLng(44.9586729,4.87081663));
		points.push(new GLatLng(44.96555939000001,4.86049355));
		points.push(new GLatLng(44.97790458000001,4.85307665));
		points.push(new GLatLng(44.97953608,4.85256698));
		points.push(new GLatLng(44.98308165,4.85218164));
		points.push(new GLatLng(44.99372637,4.85186279));
		points.push(new GLatLng(45.00198436000001,4.8424932));
		points.push(new GLatLng(45.00426625,4.83868862));
		points.push(new GLatLng(45.01098406000001,4.83770874));
		points.push(new GLatLng(45.01662618000002,4.8437097));
		points.push(new GLatLng(45.02337573000001,4.84411483));
		points.push(new GLatLng(45.02599627,4.84169463));
		points.push(new GLatLng(45.03791412000001,4.84195117));
		points.push(new GLatLng(45.04054609,4.8445575));
		points.push(new GLatLng(45.04751589,4.85391038));
		points.push(new GLatLng(45.05010379,4.85646496));
		points.push(new GLatLng(45.05594221000001,4.85973835));
		points.push(new GLatLng(45.05916477,4.85891927));
		points.push(new GLatLng(45.06405042000002,4.8530322));
		points.push(new GLatLng(45.06834940000001,4.83564946));
		points.push(new GLatLng(45.07285138,4.82915673));
		points.push(new GLatLng(45.07855141999999,4.82781266));
		points.push(new GLatLng(45.08402683,4.83045864));
		points.push(new GLatLng(45.08748313000001,4.83164252));
		points.push(new GLatLng(45.09800486,4.82959819));
		points.push(new GLatLng(45.10123707,4.82793848));
		points.push(new GLatLng(45.10399337000001,4.82502587));
		points.push(new GLatLng(45.10630846000001,4.82131551));
		points.push(new GLatLng(45.11145842,4.81478254));
		points.push(new GLatLng(45.11433821000001,4.81236996));
		points.push(new GLatLng(45.12247061,4.80403533));
		points.push(new GLatLng(45.12911691000001,4.80383554));
		points.push(new GLatLng(45.13127051,4.80412177));
		points.push(new GLatLng(45.13437085000001,4.8055435));
		points.push(new GLatLng(45.15424133000001,4.82857057));
		points.push(new GLatLng(45.15612829,4.82870601));
		points.push(new GLatLng(45.15852525,4.82696895));
		points.push(new GLatLng(45.16036863,4.82418927));
		points.push(new GLatLng(45.16122997,4.81952095));
		points.push(new GLatLng(45.16818209,4.80969138));
		points.push(new GLatLng(45.1749281,4.81023327));
		points.push(new GLatLng(45.17819619,4.81139671));
		points.push(new GLatLng(45.19080023,4.806765));
		points.push(new GLatLng(45.19373945000001,4.80490999));
		points.push(new GLatLng(45.20495234,4.81220659));
		points.push(new GLatLng(45.20813645000001,4.81031137));
		points.push(new GLatLng(45.22471158000001,4.80355975));
		points.push(new GLatLng(45.22813229,4.802311970000001));
		points.push(new GLatLng(45.24574349,4.80159074));
		points.push(new GLatLng(45.25884896,4.80883761));
		points.push(new GLatLng(45.2613276,4.80989107));
		points.push(new GLatLng(45.26648274,4.80998061));
		points.push(new GLatLng(45.26950615,4.80960553));
		points.push(new GLatLng(45.27253566,4.80976603));
		points.push(new GLatLng(45.28768932,4.80948531));
		points.push(new GLatLng(45.29065461,4.80889069));
		points.push(new GLatLng(45.29737579,4.80045489));
		points.push(new GLatLng(45.30079074,4.80921497));
		points.push(new GLatLng(45.30800569,4.85435756));
		points.push(new GLatLng(45.30895821000001,4.85880138));
		points.push(new GLatLng(45.30199673,4.8589822));
		points.push(new GLatLng(45.29852203,4.85860739));
		points.push(new GLatLng(45.2971305,4.87706095));
		points.push(new GLatLng(45.30515567,4.89724919));
		points.push(new GLatLng(45.31019645,4.90305752));
		points.push(new GLatLng(45.32041312,4.925230940000001));
		points.push(new GLatLng(45.32273894,4.928172));
		points.push(new GLatLng(45.32787141,4.94390266));
		points.push(new GLatLng(45.32859107,4.948147410000001));
		points.push(new GLatLng(45.32938285,4.95774233));
		points.push(new GLatLng(45.3362736,4.97393157));
		points.push(new GLatLng(45.33795354,4.978248690000001));
		points.push(new GLatLng(45.34341727999999,4.99036681));
		points.push(new GLatLng(45.3420756,5.00471275));
		points.push(new GLatLng(45.34223638,5.00964731));
		points.push(new GLatLng(45.32250187000001,5.0188024));
		points.push(new GLatLng(45.31929799000001,5.02064922));
		points.push(new GLatLng(45.31713129,5.02874778));
		points.push(new GLatLng(45.31811091,5.03290353));
		points.push(new GLatLng(45.31661978,5.05647174));
		points.push(new GLatLng(45.31363,5.05910621));
		points.push(new GLatLng(45.29859152,5.06635202));
		points.push(new GLatLng(45.29560053,5.06788826));
		points.push(new GLatLng(45.28577953,5.07051727));
		points.push(new GLatLng(45.28322839,5.07356516));
		points.push(new GLatLng(45.28183374999999,5.0754089));
		points.push(new GLatLng(45.28626279000002,5.08853189));
		points.push(new GLatLng(45.28785254000001,5.10790418));
		points.push(new GLatLng(45.29131447000001,5.11635361));
		points.push(new GLatLng(45.29732858,5.12099142));
		points.push(new GLatLng(45.29780109,5.130517030000001));
		points.push(new GLatLng(45.2982825,5.13536243));
		points.push(new GLatLng(45.296441,5.13878959));
		points.push(new GLatLng(45.28368408,5.13062211));
		points.push(new GLatLng(45.24544147,5.12218606));
		points.push(new GLatLng(45.24525492000001,5.14107462));
		points.push(new GLatLng(45.25631093,5.15310232));
		points.push(new GLatLng(45.24672795,5.16254264));
		points.push(new GLatLng(45.24840575,5.17654354));
		points.push(new GLatLng(45.22387629000001,5.19135119));
		points.push(new GLatLng(45.22049352,5.19964732));
		points.push(new GLatLng(45.21740666000001,5.20171702));
		points.push(new GLatLng(45.21755377000001,5.18267129));
		points.push(new GLatLng(45.21244498000001,5.17088443));
		points.push(new GLatLng(45.21013892,5.16741763));
		points.push(new GLatLng(45.19763634,5.16846115));
		points.push(new GLatLng(45.19444336000001,5.16977518));
		points.push(new GLatLng(45.18128289,5.17578634));
		points.push(new GLatLng(45.16729595999999,5.18803832));
		points.push(new GLatLng(45.16395861000001,5.18935583));
		points.push(new GLatLng(45.15716896,5.19120841));
		points.push(new GLatLng(45.14815209,5.184449));
		points.push(new GLatLng(45.14209855,5.1891884));
		points.push(new GLatLng(45.12853025,5.187564350000001));
		points.push(new GLatLng(45.12293323000001,5.18749494));
		points.push(new GLatLng(45.1201313,5.18689239));
		points.push(new GLatLng(45.10023081,5.16715249));
		points.push(new GLatLng(45.09843117,5.16289249));
		points.push(new GLatLng(45.08278883,5.15607613));
		points.push(new GLatLng(45.07790345000001,5.13541347));
		points.push(new GLatLng(45.07467613,5.134541140000001));
		points.push(new GLatLng(45.07278024,5.13833164));
		points.push(new GLatLng(45.0762811,5.14617949));
		points.push(new GLatLng(45.06629432,5.15809883));
		points.push(new GLatLng(45.06557484,5.16263482));
		points.push(new GLatLng(45.06872294,5.17083495));
		points.push(new GLatLng(45.0836884,5.18010951));
		points.push(new GLatLng(45.084217,5.2078095));
		points.push(new GLatLng(45.08328032000001,5.212347900000001));
		points.push(new GLatLng(45.08061411,5.22001104));
		points.push(new GLatLng(45.0799128,5.22416733));
		points.push(new GLatLng(45.07889124,5.226375770000001));
		points.push(new GLatLng(45.07721568,5.22749698));
		points.push(new GLatLng(45.0711644,5.231729180000001));
		points.push(new GLatLng(45.0677303,5.23985786));
		points.push(new GLatLng(45.06697808000001,5.2445184));
		points.push(new GLatLng(45.06073116000001,5.24654183));
		points.push(new GLatLng(45.05939463000001,5.26516698));
		points.push(new GLatLng(45.05616838,5.26633081));


		map.addOverlay(new GPolyline(points,"#FF6E01"));//, "#EF6329"*/
		//map.addOverlay(new GPolyline(points));
		return true;
	}
	function convCatTUrl(cat){
		var tmp="";
		//alert(cat)
		if(cat.indexOf("idoi") >= 0)
		{
			tmp = cat;
		}else{
			tmp = "type="+cat;
		}
		return tmp;
	}
	window.onload = function() {
		load();chargeID();
		GEvent.addListener(map, "moveend", function() {
		  /*var center = map.getCenter();
		  document.getElementById("message").innerHTML = center.toString();*/
		  getLimits();
		});
	};