// JavaScript Document

function createMarker(point,text) {
  	var marker = new GMarker(point);
  	GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(text);
  });
  return marker;
}


function createIconMarker(point,text) {
	
var icon = new GIcon();
icon.image = "http://roma.szczecin.pl/images/plane.png";
icon.shadow = "http://roma.szczecin.pl/images/plane_shadow.png";
icon.iconSize = new GSize(39, 38);
icon.shadowSize = new GSize(39, 38);
icon.iconAnchor = new GPoint(2, 40);
icon.infoWindowAnchor = new GPoint(5, 1);
	
	
  	var marker = new GMarker(point,icon);
  	GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(text);
  });
  return marker;
}


    function load() {
      if (GBrowserIsCompatible()) 
	  {
	  	if(document.getElementById("map"))
		{
	        var map = new GMap2(document.getElementById("map"));
			map.addControl(new GLargeMapControl());
			map.addControl(new GMapTypeControl());
			map.addControl(new GOverviewMapControl());
    	    map.setCenter(new GLatLng(53.438736, 14.544718), 15);
			var point = new GLatLng(53.438636, 14.544918);
		 	map.addOverlay(new createIconMarker(point, "Biuro Turystyczne ROMA<br/>ul. Felczaka 8<br/>71-471 Szczecin"));
			point = new GLatLng(53.439746, 14.540792);
			map.addOverlay(new createMarker(point, "Jasne Blonia"));
			point = new GLatLng(53.438193, 14.542294);
			map.addOverlay(new createMarker(point, "Urzad miejski"));
			//http://maps.google.com/?ie=UTF8&om=1&z=16&ll=53.438736,14.544718&spn=0.008781,0.020127//roma
			//http://maps.google.com/?ie=UTF8&om=1&z=17&ll=53.438046,14.544654&spn=0.004391,0.010064
			//http://maps.google.com/?ie=UTF8&om=0&z=17&ll=53.439746,14.540792&spn=0.00439,0.010064//jasne blonia
			//http://maps.google.com/?ie=UTF8&om=0&z=17&ll=53.438193,14.542294&spn=0.004391,0.010064//urzad miejski
		}
      }
    }

