var ZIP =""; var latitude =""; var longitude = ""; var markers = []; var mapViewMode = 0; var menueOption = 0; var mapCenter = 0; var startsucheIframe = 1; function searchOrt() { var selectFlag = 0; $( "#wo_input" ) .autocomplete({ focus: function(event, ui) { $("#osuchmenue>ul").css("display","block"); }, /*WICHTIG damit das Feld im neuen Menü nicht verschwindet*/ source: "/kalender/forum/login-suche-get.php?s=0&la=de&action=SEARCH_ORT", minLength: 1, select: function(event, ui){ $("#wo_input_strasse").val(ui.item.strasse); $("#wo_input_plz").val(ui.item.plz); $("#wo_input_stadtteil").val(ui.item.stadtteil); $("#wo_input_ort").val(ui.item.ort); $("#wo_input_land").val(ui.item.land); selectFlag = 1; searchObject("GET_RESULT","0"); } }) .data( "ui-autocomplete" )._renderItem = function( ul, item ) { var newText = String(item.value).replace( new RegExp(this.term, "gi"), "$&"); return $("
  • ") .data("item.autocomplete", item) .append("" + newText + "") .appendTo(ul); }; if(selectFlag !=1 && $("#wo_input").val() == '') searchObject("GET_RESULT","0"); else if(selectFlag !=1 && $("#wo_input").val().length >3 ) searchObject("GET_RESULT","0"); } function getSearchOptions() { var objektTyp =$("#objekttyp_input").val(); var ussid = getCookie("immopro_ussid"); $.ajax({ url: "/kalender/forum/login-suche-get.php?s=0&la=de&ussid="+ussid+"&action=SEARCH_OPTIONS&objektTyp="+objektTyp+"&bgcolor=", cache: false, context: document.body, success: function(responseText) { $("#searchOptionsContaine").html(responseText); $("#searchOptionsContaine").find("script").each(function(i) { eval($(this).text()); }); searchObject("GET_RESULT","0"); } }); } function setCookie(cname,cvalue,exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires=" + d.toGMTString(); document.cookie = cname+"="+cvalue+"; "+expires+"; path=/"; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i850 && 990 > skwidth) rc =3; if( skwidth >1000) rc =3; var rowidth = googlemaps ==1?rc*207:"100%"; var mapwidth = skwidth -rowidth; $("#resultObjects").css("width", rowidth); $("#map").css("width", mapwidth); //console.log("map:"+mapwidth); var viewWidth= ($(window).width()); window.onresize = function() { var showWarper = 0; if($("#warpper").is(':visible')) showWarper = 1; var viewWidth= ($(window).width()); if (viewWidth <= 400) { $("#ergibnisseBTNTD").attr('align', 'left'); $("#ergibnisseBTN2TD").attr('align', 'left'); $("#tabs2").show(); $("#content2").show(); $("#warpper").hide(); $("#suchkriterien").hide(); $("#objekte-seite").hide(); $("#pre-text").hide(); $("#next-text").hide(); if($('#suchkriterien').html()!=''){ changeDivContent('#tab_s1','#suchkriterien'); changeDivContent('#tab_s2','#resultObjects'); if(googlemaps==1) changeDivContent('#tab_s3','#map'); $("#resultHeader").hide(); $("#resultFooter").hide(); $("#tab_s2").html(''+$("#tab_s2").html()); } $("#warpper").html(''); $("#suchkriterien").html(''); getCookiesValue(); } else if (viewWidth > 400) { $("#ergibnisseBTNTD").attr('align', 'center'); $("#ergibnisseBTN2TD").attr('align', 'center'); if(showWarper==1) $("#warpper").show(); $("#suchkriterien").show(); $("#objekte-seite").show(); $("#pre-text").show(); $("#next-text").show(); $("#tabs2").hide(); $("#content2").hide(); if($('#tab_s1').html()!=''){ $("#warpper").html('
    ' +(googlemaps ==1?'
    ' +'
    ' +'' +'
    ':'')); changeDivContent('#suchkriterien','#tab_s1'); changeDivContent('#resultObjects','#tab_s2'); if(googlemaps==1) changeDivContent('#map','#tab_s3'); $("#naviM").remove(); if(showWarper==1) $("#resultHeader").show(); //$("#warpper").html($("#resultObjects").html()+$("#map").html()) } $("#tab_s1").html(''); $("#tab_s2").html(''); if(googlemaps==1) $("#tab_s3").html(''); getCookiesValue(); } } if (viewWidth <= 400) { $("#ergibnisseBTNTD").attr('align', 'left'); $("#ergibnisseBTN2TD").attr('align', 'left'); $("#tabs2").show(); $("#content2").show(); $("#warpper").hide(); $("#suchkriterien").hide(); changeDivContent('#tab_s1','#suchkriterien'); changeDivContent('#tab_s2','#resultObjects'); if(googlemaps==1) changeDivContent('#tab_s3','#map'); $("#resultHeader").show(); $("#tab_s2").html(''+$("#tab_s2").html()+$("#resultFooter").html()); $("#warpper").html(''); $("#suchkriterien").html(''); $("#objekte-seite").hide(); $("#pre-text").hide(); $("#next-text").hide(); } if ($("#menueSuche").length > 0) { $("#er").hide(); $("#resultHeader").hide(); $("#resultFooter").hide(); $("#warpper").hide(); menueOption = 1; } var checkboxes = $("input[type='checkbox']"); var OType = 1; if (getCookie("immopro_objekttyp") != "") { $( "#objekttyp_input" ).val(getCookie("immopro_objekttyp")); OType = getCookie("immopro_objekttyp"); } //erhalten Suchkriterien Werte von cookie getCookiesValue(); //objectTypeChange(); var OT = $( "#objekttyp_input" ).val(); if($("#searchOptionsContaine").is(':visible')) { $("#searchOptionsContaine").hide(); $("#resultContaine").hide(); $("#searchOptionsOn").hide(); $("#searchOptionsOff").show(); } if(OT== 15){ $("#immosuche").hide(); $("#belegungInput").show(); } else{ $("#immosuche").show(); $("#belegungInput").hide(); } if(OT== 1 ||OT== 3){ $("#mieteL").show(); $("#preisL").hide(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").show(); } if(OT== 2 || OT== 4 || OT== ""){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").show(); } if(OT== 5){ $("#mieteL").show(); $("#preis").show(); $("#preisL").hide(); $("#wohnflaeche").hide(); $("#zimmer").hide(); } if(OT== 6){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").hide(); } if(OT== 7){ $("#mieteL").show(); $("#preisL").hide(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").hide(); } if(OT== 8 ||OT== 9 ||OT== 10 ||OT== 11 ||OT== 12){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").hide(); } if(OT== 14){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").hide(); $("#zimmer").hide(); } //Erweiterte Suche anzeigen, wenn immopro_sp in Cookie ist 1 if (getCookie("immopro_sp") == "1"){ $("#searchOptionsContaine").show(); $("#resultContaine").show(); $("#searchOptionsOff").hide(); $("#searchOptionsOn").show(); //$("#ergibnisseBTN").hide(); $("#ergibnisseBTN2").show(); $("#reset2").show(); getSearchOptions(); } else if(viewWidth > 400) searchObject("GET_RESULT"); $("#content2").find("[id^='tab']").hide(); $("#tabs2 li:first").attr("id","current"); $("#content2 #tab_s1").fadeIn(); $('#tabs2 a').click(function(e) { e.preventDefault(); if ($(this).closest("li").attr("id") == "current"){ return; } else{ $("#content2").find("[id^='tab']").hide(); $("#tabs2 li").attr("id",""); $(this).parent().attr("id","current"); $('#' + $(this).attr('name')).fadeIn(); } }); $( "#wo_input" ).change(function() { getLatLng($(this).val(),'de'); var plz = $("#wo_input_plz").val(); if(plz=="") $("#wo_input_plz").val(ZIP) if(googlemaps==1) mapGoToCenter($(this).val()); var value= $(this).val(); //if(value.length>0) $( "#rad_input" ).removeAttr('disabled'); }); $( "#rad_input" ).change(function() { if(cityCircle!=null) removeCircle(); var value= $("#wo_input").val(); if(value.length>0){ showRadinasCircle($(this).val()) searchObject("GET_RESULT","0"); } //else $(this).attr('disabled','disabled'); }); if ($("#map").length > 0) { ///Floating Navigation menu ? var myMap = $('#map'); var mapY = myMap.offset().top; var myResult = $('#resultObjects'); var top = 0; if($('#navi_intern').length > 0) top = 30; var isFixed = false; var $w = $(window); $w.scroll(function() { var scrollTop = $w.scrollTop(); if($("#searchOptionsContaine").is(':visible')) ss = $("#er").height()-90; else ss = 10; if($(".form_editor").length>0) { if($("#cke_FCKeditor1").length>0) ss = $(".form_editor").height()-370; else ss = $(".form_editor").height()-10; if($("#searchOptionsContaine").is(':visible')) ss = ss+$("#er").height()-90; } ss = ss + $(".header_content").height(); var Fixed = scrollTop-ss > mapY; if (Fixed && !isFixed) { var w3 =parseInt(myResult.offset().left)+parseInt(myResult.width()); myMap.css({ position: 'fixed', top: top, left:w3, width: myMap.width(), }); isFixed = true; } else if (!Fixed && isFixed) { myMap.css({ position: 'static', '-webkit-box-shadow': 'none', '-moz-box-shadow': 'none', 'box-shadow': 'none' }); isFixed = false; } var footerOffset = $("#IP_footer_address").offset().top; if( $("#map").offset().top+750 > footerOffset){ var hei = (footerOffset -$("#map").offset().top)-75; var heiStr = hei+"px" $('#map-canvas').stop().animate({height: heiStr},10); $('#map').stop().animate({height: heiStr},10); } else if($('#map-canvas').height()<590){ $('#map-canvas').stop().animate({height: "590px"},10); $('#map').stop().animate({height: "590px"},10); } }); } if(googlemaps == "TT") initialize() // Draw Makler Marker if(googlemaps == "TT") { var maklerGeocoder = new google.maps.Geocoder(); var maklerMarker = new google.maps.Marker({ position: new google.maps.LatLng('50.1275506', '8.7674990000000'), map: map, icon: '/images/source/icon2.png', }); maklerlatlng = new google.maps.LatLng('50.1275506', '8.7674990000000'); map.setCenter(maklerlatlng); //show info window if marker clicked google.maps.event.addListener(maklerMarker, 'click', function() { ib.close(); ib.setContent('
    ' + maklerInfo + '
    '); ib.open(map,maklerMarker); }); } if(viewWidth <= 400) searchObject("GET_RESULT"); if(!$("#searchOptionsContaine").is(':visible')) { $("#ergibnisseBTN").show(); $("#reset1").show(); setCookie("immopro_sp", "0", 7); } else { $("#ergibnisseBTN").hide(); $("#reset1").hide(); } $("#reset1").bind("click", function() { setCookie("immopro_objekttyp",'', 7); $("#objekttyp_input").val($("#objekttyp_input option:first").val()); objectTypeChange(); $("input[type=text], textarea,number").val(""); $("input[type=number]").val(""); $("input[type=checkbox], textarea").prop( "checked", false ); searchObject("GET_RESULT"); }); $("#reset2").bind("click", function() { setCookie("immopro_objekttyp",'', 7); $("#objekttyp_input").val($("#objekttyp_input option:first").val()); objectTypeChange(); $("input[type=text], textarea").val(""); $("input[type=number]").val(""); $("input[type=checkbox], textarea").prop( "checked", false ); searchObject("GET_RESULT"); }); }); //get data from cookie function getCookiesValue(){ if (getCookie("immopro_objekttyp") != "") { $( "#objekttyp_input" ).val(getCookie("immopro_objekttyp")); OType = getCookie("immopro_objekttyp"); } else $("#objekttyp_input").val($("#objekttyp_input option:first").val());//$( "#objekttyp_input" ).val(1); if (getCookie("immopro_wo") != "") { $( "#wo_input" ).val(getCookie("immopro_wo")); } if (getCookie("immopro_strasse") != "") { $( "#wo_input_strasse" ).val(getCookie("immopro_strasse")); } if (getCookie("immopro_plz") != "") { $( "#wo_input_plz" ).val(getCookie("immopro_plz")); } if (getCookie("immopro_stadtteil") != "") { $( "#wo_input_stadtteil" ).val(getCookie("immopro_stadtteil")); } if (getCookie("immopro_ort") != "") { $( "#wo_input_ort" ).val(getCookie("immopro_ort")); } if (getCookie("immopro_land") != "") { $( "#wo_input_land" ).val(getCookie("immopro_land")); } if (getCookie("immopro_rad") != "") { $( "#rad_input" ).val(getCookie("immopro_rad")); //$( "#rad_input" ).removeAttr('disabled'); } //else $( "#rad_input" ).attr('disabled','disabled'); if (getCookie("immopro_lat") != "") { latitude = getCookie("immopro_lat"); } if (getCookie("immopro_lng") != "") { longitude = getCookie("immopro_lng"); } if (getCookie("immopro_preisv") != "") { $( "#preis_von_input" ).val(getCookie("immopro_preisv")); } if (getCookie("immopro_preisb") != "") { $( "#preis_bis_input" ).val(getCookie("immopro_preisb")); } if (getCookie("immopro_flaechev") != "") { $( "#flaeche_von_input" ).val(getCookie("immopro_flaechev")); } if (getCookie("immopro_flaecheb") != "") { $( "#flaeche_bis_input" ).val(getCookie("immopro_flaecheb")); } if (getCookie("immopro_zimmerv") != "") { $( "#zimmer_von_input" ).val(getCookie("immopro_zimmerv")); } if (getCookie("immopro_zimmerb") != "") { $( "#zimmer_bis_input" ).val(getCookie("immopro_zimmerv")); } if (getCookie("immopro_anreise") != "") { $( "#anreise_input" ).val(getCookie("immopro_anreise")); } if (getCookie("immopro_abreise") != "") { $( "#abreise_input" ).val(getCookie("immopro_abreise")); } if (getCookie("immopro_BPAnzahlv") != "") { $( "#personen_von_input" ).val(getCookie("immopro_BPAnzahlv")); } } function objectTypeChange(){ $( "#sortieren_input" ).val(0); var OT = $( "#objekttyp_input" ).val(); if($("#searchOptionsContaine").is(':visible')) { $("#searchOptionsContaine").hide(); $("#resultContaine").hide(); $("#searchOptionsOn").hide(); $("#searchOptionsOff").show(); $("#ergibnisseBTN").show(); $("#reset1").show(); $("#ergibnisseBTN2").hide(); $("#reset2").hide(); } if(OT== 15){ $("#immosuche").hide(); $("#belegungInput").show(); } else{ $("#immosuche").show(); $("#belegungInput").hide(); } if(OT== 1 ||OT== 3){ $("#mieteL").show(); $("#preisL").hide(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").show(); } if(OT== 2 || OT== 4 ||OT== ""){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").show(); } if(OT== 5){ $("#mieteL").show(); $("#preis").show(); $("#preisL").hide(); $("#wohnflaeche").hide(); $("#zimmer").hide(); } if(OT== 6){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").hide(); } if(OT== 7){ $("#mieteL").show(); $("#preisL").hide(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").hide(); } if(OT== 8 ||OT== 9 ||OT== 10 ||OT== 11 ||OT== 12){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").show(); $("#zimmer").hide(); } if(OT== 14){ $("#mieteL").hide(); $("#preisL").show(); $("#preis").show(); $("#wohnflaeche").hide(); $("#zimmer").hide(); } searchObject("GET_RESULT","0"); } function showSearchOptions(){ $("#searchOptionsOn").hide(); $("#ergibnisseBTN").hide(); $("#reset1").hide(); $("#ergibnisseBTN2").show(); $("#reset2").show(); $("#searchOptionsOff").show(); $("#erweiterte_suche").show(); setCookie("immopro_sp", "1", 7); } function hideSearchOptions(){ $("#searchOptionsOff").hide(); $("#ergibnisseBTN").show(); $("#reset1").show(); $("#ergibnisseBTN2").hide(); $("#reset2").hide(); $("#searchOptionsOn").show(); $("#erweiterte_suche").hide(); $("#searchOptionsContaine").html(""); setCookie("immopro_sp", "0", 7); searchObject("GET_RESULT","0"); } function showHideSearchOptions(){ if($("#searchOptionsContaine").is(':visible')) { $("#searchOptionsContaine").hide(); $("#resultContaine").hide(); $("#searchOptionsOn").hide(); $("#searchOptionsOff").show(); $("#ergibnisseBTN").show(); $("#reset1").show(); $("#ergibnisseBTN2").hide(); $("#reset2").hide(); setCookie("immopro_sp", "0", 7); searchObject("GET_RESULT","0"); } else { getSearchOptions(); $("#searchOptionsContaine").show(); $("#resultContaine").show(); $("#searchOptionsOff").hide(); $("#searchOptionsOn").show(); $("#ergibnisseBTN").hide(); $("#reset1").hide(); $("#ergibnisseBTN2").show(); $("#reset2").show(); setCookie("immopro_sp", "1", 7); } } function getNextObjects(st) { next = 1; searchObject("GET_RESULT",st,next); } function sortieren(st) { next = 1; searchObject("GET_RESULT",st,next); } function changeDivContent(div1, div2) { $(div1).html ($(div2).html()); } function mapExpander(x) { if(x=="p") { $( "#resultObjects" ).css( "width", "-=205" ); var rWidth =parseInt($( "#resultObjects" ).width())+parseInt($( "#resultObjects" ).offset().left); $( "#map" ).css( "width", "+=205" ); $( "#map" ).css( "left", rWidth ); var w=$( "#map" ).css( ["width"]); $( "#map-canvas" ).css( "width", w ); google.maps.event.trigger(map, "resize"); $("#mapExpander").hide(); $("#mapUnexpander").show(); } else { $( "#resultObjects" ).css( "width", "+=205" ); var rWidth =parseInt($( "#resultObjects" ).width())+parseInt($( "#resultObjects" ).offset().left); $( "#map" ).css( "width", "-=205" ); $( "#map" ).css( "left", rWidth ); var w=$( "#map" ).css( ["width"]); $( "#map-canvas" ).css( "width", w ); google.maps.event.trigger(map, "resize"); $("#mapExpander").show(); $("#mapUnexpander").hide(); } } function showRadinasCircle(rad){ var geocoder = new google.maps.Geocoder(); //var latlng = new google.maps.LatLng(lat, lng); geocoder.geocode( { 'address': $( "#wo_input" ).val(),'region': 'de'}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var latitude = results[0].geometry.location.lat(); var longitude = results[0].geometry.location.lng(); showCircle(results[0].geometry.location.lat(),results[0].geometry.location.lng(),rad); } }); } function mapGoToCenter(address){ var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': address,'region': 'de'}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var latitude = results[0].geometry.location.lat(); var longitude = results[0].geometry.location.lng(); map.setCenter(new google.maps.LatLng(latitude, longitude)); map.setZoom(13); } }); } function getZIPCode(lat,lng,region){ var latlng = new google.maps.LatLng(lat, lng); geocoder = new google.maps.Geocoder(); var info ="" geocoder.geocode({'latLng': latlng,'region': region}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[0]) { for (j = 0; j < results[0].address_components.length; j++) { if (results[0].address_components[j].types[0] == 'postal_code') info= info+" Zip Code: " + results[0].address_components[j].short_name+"\n"; alert(info); } } } else { alert("Geocoder failed due to: " + status); } }); } function getLatLng(address,region){ var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': address,'region': region}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { latitude = results[0].geometry.location.lat(); longitude = results[0].geometry.location.lng(); var latlng = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()); return latlng; } return null; }); } function getZIPCode2(lat,lng,region){ var latlng = new google.maps.LatLng(lat, lng); geocoder = new google.maps.Geocoder(); var info ="" geocoder.geocode({'latLng': latlng,'region': region}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[0]) { for (j = 0; j < results[0].address_components.length; j++) { if (results[0].address_components[j].types[0] == 'route') info= info+" Straße: " + results[0].address_components[j].short_name+"\n"; else if (results[0].address_components[j].types[0] == 'postal_code') info= info+" Zip Code: " + results[0].address_components[j].short_name+"\n"; else if (results[0].address_components[j].types[0] == 'administrative_area_level_1' ) info= info+" Stadt: " + results[0].address_components[j].short_name+"\n"; } alert(info+results[0].formatted_address); } } else { alert("Geocoder failed due to: " + status); } }); } var citymap = {}; citymap['osnbrueck'] = { center: new google.maps.LatLng(52.261814, 8.056169), population: 100000 }; var cityCircle; var map; var infowindow; var markerIndex =0; var ib; var infoBoxOptions = { disableAutoPan: false, maxWidth: 0, pixelOffset: new google.maps.Size(-121, 0), zIndex: null, boxStyle: { background: "url('http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/examples/tipbox.gif') no-repeat", opacity: 1, width: "242px" }, closeBoxURL: "", infoBoxClearance: new google.maps.Size(1, 1), isHidden: false, pane: "floatPane", enableEventPropagation: false }; ib = new InfoBox(infoBoxOptions); function initialize() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(52.279911, 8.047179), }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); //Infofenster infowindow = new google.maps.InfoWindow({ maxWidth: 240, }); google.maps.event.addListener(infowindow, 'domready', function() { // Reference to the DIV that wraps the bottom of infowindow var iwOuter = $('.gm-style-iw'); /* Since this div is in a position prior to .gm-div style-iw. * We use jQuery and create a iwBackground variable, * and took advantage of the existing reference .gm-style-iw for the previous div with .prev(). */ var iwBackground = iwOuter.prev(); // Removes background shadow DIV iwBackground.children(':nth-child(2)').css({'display' : 'none'}); // Removes white background DIV iwBackground.children(':nth-child(4)').css({'display' : 'none'}); // Removes white background DIV iwBackground.children(':nth-child(4)').css({'width' : '240px'}); // Removes white background DIV iwBackground.children(':nth-child(4)').css({'height' : '300px'}); // Moves the infowindow 28px to the right. iwOuter.parent().parent().css({left: '28px'}); // Moves the infowindow 12px to the bottom. iwOuter.parent().parent().css({top: '12px'}); // Moves the shadow of the arrow 76px to the left margin. iwBackground.children(':nth-child(1)').attr('style', function(i,s){ return s + 'left: 105px !important;'}); // Moves the shadow of the arrow 76px to the top margin. iwBackground.children(':nth-child(1)').attr('style', function(i,s){ return s + 'top: 342px !important;'}); // Moves the arrow 76px to the left margin. iwBackground.children(':nth-child(3)').attr('style', function(i,s){ return s + 'left: 105px !important;'}); // Moves the arrow 76px to the top margin. iwBackground.children(':nth-child(3)').attr('style', function(i,s){ return s + 'top: 322px !important;'}); // Changes the desired tail shadow color. iwBackground.children(':nth-child(3)').find('div').children().css({'box-shadow': '#000 0px 1px 6px', 'z-index' : '1'}); // Reference to the div that groups the close button elements. var iwCloseBtn = iwOuter.next(); var bo ='5px solid '+closeBG; // Apply the desired effect to the close button iwCloseBtn.css({opacity: '1', right: '35px', top: '-6px', border: bo, 'border-radius': '13px', 'box-shadow': '0 0 5px #3990B9'}); var iwCloseBtn1 = iwCloseBtn.next(); iwCloseBtn1.css({display: 'none'}); // If the content of infowindow not exceed the set maximum height, then the gradient is removed. if($('.iw-content').height() < 140){ $('.iw-bottom-gradient').css({display: 'none'}); } // The API automatically applies 0.7 opacity to the button after the mouseout event. This function reverses this event to the desired value. iwCloseBtn.mouseout(function(){ $(this).css({opacity: '1'}); }); }); } //google.maps.event.addDomListener(window, 'load', initialize); function removeCircle(){ cityCircle.setMap(null); } function showCircle(lat,lng,rad){ var populationOptions2 = { strokeColor: '#e4001b', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#e4001b', fillOpacity: 0.2, map: map, center: new google.maps.LatLng(lat, lng), radius: rad * 1000 }; var marker = new google.maps.Marker({ position:new google.maps.LatLng(lat, lng), map: map, //icon: icon }); //show info window if marker clicked google.maps.event.addListener(marker, 'click', function() { //infowindow.setContent(lat+" "+lng); //infowindow.open(map,marker); }); cityCircle = new google.maps.Circle(populationOptions2); } function drawMarker(lat,lng,info,icon,ind){ var marker = new google.maps.Marker({ position:new google.maps.LatLng(lat, lng), map: map, icon: icon }); if(mapCenter == 0){ mapCenter = 1; map.setCenter(new google.maps.LatLng(lat,lng)); } //Put marker in marker array markers[ind] = marker; markerIndex++; //show info window if marker clicked google.maps.event.addListener(marker, 'click', function() { //infowindow.setContent('
    ' + info + '
    '); ib.close(); ib.setContent('
    ' + info + '
    '); ib.open(map,marker); }); } function drawMarker2(address,info,icon,ind,id){ var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': address }, function(results, status) { //Gefunden? if (status == google.maps.GeocoderStatus.OK) { var mylatlng = results[0].geometry.location; var marker = new google.maps.Marker({ position: mylatlng, map: map, icon: icon }); if(mapCenter == 0){ mapCenter = 1; map.setCenter(mylatlng); } var templat = results[0].geometry.location.lat(); var templng = results[0].geometry.location.lng(); document.getElementById("mapframe").src = '/karte.php?lat=' + templat + '&lng=' + templng + '&id=' + id; //Put marker in marker array markers[ind] = marker; markerIndex++; //show info window if marker clicked google.maps.event.addListener(marker, 'click', function() { //infowindow.setContent('
    ' + info + '
    '); ib.close(); ib.setContent('
    ' + info + '
    '); ib.open(map,marker); }); } }); } function drawMarkerFromAddresse(address,text,onr){ var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': address }, function(results, status){ if (status == google.maps.GeocoderStatus.OK){ var latlng = results[0].geometry.location; //Marker var marker = new google.maps.Marker({ position: latlng, map: map, }); //Put marker in marker array markers.push(marker); markerIndex++; //show info window if marker clicked google.maps.event.addListener(marker, 'click', function() { //infowindow.setContent('
    ' + text + '
    '); ib.close(); ib.setContent('
    ' + text + '
    '); ib.open(map,marker); }); } }); } var ll = new google.maps.LatLng(52.279911, 8.047179); // Sets the map on all markers in the array. function setAllMap(map) { for (var i = 0; i < markers.length; i++) { if(typeof markers[i] !== "undefined") { markers[i].setMap(map); } } } // Removes the markers from the map, but keeps them in the array. function clearMarkers() { setAllMap(null); } // Shows any markers currently in the array. function showMarkers() { setAllMap(map); } // Deletes all markers in the array by removing references to them. function deleteMarkers() { clearMarkers(); markers = []; } function openInfoWindow(id,c,obid){ google.maps.event.trigger(markers[id], 'click'); if(c>1){ var oid =""+obid+""+c+""; var str1 = "id=\"s"+oid+"s\" class=\"obNr "; var str2 = "id=\"s"+oid+"s\" class=\"obNr strong"; ib.content_ = ib.content_.replace("obNr strong","obNr "); ib.content_ = ib.content_.replace(str1,str2); var str11 = "id=\""+oid+"\" class=\"hideMe"; var str12 = "id=\""+oid+"\" class=\"showMe"; ib.content_ = ib.content_.replace("showMe","hideMe"); ib.content_ = ib.content_.replace(str11,str12); ib.close(); ib.open(map,markers[id]); } } var sortFlag = 0; var d = new Date(); var requestTime = 0; var Timeout; function searchObject(action,start,next) { if (getCookie("immopro_ussid") == "") setCookie("immopro_ussid",Math.floor((1 + Math.random()) * 0x10000) , 7); ussid = getCookie("immopro_ussid"); var naviStart = start; clearTimeout(Timeout); Timeout = setTimeout(function() { start1 = start || 0; next = next || 0; deleteMarkers(); markerIndex = 0; markers =[]; var wo = $("#wo_input").val(); if(wo!=""){ var strasse = $("#wo_input_strasse").val(); var plz = $("#wo_input_plz").val(); var stadtteil = $("#wo_input_stadtteil").val(); var ort = $("#wo_input_ort").val(); var land = $("#wo_input_land").val(); var rad = $("#rad_input").val(); setCookie("immopro_wo", wo, 7); setCookie("immopro_strasse",strasse, 7); setCookie("immopro_plz", plz, 7); setCookie("immopro_stadtteil", stadtteil, 7); setCookie("immopro_ort", ort, 7); setCookie("immopro_land", land, 7); setCookie("immopro_rad", rad, 7); setCookie("immopro_lat", latitude, 7); setCookie("immopro_lng", longitude, 7); } else { $("#wo_input_strasse").val(""); $("#wo_input_plz").val(""); $("#wo_input_stadtteil").val(""); $("#wo_input_ort").val(""); $("#wo_input_land").val(""); setCookie("immopro_wo", "", 7); setCookie("immopro_strasse","", 7); setCookie("immopro_plz", "", 7); setCookie("immopro_stadtteil", "", 7); setCookie("immopro_ort", "", 7); setCookie("immopro_land", "", 7); setCookie("immopro_rad", "", 7); setCookie("immopro_lat", "", 7); setCookie("immopro_lng", "", 7); } var objektTyp =$("#objekttyp_input").val(); if( $("#sortieren_input").length>0) var sortieren =$("#sortieren_input").val(); else var sortieren ="0"; setCookie("immopro_objekttyp",objektTyp, 7); if(objektTyp!=15) { if($( "#preis_von_input" ).length > 0) var preisv = $( "#preis_von_input" ).val(); else var preisv = ""; if($( "#preis_bis_input" ).length > 0) var preisb = $( "#preis_bis_input" ).val(); else var preisb = ""; if($( "#flaeche_von_input" ).length > 0) var flaechev = $( "#flaeche_von_input" ).val(); else var flaechev = ""; if($( "#flaeche_bis_input" ).length > 0) var flaecheb = $( "#flaeche_bis_input" ).val(); else var flaecheb = ""; if($( "#zimmer_von_input" ).length > 0) var zimmerv = $( "#zimmer_von_input" ).val(); else var zimmerv = ""; if($( "#zimmer_bis_input" ).length > 0) var zimmerb = $( "#zimmer_bis_input" ).val(); else var zimmerb = ""; setCookie("immopro_preisv",preisv, 7); setCookie("immopro_preisb",preisb, 7); setCookie("immopro_flaechev",flaechev, 7); setCookie("immopro_flaecheb",flaecheb, 7); setCookie("immopro_zimmerv",zimmerv, 7); setCookie("immopro_zimmerb",zimmerb, 7); } var searchOptions = 0; var tester133 = 1; if($("#searchOptionsContaine").is(':visible') || tester133 == 1) { var i = 0; searchOptions = 1; var wohnungstyp= new Array(); var haustyp= new Array(); var wohnart= new Array(); var nutzungsart= new Array(); var objektsart7= new Array(); var objektsart8= new Array(); var objektsart9= new Array(); var objektsart10= new Array(); var objektsart11= new Array(); var objektsart12= new Array(); var objektsart14= new Array(); var ferienwohnung= new Array(); var ausstattung= new Array(); var heizungsart= new Array(); var balkon= new Array(); var ausblick= new Array(); var schein; var vermietung; var vermarktungsart; var erschliessung= new Array(); var bebaubarnach= new Array(); var lageart= new Array(); $("input:checkbox[class=wohnungstyp]:checked").each(function () { wohnungstyp[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=haustyp]:checked").each(function () { haustyp[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=wohnart]:checked").each(function () { wohnart[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=nutzungsart]:checked").each(function () { nutzungsart[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=objektsart7]:checked").each(function () { objektsart7[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=objektsart8]:checked").each(function () { objektsart8[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=objektsart9]:checked").each(function () { objektsart9[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=objektsart10]:checked").each(function () { objektsart10[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=objektsart11]:checked").each(function () { objektsart11[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=objektsart12]:checked").each(function () { objektsart12[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=objektsart14]:checked").each(function () { objektsart14[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=ferienwohnung]:checked").each(function () { ferienwohnung[i] = $(this).val(); i++; }); i = 0; $("input:checkbox[class=ausstattung]:checked").each(function () { ausstattung[i] = $(this).val(); i++; }); i=0; $("input:checkbox[class=heizungsart]:checked").each(function () { heizungsart[i] = $(this).val(); i++; }); i=0; $("input:checkbox[class=balkon]:checked").each(function () { balkon[i] = $(this).val(); i++; }); i=0; $("input:checkbox[class=ausblick]:checked").each(function () { ausblick[i] = $(this).val(); i++; }); if($("#data28_1").is(":checked")) vermietung = ""; else if($("#data28_2").is(":checked")) vermietung = "1"; else if($("#data28_3").is(":checked")) vermietung = "0"; if($("#data23_1").is(":checked")) schein = ""; else if($("#data23_2").is(":checked")) schein = "1"; else if($("#data23_3").is(":checked")) schein = "0"; if($("#vermarktungsart1").is(":checked")) vermarktungsart = "1"; else if($("#vermarktungsart2").is(":checked")) vermarktungsart = "2"; else if($("#vermarktungsart3").is(":checked")) vermarktungsart = "3"; i=0; $("input:checkbox[class=erschliessung]:checked").each(function () { erschliessung[i] = $(this).val() i++; }); i=0; $("input:checkbox[class=bebaubarnach]:checked").each(function () { bebaubarnach[i] = $(this).val(); i++; }); i=0; $("input:checkbox[class=lageart]:checked").each(function () { lageart[i] = $(this).val(); i++; }); var baujahrv =$( "#baujahr_von_input" ).val(); var baujahrb =$( "#baujahr_bis_input" ).val(); var letzteMv =$( "#letzteM_von_input" ).val(); var letzteMb =$( "#letzteM_bis_input" ).val(); var ASZv =$("#AnzahlSchlafzimmer_von_input" ).val(); var ASZb =$("#AnzahlSchlafzimmer_bis_input" ).val(); var ABZv =$("#AnzahlBadezimmer_von_input" ).val(); var ABZb =$("#AnzahlBadezimmer_bis_input" ).val(); var mietdauerv =$("#mietdauer_von_input" ).val(); var mietdauerb =$("#mietdauer_bis_input" ).val(); var gstueckv =$("#gstueck_von_input" ).val(); var gstueckb =$("#gstueck_bis_input" ).val(); var einzugabv =$("#einzugab_von_input" ).val(); var einzugabb =$("#einzugab_bis_input" ).val(); var gastraumv =$("#gastraum_von_input" ).val(); var gastraumb =$("#gastraum_bis_input" ).val(); var anzahlBettenv =$("#anzahlBetten_von_input" ).val(); var anzahlBettenb =$("#anzahlBetten_bis_input" ).val(); var xFachMv =$("#xFachM_von_input" ).val(); var xFachMb =$("#xFachM_bis_input" ).val(); } if(objektTyp == 15){ var anreise =$("#anreise_input" ).val(); var abreise =$("#abreise_input" ).val(); var BPAnzahlv =$("#personen_von_input" ).val(); setCookie("immopro_anreise",anreise, 7); setCookie("immopro_abreise",abreise, 7); setCookie("immopro_BPAnzahlv",BPAnzahlv, 7); } var PLZSTR = (plz!=''?plz:rad!=""?ZIP:""); var WoSTR = (wo!=''?1:""); var v = 'd'; if($(window).width()<=400) v = 'm'; $.ajax({ url: "/kalender/forum/login-suche-get.php?s=0&ks=&la=de&action="+action+"&v="+v+"", type: "POST", data: {ussid:ussid,objektTyp:objektTyp,wo:WoSTR,woInput:wo,strasse:strasse,plz:PLZSTR,stadtteil:stadtteil,ort:ort,land:land,rad:rad,latitude:latitude,longitude:longitude,preisv:preisv,preisb:preisb,flaechev:flaechev,flaecheb:flaecheb,zimmerv:zimmerv,zimmerb:zimmerb,map:googlemaps, searchOptions:searchOptions,wohnungstyp:wohnungstyp, haustyp:haustyp, wohnart:wohnart, nutzungsart:nutzungsart,objektsart7:objektsart7,objektsart8:objektsart8,objektsart9:objektsart9,objektsart10:objektsart10,objektsart11:objektsart11,objektsart12:objektsart12,objektsart14:objektsart14,ferienwohnung:ferienwohnung, ausstattung:ausstattung, heizungsart:heizungsart, balkon:balkon, ausblick:ausblick, vermietung:vermietung, schein:schein, vermarktungsart:vermarktungsart, erschliessung:erschliessung, bebaubarnach:bebaubarnach, lageart:lageart, baujahrv:baujahrv, baujahrb:baujahrb, letzteMv:letzteMv,letzteMb:letzteMb, mietdauerv:mietdauerv, mietdauerb:mietdauerb, gstueckv:gstueckv, gstueckb:gstueckb, ASZv:ASZv,ASZb:ASZb,ABZv:ABZv,ABZb:ABZb, einzugabv:einzugabv, einzugabb:einzugabb, gastraumv:gastraumv, gastraumb:gastraumb, anzahlBettenv:anzahlBettenv, anzahlBettenb:anzahlBettenb, xFachMv:xFachMv, xFachMb:xFachMb,start:start1,anreise:anreise,abreise:abreise,BPAnzahlv:BPAnzahlv,menueOption:menueOption,sortieren:sortieren,breite:'1280', }, cache: false, context: document.body, success: function(responseText) { var resultArray = JSON.parse(responseText); $.each(resultArray, function() { $("#resultHeader").html(this.navi); $("#resultFooter").html(this.navi); var el = document.getElementById('resultFooter'); el.removeChild( el.firstChild ); var el = document.getElementById('resultFooter'); el.removeChild( el.firstChild ); if($(window).width()<=400) { $("#tab_s2").html(this.count=="null" ? "Keine Objekte gefunden":this.objects); if(this.navi!=null) $("#tab_s2").html(''+$("#tab_s2").html()+''); } if(this.count>0) { $('input[id*=ergibnisseBTN2]').val(this.count+' Treffer anzeigen'); $('input[id*=ergibnisseBTN]').val(this.count+' Treffer anzeigen'); $("#treffer").html(this.count+' Treffer anzeigen'); } else if(this.count==0) { $('input[id*=ergibnisseBTN2]').val('Kein Treffer'); $('input[id*=ergibnisseBTN]').val('Kein Treffer'); $("#treffer").html(this.count+' Treffer anzeigen'); } $("#resultContaine").html(this.count+' Treffer anzeigen'); $("#resultObjects").html(this.count=="null"?"Keine Objekte gefunden":this.objects); if((next == 0 && mSuche ==0)){ $("#warpper").hide(); $("#resultHeader").hide(); $("#resultFooter").hide(); } if(mSuche ==1 && this.count!=0){ $("#warpper").show(); $("#resultHeader").show(); $("#resultFooter").show(); mSuche =0; } if(this.count==0){ $("#warpper").hide(); $("#resultHeader").hide(); $("#resultFooter").hide(); } if($(window).width()<=400) { $("#resultHeader").hide(); $("#resultFooter").hide(); } }); if(naviStart>0){ var resultDivOffset = $(".sortDiv").offset(); window.scrollTo(0,resultDivOffset.top); } } }); },300); } function showSearchResult() { if ((window.top != window.self) ) { if(startsucheIframe == 1) window.top.location.href ='/objekt-suchen.php?s=0&ks=&la=de&mSuche=1'; else window.location.href ='/objekt-suchen.php?s=0&ks=&la=de&mSuche=1'; } else if ($("#menueSuche").length > 0) { window.location.href ='/objekt-suchen.php?s=0&ks=&la=de&mSuche=1'; } else if ($(window).width() <= 400){ $("#content2 #tab_s1").hide(); $("#tabs2 li:nth-child(2)").attr("id","current"); $("#tabs2 li:first").attr("id",""); $("#content2 #tab_s2").fadeIn(); if(!$("#searchOptionsContaine").is(':visible')) { var sortDivOffset = $("#tabs2").offset(); window.scrollTo(0,sortDivOffset.top-60); } } else{ $("#resultHeader").show(); $("#resultFooter").show(); $("#warpper").show(); var resultHeaderOffset = $("#resultHeader").offset(); window.scrollTo(0,resultHeaderOffset.top-100); } setCookie("immopro_show_object", "1", 1); }