function initialize(lat, lng, texti) {
	if (GBrowserIsCompatible()) {
    
      var baseIcon = new GIcon();
          baseIcon.iconSize=new GSize(20,20);
          baseIcon.shadowSize=new GSize(24,24);
          baseIcon.iconAnchor=new GPoint(16,32);
          baseIcon.infoWindowAnchor=new GPoint(16,0);
          
      var icon = new GIcon(baseIcon, "/assets/img/icon.png", null, null);
	  
      function createMarker(point,html,icon) {
        var marker = new GMarker(point,icon);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }

      // Display the map, with some controls and set the initial location 
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
//      map.setCenter(new GLatLng(60.508393,22.221232), 14);
      map.setCenter(new GLatLng(lat,lng), 14);
     // Set up three markers with info windows 
    
//      var point = new GLatLng(60.508393,22.221232);
      var point = new GLatLng(lat,lng);

//      var marker = createMarker(point,'<div style="width:150px"><strong>Alphaform RPI Oy</strong><br />Aholantie 17,<br />21290 Rusko', icon)
      var marker = createMarker(point, texti, icon)
      map.addOverlay(marker);
	  }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
}
        
    
