﻿function CreateBookmarkLink() {
    PageTitle = document.title;
    url = "http://www.areacasa.es/";

    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(PageTitle, url, "");
    } else if (window.external) { // IE Favorite
        window.external.AddFavorite(url, PageTitle);
    }
    else if (window.opera && window.print) { // Opera Hotlist
        return true;
    }
}

function initializeGMaps_Address(address) {
    if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
        geocoder = new GClientGeocoder();

        if (geocoder) {
            geocoder.getLatLng(address,
                  function(point) {
                      if (point) {
                          map.setCenter(point, 16);
                          //var marker = new GMarker(point);
                          //map.addOverlay(marker);
                          map.addControl(new GSmallMapControl());
                          map.addControl(new GMapTypeControl());
                      } else {
                          alert('We were unable to find the Google Map for this address');
                      }
                  }
            );
        }
    }
}
