﻿var map;

function initialize() {
    if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
        bounds = new GLatLngBounds();
        map.setUIToDefault();
       }
    }
    
function showAddress(address,info) {
    
      map = new GMap2(document.getElementById("map_canvas"));

      map.setUIToDefault();
      geocoder = new GClientGeocoder();
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
                map.setCenter(new GLatLng(63.866085, 23.626099), 8);
            } else {
              map.setCenter(point, 12);
              var marker = new GMarker(point);
              map.addOverlay(marker);
            }
          }
        );
      }
}

function getCity() {
    var locationCity = google.loader.ClientLocation.address.city;
    var hf = document.getElementById('LocalityHiddenValue');
    hf.value = locationCity;
}

