	function CustomControls() {
    }
		var ruta = 'http://www.singuladerm.com/wp-content/plugins/store-locator/images/controls/';
    
		CustomControls.prototype = new GControl();

    CustomControls.prototype.initialize = function(map) {
      var container = document.createElement("div");
	  var me = this;

	  var panUpDiv = document.createElement("div");
      this.setButtonStyle_(panUpDiv,"panUp");
      container.appendChild(panUpDiv);
      GEvent.addDomListener(panUpDiv, "click", function() {
        map.panDirection(0,+1);
      });
	  	  
	  var panLeftDiv = document.createElement("div");
      this.setButtonStyle_(panLeftDiv,"panLeft");
      container.appendChild(panLeftDiv);
      GEvent.addDomListener(panLeftDiv, "click", function() {
        map.panDirection(+1,0);
      });
	  
	  var panRightDiv = document.createElement("div");
      this.setButtonStyle_(panRightDiv,"panRight");
      container.appendChild(panRightDiv);
      GEvent.addDomListener(panRightDiv, "click", function() {
        map.panDirection(-1,0); 
      });

	  var panDownDiv = document.createElement("div");
      this.setButtonStyle_(panDownDiv,"panDown");
      container.appendChild(panDownDiv);
      GEvent.addDomListener(panDownDiv, "click", function() {
        map.panDirection(0,-1);
      });
	  
       var zoomInDiv = document.createElement("div");
      this.setButtonStyle_(zoomInDiv,"ZoomIn");
      container.appendChild(zoomInDiv);
      GEvent.addDomListener(zoomInDiv, "click", function() {
        map.zoomIn();
	  });

	  var zoomOutDiv = document.createElement("div");
      this.setButtonStyle_(zoomOutDiv,"ZoomOut");
      container.appendChild(zoomOutDiv);
      GEvent.addDomListener(zoomOutDiv, "click", function() {
        map.zoomOut();
      });

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

    CustomControls.prototype.getDefaultPosition = function() {
	
      return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(30, 10));
    }


    CustomControls.prototype.setButtonStyle_ = function(button, type) {
	
	if (type=="ZoomIn"){
	  button.style.background = 'url('+ruta+'mas.png)';
      button.style.backgroundRepeat = 'no-repeat'; 
	  button.style.marginTop="55px"
	  button.style.height="23px";
	  button.style.width="23px";
	  button.style.cursor="pointer";
	  
	 }else if(type=="ZoomOut"){
	  button.style.background = 'url('+ruta+'menos.png)';
      button.style.backgroundRepeat = 'no-repeat'; 
	  button.style.height="23px";
	  button.style.width="23px";
	  button.style.cursor="pointer";
	  
	  
	   }else if(type=="panUp"){
	  button.style.background = 'url('+ruta+'arriba.png)';
      button.style.backgroundRepeat = 'no-repeat'; 
	  button.style.textAlign="center"
	  button.style.height="23px";
	  button.style.width="23px";
	  button.style.cursor="pointer";
	  
	  
	   }else if(type=="panDown"){
	  button.style.background = 'url('+ruta+'abajo.png)';
      button.style.backgroundRepeat = 'no-repeat'; 
	  button.style.display="block"
	  button.style.clear="both"
	  button.style.height="23px";
	  button.style.width="23px";
	  button.style.cursor="pointer";
	 button.style.position="absolute";
	  button.style.top="45px";
	  
	   }else if(type=="panRight"){
	  button.style.background = 'url('+ruta+'derecha.png)';
      button.style.backgroundRepeat = 'no-repeat'; 
	  //button.style.cssFloat="right"
	  button.style.height="23px";
	  button.style.width="23px";
	  button.style.cursor="pointer";
	  button.style.position="absolute";
	  button.style.left="20px";
	 
	  
	  }else if(type=="panLeft"){
	  button.style.background = 'url('+ruta+'izquierda.png)';
      button.style.backgroundRepeat = 'no-repeat'; 
	  //button.style.marginLeft="-20px"
	  //button.style.marginRight="17px"
	  //button.style.cssFloat="left"
	  button.style.height="23px";
	  button.style.width="23px";
	  button.style.cursor="pointer";
	   button.style.position="absolute";
	  button.style.left="-20px";
	  button.style.display="inline";
	  }
    }
