/*
function google__sMapLoad() 
{
    if (GBrowserIsCompatible()) 
    {
      var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(39.909736, -3.691406), 5);
      map.addControl(new GSmallMapControl());    // para el zoom salga pequeño 
    }
}

         
function google_sMostrarEnMapa()
{
    
    var map = new GMap(document.getElementById("map"));
    
    var geocoder = new GClientGeocoder();
    
    //var address = document.getElementById("txt_destino_hotel").value + ", "+document.getElementById("comboPaises").value; 
    var address = document.getElementById("txt_destino_hotel").value + ", "+document.frm_hoteles.comboPaises.options[document.frm_hoteles.comboPaises.selectedIndex].text; 
    //alert(address);
    
      geocoder.getLatLng(
        address,
        function(point) {
          if (!point) {
            alert(address + " No encontrado");
             google__sMapLoad();
          } else {
            map.setCenter(point, 6);
            var marker = new GMarker(point);
            map.addOverlay(marker);
            marker.openInfoWindowHtml(address);
          }
        }
      );
}


///*****************************************************************************************************************************************


      map = new GMap2(document.getElementById("img_google"));
      map.setCenter(new GLatLng(40.452557, -3.510673), 15);
      
      // insertar los controles
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      
      geocoder = new GClientGeocoder();
    
    
    // addAddressToMap() is called when the geocoder returns an
    // answer.  It adds a marker to the map with an open info window
    // showing the nicely formatted version of the address and the country code.
    function addAddressToMap(response) {
      map.clearOverlays();
      if (!response || response.Status.code != 200) {
        alert("Lo sentimos, no se ha encontrado su direcci&ocute;n");
      } else {
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
        
        map.setCenter(point, 15);
        
        marker = new GMarker(point, {draggable: true});
        
        GEvent.addListener(marker, "dragstart", function() {
          map.closeInfoWindow();
        });

        GEvent.addListener(marker, "dragend", function() {

          marker.openInfoWindowHtml(place.address);

        });
        
        map.addOverlay(marker);
        marker.openInfoWindowHtml(place.address);
        
      }
    }
    
    // showLocation() is called when you click on the Search button
    // in the form.  It geocodes the address entered into the form
    // and adds a marker to the map at that location.
    function showLocation(address) {
    alert("Direccion : "+address);

      geocoder.getLocations(address, addAddressToMap);
    }


    function findLocation() { 
      showLocation();
    }
    

*/
