
	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.
	TextualZoomControl.prototype.initialize = function(map) {
		var container = document.createElement("div");


     var zoomInDiv = document.createElement("div");
      this.setButtonStyle_(zoomInDiv, "in");
      container.appendChild(zoomInDiv);
      GEvent.addDomListener(zoomInDiv, "click", function() {
        map.zoomIn();
      });
	  
      var zoomOutDiv = document.createElement("div");
      this.setButtonStyle_(zoomOutDiv, "out");
      container.appendChild(zoomOutDiv);
      GEvent.addDomListener(zoomOutDiv, "click", function() {
        map.zoomOut();
      });
		
		  var size_of_direction_label = 25;
		  var width = map.getSize().width;
		  if (width > 0) middle_w = width/2 - size_of_direction_label;
		
		  var height = map.getSize().height;
		  if (height > 0) middle_height = height/2;
			
			//pt cardinal est
		  var pan_right_div = document.createElement("div");
		  this.setButtonStyle2_(pan_right_div, middle_height - 20, width-45);
		  container.appendChild(pan_right_div);
		  var img_right = document.createElement('img');
		  img_right.src = 'http://www.vinsnaturels.fr/design/icones/googlemaps/droite.png';
		  pan_right_div.appendChild(img_right);
		  GEvent.addDomListener(pan_right_div, "click", function() { map.panDirection(-1,0); });
			
			//pt cardinal ouest
		  var pan_left_div = document.createElement("div");
		  this.setButtonStyle2_(pan_left_div, middle_height - 20, 00);
		  container.appendChild(pan_left_div);
		  var img_left = document.createElement('img');
		  img_left.src = 'http://www.vinsnaturels.fr/design/icones/googlemaps/gauche.png';
		  pan_left_div.appendChild(img_left);
		  GEvent.addDomListener(pan_left_div, "click", function() { map.panDirection(1,0); });
			
			//pt cardinal nord
		  var pan_up_div = document.createElement("div");
		  this.setButtonStyle2_(pan_up_div, -5, middle_w);
		  container.appendChild(pan_up_div);
		  var img_up = document.createElement('img');
		  img_up.src = 'http://www.vinsnaturels.fr/design/icones/googlemaps/haut.png';
		  pan_up_div.appendChild(img_up);
		  GEvent.addDomListener(pan_up_div, "click", function() { map.panDirection(0,1); });
			
			//pt cardinal sud
		  var pan_down_div = document.createElement("div");
		  this.setButtonStyle2_(pan_down_div, height - 40, middle_w);
		  container.appendChild(pan_down_div);
		  var img_down = document.createElement('img');
		  img_down.src = 'http://www.vinsnaturels.fr/design/icones/googlemaps/bas.png';
		  pan_down_div.appendChild(img_down);
		  GEvent.addDomListener(pan_down_div, "click", function() { map.panDirection(0,-1); });


// 		We add the control to to the map container and return the element 
// 		for the map class to position properly.

		map.getContainer().appendChild(container);
		return container;
	}


// 	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_LEFT, new GSize(15, 7));
	}

// Sets the proper CSS for the given button element.
    TextualZoomControl.prototype.setButtonStyle_ = function(button, label) {
      button.style.textDecoration = "underline";
      button.style.color = "#0000cc";
      button.style.background = "url('http://www.vinsnaturels.fr/design/icones/googlemaps/zoom" + label +".png')";
      button.style.border = "none";
      button.style.marginBottom = "3px";
      button.style.width = "30px";
      button.style.height = "30px";
      button.style.cursor = "pointer";
    }
		TextualZoomControl.prototype.setButtonStyle2_ = function(button, top_pos, left_pos) {
		  button.style.top = top_pos + "px";
		  button.style.left = left_pos + "px";
		  button.style.position = "absolute";
		  button.style.cursor = "pointer";
		}

