var htmls=[];var gmarkers=[];var parkings=[];var i=0;var p=0;var onBoard=[];onBoard.parkings=false;var dataOnBoard=[];var map;var tooltip;var gIcons=[];var myIcon=new GIcon();myIcon.image="/images/common/google-map/16x16Num0.png";myIcon.iconSize=new GSize(24,35);myIcon.iconAnchor=new GPoint(12,16);myIcon.infoWindowAnchor=new GPoint(12,4);gIcons.lieux=myIcon;var myIcon=new GIcon();myIcon.image="/images/common/google-map/21x21NumBleu0.png";myIcon.iconSize=new GSize(21,28);myIcon.iconAnchor=new GPoint(12,35);myIcon.infoWindowAnchor=new GPoint(12,4);myIcon.type="PictoBleu";gIcons.lieuBleu=myIcon;var myIcon=new GIcon();myIcon.image="/images/common/google-map/PictoLieu.png";myIcon.iconSize=new GSize(24,35);myIcon.iconAnchor=new GPoint(12,35);myIcon.infoWindowAnchor=new GPoint(12,4);gIcons.lieuRouge=myIcon;var myIcon=new GIcon();myIcon.image="/images/common/google-map/PictoPresence.png";myIcon.iconSize=new GSize(24,35);myIcon.iconAnchor=new GPoint(12,35);myIcon.infoWindowAnchor=new GPoint(12,4);gIcons.lieuRougeMini=myIcon;var myIcon=new GIcon();myIcon.image="/images/common/google-map/16x16Parking.png";myIcon.iconSize=new GSize(16,16);myIcon.iconAnchor=new GPoint(8,16);myIcon.infoWindowAnchor=new GPoint(8,4);gIcons.parkings=myIcon;var myIcon=new GIcon();myIcon.image="/images/common/google-map/PictoBars.png";myIcon.iconSize=new GSize(24,35);myIcon.iconAnchor=new GPoint(12,35);myIcon.infoWindowAnchor=new GPoint(12,4);gIcons.BAR=myIcon;var myIcon=new GIcon();myIcon.image="/images/common/google-map/21x21NumBleu1.png";myIcon.iconSize=new GSize(21,28);myIcon.iconAnchor=new GPoint(12,15);myIcon.infoWindowAnchor=new GPoint(12,14);gIcons.NUM=myIcon;gIcons.CAS=new GIcon(gIcons.BAR,"/images/common/google-map/PictoCasinos.png");gIcons.CCU=new GIcon(gIcons.BAR,"/images/common/google-map/PictoCentresCulturels.png");gIcons.DIS=new GIcon(gIcons.BAR,"/images/common/google-map/PictoDiscotheque.png");gIcons.ENF=new GIcon(gIcons.BAR,"/images/common/google-map/PictoEnfants.png");gIcons.EXP=new GIcon(gIcons.BAR,"/images/common/google-map/PictoExposSalons.png");gIcons.GAL=new GIcon(gIcons.BAR,"/images/common/google-map/PictoGaleriesDart.png");gIcons.GRA=new GIcon(gIcons.BAR,"/images/common/google-map/PictoGrandsMagasins.png");gIcons.HOT=new GIcon(gIcons.BAR,"/images/common/google-map/PictoHotels.png");gIcons.LIB=new GIcon(gIcons.BAR,"/images/common/google-map/PictoLieuxPublicsBalades.png");gIcons.MUS=new GIcon(gIcons.BAR,"/images/common/google-map/PictoMusees.png");gIcons.RES=new GIcon(gIcons.BAR,"/images/common/google-map/PictoRestaurant.png");gIcons.SPE=new GIcon(gIcons.BAR,"/images/common/google-map/PictoSalles.png");gIcons.SPO=new GIcon(gIcons.BAR,"/images/common/google-map/PictoSportEtDetente.png");gIcons.STH=new GIcon(gIcons.BAR,"/images/common/google-map/PictoTheatre.png");gIcons.ALI=new GIcon(gIcons.BAR,"/images/common/google-map/PictoAlimentation.png");gIcons.BEA=new GIcon(gIcons.BAR,"/images/common/google-map/PictoBeauteSante.png");gIcons.CIN=new GIcon(gIcons.BAR,"/images/common/google-map/PictoCinema.png");gIcons.CLR=new GIcon(gIcons.BAR,"/images/common/google-map/PictoAlimentation.png");gIcons.EDU=new GIcon(gIcons.BAR,"/images/common/google-map/PictoAlimentation.png");gIcons.MAR=new GIcon(gIcons.BAR,"/images/common/google-map/PictoMarches.png");gIcons.VID=new GIcon(gIcons.BAR,"/images/common/google-map/PictoShopping.png");gIcons.SPF=new GIcon(gIcons.BAR,"/images/common/google-map/PictoSportsFamiliaux.png");gIcons.TRA=new GIcon(gIcons.BAR,"/images/common/google-map/PictoTransports.png");gIcons.LIE=new GIcon(gIcons.BAR,"/images/common/google-map/PictoLieuxPublicsAdmin.png");gIcons["1"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu1.png");gIcons["2"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu2.png");gIcons["3"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu3.png");gIcons["4"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu4.png");gIcons["5"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu5.png");gIcons["6"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu6.png");gIcons["7"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu7.png");gIcons["8"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu8.png");gIcons["9"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu9.png");gIcons["10"]=new GIcon(gIcons.NUM,"/images/common/google-map/21x21NumBleu10.png");function showTooltip(c){tooltip.innerHTML=c.tooltip;var b=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.fromDivPixelToLatLng(new GPoint(0,0),true),map.getZoom());var f=map.getCurrentMapType().getProjection().fromLatLngToPixel(c.getPoint(),map.getZoom());var d=c.getIcon().iconAnchor;var e=c.getIcon().iconSize.width;var a=tooltip.clientHeight;var g=new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(f.x-b.x-d.x+e,f.y-b.y-d.y-a));g.apply(tooltip);tooltip.style.visibility="visible"}function createMarkerTooltip(a,d,c){var b=new GMarker(a,c);b.tooltip="<div class=tooltip>"+d+"</div>";GEvent.addListener(b,"mouseover",function(){showTooltip(b)});GEvent.addListener(b,"mouseout",function(){tooltip.style.visibility="hidden"});return b}function createMarkerSimple(a,c){var d=c;d.image=d.image.replace("Num"+i,"Num"+(i+1));i++;d.image=d.image.replace("Num"+i,"Num"+(i+1));i++;var b=new GMarker(a,d);return b}function loader(){if(document.getElementById("loadingMessage").style.display=="none"){document.getElementById("loadingMessage").style.display="block"}else{document.getElementById("loadingMessage").style.display="none"}}function toggleAllLieux(f){var b=f.split("#");var d=b[0];var h=b[1];var a=b[2];var g=b[3];var c=g.split(",");for(m=0;m<c.length;m++){var e=c[m];if(onBoard[e]!=undefined&&e!=d){for(n=0;n<dataOnBoard[e].length;n++){map.removeOverlay(dataOnBoard[e][n])}onBoard[e]=false}}toggleLieu(d,h,a)}function toggleLieu(b,c,a){if(onBoard[b]==undefined){loader();c=c.replace("CODETYLIEU",a);GDownloadUrl(c,function(j,h){var f=GXml.parse(j);var k=f.documentElement.getElementsByTagName("marker");dataOnBoard[b]=[];for(var g=0;g<k.length;g++){var d=new GLatLng(parseFloat(k[g].getAttribute("lat")),parseFloat(k[g].getAttribute("lng")));if(gIcons[b]==undefined){icone=gIcons.lieuRougeMini}else{icone=gIcons[b]}var e=k[g].getAttribute("avis");if(e!=""){marker=createMarker(d,[k[g].getAttribute("details"),k[g].getAttribute("avis")],[k[g].getAttribute("titleDetails"),k[g].getAttribute("titleAvis")],icone)}else{marker=createMarker(d,[k[g].getAttribute("details")],[k[g].getAttribute("titleDetails")],icone)}map.addOverlay(marker);dataOnBoard[b].push(marker)}onBoard[b]=true;loader()})}else{for(m=0;m<dataOnBoard[b].length;m++){if(onBoard[b]==true){map.removeOverlay(dataOnBoard[b][m])}else{map.addOverlay(dataOnBoard[b][m])}}if(onBoard[b]==false){onBoard[b]=true}else{onBoard[b]=false}}}function createMarker(a,g,e,c){var h=c;if(h.type="PictoBleu"){h.image=h.image.replace("NumBleu"+i,"NumBleu"+(i+1))}else{h.image=h.image.replace("Num"+i,"Num"+(i+1))}var b=new GMarker(a,h);var f=[];for(var d=0;d<g.length;d++){f.push(new GInfoWindowTab(e[d],"<div id='gMapInfoWindow' style='line-height: 120% !important; width:230px'>"+g[d]+"</div>"))}GEvent.addListener(b,"mouseover",function(){b.openInfoWindowTabsHtml(f)});htmls[i]=f;gmarkers[i]=b;i++;return b}function showParkings(){if(onBoard.parkings==false){onBoard.parkings=true;for(m=0;m<parkings.length;m++){map.addOverlay(parkings[m])}}else{onBoard.parkings=false;for(m=0;m<parkings.length;m++){map.removeOverlay(parkings[m])}}};