 
  //****************Création Polygone Quartier Berrait******************
		quartierPoly = new GPolygon([new GLatLng(45.181855,5.703106),new GLatLng(45.181795,5.705681),new GLatLng(45.181553,5.714478),new GLatLng(45.182082,5.71538),new GLatLng(45.181855,5.716903),new GLatLng(45.184063,5.717676),new GLatLng(45.196706,5.711646),new GLatLng(45.196812,5.711002),new GLatLng(45.194634,5.710616),new GLatLng(45.192668,5.708234),new GLatLng(45.192593,5.703299),new GLatLng(45.181855,5.703106)], "#ed1d18", 5, 0.4, "#ff0000", 0);
  	//*************************************
	catAffiche = null;
	var myIcons = [];
	var iconRose = new GIcon(G_DEFAULT_ICON, "squelettes/img/roseicon.png");
		iconRose.iconSize = new GSize(19,28);
		iconRose.shadow = '';
		iconRose.iconAnchor = new GPoint(9.5,28);
		
	var iconBleu = new GIcon(G_DEFAULT_ICON, "squelettes/img/bleuicon.png");
		iconBleu.iconSize = new GSize(19,28);
		iconBleu.shadow = '';
		iconBleu.iconAnchor = new GPoint(9.5,28);
		
	var iconRouge = new GIcon(G_DEFAULT_ICON, "squelettes/img/rougeicon.png");
		iconRouge.iconSize = new GSize(19,28);
		iconRouge.shadow = '';
		iconRouge.iconAnchor = new GPoint(9.5,28);
		
	var iconBeige = new GIcon(G_DEFAULT_ICON, "squelettes/img/beigeicon.png");
		iconBeige.iconSize = new GSize(19,28);
		iconBeige.shadow = '';
		iconBeige.iconAnchor = new GPoint(9.5,28);
		
	var iconOrange = new GIcon(G_DEFAULT_ICON, "squelettes/img/orangeicon.png");
		iconOrange.iconSize = new GSize(19,28);
		iconOrange.shadow = '';
		iconOrange.iconAnchor = new GPoint(9.5,28);
		
	var iconVert = new GIcon(G_DEFAULT_ICON, "squelettes/img/verticon.png");
		iconVert.iconSize = new GSize(19,28);
		iconVert.shadow = '';
		iconVert.iconAnchor = new GPoint(9.5,28);
		
	var iconViolet = new GIcon(G_DEFAULT_ICON, "squelettes/img/violeticon.png");
		iconViolet.iconSize = new GSize(19,28);
		iconViolet.shadow = '';
		iconViolet.iconAnchor = new GPoint(9.5,28);
		
		var iconCross = new GIcon(G_DEFAULT_ICON, "squelettes/img/cross.png");
		iconCross.iconSize = new GSize(50,50);
		iconCross.shadow = '';
		iconCross.iconAnchor = new GPoint(25,25);
		
	myIcons["Loisir"] = iconRose;
	myIcons["Ecole"] = iconBleu;
	myIcons["UQB"] = iconRouge;
	myIcons["Mémo"] = iconViolet;
	myIcons["Social"] = iconVert;
	myIcons["Sénior"] = iconBeige;
	myIcons["Sport"] = iconOrange;
	myIcons["Projet en cours"] = iconVert;
	myIcons["Projet passé"] = iconOrange;
	//textualZoom
 	function TextualZoomControl() {
    }
    TextualZoomControl.prototype = new GControl();

    // Creates a one DIV for each of the buttons and places them in a container
    // DIV which is returned as our control element. We add the control to
    // to the map container and return the element for the map class to
    // position properly.
    TextualZoomControl.prototype.initialize = function(map) {
      var container = document.createElement("div");

      var zoomInDiv = document.createElement("div");
      //this.setButtonStyle_(zoomInDiv);
	  this.setButtonStyle_(zoomInDiv);
      container.appendChild(zoomInDiv);
      zoomInDiv.innerHTML = '<img src="squelettes/img/map_zoom_plus.png">';
      GEvent.addDomListener(zoomInDiv, "click", function() {
        map.zoomIn();
		   		if(map.getZoom()==13 && page!="ajout"){ 
				map.addOverlay(quartierPoly);
				initMarkers(markers,catAffiche)};
      });

      var zoomOutDiv = document.createElement("div");
      this.setButtonStyle_(zoomOutDiv);
      container.appendChild(zoomOutDiv);
	  zoomOutDiv.innerHTML = '<img src="squelettes/img/map_zoom_moins.png">';
      GEvent.addDomListener(zoomOutDiv, "click", function() {
        map.zoomOut();
			//if(map.getZoom()<14){map.removeOverlay(MarkersArray[1]);};
			if(map.getZoom()==12  && page!="ajout"){map.clearOverlays()};
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    TextualZoomControl.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(0, 50));
    }

    // Sets the proper CSS for the given button element.
    TextualZoomControl.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
	 button.style.padding = "0px";
     button.style.marginBottom = "-5px";
	 button.style.marginTop = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

	//moveUp
	function MoveUpArrow() {
    }
    MoveUpArrow.prototype = new GControl();

    // Creates a one DIV for each of the buttons and places them in a container
    // DIV which is returned as our control element. We add the control to
    // to the map container and return the element for the map class to
    // position properly.
    MoveUpArrow.prototype.initialize = function(map) {
      var container = document.createElement("div");

    var moveUp = document.createElement("div");
      this.setButtonStyle_(moveUp);
      container.appendChild(moveUp);
	  moveUp.innerHTML = '<img src="squelettes/img/map_arrow_t.png">';
	  movementUp = new GSize(0,60);
      GEvent.addDomListener(moveUp, "click", function() {
       // map.panDirection(0, 1) ;
	   map.closeExtInfoWindow();
	   map.panBy(movementUp);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    MoveUpArrow.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(447, 0));
    }

    // Sets the proper CSS for the given button element.
    MoveUpArrow.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
    // button.style.marginBottom = "10px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

	//moveDown
	function MoveDownArrow() {
    }
    MoveDownArrow.prototype = new GControl();

    // Creates a one DIV for each of the buttons and places them in a container
    // DIV which is returned as our control element. We add the control to
    // to the map container and return the element for the map class to
    // position properly.
    MoveDownArrow.prototype.initialize = function(map) {
      var container = document.createElement("div");

    var moveDown = document.createElement("div");
      this.setButtonStyle_(moveDown);
      container.appendChild(moveDown);
	  moveDown.innerHTML = '<img src="squelettes/img/map_arrow_b.png">';
	  movementDown = new GSize(0,-60);
      GEvent.addDomListener(moveDown, "click", function() {
       // map.panDirection(0, 1) ;
	   map.closeExtInfoWindow();
	   map.panBy(movementDown);
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    MoveDownArrow.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(447, 0));
    }

    // Sets the proper CSS for the given button element.
    MoveDownArrow.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     //button.style.marginBottom = "10px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

	//moveLeft
	function MoveLeftArrow() {
    }
    MoveLeftArrow.prototype = new GControl();

    // Creates a one DIV for each of the buttons and places them in a container
    // DIV which is returned as our control element. We add the control to
    // to the map container and return the element for the map class to
    // position properly.
    MoveLeftArrow.prototype.initialize = function(map) {
      var container = document.createElement("div");

    var moveLeft = document.createElement("div");
      this.setButtonStyle_(moveLeft);
      container.appendChild(moveLeft);
	  moveLeft.innerHTML = '<img src="squelettes/img/map_arrow_l.png">';
	  movementLeft = new GSize(60,0);
      GEvent.addDomListener(moveLeft, "click", function() {
       // map.panDirection(0, 1) ;
	   map.closeExtInfoWindow();
	   map.panBy(movementLeft);
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    MoveLeftArrow.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(0, 158));
    }

    // Sets the proper CSS for the given button element.
    MoveLeftArrow.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "10px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

	//moveRight
	function MoveRightArrow() {
    }
    MoveRightArrow.prototype = new GControl();

    // Creates a one DIV for each of the buttons and places them in a container
    // DIV which is returned as our control element. We add the control to
    // to the map container and return the element for the map class to
    // position properly.
    MoveRightArrow.prototype.initialize = function(map) {
      var container = document.createElement("div");

    var moveRight = document.createElement("div");
      this.setButtonStyle_(moveRight);
      container.appendChild(moveRight);
	  moveRight.innerHTML = '<img src="squelettes/img/map_arrow_r.png">';
	  movementRight = new GSize(-60,0);
      GEvent.addDomListener(moveRight, "click", function() {
       // map.panDirection(0, 1) ;
	   map.panBy(movementRight);
	   map.closeExtInfoWindow()
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    MoveRightArrow.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(0, 158));
    }

    // Sets the proper CSS for the given button element.
    MoveRightArrow.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "10px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

	//changeMapType
	function ChangeMapType() {
    }
    ChangeMapType.prototype = new GControl();
	
    ChangeMapType.prototype.initialize = function(map) {
      var container = document.createElement("div");

    var cmapType = document.createElement("div");
      this.setButtonStyle_(cmapType);
      container.appendChild(cmapType);
	  cmapType.innerHTML = '<div id="mapType" style="background-image:url(squelettes/img/map_type.png); width:114px; height:26px; text-align:center; color:#56626e; font-size:11px; line-height:22px; font-weight:bold;">Avec noms de rue</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cmapType, "click", function() {
       // map.panDirection(0, 1) ;
	   //map.panBy(movementRight);
	   if(map.getCurrentMapType().getName() == "Satellite"){ map.setMapType(G_HYBRID_MAP);document.getElementById('mapType').innerHTML = 'Sans noms de rue'}
	   else{map.setMapType(G_SATELLITE_MAP); document.getElementById('mapType').innerHTML = 'Avec noms de rue'}
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    ChangeMapType.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(90, -1));
    }

    // Sets the proper CSS for the given button element.
    ChangeMapType.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "10px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

	//retourUQB
	function RetourUQB() {
    }
    RetourUQB.prototype = new GControl();
	
    RetourUQB.prototype.initialize = function(map) {
      var container = document.createElement("div");

    var retourCarte = document.createElement("div");
      this.setButtonStyle_(retourCarte);
      container.appendChild(retourCarte);
	  retourCarte.innerHTML = '<div id="mapType" style="background-image:url(squelettes/img/map_uqb.png); width:26px; height:42px; text-align:center; color:#56626e;  font-weight:bold; "></div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(retourCarte, "click", function() {
       map.panTo(new GLatLng(45.187406, 5.713127));
	   
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    RetourUQB.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(-1, 50));
    }

    // Sets the proper CSS for the given button element.
    RetourUQB.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "10px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//carnetAdresses
	function CarnetAdresses() {
    }
    CarnetAdresses.prototype = new GControl();
	
    CarnetAdresses.prototype.initialize = function(map) {
      var container = document.createElement("div");

    adresses = document.createElement("div");
      this.setButtonStyle_(adresses);
      container.appendChild(adresses);
	  adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:114px; height:26px; text-align:center; color:#56626e; font-size:11px; line-height:30px; font-weight:bold; ">Carnet d&rsquo;adresses</div>';
	  //movementRight = new GSize(-60,0);
     GEvent.addDomListener(adresses, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.removeControl(carnet);
		categ1=new Categorie1();
		map.addControl(categ1);
		categ2=new Categorie2();
		map.addControl(categ2);
  		categ3=new Categorie3();
		map.addControl(categ3);
		categ4=new Categorie4();
		map.addControl(categ4);
		categ5=new Categorie5();
		map.addControl(categ5);
		categ6=new Categorie6();
		map.addControl(categ6);
		categ7=new Categorie7();
		map.addControl(categ7);
		carnetbis=new CarnetAdressesBis();
		map.addControl(carnetbis);
		
		
		map.removeControl(conebis);
		cone=new ProjetUrbanisme();
		map.addControl(cone);
		map.removeControl(categ8);
		map.removeControl(categ9);
//		map.addControl(new Categorie6());
		
	   
     });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    CarnetAdresses.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(270, 0));
    }

    // Sets the proper CSS for the given button element.
    CarnetAdresses.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

  	//carnetAdressesBis
 	function CarnetAdressesBis() {
    }
    CarnetAdressesBis.prototype = new GControl();
	
    CarnetAdressesBis.prototype.initialize = function(map) {
      var container = document.createElement("div");

    adressesBis = document.createElement("div");
      this.setButtonStyle_(adressesBis);
      container.appendChild(adressesBis);
	  adressesBis.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:114px; height:26px; text-align:center; color:#56626e; font-size:11px; line-height:30px; font-weight:bold; ">Carnet d&rsquo;adresses</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(adressesBis, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   
        map.removeControl(carnetbis);
		carnet=new CarnetAdresses();
		map.addControl(carnet);
		map.removeControl(categ1);
		map.removeControl(categ2);
		map.removeControl(categ3);
		map.removeControl(categ4);
		map.removeControl(categ5);
		map.removeControl(categ6);
		map.removeControl(categ7);
//		map.addControl(new Categorie6());
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    CarnetAdressesBis.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(270, 182));
    }

    // Sets the proper CSS for the given button element.
    CarnetAdressesBis.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
  
  	//categorie1
  	function Categorie1() {
    }
    Categorie1.prototype = new GControl();
	
    Categorie1.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat1 = document.createElement("div");
      this.setButtonStyle_(cat1);
      container.appendChild(cat1);
	  cat1.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/rougebtn.png" alt="icone rouge"/>Union de Quartier</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat1, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "UQB";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie1.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(214, 156));
    }

    // Sets the proper CSS for the given button element.
    Categorie1.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//categorie2
	function Categorie2() {
    }
    Categorie2.prototype = new GControl();
	
    Categorie2.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat2 = document.createElement("div");
      this.setButtonStyle_(cat2);
      container.appendChild(cat2);
	  cat2.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/vertbtn.png" alt="icone vert"/>Logement - Santé - Social</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat2, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Social";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie2.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(214, 130));
    }

    // Sets the proper CSS for the given button element.
    Categorie2.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//categorie3
	function Categorie3() {
    }
    Categorie3.prototype = new GControl();
	
    Categorie3.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat3 = document.createElement("div");
      this.setButtonStyle_(cat3);
      container.appendChild(cat3);
	  cat3.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/bleubtn.png" alt="icone violet"/>Ecoles - Petite enfance</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat3, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Ecole";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie3.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(214, 104));
    }

    // Sets the proper CSS for the given button element.
    Categorie3.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//categorie4
	function Categorie4() {
    }
    Categorie4.prototype = new GControl();
	
    Categorie4.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat4 = document.createElement("div");
      this.setButtonStyle_(cat4);
      container.appendChild(cat4);
	  cat4.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/rosebtn.png" alt="icone rose"/>Loisirs - Culture</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat4, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Loisir";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie4.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(214, 78));
    }

    // Sets the proper CSS for the given button element.
    Categorie4.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//categorie5
	function Categorie5() {
    }
    Categorie5.prototype = new GControl();
	
    Categorie5.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat5 = document.createElement("div");
      this.setButtonStyle_(cat5);
      container.appendChild(cat5);
	  cat5.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/beigebtn.png" alt="icone beige"/>Séniors</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat5, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Sénior";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie5.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(214, 52));
    }

    // Sets the proper CSS for the given button element.
    Categorie5.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//categorie6
	function Categorie6() {
    }
    Categorie6.prototype = new GControl();
	
    Categorie6.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat6 = document.createElement("div");
      this.setButtonStyle_(cat6);
      container.appendChild(cat6);
	  cat6.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/orangebtn.png" alt="icone orange"/>Sport</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat6, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Sport";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie6.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(214, 26));
    }

    // Sets the proper CSS for the given button element.
    Categorie6.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//categorie7
	function Categorie7() {
    }
    Categorie7.prototype = new GControl();
	
    Categorie7.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat7 = document.createElement("div");
      this.setButtonStyle_(cat7);
      container.appendChild(cat7);
	  cat7.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/violetbtn.png" alt="icone bleu"/>Mémo</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat7, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Mémo";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie7.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(214, 0));
    }

    // Sets the proper CSS for the given button element.
    Categorie7.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

   // var iconBlue = new GIcon(); 
//    iconBlue.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png';
//    iconBlue.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
//    iconBlue.iconSize = new GSize(12, 20);
//    iconBlue.shadowSize = new GSize(22, 20);
//    iconBlue.iconAnchor = new GPoint(6, 20);
//    iconBlue.infoWindowAnchor = new GPoint(5, 1);
//
//    var iconRed = new GIcon(); 
//    iconRed.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
//    iconRed.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
//    iconRed.iconSize = new GSize(12, 20);
//    iconRed.shadowSize = new GSize(22, 20);
//    iconRed.iconAnchor = new GPoint(6, 20);
//    iconRed.infoWindowAnchor = new GPoint(5, 1);
//
//    var customIcons = [];
//    customIcons["restaurant"] = iconBlue;
//    customIcons["bar"] = iconRed;

	//projetUrbanisme
	function ProjetUrbanisme() {
    }
    ProjetUrbanisme.prototype = new GControl();
	
    ProjetUrbanisme.prototype.initialize = function(map) {
      var container = document.createElement("div");

    urbanisme = document.createElement("div");
      this.setButtonStyle_(urbanisme);
      container.appendChild(urbanisme);
	  urbanisme.innerHTML = '<div id="urbanismeOnglet" style="background-image:url(squelettes/img/map_menus.png); width:114px; height:26px; text-align:center; color:#56626e; font-size:11px; line-height:30px; font-weight:bold; ">Projets d&rsquo;urbanisme</div>';
	  //movementRight = new GSize(-60,0);
     GEvent.addDomListener(urbanisme, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.removeControl(cone);
		categ8=new Categorie8();
		map.addControl(categ8);
		categ9=new Categorie9();
		map.addControl(categ9);
		conebis=new ProjetUrbanismeBis();
		map.addControl(conebis);
//		map.addControl(new Categorie6());

map.removeControl(carnetbis);
		carnet=new CarnetAdresses();
		map.addControl(carnet);
		map.removeControl(categ1);
		map.removeControl(categ2);
		map.removeControl(categ3);
		map.removeControl(categ4);
		map.removeControl(categ5);
		map.removeControl(categ6);
		map.removeControl(categ7);
		
	   
     });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    ProjetUrbanisme.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(85, 0));
    }

    // Sets the proper CSS for the given button element.
    ProjetUrbanisme.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

//projetUrbanismeBis
	function ProjetUrbanismeBis() {
    }
    ProjetUrbanismeBis.prototype = new GControl();
	
    ProjetUrbanismeBis.prototype.initialize = function(map) {
      var container = document.createElement("div");

    urbanismebis = document.createElement("div");
      this.setButtonStyle_(urbanismebis);
      container.appendChild(urbanismebis);
	  urbanismebis.innerHTML = '<div id="urbanismeOnglet" style="background-image:url(squelettes/img/map_menus.png); width:114px; height:26px; text-align:center; color:#56626e; font-size:11px; line-height:30px; font-weight:bold; ">Projets d&rsquo;urbanisme</div>';
	  //movementRight = new GSize(-60,0);
     GEvent.addDomListener(urbanismebis, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	    map.removeControl(conebis);
		cone=new ProjetUrbanisme();
		map.addControl(cone);
		map.removeControl(categ8);
		map.removeControl(categ9);
		
	   
     });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    ProjetUrbanismeBis.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(85, 52));
    }

    // Sets the proper CSS for the given button element.
    ProjetUrbanismeBis.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

	//categorie1
	function Categorie8() {
    }
    Categorie8.prototype = new GControl();
	
    Categorie8.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat8 = document.createElement("div");
      this.setButtonStyle_(cat8);
      container.appendChild(cat8);
	  cat8.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/bleubtn.png" alt="icone orange"/>Projets en Cours</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat8, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Projet en cours";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie8.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(29, 26));
    }

    // Sets the proper CSS for the given button element.
    Categorie8.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }
	
	//categorie2
	function Categorie9() {
    }
    Categorie9.prototype = new GControl();
	
    Categorie9.prototype.initialize = function(map) {
      var container = document.createElement("div");

    cat9 = document.createElement("div");
      this.setButtonStyle_(cat9);
      container.appendChild(cat9);
	  cat9.innerHTML = '<div class="cat" ><img class="iconmenu" src="squelettes/img/orangebtn.png" alt="icone bleu"/>Projets passés</div>';
	  //movementRight = new GSize(-60,0);
      GEvent.addDomListener(cat9, "click", function() {
       //adresses.innerHTML = '<div id="adresseOnglet" style="background-image:url(squelettes/img/map_menus.png); width:144px; height:26px; text-align:center; color:#56626e; font-size:14px; font-weight:bold; ">Carnet d&rsquo;adresses</div><div style="width:200px; height:400px; background-color:#ffffff;"';
	   map.clearOverlays();
	   map.addOverlay(quartierPoly);
	   catAffiche = "Projet passé";
	   initMarkers(markers,catAffiche);
	   
      });
	  
	  

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    Categorie9.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(29, 0));
    }

    // Sets the proper CSS for the given button element.
    Categorie9.prototype.setButtonStyle_ = function(button) {
 
//	  button.style.textDecoration = "underline";
//      button.style.color = "#0000cc";
//      button.style.backgroundColor = "white";
//      button.style.font = "small Arial";
//      button.style.border = "1px solid black";
//      button.style.padding = "2px";
     button.style.marginBottom = "0px";
//      button.style.textAlign = "center";
//      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

   // var iconBlue = new GIcon(); 
//    iconBlue.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png';
//    iconBlue.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
//    iconBlue.iconSize = new GSize(12, 20);
//    iconBlue.shadowSize = new GSize(22, 20);
//    iconBlue.iconAnchor = new GPoint(6, 20);
//    iconBlue.infoWindowAnchor = new GPoint(5, 1);
//
//    var iconRed = new GIcon(); 
//    iconRed.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
//    iconRed.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
//    iconRed.iconSize = new GSize(12, 20);
//    iconRed.shadowSize = new GSize(22, 20);
//    iconRed.iconAnchor = new GPoint(6, 20);
//    iconRed.infoWindowAnchor = new GPoint(5, 1);
//
//    var customIcons = [];
//    customIcons["restaurant"] = iconBlue;
//    customIcons["bar"] = iconRed;// JavaScript Document
