var geodecoder=null;
var map=null;
function UstawSrodek(address) {
	geocoder.getLatLng(
		address, function(point){
			if (!point) {
				alert(address + " nie zostal odnaleziony");
			 } else {
			 	map.setCenter(point, 13);
			 }
});}
function UstawSrodek2(address) {
	geocoder.getLatLng(
		address, function(point){
			if (!point) {
				alert(address + " nie zostal odnaleziony");
			 } else {
			 	map3.setCenter(point, 13);
			 }
});}
function showAddress(address,txt,qiconns) {
	geocoder.getLatLng(
		address, function(point) {
			var marker = new GMarker(point,qiconns);  
			marker.txt=txt;  
			map.addOverlay(marker);  
			GEvent.addListener(marker,"click",function() {  
				marker.openInfoWindowHtml(marker.txt);  
			});  
		 marker.refresh();
});}
function showAddress3(address,txt,qiconns) {
	geocoder.getLatLng(
		address, function(point) {
			var marker = new GMarker(point,qiconns);  
			marker.txt=txt;  
			map3.addOverlay(marker);  
			GEvent.addListener(marker,"click",function() {  
				marker.openInfoWindowHtml(marker.txt);  
			});  
		 marker.refresh();
});}
function showAddress2(address){
	geocoder.getLatLng(
		address,
		function(point){
			map2.setCenter(point,13);
		}
	);
}
function showAddress4(address){
	geocoder.getLatLng(
		address,
		function(point){
			map4.setCenter(point,13);
		}
	);
}
function load() {
	/*
      if (GBrowserIsCompatible()) {
						map = new GMap2(document.getElementById("mamamapa"));
         geocoder=new GClientGeocoder();
         map.addControl(new GLargeMapControl());
         map.addControl(new GOverviewMapControl()); 
			
			UstawSrodek("Polska,Nidzica,Nidzica,SĹowackiego 7");  
		  
			var ikona1 = new GIcon();  
			ikona1.image = "//maps.google.com/mapfiles/kml/pal3/icon49.png";
			ikona1.iconSize = new GSize(32, 32);  
			ikona1.infoWindowAnchor = new GPoint(16,16);  
			ikona1.iconAnchor = new GPoint(16,16);  
			ikona1.shadowSize = new GSize(59, 32);
			
			showAddress('Polska,Nidzica,Nidzica,SĹowackiego 7','Kancelaria Adwokacka Kamil Rytelewski
Polska,Nidzica,Nidzica,SĹowackiego 7',{icon: ikona1});
			
			map3 = new GMap2(document.getElementById("mamamapa3"));
         geocoder=new GClientGeocoder();
         map3.addControl(new GLargeMapControl());
         map3.addControl(new GOverviewMapControl()); 
			UstawSrodek2("Polska,Nidzica,Nidzica,SĹowackiego 7");  
			showAddress3('Polska,Nidzica,Nidzica,SĹowackiego 7','Kancelaria Adwokacka Kamil Rytelewski
Polska,Nidzica,Nidzica,SĹowackiego 7',{icon: ikona1});
			
			
			map2 = new GMap2(document.getElementById("mamamapa2"));
         geocoder=new GClientGeocoder();
         map2.addControl(new GLargeMapControl());	
		   map2.addOverlay(new GLayer('com.panoramio.all'));	
			
			showAddress2('Polska,Nidzica,Nidzica,SĹowackiego 7');		
			
				}
	*/
}