function TextualZoomObject() {
    }
    TextualZoomObject.prototype = new GControl();

    TextualZoomObject.prototype.initialize = function(map) {
      
	  var container = document.createElement("div");
      var objectInDiv = document.createElement("div");
	  var weather = 'Weather';
	  
	  if(language!='en'){	  
	  	weather = 'Pogoda';  
	  }
	   
	  container.id="text_object";
	  container.style.visibility = "hidden";
      	 
      this.setButtonStyle_(objectInDiv);            
      objectInDiv.innerHTML = '<div>'+weather+'</div>' ;		
      container.appendChild(objectInDiv);

      GEvent.addDomListener(objectInDiv, "click", function() {
        /**
         * Tutaj jakas akcja
         */
		//alert("Load action");
		
		
		 var bounds = map.getBounds();
		 var southWest = bounds.getSouthWest();
		 var northEast = bounds.getNorthEast();
		 var southWest_lat = southWest.lat(); 
		 var southWest_lng = southWest.lng();
		 var northEast_lat = northEast.lat();
		 var northEast_lng = northEast.lng();
		
		setWeather(southWest_lat,southWest_lng,northEast_lat,northEast_lng)
		//map.addControl(new TextualZoomObjectShow());
      });

      map.getContainer().appendChild(container);
      return container;
    }

	TextualZoomObject.prototype.setButtonStyle_ = function(button) {
      button.style.textDecoration = "none";
      button.style.color = "#000000";
      button.style.backgroundColor = "white";
      button.style.fontFamily = "Trebuchet MS";
      button.style.fontSize = "11px";
      button.style.border = "1px solid black";
      button.style.padding = "1px";
      button.style.marginLeft = "0px";
      button.style.marginTop = "0px";
      button.style.textAlign = "center";
      button.style.width = "6em";
      button.style.cursor = "pointer";
    }

    TextualZoomObject.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(115, 3));
    }

    
