// teste auf Frames

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

function switch_menue_bg_image(position_y, colorswitch, element, activeElement){
	
	// Hier koennen die Farben fuer das aktive und inaktive Element geaendert werden
	var inactiveColor 	= "#ffffff";
	var activeColor 	= "#b20202";
	
	// Ab hier nichts mehr aendern
	
	var navpos = document.getElementById('navi-pos');	
	navpos.style.backgroundPosition = "0px -" + position_y + "px";

	var childs = navpos.childNodes;
	var childCount = childs.length;
	
	var specialChildCount = 0;
	var activeElementNode = false;
	
	for(i = 0; i < childCount; i++) {		
		if(childs[i].nodeType == 1) {
			++specialChildCount;			
			childs[i].style.color = inactiveColor;			
			if(specialChildCount == activeElement) {
				activeElementNode = childs[i];
			}
		}
		
	}
	
	if(colorswitch == false) {
		element.style.color = activeColor;
	} else {
		if(activeElementNode != false) {
			
			activeElementNode.style.color = activeColor;
		}
	}
	
}

/*
//<![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);
          }
        );
      }
    }
//]]>*/

