try{
function TextualZoomControl() {
}
TextualZoomControl.prototype = new GControl();

TextualZoomControl.prototype.initialize = function(map) {
	var container = document.createElement("div");
	var zoomInDiv = document.createElement("div");
	this.setButtonStyle_(zoomInDiv);
	container.appendChild(zoomInDiv);
	zoomInDiv.innerHTML = '<span style="font-weight:bold; font-size:medium">+ </span>';
	zoomInDiv.appendChild(document.createTextNode("Zbliż"));
	GEvent.addDomListener(zoomInDiv, "click", function() {
		map.zoomIn();
	});
	var zoomOutDiv = document.createElement("div");
	this.setButtonStyle_(zoomOutDiv);
	container.appendChild(zoomOutDiv);
	zoomOutDiv.innerHTML = '<span style="font-weight:bold; font-size:medium">- </span>';
	zoomOutDiv.appendChild(document.createTextNode("Oddal"));
	//
	GEvent.addDomListener(zoomOutDiv, "click", function() {
		map.zoomOut();
	});
	map.getContainer().appendChild(container);
	return container;
}

TextualZoomControl.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(6, 6));
}

TextualZoomControl.prototype.setButtonStyle_ = function(button) {
	button.style.color = "white";
	button.style.backgroundColor = "#8BC100";
	button.style.font = "small Arial";
	button.style.border = "1px solid #80B200";
	button.style.padding = "2px";
	button.style.marginBottom = "3px";
	button.style.textAlign = "center";
	button.style.width = "82px";
	button.style.cursor = "pointer";
}

/////////////////////////////////////////////////////////////////////////////////
	if (!document.getElementById) { // non-W3C compliant
    document.getElementById = function(strID) { // create the function
      if (document.layers) 
        return document[strID]; // NS 4.x
      if (document.all) 
        return document.all[strID]; // IE 3.x and up
      return null; // expect the unexpected
    }
  }
//////////////////////////////////////////////////////////////////////////////////
function MapTypeControlMap() {}
MapTypeControlMap.prototype = new GControl();
MapTypeControlMap.prototype.initialize = function(map) {
	var typeMap = document.createElement("div");
	typeMap.setAttribute("id", "TypeMap");
	this.setButtonStyle_(typeMap);
	typeMap.appendChild(document.createTextNode("Mapa"));
	GEvent.addDomListener(typeMap, "click", function() {
		if(map.getCurrentMapType() != G_NORMAL_MAP) {
		  map.setMapType(G_NORMAL_MAP);
		  typeMap.style.fontWeight = "bold";
		  
		  document.getElementById('TypeSatellite').style.fontWeight = "normal";
		  document.getElementById('TypeHybrid').style.fontWeight = "normal";
		  //document.getElementById('TypePhysical').style.fontWeight = "normal";
		}
  });
	map.getContainer().appendChild(typeMap);
	return typeMap;
}
MapTypeControlMap.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(270, 6));
}
MapTypeControlMap.prototype.setButtonStyle_ = function(button) {
	button.style.color = "white";
	button.style.backgroundColor = "#8BC100";
	button.style.font = "small Arial";
	button.style.border = "1px solid #80B200";
	button.style.padding = "2px";
	button.style.marginRight = "3px";
	button.style.textAlign = "center";
	button.style.width = "82px";
	button.style.cursor = "pointer";
	button.style.fontWeight = "bold";
}


function MapTypeControlSatellite() {}
MapTypeControlSatellite.prototype = new GControl();
MapTypeControlSatellite.prototype.initialize = function(map) {
	var typeSatellite = document.createElement("div");
	typeSatellite.setAttribute("id", "TypeSatellite");
	this.setButtonStyle_(typeSatellite);
	typeSatellite.appendChild(document.createTextNode("Satelitarna"));
	GEvent.addDomListener(typeSatellite, "click", function() {
		if(map.getCurrentMapType() != G_SATELLITE_MAP) {
      map.setMapType(G_SATELLITE_MAP);
		  typeSatellite.style.fontWeight = "bold";
		  
		  document.getElementById('TypeMap').style.fontWeight = "normal";
		  document.getElementById('TypeHybrid').style.fontWeight = "normal";
		//  document.getElementById('TypePhysical').style.fontWeight = "normal";
		}
  });
	map.getContainer().appendChild(typeSatellite);
	return typeSatellite;
}  
MapTypeControlSatellite.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(362, 6));
}
MapTypeControlSatellite.prototype.setButtonStyle_ = function(button) {
	button.style.color = "white";
	button.style.backgroundColor = "#8BC100";
	button.style.font = "small Arial";
	button.style.border = "1px solid #80B200";
	button.style.padding = "2px";
	button.style.marginRight = "3px";
	button.style.textAlign = "center";
	button.style.width = "82px";
	button.style.cursor = "pointer";
}


function MapTypeControlHybrid() {}
MapTypeControlHybrid.prototype = new GControl();
MapTypeControlHybrid.prototype.initialize = function(map) {
	var typeHybrid = document.createElement("div");
	typeHybrid.setAttribute("id", "TypeHybrid");
	this.setButtonStyle_(typeHybrid);
	typeHybrid.appendChild(document.createTextNode("Hybrydowa"));
	GEvent.addDomListener(typeHybrid, "click", function() {
		if(map.getCurrentMapType() != G_HYBRID_MAP) {
		  map.setMapType(G_HYBRID_MAP);
		  typeHybrid.style.fontWeight = "bold";
		  
		  document.getElementById('TypeMap').style.fontWeight = "normal";
		  document.getElementById('TypeSatellite').style.fontWeight = "normal";
    //  document.getElementById('TypePhysical').style.fontWeight = "normal";
		}
  });
	map.getContainer().appendChild(typeHybrid);
	return typeHybrid;
}
MapTypeControlHybrid.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(454, 6));
}
MapTypeControlHybrid.prototype.setButtonStyle_ = function(button) {
	button.style.color = "white";
	button.style.backgroundColor = "#8BC100";
	button.style.font = "small Arial";
	button.style.border = "1px solid #80B200";
	button.style.padding = "2px";
	button.style.marginRight = "3px";
	button.style.textAlign = "center";
	button.style.width = "82px";
	button.style.cursor = "pointer";
	button.style.cssFloat = "left";
}

//dodane 2008.04.05
function MapTypeControlPhysical() {}
MapTypeControlPhysical.prototype = new GControl();
MapTypeControlPhysical.prototype.initialize = function(map) {
	var typePhysical = document.createElement("div");
	typePhysical.setAttribute("id", "TypePhysical");
	this.setButtonStyle_(typePhysical);
	typePhysical.appendChild(document.createTextNode("Fizyczna"));
	GEvent.addDomListener(typePhysical, "click", function() {
		if(map.getCurrentMapType() != G_PHYSICAL_MAP) {
      map.setMapType(G_PHYSICAL_MAP);
		  typePhysical.style.fontWeight = "bold";
		  
		  document.getElementById('TypeMap').style.fontWeight = "normal";
		  document.getElementById('TypeHybrid').style.fontWeight = "normal";
		  document.getElementById('TypeSatellite').style.fontWeight = "normal";
		}
  });
	map.getContainer().appendChild(typePhysical);
	return typePhysical;
}  
MapTypeControlSatellite.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(362, 6));
}
MapTypeControlSatellite.prototype.setButtonStyle_ = function(button) {
	button.style.color = "white";
	button.style.backgroundColor = "#8BC100";
	button.style.font = "small Arial";
	button.style.border = "1px solid #80B200";
	button.style.padding = "2px";
	button.style.marginRight = "3px";
	button.style.textAlign = "center";
	button.style.width = "82px";
	button.style.cursor = "pointer";
}

//koniec


//////////////////////////////////////////////////////////////////////
function TextualMapTypeControl() {
}
TextualMapTypeControl.prototype = new GControl();

TextualMapTypeControl.prototype.initialize = function(map) {
	var container = document.createElement("div");
	
	var typeMap = document.createElement("div");
	this.setButtonStyle_(typeMap);
	typeMap.style.fontWeight = "bold";
	container.appendChild(typeMap);
	typeMap.appendChild(document.createTextNode("Mapa"));
	GEvent.addDomListener(typeMap, "click", function() {
		if(map.getCurrentMapType() != G_NORMAL_MAP) {
		  map.setMapType(G_NORMAL_MAP);
		  typeMap.style.fontWeight = "bold";
		  typeSatellite.style.fontWeight = "normal";
		  typeHybrid.style.fontWeight = "normal";
		 // typePhysical.style.fontWeight = "normal";
		}
  });
	var typeSatellite = document.createElement("div");
	this.setButtonStyle_(typeSatellite);
	container.appendChild(typeSatellite);
	typeSatellite.appendChild(document.createTextNode("Satelitarna"));
	GEvent.addDomListener(typeSatellite, "click", function() {
		if(map.getCurrentMapType() != G_SATELLITE_MAP) {
      map.setMapType(G_SATELLITE_MAP);
		  typeSatellite.style.fontWeight = "bold";
		  typeMap.style.fontWeight = "normal";
		  typeHybrid.style.fontWeight = "normal";
		//  typePhysical.style.fontWeight = "normal";
		}
  });
	var typeHybrid = document.createElement("div");
	this.setButtonStyle_(typeHybrid);
	container.appendChild(typeHybrid);
	typeHybrid.appendChild(document.createTextNode("Hybrydowa"));
	GEvent.addDomListener(typeHybrid, "click", function() {
		if(map.getCurrentMapType() != G_HYBRID_MAP) {
		  map.setMapType(G_HYBRID_MAP);
		  typeHybrid.style.fontWeight = "bold";
		  typeSatellite.style.fontWeight = "normal";
		  typeMap.style.fontWeight = "normal";
		 // typePhysical.style.fontWeight = "normal";
		}
  });
  
  
  	var typePhysical = document.createElement("div");
	this.setButtonStyle_(typePhysical);
	container.appendChild(typePhysical);
	typePhysical.appendChild(document.createTextNode("Fizyczna"));
	GEvent.addDomListener(typePhysical, "click", function() {
		if(map.getCurrentMapType() != G_PHYSICAL_MAP) {
      map.setMapType(G_PHYSICAL_MAP);
		//  typePhysical.style.fontWeight = "bold";
		  typeSatellite.style.fontWeight = "normal";
		  typeMap.style.fontWeight = "normal";
		  typeHybrid.style.fontWeight = "normal";
		}
  });
  
 
  
	map.getContainer().appendChild(container);
	return container;
}

TextualMapTypeControl.prototype.getDefaultPosition = function() {
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(270, 6));
}

TextualMapTypeControl.prototype.setButtonStyle_ = function(button) {
	button.style.color = "white";
	button.style.backgroundColor = "#8BC100";
	button.style.font = "small Arial";
	button.style.border = "1px solid #80B200";
	button.style.padding = "2px";
	button.style.marginRight = "3px";
	button.style.textAlign = "center";
	button.style.width = "82px";
	button.style.cursor = "pointer";
	button.style.cssFloat = "left";
}
//////////////////////////////////////////////////////////////////////
        //dodane PK
      function myclick(i) {
        GEvent.trigger(gmarkers[i], "click");
	if(readCookie('setChecked')==1) $$('.cloudPreffHours').each(function(d){ d.style.display = ''; });
		else $$('.cloudPreffHours').each(function(d){ d.style.display = 'none'; });
      };
      
      var gmarkers=[];
      //end
}
catch(e){}
