function openFenster(link,fenster,weite,hoehe)
  {
  open(link,fenster,"width="+weite+",height="+hoehe+", resizable=yes,toolbar=no,scrollbars=yes,screenX=300,screenY=200");
  }  
function openFenster2(link,fenster,weite,hoehe)
  {
  open(link,fenster,"width="+weite+",height="+hoehe+", location=yes,menubar=yes,resizable=yes,toolbar=yes,scrollbars=yes,screenX=100,screenY=100");
  }
function auswahl()
{
    if (document.duo.elements[0].checked) {
	document.forms[1].elements[2].disabled=false;
	document.forms[1].elements[4].disabled=false;
	document.forms[1].elements[6].disabled=false;
	}
	else {
		document.forms[1].elements[2].disabled=true;
		document.forms[1].elements[4].disabled=true;
		document.forms[1].elements[6].disabled=true;
		}
}
<!--[if lt IE 7]>
if(window.navigator.systemLanguage && !window.navigator.language) {
  function hoverIE() {
    var LI = document.getElementById("Navigation").firstChild;
    do {
      if (sucheUL(LI.firstChild)) {
        LI.onmouseover=einblenden; LI.onmouseout=ausblenden;
      }
      LI = LI.nextSibling;
    }
    while(LI);
  }
  function sucheUL(UL) {
    do {
      if(UL) UL = UL.nextSibling;
      if(UL && UL.nodeName == "UL") return UL;
    }
    while(UL);
    return false;
  }
  function einblenden() {
    var UL = sucheUL(this.firstChild);
    UL.style.display = "block"; UL.style.backgroundColor = "silver";
  }
  function ausblenden() {
    sucheUL(this.firstChild).style.display = "none";
  }
  window.onload=hoverIE;
}
<!--[endif]-->
function createMarker(point,html) {
         var marker = new GMarker(point);
         GEvent.addListener(marker, "click", function() {
           marker.openInfoWindowHtml(html);
         });
         return marker;
} 
function showAddress(address) {
  geocoder.getLatLng(
    address,
    function(point) {
      if (!point) {
        alert(address + " not found");
      } else {
        map.setCenter(point, 11);
        var marker = createMarker(point,address+''); 
        map.addOverlay(marker);        
		map.setUIToDefault();
      }
    }
  );  
} 
function check(checkbox, senden) {
if(checkbox.checked==true){
senden.disabled = false;
}
else {
senden.disabled = true;
}
}
function gmap(lat,lng,adresse) {
    var latlng = new google.maps.LatLng(lat, lng);
    var myOptions = {
      zoom: 15,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };	
    if(adresse){
	var map = new google.maps.Map(document.getElementById("gmap"), myOptions);
	var marker = new google.maps.Marker({  
										position: new google.maps.LatLng(lat, lng),  
										map: map,  
										title: adresse,  
										clickable: true  
										});  
          // Creating an InfowWindow          
          var infowindow = new google.maps.InfoWindow({
            content: adresse
          });
		  infowindow.open(map, marker);
	}
}
  function initialize(stadtteil,adressen) {
  var geocoder;
  var map;
  geocoder = new google.maps.Geocoder();
    var latlng = new google.maps.LatLng(50, 15);
    var myOptions = {
      zoom: 13,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById("gmap"), myOptions);  
    
	geocoder.geocode( { 'address': stadtteil}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
        map.setCenter(results[0].geometry.location);
        var marker = new google.maps.Marker({
            map: map, 
            position: results[0].geometry.location,
			clickable: true,
			title: 'Stadtteil '+stadtteil
        });
		google.maps.event.addListener(marker, 'click', function() {
		var infowindow = new google.maps.InfoWindow({content: 'Stadtteil '+stadtteil});
        infowindow.open( map, this );	 
		});
		
      } else {
        alert("Geocode was not successful for the following reason: " + status);
      }
	  
    });
	if (adressen[0]["ort"]){		
	   var infowindow = new Array();
	   var dermarker = new Array();	   
	   for (var xa = 0; xa < adressen.length; xa++) {	   
	   var contentString = '<a href="/">'+adressen[xa]["name"]+'</a>';  
       marker = new google.maps.Marker({
	    position: new google.maps.LatLng(adressen[xa]["lat"], adressen[xa]["lng"]),
	    map: map,
		clickable: true,
		title: 'Anzeige: '+adressen[xa]["name"]
	});
	   inserate[xa]["dermarker"] = marker;
	   
	   //infowindow = new google.maps.InfoWindow({content: contentString});
		google.maps.event.addListener(marker, 'click', function() {
		 //infowindow.open( map, this );
 		 getinfowindow(this);		 
		});
	   }
  }
  function getinfowindow(which)
					{
   					 for ( var m = 0; m < inserate.length; ++m )
    					{
        				
        					if ( inserate[m]['dermarker'] == which ) 
        					{
            				var infowindow = new google.maps.InfoWindow({content: 'Anzeige: <b>'+inserate[m]["name"]+'<br /></b><br />'+inserate[m]["adresse"]+' '+inserate[m]["hnr"]+'<br />'+inserate[m]["plz"]+' / '+inserate[m]["ort"]});
            				infowindow.open( map, which );
            				return;
        					}
    					}
					}
}
