
function init_accordion(activeLayer) {
     if(activeLayer == undefined) activeLayer = 0;
     if ($('#accordion-wrapper').length) {
		$('#accordion-wrapper').accordion({
		    header: '.accordion_header',
		    autoheight: false,
		    animated: 'easeslide',
                    active: activeLayer,
                    collapsible: true
		});
     }
}



function getMapsWithAdress(adressString){
    //Maps initialisieren und in einen Container laden:
            //-------------------------------------------------
            var geocoder = new google.maps.Geocoder();
            var geoLocation = new google.maps.LatLng(0, 0);
            var myOptions = {
                  zoom: 10,
                  center: geoLocation,
                  mapTypeId: google.maps.MapTypeId.ROADMAP,
                  mapTypeControlOptions: {
                    style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
                  }
            };

            var map = new google.maps.Map(document.getElementById("map_container"), myOptions) ;
            var marker = new google.maps.Marker({
              position: geoLocation,
              map: map,
              draggable: false
            });

            //Adresse ermitteln und die Karte ausrichten:
            //-------------------------------------------
            geocoder.geocode({'address': adressString},
            function(results, status) {
              if (status == google.maps.GeocoderStatus.OK) {
                var position = results[0].geometry.location;
                map.setCenter(position);
                map.setZoom(14);
                marker.setPosition(position);

              } else {
                document.getElementById("map_container").innerHTML = 'Die Position konnte nicht automatisch ermittelt werden. ' + status;
              }
            })
}

function getMaps(lat, lng){
    //Maps initialisieren und in einen Container laden:
            //-------------------------------------------------
           // var geocoder = new google.maps.Geocoder();
            var geoLocation = new google.maps.LatLng(lat, lng);
            var myOptions = {
                  zoom: 13,
                  center: geoLocation,
                  mapTypeId: google.maps.MapTypeId.ROADMAP,
                  mapTypeControlOptions: {
                    style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
                  }
            };

            var map = new google.maps.Map(document.getElementById("map_container"), myOptions) ;
            var marker = new google.maps.Marker({
              position: geoLocation,
              map: map,
              draggable: false
            });

}

function getMail(name, domain ){

    document.write('<a href=\"mailto:' +  name + '@' + domain + '\">');
    document.write(name + '@' + domain +  '</a>');
}

function clearNewsletterInput(thisObj, standart)
{
        var oInput = thisObj;
        if(!oInput)
                return;

        if(oInput.value == standart )
        {
                oInput.value = "";
                //oInput.focus();
        }
}