
var map=null;var geocoder=null;var marker=null;WLC.resultList=[];WLC.adResults=[[],[],[]];WLC.markers=[];WLC.resolvedMarkers=[];WLC.thumbMarkers=[];WLC.resolvedThumbMarkers=[];WLC.isFilterNotSet=true;WLC.RESULTLISTSIZE=0;WLC.ADURL="itemUrl";WLC.ADTITLE="itemTitle";WLC.STREET="street";WLC.CITY="city";WLC.COUNTRY="countryId";WLC.PRICE="price";WLC.PRICEUNIT="priceUnit";WLC.SPACE="numberOfRooms";WLC.AVAILABILITY="availableFrom";WLC.IMGSRC="imgSrc";WLC.IMGFLYSRC="imgFlySrc";WLC.MARKERTEXT="markerText";WLC.alphabet=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];ajaxResult=null;WLC.ajaxResultSize=0;WLC.ajaxFilterSubcategories=[];WLC.VIEWTYPE="viewType";WLC.mapIsOpen=true;jQuery(function($){if(!(WLC.isMapSupported())){jQuery("#global_e_map_showhide").hide();}
if(WLC.isResultListCalledWithRefineParameters()){WLC.showSearchFilter();}
jQuery("#e_f_tog").toggle(function(){WLC.showSearchFilter();},function(){WLC.hideSearchFilter();});if(WLC.isMapSupported()){jQuery("#e_map_showhide").toggle(function(){jQuery("#e_map_ct").hide();jQuery("#e_map_hide_text").hide();jQuery("#e_map_show_text").show();jQuery("#e_map_showhide_ico").css("background-position","0 0");WLC.mapIsOpen=false;},function(){jQuery("#e_map_ct").show();WLC.fitMarkersToMap(WLC.resolvedMarkers);jQuery("#e_map_show_text").hide();jQuery("#e_map_hide_text").show();jQuery("#e_map_showhide_ico").css("background-position","0 -11px");WLC.mapIsOpen=true;});}
jQuery("#e_res_alert_msg dt").livequery(function(){jQuery(this).click(function(){jQuery("#zipInputTmp").css({opacity:".01"}).stop();var item=jQuery(this).text();jQuery("#zipInputTmp").attr("value",item);jQuery("#zipInputTmp").css({border:"1px solid lightgreen"});jQuery("#zipInputTmp").focus();jQuery("#zipInputTmp").animate({opacity:"1"},300).animate({opacity:"0.1"},300).animate({opacity:"1"},300).animate({opacity:"0.1"},300).animate({opacity:"1"},300);});});jQuery("#e_res_alert_msg dt").livequery(function(){jQuery(this).hover(function(){jQuery(this).addClass('e_r_a_h');},function(){jQuery(this).removeClass('e_r_a_h');});},function(){jQuery(this).unbind('mouseover').unbind('mouseout');});jQuery(".hov").livequery(function(){jQuery(this).hover(function(){jQuery(this).prev().children(".res_h_t").addClass("t_on");jQuery(this).children(".res_h_l").addClass("l_on");jQuery(this).children(".res_h_r").addClass("r_on");jQuery(this).next().children(".res_h_b").addClass("b_on");},function(){jQuery(this).prev().children(".res_h_t").removeClass("t_on");jQuery(this).children(".res_h_l").removeClass("l_on");jQuery(this).children(".res_h_r").removeClass("r_on");jQuery(this).next().children(".res_h_b").removeClass("b_on");});},function(){jQuery(this).unbind('mouseover').unbind('mouseout');});jQuery("#refineSearchBtn,#refineSearchBtn2,#refineSearchLink").click(function(){WLC.refineSearch();});jQuery("#saveSearch1, #saveSearch2").click(function(){WLC.refineSearch();return false;});jQuery("img#res_pag_t_prev, img#res_pag_b_prev").click(function(){WLC.toggleMapBusy(WLC.isMapSupported(),true);jQuery("#e_res tbody").empty();WLC.toggleResultsBusy(true);EstateAjaxSearchController.getPreviousPage({callback:_handleResponse,exceptionHandler:_excepHandler});});jQuery("img#res_pag_t_next, img#res_pag_b_next").click(function(){WLC.toggleMapBusy(WLC.isMapSupported(),true);jQuery("#e_res tbody").empty();WLC.toggleResultsBusy(true);EstateAjaxSearchController.getNextPage({callback:_handleResponse,exceptionHandler:_excepHandler});});jQuery("span.res_pag_idx").livequery(function(){jQuery(this).click(function(){WLC.toggleMapBusy(WLC.isMapSupported(),true);jQuery("#e_res tbody").empty();WLC.toggleResultsBusy(true);var pageId=jQuery(this).text();EstateAjaxSearchController.getPage(pageId,{callback:_handleResponse,exceptionHandler:_excepHandler});});});jQuery("table.res_sorter_tbl a.price, table.res_sorter_tbl a.zip, table.res_sorter_tbl a.city").click(function(){WLC.toggleMapBusy(WLC.isMapSupported(),true);jQuery("#e_res tbody").empty();WLC.toggleResultsBusy(true);var sortBy=jQuery(this).attr("class");var sortDirection=jQuery(this).attr("name");WLC.setNewSortElementsFor(sortBy,sortDirection);EstateAjaxSearchController.sort(sortBy,sortDirection,{callback:_handleResponse,exceptionHandler:_excepHandler});return false;});jQuery("#e_f_region").change(function(){jQuery("#zipInputTmp").val("");jQuery("#e_f_country").val("CH");jQuery("#zipRadiusInputTmp").val("0");});jQuery("#zipInputTmp").change(function(){jQuery("#e_f_region").val("-1");});jQuery("#e_f_country").change(function(){if(jQuery("#e_f_country").val()=='CH'){jQuery("#zipRadiusInputTmp").removeAttr("disabled");jQuery("#e_f_region").removeAttr("disabled");}else{jQuery("#zipRadiusInputTmp").attr("disabled","disabled");jQuery("#e_f_region").attr("disabled","disabled");jQuery("#zipRadiusInputTmp").val("0");jQuery("#e_f_region").val("-1");}});if(WLC.isMapSupported()){WLC.initGoogleMap();}
WLC.fillUpResultList();WLC.initResults(WLC.RESULTLISTSIZE);if(WLC.isMapSupported()){WLC.processResults(WLC.RESULTLISTSIZE);}else{WLC.finalizeResultMarkup(false,WLC.isMiniMapsSupported());}});WLC.showSearchFilter=function(){jQuery("#e_map_ct").hide();jQuery("#e_f_st").hide();jQuery("#e_f_ht").show();jQuery("#e_f_tog_ico").css("background-position","0 -11px");jQuery("#e_f").show();WLC.IEmapCTHelper();WLC.isFilterNotSet=false;jQuery("#refineSearchBtn").hide();jQuery("#refineSearchBtn2").show();}
WLC.hideSearchFilter=function(){jQuery("#e_map_ct").hide();jQuery("#e_f_ht").hide();jQuery("#e_f_st").show();jQuery("#e_f_tog_ico").css("background-position","0 0");jQuery("#e_f").hide();WLC.IEmapCTHelper();WLC.isFilterNotSet=true;jQuery("#refineSearchBtn2").hide();jQuery("#refineSearchBtn").show();}
WLC.IEmapCTHelper=function(){if(WLC.isMapSupported()){if(WLC.mapIsOpen){jQuery("#e_map_ct").show();}}}
WLC.initGoogleMap=function(){if(GBrowserIsCompatible()){WLC.toggleMapBusy(WLC.isMapSupported(),true);map=new GMap2(document.getElementById("map_canvas"));map.addControl(new GSmallMapControl());map.addControl(new GMapTypeControl());map.addControl(new GScaleControl());map.enableDoubleClickZoom();map.setCenter(new GLatLng(46.888607,8.417369),7);geocoder=new GClientGeocoder();if(typeof proxyGeocoder!='undefined')
{geocoder.getLatLng=proxyGeocoder.getLatLng;}}else{jQuery("#global_e_map_showhide").hide();}}
jQuery(window).unload(function(){if(WLC.isMapSupported()){GUnload();}});WLC.initResults=function(size){if(isNaN(size)||size.length==0){log("error @ WLC.initResults(size) - 0 results returned, missing parameter: size");}else{var _size=size;for(var count=0;count<_size;count++){WLC.fillAdResults(count,WLC.resultList[count][WLC.STREET],WLC.resultList[count][WLC.CITY],WLC.resultList[count][WLC.COUNTRY],WLC.resultList[count][WLC.VIEWTYPE]);}}}
WLC.fillAdResults=function(i,street,city,country,viewType){var inputAdr="";if(street==""||street=="undefined"){inputAdr=city;}else{inputAdr=street+", "+city;}
if(country!=""&&country!="undefined"){inputAdr+=", "+country;}
WLC.adResults[0].push(inputAdr);WLC.adResults[1].push(viewType);WLC.adResults[2].push(false);}
WLC.processResults=function(numberOfAllResults){var blnMiniMapsEnabled=WLC.isMiniMapsSupported();var v=numberOfAllResults;var resolvedCounter=0;var unresolvedCounter=0;var xhrCounter=0;while(xhrCounter<v){jQuery(WLC.adResults[0]).each(function(j,e){if(geocoder){geocoder.getLatLng(e,function(pointLatLng){if(pointLatLng){WLC.markers[j]=WLC.createMarker(pointLatLng,WLC.basePath+'/images/googleMaps/e'+j+'.png',j,true);WLC.resolvedMarkers.push(WLC.markers[j]);if(blnMiniMapsEnabled==true){WLC.thumbMarkers[j]=WLC.createMarker(pointLatLng,WLC.basePath+'/images/googleMaps/e_s.png',j,false);WLC.resolvedThumbMarkers.push(WLC.thumbMarkers[j]);mapResultList=new GMap2(document.getElementById("map_canvas"+j));mapResultList.setCenter(WLC.thumbMarkers[j].getPoint(),16);mapResultList.hideControls();mapResultList.enableDoubleClickZoom();mapResultList.addOverlay(WLC.thumbMarkers[j]);}
WLC.createFlyout(j);resolvedCounter++;WLC.adResults[2][j]=true;}else{unresolvedCounter++;WLC.adResults[2][j]=false;}
if(resolvedCounter+unresolvedCounter==v){if(resolvedCounter>0){WLC.addMarkersToMap(WLC.resolvedMarkers);WLC.fitMarkersToMap(WLC.resolvedMarkers);}else{map.setCenter(new GLatLng(46.888607,8.417369),7);WLC.toggleMapBusy(WLC.isMapSupported(),false);}
WLC.finalizeResultMarkup(WLC.isMapSupported(),WLC.isMiniMapsSupported());}});}
xhrCounter++;});}}
WLC.finalizeResultMarkup=function(blnMapEnabled,blnMiniMapsEnabled){var blnIE=jQuery.browser.msie;jQuery(WLC.adResults[1]).each(function(i,e){var _viewType=WLC.adResults[1][i];if(blnMapEnabled==true){var blnResolved=WLC.adResults[2][i];jQuery("#e_res img.ie6pngfix").each(function(y,inactiveElement){if(y==i){if(blnResolved==false){if(blnIE==true){var _pattern=/(\D*)(\d+)(\.gif)/;var _string=jQuery(inactiveElement).attr("src");var _result=_string.replace(_pattern,"$1$2b$3");if(_result.length>0){newSrc=_result;jQuery(inactiveElement).attr("src",newSrc);}else{log("error: result marker img indicates false uri or ie6pngfix was not applied correctly.");}}else{var tmpSrc=jQuery(inactiveElement).attr("src");var tmpSplit=tmpSrc.split('.');var newSrc=tmpSplit[0]+"b."+tmpSplit[1];jQuery(inactiveElement).attr("src",newSrc);}}}});jQuery("#e_res a.toMainMap").each(function(w,markerElement){if(w==i){if(blnResolved==false){jQuery(markerElement).addClass("nodrop");jQuery(markerElement).click(function(){return false;});}else{jQuery(markerElement).click(function(){WLC.markers[w].openInfoWindowHtml(WLC.resultList[w][WLC.MARKERTEXT]);});}}});jQuery("#e_res div.e_res_mini").each(function(z,markupPosition){if(z==i){if(_viewType==1||_viewType==3){if(blnMiniMapsEnabled==true){if(!blnResolved){jQuery(markupPosition).hide();jQuery(markupPosition).next().show();}}else{jQuery(markupPosition).hide();}}else{jQuery(markupPosition).hide();jQuery(markupPosition).next().next().show();}}});}else{jQuery("#e_res a.toMainMap").hide();jQuery("#e_res div.e_res_mini").each(function(z,markupPosition){if(z==i){if(_viewType==2){jQuery(markupPosition).hide();jQuery(markupPosition).next().next().show();}else{jQuery(markupPosition).hide();}}});}});WLC.toggleResultsBusy(false);}
WLC.fitMarkersToMap=function(markersToFit){var bounds=new GLatLngBounds();var i=0;while(i<markersToFit.length){bounds.extend(markersToFit[i].getPoint());i++;}
var lngCenter=(bounds.getNorthEast().lng()+bounds.getSouthWest().lng())/2;var latCenter=(bounds.getNorthEast().lat()+bounds.getSouthWest().lat())/2;var center=new GLatLng(latCenter,lngCenter);map.checkResize();map.setCenter(center,map.getBoundsZoomLevel(bounds));WLC.toggleMapBusy(WLC.isMapSupported(),false);}
WLC.toggleMapstuff=function(blnWithEmptyMsg){log("toggle");}
WLC.toggleMapBusy=function(isMapSupported,blnSwitchOn){if(!isMapSupported){return;}
if(blnSwitchOn==true){jQuery("#map_busy").show();}else{jQuery("#map_busy").fadeOut(300);}}
WLC.toggleResultsBusy=function(blnSwitchOn){if(blnSwitchOn==true){jQuery("#e_res thead").show();}else{jQuery("#e_res thead").hide();}}
WLC.setNewSortElementsFor=function(criteria,direction){var ASC="asc";var DESC="desc";if(direction==ASC){jQuery("#"+criteria+"_"+ASC+"_link").hide();jQuery("#"+criteria+"_"+DESC+"_link").show();jQuery("#"+criteria+"_"+DESC+"_link").css("font-weight","bold");jQuery("#ico_"+criteria).css("background-position","0 -9px");}else{jQuery("#"+criteria+"_"+DESC+"_link").hide();jQuery("#"+criteria+"_"+ASC+"_link").show();jQuery("#"+criteria+"_"+ASC+"_link").css("font-weight","bold");jQuery("#ico_"+criteria).css("background-position","0 -18px");}
WLC.setOtherSortElementsBack(criteria);}
WLC.setOtherSortElementsBack=function(criteria){jQuery("table.res_sorter_tbl a").each(function(i,el){var elClass=jQuery(el).attr("class");if(criteria!=elClass){jQuery("#"+elClass+"_desc_link").hide();jQuery("#"+elClass+"_asc_link").show();jQuery("#"+elClass+"_asc_link").css("font-weight","normal");jQuery("table.res_sorter_tbl img."+elClass).css("background-position","0 0");}});}
WLC.addMarkersToMap=function(markers){var i=0;while(i<markers.length){map.addOverlay(markers[i]);i++;}}
WLC.createMarker=function(point,imgSrc,count,blninfo){if(blninfo==true){marker=new GMarker(point,WLC.setPOIIcon(imgSrc));GEvent.addListener(marker,"click",function(e){this.openInfoWindowHtml(WLC.resultList[count][WLC.MARKERTEXT]);});}else{marker=new GMarker(point,WLC.setSmallPOIIcon(imgSrc));}
return marker;}
WLC.createFlyout=function(count){WLC.resultList[count][WLC.MARKERTEXT]=WLC.createEstateMarkerText(count,WLC.resultList[count][WLC.IMGFLYSRC],WLC.resultList[count][WLC.STREET],WLC.resultList[count][WLC.CITY],WLC.resultList[count][WLC.ADTITLE],WLC.resultList[count][WLC.PRICE],WLC.resultList[count][WLC.PRICEUNIT],WLC.resultList[count][WLC.SPACE],WLC.resultList[count][WLC.AVAILABILITY],WLC.resultList[count][WLC.ADURL]);}
WLC.setPOIIcon=function(iconSrc){var iconRed=new GIcon();iconRed.image=iconSrc;iconRed.shadow=WLC.basePath+'/images/googleMaps/sh.png';iconRed.iconSize=new GSize(21,45);iconRed.shadowSize=new GSize(43,46);iconRed.iconAnchor=new GPoint(10,44);iconRed.infoWindowAnchor=new GPoint(11,5);var options={icon:iconRed,draggable:false,bouncy:false};return options;}
WLC.setSmallPOIIcon=function(iconSrc){var iconRed=new GIcon();iconRed.image=iconSrc;iconRed.shadow='';iconRed.iconSize=new GSize(16,16);iconRed.shadowSize=new GSize(0,0);iconRed.iconAnchor=new GPoint(8,8);iconRed.infoWindowAnchor=new GPoint(0,0);var options={icon:iconRed,draggable:false,bouncy:false};return options;}
WLC.clearMap=function(){map.clearOverlays();}
WLC.createEstateMarkerText=function(count,imageLink,street,city,adTitle,price,priceUnit,space,available,adLink){street=street.replace(/</g,"&lt;").replace(/>/g,"&gt;");city=city.replace(/</g,"&lt;").replace(/>/g,"&gt;");adTitle=adTitle.replace(/</g,"&lt;").replace(/>/g,"&gt;");return"<div id='infoWindowContainer'>"
+"<strong class=\"infoWindowLetter\">"+WLC.alphabet[count]+"</strong>"+"&nbsp;&nbsp;"+"<a href=\""+adLink+"\">"+WLC.setAddress(street,city)+"</a>"
+"<div class=\"br_s2\"><!-- --></div>"
+adTitle
+"<div class=\"br_s2\"><!-- --></div>"
+"<table>"
+"<tr>"
+"<td>"
+"<a href=\""+adLink+"\">"+imageLink+"</a>"
+"</td>"
+"<td>&nbsp;&nbsp;&nbsp;</td>"
+"<td class=\"infoWindowTxtcell\">"
+WLC.setValues(price,space,available,priceUnit)
+"</td>"
+"</tr>"
+"</table>"
+"</div>";}
WLC.setAddress=function(street,city){var address="";if(street!='undefined'&&street.trim()!=''&&city!='undefined'&&city.trim()!=''){address=street+", "+city;}else{if(city!='undefined'&&city.trim()!=''){address=city;}}
return address;}
WLC.refineSearch=function(){jQuery("#e_res_alert").hide();WLC.toggleMapBusy(WLC.isMapSupported(),true);jQuery("#e_res tbody").empty();WLC.toggleResultsBusy(true);WLC.ajaxFilterSubcategories=[];WLC.setOtherSortElementsBack(null);jQuery("#e_f_subcategory .chk").each(function(i,e){if(this.checked){WLC.ajaxFilterSubcategories.push(this.value);}});var r_zipCity=jQuery("#zipInputTmp").val();var r_radius=jQuery("#zipRadiusInputTmp").val();var r_roomsMin=jQuery("#e_f_room_min").val();var r_roomsMax=jQuery("#e_f_room_max").val();var r_priceMin=jQuery("#e_f_price_min").val();var r_priceMax=jQuery("#e_f_price_max").val();var r_surfaceLivingMin=jQuery("#surfaceLivingMin").val();var r_surfaceLivingMax=jQuery("#surfaceLivingMax").val();var r_surfacePropertyMin=jQuery("#surfacePropertyMin").val();var r_surfacePropertyMax=jQuery("#surfacePropertyMax").val();var r_surfaceUsableMin=jQuery("#surfaceUsableMin").val();var r_surfaceUsableMax=jQuery("#surfaceUsableMax").val();var r_region=jQuery("#e_f_region").val();var r_country=jQuery("#e_f_country").val();var r_date=jQuery("#e_f_date").val();if(WLC.isFilterNotSet){r_region=null;r_country=null;r_date=null;WLC.ajaxFilterSubcategories=[];}
var estateRefineAjaxBeanInObject={zipCity:r_zipCity,zipCityRadius:r_radius,numberOfRoomsMin:r_roomsMin,numberOfRoomsMax:r_roomsMax,priceMin:r_priceMin,priceMax:r_priceMax,regionId:r_region,countryId:r_country,selectedOnlineDuration:r_date,surfaceLivingMin:r_surfaceLivingMin,surfaceLivingMax:r_surfaceLivingMax,surfacePropertyMin:r_surfacePropertyMin,surfacePropertyMax:r_surfacePropertyMax,surfaceUsableMin:r_surfaceUsableMin,surfaceUsableMax:r_surfaceUsableMax,subCategoryIds:WLC.ajaxFilterSubcategories,isMixedSearch:WLC.isMixedSearch()};EstateAjaxSearchController.refineSearch(estateRefineAjaxBeanInObject,{callback:_handleResponse,exceptionHandler:_excepHandler});return;}
function _excepHandler(exceptionMessage,exceptionObject){alert(exceptionMessage+", "+exceptionObject.missedSessionKey+", "+exceptionObject.javaClassName);}
function _handleResponse(ajaxResponse){if(ajaxResponse.ajaxCallState===1){jQuery("#global_e_map_showhide").hide();jQuery("#res").hide();jQuery("#e_res_alert .ct_res_emph_bg").empty();jQuery("#e_res_alert .ct_res_emph_bg").append(ajaxResponse.infoText);jQuery("#e_res_alert").show();}else if(ajaxResponse.ajaxCallState===2){jQuery("#global_e_map_showhide").hide();jQuery("#res").hide();jQuery("#e_res_alert .ct_res_emph_bg").empty();jQuery("#e_res_alert .ct_res_emph_bg").append(ajaxResponse.warningText);jQuery("#e_res_alert .ct_res_emph_bg").append(ajaxResponse.message.message);jQuery("#e_res_alert").show();}else if(ajaxResponse.ajaxCallState===4){jQuery("#global_e_map_showhide").hide();jQuery("#res").hide();jQuery("#e_res_alert .ct_res_emph_bg").empty();jQuery("#e_res_alert .ct_res_emph_bg").append(ajaxResponse.errorText);jQuery("#e_res_alert").show();}else if(ajaxResponse.ajaxCallState===0){_showData(ajaxResponse.data);WLC.axSearchParamsRent=ajaxResponse.data.properties['context.switch.url.rent'];WLC.axSearchParamsBuy=ajaxResponse.data.properties['context.switch.url.buy'];}else{return;}}
function _showData(ajaxResult){jQuery("#e_res_alert").hide();if(WLC.isMapSupported()){jQuery("#global_e_map_showhide").show();}
jQuery("#res").show();jQuery("#e_res_alert .ct_res_emph_bg").text();var ajaxResultList=[];WLC.resultList=[];WLC.adResults=[[],[],[]];WLC.markers=[];WLC.resolvedMarkers=[];if(WLC.isMiniMapsSupported()){WLC.thumbMarkers=[];WLC.resolvedThumbMarkers=[];}
marker=null;if(WLC.isMapSupported()){WLC.clearMap();}
jQuery("span.resRangeStart").text(ajaxResult.resultRangeStart);jQuery("span.resRangeEnd").text(ajaxResult.resultRangeEnd);jQuery("span.totalSearchResult").text(ajaxResult.totalSearchResult);var currentPage=ajaxResult.currentPageId;var isLastPage=false;isLastPage=ajaxResult.isLastPage;var pageIds=[];pageIds=ajaxResult.pageIds;jQuery(".res_pag_idx_ct").empty();if(pageIds.length>1){jQuery(pageIds).each(function(i,el){jQuery(".res_pag_idx_ct").append("<span class=\"res_pag_idx\">"+el+"</span>");});}
if(currentPage==1){jQuery("#res_pag_t_prev, #res_pag_b_prev").hide();}else{jQuery("#res_pag_t_prev, #res_pag_b_prev").show();}
if(isLastPage==true){jQuery("#res_pag_t_next, #res_pag_b_next").hide();}else{jQuery("#res_pag_t_next, #res_pag_b_next").show();}
jQuery("span.res_pag_idx").each(function(i,el){if(jQuery(el).text()==currentPage){jQuery(el).css("font-weight","bold");}});jQuery(".res_paging").show();ajaxResultList=ajaxResult.result;WLC.ajaxResultSize=ajaxResultList.length;jQuery.each(ajaxResultList,function(i,arrEl){WLC.resultList[i]={};WLC.resultList[i][WLC.ADURL]=(arrEl.adUrl!="undefined")?arrEl.adUrl:"";WLC.resultList[i][WLC.ADTITLE]=(arrEl.title!="undefined")?arrEl.title:"";WLC.resultList[i][WLC.STREET]=(arrEl.streetName!="undefined")?arrEl.streetName:"";WLC.resultList[i][WLC.STREET]+=(arrEl.streetNumber!="undefined"&&arrEl.streetNumber.trim()!="")?" "+arrEl.streetNumber:"";WLC.resultList[i][WLC.CITY]=(arrEl.zip!="undefined")?arrEl.zip:"";WLC.resultList[i][WLC.CITY]+=(arrEl.city!="undefined")?" "+arrEl.city:"";WLC.resultList[i][WLC.COUNTRY]=(arrEl.countryId!="undefined")?arrEl.countryId:"";WLC.resultList[i][WLC.PRICE]=(arrEl.priceUnified!="undefined")?arrEl.priceUnified:"";WLC.resultList[i][WLC.PRICEUNIT]=(arrEl.priceUnit!="undefined")?arrEl.priceUnit:"";WLC.resultList[i][WLC.SPACE]=(arrEl.space!="undefined")?arrEl.space:"";WLC.resultList[i][WLC.AVAILABILITY]=(arrEl.availableFrom!="undefined"&&arrEl.availableFrom.trim()!='')?WLC.returnLabel('available')+arrEl.availableFrom+" "+arrEl.availableFromDate:"";WLC.resultList[i][WLC.IMGSRC]=(arrEl.imageSrcPath!="undefined")?arrEl.imageSrcPath:"";WLC.resultList[i][WLC.IMGFLYSRC]=(arrEl.imageFlyoutSrcPath!="undefined")?arrEl.imageFlyoutSrcPath:"";WLC.resultList[i][WLC.VIEWTYPE]=(arrEl.viewType!="undefined")?arrEl.viewType:"";var street=WLC.resultList[i][WLC.STREET];var city=(arrEl.zip!=""&&arrEl.zip!="undefined"?arrEl.zip+" ":"");city+=(arrEl.city!=""&&arrEl.city!="undefined"?arrEl.city:"");var country=(arrEl.countryId!=""&&arrEl.countryId!="undefined")?arrEl.countryId:"";WLC.fillAdResults(i,street,city,country,arrEl.viewType);WLC.generateEstateResultRow(i,arrEl.imageSrcPath,arrEl.adUrl,arrEl.zip,arrEl.city,arrEl.streetName,arrEl.streetNumber,arrEl.title,arrEl.space,arrEl.availableFrom,arrEl.availableFromDate,arrEl.priceUnified,arrEl.priceUnit,arrEl.sourceName);});if(WLC.isMapSupported()){WLC.processResults(WLC.ajaxResultSize);}else{WLC.finalizeResultMarkup(false,WLC.isMiniMapsSupported());}}
