function googlemap(direccion) {
	   document.getElementsByName("address")[0].value=direccion;
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
//        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
       // map.setCenter(new GLatLng(42.31666, -8.78333), 6);
        map.setCenter(new GLatLng(40.416667, -3.75000), 6);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GOverviewMapControl());
        geocoder = new GClientGeocoder();
      }
       if (geocoder) {
        geocoder.getLatLng(
          direccion,
          function(point) {
            if (!point) {
              alert(direccion + " No encontrado");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(direccion);
            }
          }
        );
      }
	 // showAddress(direccion);
    }

    function showAddress(address) {
        if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }
	

function BuscarTexto() {    
    document.frmBuscar.txtBuscar.value = Trim(document.frmBuscar.txtBuscar.value);
    if (document.frmBuscar.txtBuscar.value != ''){
        document.frmBuscar.action = 'index.php?Pagina=Buscar';
        document.frmBuscar.submit();
    }else{
        document.frmBuscar.txtBuscar.focus();
    }
}
	
