// teste auf Frames

function frametest()
{
	if(top.frames.length > 0)
	top.location.href=self.location;
}

//<![CDATA[ Google Maps
var WINDOW_HTML = '<strong>Heidelberger Klinik</strong><br>Br?ckenkopfstra?e 1-2<br>69120 Heidelberg';
var map = null;
var geocoder = null;
  
    function load() {
      if (GBrowserIsCompatible()) {
	    mapDiv = document.getElementById("map");
        map = new GMap2(mapDiv);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		// zoom durch doppelklick ermoeglichen
        map.enableDoubleClickZoom();
        map.enableContinuousZoom();
        // zoom durch mausrad ermoeglichen
		GMap2.prototype.wheelZoom = function(event)
         { if(event.cancelable)    event.preventDefault(); 
		   if((event.detail || -event.wheelDelta) < 0)
           { map.zoomIn();} else { map.zoomOut();}
         return false;
  		}
  		GEvent.addDomListener(mapDiv, "DOMMouseScroll", map.wheelZoom);
  		GEvent.addDomListener(mapDiv, "mousewheel", map.wheelZoom); 

        geocoder = new GClientGeocoder();
		rect = new GLatLngBounds();
		showAddress("Br?ckenkopfstra?e 1-2, 69120 Heidelberg");
      }
    }

    function showAddress(address, window_html, index) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
			  var icon = new GIcon();
			  icon.iconSize = new GSize(12, 20);
			  icon.shadowSize = new GSize(22, 20);
			  icon.iconAnchor = new GPoint(6, 20);
			  icon.infoWindowAnchor = new GPoint(5, 1);
			  map.setCenter(point, 13);
              var marker = new GMarker(point, icon);
              map.addOverlay(marker);
			  GEvent.addListener(marker, 'click', function() {marker.openInfoWindowHtml(window_html);});
			  marker.openInfoWindowHtml(WINDOW_HTML);
          }
        );
      }
    }
//]]>

 // START: Warnung für veraltete Browser, unbedingt drin lassen!
var $buoop = {vs:{i:7,f:3,o:10.5,s:3.2,n:9}}
$buoop.ol = window.onload; 
window.onload=function(){ 
 if ($buoop.ol) $buoop.ol(); 
 var e = document.createElement("script"); 
 e.setAttribute("type", "text/javascript"); 
 e.setAttribute("src", "http://browser-update.org/update.js"); 
 document.body.appendChild(e); 
}
// ENDE: Warnung für veraltete Browser, unbedingt drin lassen!
    
 // START: Suchbox Autocomplete (jQuery)
$(function() {
    $("#keywords").autocomplete({
        source: "ajax_search_suggestions.php",
        minLength: 2,
        select: function(event, ui) {
            $("#keywords").val(ui.item.value);
            $("#search").submit();
        }
    });
});
// ENDE: Suchbox Autocomplete (jQuery)


 // START: Suchbox Bordeaux Autocomplete (jQuery)
/*$(function() {
    $("#keywords").autocomplete({
        source: "ajax_search_suggestions_bordeaux.php",
        minLength: 2,
        select: function(event, ui) {
            $("#keywords").val(ui.item.value);
            $("#search_bordeaux").submit();
        }
    });
});*/
// ENDE: Suchbox Autocomplete (jQuery)

