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 gIconsV3=[];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="http://photos.cityvox.com/photos_original/77/252/457805.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="http://photos.cityvox.com/photos_original/146/39/468882.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="http://photos.cityvox.com/photos_original/56/38/468536.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="http://photos.cityvox.com/photos_original/150/39/468886.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="http://photos.cityvox.com/photos_original/151/39/468887.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="http://photos.cityvox.com/photos_original/77/252/457805.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,"http://photos.cityvox.com/photos_original/152/39/468888.png");gIcons.CCU=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/153/39/468889.png");gIcons.DIS=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/154/39/468890.png");gIcons.ENF=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/155/39/468891.png");gIcons.EXP=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/156/39/468892.png");gIcons.GAL=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/157/39/468893.png");gIcons.GRA=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/158/39/468894.png");gIcons.HOT=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/159/39/468895.png");gIcons.LIB=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/160/39/468896.png");gIcons.MUS=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/161/39/468897.png");gIcons.RES=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/162/39/468898.png");gIcons.SPE=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/164/39/468900.png");gIcons.SPO=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/165/39/468901.png");gIcons.STH=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/166/39/468902.png");gIcons.ALI=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/167/39/468903.png");gIcons.BEA=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/168/39/468904.png");gIcons.CIN=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/169/39/468905.png");gIcons.CLR=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/167/39/468903.png");gIcons.EDU=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/167/39/468903.png");gIcons.MAR=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/172/39/468908.png");gIcons.VID=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/173/39/468909.png");gIcons.SPF=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/174/39/468910.png");gIcons.TRA=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/176/39/468912.png");gIcons.LIE=new GIcon(gIcons.BAR,"http://photos.cityvox.com/photos_original/177/39/468913.png");gIcons["1"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/77/252/457805.png");gIcons["2"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/80/252/457808.png");gIcons["3"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/82/252/457810.png");gIcons["4"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/83/252/457811.png");gIcons["5"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/85/252/457813.png");gIcons["6"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/87/252/457815.png");gIcons["7"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/97/252/457825.png");gIcons["8"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/100/252/457828.png");gIcons["9"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/102/252/457830.png");gIcons["10"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/106/252/457834.png");gIcons["11"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/109/252/457837.png");gIcons["12"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/112/252/457840.png");gIcons["13"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/114/252/457842.png");gIcons["14"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/120/252/457848.png");gIcons["15"]=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/122/252/457850.png");gIconsV3["1"]="http://photos.cityvox.com/photos_original/77/252/457805.png";gIconsV3["2"]="http://photos.cityvox.com/photos_original/80/252/457808.png";gIconsV3["3"]="http://photos.cityvox.com/photos_original/82/252/457810.png";gIconsV3["4"]="http://photos.cityvox.com/photos_original/83/252/457811.png";gIconsV3["5"]="http://photos.cityvox.com/photos_original/85/252/457813.png";gIconsV3["6"]="http://photos.cityvox.com/photos_original/87/252/457815.png";gIconsV3["7"]="http://photos.cityvox.com/photos_original/97/252/457825.png";gIconsV3["8"]="http://photos.cityvox.com/photos_original/100/252/457828.png";gIconsV3["9"]="http://photos.cityvox.com/photos_original/102/252/457830.png";gIconsV3["10"]="http://photos.cityvox.com/photos_original/106/252/457834.png";gIconsV3["11"]="http://photos.cityvox.com/photos_original/109/252/457837.png";gIconsV3["12"]="http://photos.cityvox.com/photos_original/112/252/457840.png";gIconsV3["13"]="http://photos.cityvox.com/photos_original/114/252/457842.png";gIconsV3["14"]="http://photos.cityvox.com/photos_original/120/252/457848.png";gIconsV3["15"]="http://photos.cityvox.com/photos_original/122/252/457850.png";gIcons.TH1=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/17/15/462609.png");gIcons.TH2=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/21/15/462613.png");gIcons.TH3=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/23/15/462615.png");gIcons.TH4=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/25/15/462617.png");gIcons.TH5=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/26/15/462618.png");gIcons.TH6=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/28/15/462620.png");gIcons.TH7=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/30/15/462622.png");gIcons.TH8=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/31/15/462623.png");gIcons.TH9=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/32/15/462624.png");gIcons.TH10=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/34/15/462626.png");gIcons.CDC1=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/35/15/462627.png");gIcons.CDC2=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/36/15/462628.png");gIcons.CDC3=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/37/15/462629.png");gIcons.CDC4=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/38/15/462630.png");gIcons.CDC5=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/39/15/462631.png");gIcons.CDC6=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/40/15/462632.png");gIcons.CDC7=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/42/15/462634.png");gIcons.CDC8=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/43/15/462635.png");gIcons.CDC9=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/44/15/462636.png");gIcons.CDC10=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/45/15/462637.png");gIcons.EVM1=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/46/15/462638.png");gIcons.EVM2=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/47/15/462639.png");gIcons.EVM3=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/48/15/462640.png");gIcons.EVM4=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/49/15/462641.png");gIcons.EVM5=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/51/15/462643.png");gIcons.EVM6=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/52/15/462644.png");gIcons.EVM7=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/53/15/462645.png");gIcons.EVM8=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/54/15/462646.png");gIcons.EVM9=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/55/15/462647.png");gIcons.EVM10=new GIcon(gIcons.NUM,"http://photos.cityvox.com/photos_original/56/15/462648.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])}}};