if(!iQ.Ajax){alert('iQAjax.js Not Loaded');}; if(!iQ.Utils){alert('iQUtils.js Not Loaded');}; YAHOO.util.Event.addListener(window,"load",function(){doPageLoad()}); var intStartPage = 1; var bPageLoad = true; var iMaxMapPoints = 300; var objAccordianOpen = null var objAccordianClose = null var AccordianState = 'closed'; var m_ProcessingHTML = '
'; function doPageLoad(){ if(iQ.Utils.getFieldValue('DataForm','SearchBy').toLowerCase() == 'map'){ var tmpLat = iQ.Utils.GetCookie('MapLat'); var tmpLon = iQ.Utils.GetCookie('MapLon'); var tmpZoomLevel = iQ.Utils.GetCookie('MapZoomLevel'); var MapOptions ={}; MapOptions.DivID = 'iQ_VEMap'; MapOptions.MapType = 'default'; if(tmpLat != null && tmpLon != null && tmpZoomLevel != null && tmpLat != '' && tmpLon != '' && tmpZoomLevel != ''){ MapOptions.Lat = tmpLat; MapOptions.Lon = tmpLon; var tmpZoomLevel = tmpZoomLevel * 1; MapOptions.ZoomLevel = tmpZoomLevel; }else{ MapOptions.Lat = 47.6998268545; MapOptions.Lon = -116.792907715; MapOptions.ZoomLevel = 14; } MapOptions.Recenter = false; MapOptions.OnChangeCallBack = 'handleMapChanged'; doInitMap(MapOptions); } intStartPage = iQ.Utils.getFieldValue('DataForm','StartPage'); //need this for coming from 'back' button ChangePropertyType(); doLoadAccordian('iQ_PWatch_Header'); doGetMapListings(); doGetListings(); } function GetParams(bMapParams){ var params = ''; var sa = iQ.Utils.getFieldValue('DataForm','StreetAddress'); var ml = iQ.Utils.getFieldValue('DataForm','ML_Number'); var pid = iQ.Utils.getFieldValue('DataForm','PropertyID'); var mloradd = iQ.Utils.getFieldValue('DataForm','ML_Or_Address'); var quicksearch = ''; var quicksearchtype = ''; if(sa != ''){ quicksearch = sa; quicksearchtype = 'StreetAddress'; } if(ml != ''){ quicksearch = ml; quicksearchtype = 'ML_Number'; } if(pid != ''){ quicksearch = pid; quicksearchtype = 'PropertyID'; } if(mloradd != ''){ quicksearch = mloradd; quicksearchtype = 'Any'; } //alert(quicksearch); if(iQ.Utils.getFieldValue('DataForm','SearchBy').toLowerCase() == 'list'){ bMapParams = false; if(quicksearch != ''){ params += '"ReturnLayout":"AllPropertyFullGrid",'; params += '"QuickSearch":"' + encodeURIComponent(quicksearch) + '",'; params += '"QuickSearchType":"' + encodeURIComponent(quicksearchtype) + '",'; }else{ params += '"ReturnLayout":"PropertyTypeFullGrid",'; } } //alert(params); params += '"TrackingID":"' + encodeURIComponent(iQ.Utils.GetCookie('TrackingID')) + '",'; params += '"SelectedLanguage":"' + encodeURIComponent(iQ.Utils.GetCookie('SelectedLanguage')) + '",'; params += '"TopLeftLat":' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','TopLeftLat')) + ','; params += '"TopLeftLon":' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','TopLeftLon')) + ','; params += '"BottomRightLat":' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','BottomRightLat')) + ','; params += '"BottomRightLon":' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','BottomRightLon')) + ','; if(bMapParams){ params += '"StartPage":"' + intStartPage + '",'; params += '"MaxRows":' + iMaxMapPoints + ','; params += '"ReturnType":"Recordset",'; }else{ params += '"StartPage":"' + intStartPage + '",'; params += '"MaxRows":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','MaxRows')) + '",'; params += '"ReturnType":"HTML",'; } params += '"NewDays":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','NewDays')) + '",'; params += '"ReducedDays":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','ReducedDays')) + '",'; params += '"PropertyType":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','PropertyType')) + '",'; params += '"SiteID_List":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','SiteID_List')) + '",'; params += '"OrderBy":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','OrderBy')) + '",'; params += '"OrderDirection":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','OrderDirection')) + '",'; switch (iQ.Utils.getFieldValue('DataForm','SearchType')){ case "Area": params += '"SearchList":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','AreaList')) + '",'; break; case "Zip_Code": params += '"SearchList":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','ZipList')) + '",'; break; case "City": params += '"SearchList":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','CityList')) + '",'; break; } params += '"SearchType":' + '"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','SearchType')) + '",'; params += '"ImagesMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','ImagesMin')) + '",'; params += '"VirtualTour":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','VirtualTour')) + '",'; params += '"StreetAddress":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','StreetAddress')) + '",'; params += '"ML_Or_Address":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','ML_Or_Address')) + '",'; params += '"ML_Number":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','ML_Number')) + '",'; params += '"PropertyID":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','PropertyID')) + '",'; params += '"Previews":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Previews')) + '",'; params += '"OpenHouse":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','OpenHouse')) + '",'; params += '"OpenHouseDays":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','OpenHouseDays')) + '",'; //alert(iQ.Utils.getFieldValue('DataForm','Res_StyleList')); if(iQ.Utils.getFieldValue('DataForm','PropertyType') == 'Residential'){ params += '"PriceMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_PriceMin')) + '",'; params += '"PriceMax":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_PriceMax')) + '",'; params += '"StyleList":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_StyleList')) + '",'; params += '"BedsMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_BedsMin')) + '",'; params += '"BathsMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_BathsMin')) + '",'; params += '"SQFeetMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_SQFeetMin')) + '",'; params += '"GarageMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_GarageMin')) + '",'; params += '"Story":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_Story')) + '",'; params += '"YearMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_YearMin')) + '",'; params += '"AcreageMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_AcreageMin')) + '",'; params += '"Pool":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_Pool')) + '",'; params += '"SchoolDistrict":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_SchoolDistrict')) + '",'; params += '"ElementarySchool":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_ElementarySchool')) + '",'; params += '"JrHighSchool":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_JrHighSchool')) + '",'; params += '"HighSchool":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_HighSchool')) + '",'; params += '"CommunityList":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_CommunityList')) + '",'; params += '"CommunityName":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_CommunityName')) + '",'; params += '"SubType":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Res_SubType')) + '",'; } if(iQ.Utils.getFieldValue('DataForm','PropertyType') == 'Land'){ params += '"PriceMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Lan_PriceMin')) + '",'; params += '"PriceMax":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Lan_PriceMax')) + '",'; params += '"AcreageMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Lan_AcreageMin')) + '",'; params += '"Zoning":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Lan_Zoning')) + '",'; params += '"SubType":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Lan_SubType')) + '",'; } if(iQ.Utils.getFieldValue('DataForm','PropertyType') == 'Commercial'){ params += '"PriceMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_PriceMin')) + '",'; params += '"PriceMax":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_PriceMax')) + '",'; params += '"SQFeetMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_SQFeetMin')) + '",'; params += '"SQFeetOfficeMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_SQFeetOfficeMin')) + '",'; params += '"Zoning":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_Zoning')) + '",'; params += '"StoryMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_StoryMin')) + '",'; params += '"SubType":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_SubType')) + '",'; params += '"YearMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Com_YearMin')) + '",'; } if(iQ.Utils.getFieldValue('DataForm','PropertyType') == 'MultiFamily'){ params += '"PriceMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Mul_PriceMin')) + '",'; params += '"PriceMax":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Mul_PriceMax')) + '",'; params += '"BuildingsMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Mul_BuildingsMin')) + '",'; params += '"UnitsMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Mul_UnitsMin')) + '",'; params += '"SubType":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Mul_SubType')) + '",'; params += '"YearMin":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Mul_YearMin')) + '",'; params += '"Type":"' + encodeURIComponent(iQ.Utils.getFieldValue('DataForm','Mul_Type')) + '",'; } params = iQ.Utils.Left(params,params.length-1); return params; } function doGetListings(){ doStatusUpdate('iQ_ListStatusMessage',m_ProcessingHTML); var params = GetParams(false); var sa = iQ.Utils.getFieldValue('DataForm','StreetAddress'); var ml = iQ.Utils.getFieldValue('DataForm','ML_Number'); var pid = iQ.Utils.getFieldValue('DataForm','PropertyID'); var mloradd = iQ.Utils.getFieldValue('DataForm','ML_Or_Address'); var bDoQuickSearch = false; if(sa != '' || ml != '' || pid != '' || mloradd != ''){ bDoQuickSearch = true; } var _Ajax = new iQ.Ajax(); if(iQ.Utils.getFieldValue('DataForm','SearchBy').toLowerCase() == 'list'){ if(bDoQuickSearch){ _Ajax.CFCMethod = 'doQuickSearch'; }else{ _Ajax.CFCMethod = 'doCriteriaSearch'; } }else{ _Ajax.CFCMethod = 'doSimpleCriteriaSearch'; } _Ajax.URL = '/websvc/Listings.cfc'; _Ajax.Params ={Params:'{' + params + '}'}; _Ajax.CallbackHandler = "onGetListings"; _Ajax.Send(); } function onGetListings(ret){ var jsonData = ret; var objList = iQ.Utils.getBrowserObject('iQ_Listings'); if(jsonData.TOTALROWCOUNT == 0){ doStatusUpdate('iQ_ListStatusMessage','0 Listings found'); objList.innerHTML = ''; }else{ if(iQ.Utils.getFieldValue('DataForm','SearchBy').toLowerCase() == 'list'){ objList.innerHTML = jsonData.HTML; iQ.Utils.doAjaxResultPaging(5,'app',intStartPage,jsonData.TOTALROWCOUNT,iQ.Utils.getFieldValue('DataForm','MaxRows'),'doNextPage','divPagingTop'); iQ.Utils.doAjaxResultPaging(5,'app',intStartPage,jsonData.TOTALROWCOUNT,iQ.Utils.getFieldValue('DataForm','MaxRows'),'doNextPage','divPagingBottom'); }else{ if(jsonData.TOTALROWCOUNT > iMaxMapPoints){ objList.innerHTML = ''; iQ.Utils.doAjaxResultPaging(5,'app',1,0,iQ.Utils.getFieldValue('DataForm','MaxRows'),'doNextPage','divPagingTop'); iQ.Utils.doAjaxResultPaging(5,'app',1,0,iQ.Utils.getFieldValue('DataForm','MaxRows'),'doNextPage','divPagingBottom'); }else{ objList.innerHTML = jsonData.HTML; iQ.Utils.doAjaxResultPaging(5,'app',intStartPage,jsonData.TOTALROWCOUNT,iQ.Utils.getFieldValue('DataForm','MaxRows'),'doNextPage','divPagingTop'); iQ.Utils.doAjaxResultPaging(5,'app',intStartPage,jsonData.TOTALROWCOUNT,iQ.Utils.getFieldValue('DataForm','MaxRows'),'doNextPage','divPagingBottom'); } } doStatusUpdate('iQ_ListStatusMessage',jsonData.TOTALROWCOUNT + ' Listings found'); $.iqListingImages(); } } function doGetMapListings(){ //since we are not doing a map search just return. if(iQ.Utils.getFieldValue('DataForm','SearchBy').toLowerCase() == 'list'){ return false; } doStatusUpdate('iQ_MapStatusMessage',m_ProcessingHTML); var params = GetParams(true); var _Ajax = new iQ.Ajax(); _Ajax.CFCMethod = 'doSimpleCriteriaSearch'; _Ajax.URL = '/websvc/Listings.cfc'; _Ajax.Params ={Params:'{' + params + '}'}; _Ajax.CallbackHandler = "onGetMapListings"; _Ajax.Send(); } function onGetMapListings(ret){ var arrPoints = new Array(1); var jsonData = ret; var jsonCols ={}; if(jsonData.TOTALROWCOUNT == 0){ //iQ.Utils.doMessagePanel('Message','No Records Found'); iQ.Utils.doShowMessageOverlay('
We found no properties matching your search criteria.

Please modify your search criteria or adjust the map to change the search area.
','iQ_VEMap','200px','Right',-2,'Top',2); doLoadMap([]); doStatusUpdate('iQ_MapStatusMessage','0 Listings found'); }else{ if(jsonData.TOTALROWCOUNT > iMaxMapPoints){ doClearMap(); iQ.Utils.doShowMessageOverlay('
A maximum of ' + iMaxMapPoints + ' properties may be displayed. We found ' + jsonData.TOTALROWCOUNT + ' properties matching your search criteria.

Please modify your search criteria or adjust the map to change the search area.

click to close
','iQ_VEMap','200px','Right',-2,'Top',2); //iQ.Utils.doMessagePanel('Message','A maximum of ' + iMaxMapPoints + ' properties may be displayed. We found ' + jsonData.TOTALROWCOUNT + ' properties matching your search criteria. Please adjust your criteria or double click the map to zoom in.'); }else{ iQ.Utils.doHideMessageOverlay(); for(var i = 0;i < jsonData.RECORDSET.COLUMNS.length;i++){ jsonCols[jsonData.RECORDSET.COLUMNS[i]] = i; } for(i=0;i < jsonData.RECORDSET.DATA.length;i++){ var obj = new iQMapPoint(); obj.DBTable = jsonData.RECORDSET.DATA[i][jsonCols["PROPERTYTYPE"]]; obj.KeyField = 'ML_Number'; obj.KeyData = jsonData.RECORDSET.DATA[i][jsonCols["ML_NUMBER"]]; obj.Lat = jsonData.RECORDSET.DATA[i][jsonCols["LAT"]]; obj.Lon = jsonData.RECORDSET.DATA[i][jsonCols["LON"]]; obj.Address = jsonData.RECORDSET.DATA[i][jsonCols["STREETADDRESS"]] + "," + jsonData.RECORDSET.DATA[i][jsonCols["CITY"]] + "," + jsonData.RECORDSET.DATA[i][jsonCols["STATE"]] + " " + jsonData.RECORDSET.DATA[i][jsonCols["ZIP_CODE"]]; obj.CustomIcon = '
' + eval(i + 1) + '
'; obj.CustomIcon_Class = 'iQ_Listings_Map_Icon'; obj.CustomIcon_Over_Class = 'iQ_Listings_Map_Icon_Over'; obj.Contents = getBubbleContents(jsonData,jsonCols,i); arrPoints[i] = obj; } doLoadMap(arrPoints); } doStatusUpdate('iQ_MapStatusMessage',jsonData.TOTALROWCOUNT + ' Listings found'); } //window.scroll(0,0); } function getBubbleContents(jsonData,jsonCols,intPin){ var objStringBuffer = new iQ.Utils.StringBuffer(); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
' + jsonData.RECORDSET.DATA[intPin][jsonCols["ROWNUMBER"]] + ':' + jsonData.RECORDSET.DATA[intPin][jsonCols["STREETADDRESS"]] + '
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append(''); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); if(jsonData.RECORDSET.DATA[intPin][jsonCols["PROPERTYTYPE"]] == 'Residential'){ objStringBuffer.append('
$' + iQ.Utils.NumberFormat(jsonData.RECORDSET.DATA[intPin][jsonCols["LIST_PRICE"]]) + '
'); objStringBuffer.append('Bed(s): ' + jsonData.RECORDSET.DATA[intPin][jsonCols["BEDS"]] + '
'); objStringBuffer.append('Bath(s): ' + jsonData.RECORDSET.DATA[intPin][jsonCols["BATHS"]] + '
'); objStringBuffer.append('Sq Ft: ' + eval(jsonData.RECORDSET.DATA[intPin][jsonCols["SQ_FOOT"]]) + '
'); } objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); if(jsonData.RECORDSET.DATA[intPin][jsonCols["ISCOMPANYLISTING"]] == 'T'){ objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append(''); objStringBuffer.append(jsonData.RECORDSET.DATA[intPin][jsonCols["AGENTFIRSTNAME"]] + '
'); objStringBuffer.append(jsonData.RECORDSET.DATA[intPin][jsonCols["AGENTLASTNAME"]] + '
'); objStringBuffer.append('
'); objStringBuffer.append('' + jsonData.RECORDSET.DATA[intPin][jsonCols["AGENTPHONE"]] + '
'); objStringBuffer.append('
'); objStringBuffer.append('
'); } objStringBuffer.append('
'); if(jsonData.RECORDSET.DATA[intPin][jsonCols["ISCOMPANYLISTING"]] == 'T'){ objStringBuffer.append('
'); objStringBuffer.append(''); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); }else{ objStringBuffer.append('
'); } objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); objStringBuffer.append('
'); if(jsonData.RECORDSET.DATA[intPin][jsonCols["ISCOMPANYLISTING"]] == 'F'){ objStringBuffer.append('' + jsonData.RECORDSET.DATA[intPin][jsonCols["LO_NAME"]] + ''); } objStringBuffer.append(''); objStringBuffer.append('
'); objStringBuffer.append('
'); return objStringBuffer.tostring(); } function doStatusUpdate(sDivID,sMessage){ var objStatus = iQ.Utils.getBrowserObject(sDivID); objStatus.innerHTML = sMessage; } function ChangeSiteID(siteid){ iQ.Utils.setFieldValue('DataForm','SiteIDChanged','T'); iQ.Utils.setFieldValue('DataForm','ML_Number',''); iQ.Utils.setFieldValue('DataForm','StreetAddress',''); iQ.Utils.setFieldValue('DataForm','PropertyID',''); iQ.Utils.setFieldValue('DataForm','ML_Or_Address',''); iQ.Utils.setFieldValue('DataForm','Res_CommunityName',''); document.DataForm.submit(); } function ChangeSearchType(){ var divAreaList = iQ.Utils.getBrowserObject("divAreaList"); var divZipList = iQ.Utils.getBrowserObject("divZipList"); var divCityList = iQ.Utils.getBrowserObject("divCityList"); switch (iQ.Utils.getFieldValue('DataForm','SearchType')){ case "Area": divAreaList.style.visibility = 'visible'; divAreaList.style.display = 'block'; divZipList.style.visibility = 'hidden'; divZipList.style.display = 'none'; divCityList.style.visibility = 'hidden'; divCityList.style.display = 'none'; var obj = iQ.Utils.getFormObject('DataForm','ZipList','select'); for(var i=0;i < obj.options.length;i++){ obj.options[i].selected = false; } if(obj.options.length != 0){ obj.options[0].selected = true; } var obj = iQ.Utils.getFormObject('DataForm','CityList','select'); for(var i=0;i < obj.options.length;i++){ obj.options[i].selected = false; } if(obj.options.length != 0){ obj.options[0].selected = true; } break; case "Zip_Code": divAreaList.style.visibility = 'hidden'; divAreaList.style.display = 'none'; divZipList.style.visibility = 'visible'; divZipList.style.display = 'block'; divCityList.style.visibility = 'hidden'; divCityList.style.display = 'none'; var obj = iQ.Utils.getFormObject('DataForm','AreaList','select'); for(var i=0;i < obj.options.length;i++){ obj.options[i].selected = false; } if(obj.options.length != 0){ obj.options[0].selected = true; } var obj = iQ.Utils.getFormObject('DataForm','CityList','select'); for(var i=0;i < obj.options.length;i++){ obj.options[i].selected = false; } if(obj.options.length != 0){ obj.options[0].selected = true; } break; case "City": divAreaList.style.visibility = 'hidden'; divAreaList.style.display = 'none'; divZipList.style.visibility = 'hidden'; divZipList.style.display = 'none'; divCityList.style.visibility = 'visible'; divCityList.style.display = 'block'; var obj = iQ.Utils.getFormObject('DataForm','AreaList','select'); for(var i=0;i < obj.options.length;i++){ obj.options[i].selected = false; } if(obj.options.length != 0){ obj.options[0].selected = true; } var obj = iQ.Utils.getFormObject('DataForm','ZipList','select'); for(var i=0;i < obj.options.length;i++){ obj.options[i].selected = false; } if(obj.options.length != 0){ obj.options[0].selected = true; } break; } } function ChangeOrderBy(orderby,orderdirection){ var objOrderBy = iQ.Utils.getFormObject('DataForm','OrderBy','input'); var objOrderDirection = iQ.Utils.getFormObject('DataForm','OrderDirection','input'); objOrderBy.value = orderby; objOrderDirection.value = orderdirection; doGetMapListings(); doGetListings(); } function ChangePropertyType(){ var divStyles = iQ.Utils.getBrowserObject('divStyles'); var divResCriteria = iQ.Utils.getBrowserObject('divResCriteria'); var divSchools = iQ.Utils.getBrowserObject('divSchools'); var divLanCriteria = iQ.Utils.getBrowserObject('divLanCriteria'); var divComCriteria = iQ.Utils.getBrowserObject('divComCriteria'); var divMulCriteria = iQ.Utils.getBrowserObject('divMulCriteria'); var divOpenHouse = iQ.Utils.getBrowserObject('divOpenHouse'); var divOpenHouseSearchButton = iQ.Utils.getBrowserObject('divOpenHouseSearchButton'); iQ.Utils.doHideMessageOverlay(); switch (iQ.Utils.getFieldValue('DataForm','PropertyType')){ case "Residential": divStyles.style.visibility = 'visible'; divStyles.style.display = 'block'; divResCriteria.style.visibility = 'visible'; divResCriteria.style.display = 'block'; divSchools.style.visibility = 'visible'; divSchools.style.display = 'block'; divLanCriteria.style.visibility = 'hidden'; divLanCriteria.style.display = 'none'; divComCriteria.style.visibility = 'hidden'; divComCriteria.style.display = 'none'; divMulCriteria.style.visibility = 'hidden'; divMulCriteria.style.display = 'none'; divOpenHouse.style.visibility = 'visible'; divOpenHouse.style.display = 'block'; divOpenHouseSearchButton.style.visibility = 'visible'; divOpenHouseSearchButton.style.display = 'block'; break; case "Commercial": divStyles.style.visibility = 'hidden'; divStyles.style.display = 'none'; divResCriteria.style.visibility = 'hidden'; divResCriteria.style.display = 'none'; divSchools.style.visibility = 'hidden'; divSchools.style.display = 'none'; divLanCriteria.style.visibility = 'hidden'; divLanCriteria.style.display = 'none'; divComCriteria.style.visibility = 'visible'; divComCriteria.style.display = 'block'; divMulCriteria.style.visibility = 'hidden'; divMulCriteria.style.display = 'none'; divOpenHouse.style.visibility = 'hidden'; divOpenHouse.style.display = 'none'; divOpenHouseSearchButton.style.visibility = 'hidden'; divOpenHouseSearchButton.style.display = 'none'; break; case "Land": divStyles.style.visibility = 'hidden'; divStyles.style.display = 'none'; divResCriteria.style.visibility = 'hidden'; divResCriteria.style.display = 'none'; divSchools.style.visibility = 'hidden'; divSchools.style.display = 'none'; divLanCriteria.style.visibility = 'visible'; divLanCriteria.style.display = 'block'; divComCriteria.style.visibility = 'hidden'; divComCriteria.style.display = 'none'; divMulCriteria.style.visibility = 'hidden'; divMulCriteria.style.display = 'none'; divOpenHouse.style.visibility = 'hidden'; divOpenHouse.style.display = 'none'; divOpenHouseSearchButton.style.visibility = 'hidden'; divOpenHouseSearchButton.style.display = 'none'; break; case "MultiFamily": divStyles.style.visibility = 'hidden'; divStyles.style.display = 'none'; divResCriteria.style.visibility = 'hidden'; divResCriteria.style.display = 'none'; divSchools.style.visibility = 'hidden'; divSchools.style.display = 'none'; divLanCriteria.style.visibility = 'hidden'; divLanCriteria.style.display = 'none'; divComCriteria.style.visibility = 'hidden'; divComCriteria.style.display = 'none'; divMulCriteria.style.visibility = 'visible'; divMulCriteria.style.display = 'block'; divOpenHouse.style.visibility = 'hidden'; divOpenHouse.style.display = 'none'; divOpenHouseSearchButton.style.visibility = 'hidden'; divOpenHouseSearchButton.style.display = 'none'; break; } } function ChangeView(sChangeTo){ if(sChangeTo == 'Map'){ iQ.Utils.setFieldValue('DataForm','StreetAddress',''); iQ.Utils.setFieldValue('DataForm','ML_Number',''); iQ.Utils.setFieldValue('DataForm','PropertyID',''); iQ.Utils.setFieldValue('DataForm','ML_Or_Address',''); iQ.Utils.setFieldValue('DataForm','Res_CommunityName',''); } var CurrForm = iQ.Utils.getBrowserObject('DataForm'); CurrForm.SearchBy.value= sChangeTo; CurrForm.submit(); } function doCriteriaChange(){ intStartPage = 1; iQ.Utils.setFieldValue('DataForm','StartPage',intStartPage); iQ.Utils.doHideMessageOverlay(); iQ.Utils.setFieldValue('DataForm','ML_Number',''); iQ.Utils.setFieldValue('DataForm','StreetAddress',''); iQ.Utils.setFieldValue('DataForm','PropertyID',''); iQ.Utils.setFieldValue('DataForm','ML_Or_Address',''); iQ.Utils.setFieldValue('DataForm','Res_CommunityName',''); doSaveCriteriaSearch(); doGetMapListings(); doGetListings(); } function doSaveCriteriaSearch(){ var params = GetParams(false); var _Ajax = new iQ.Ajax(); _Ajax.CFCMethod = 'doSaveCriteriaSearch'; _Ajax.URL = '/websvc/Listings.cfc'; _Ajax.Params ={Params:'{' + params + '}'}; _Ajax.Send(); } //this function gets passed to a central func that renders paging // note we do not reload map here function doNextPage(intNextPage){ intStartPage = intNextPage; iQ.Utils.setFieldValue('DataForm','StartPage',intNextPage); doGetListings(); } //callback func passed to initmap func function handleMapChanged(topleftlat,topleftlon,bottomrightlat,bottomrightlon,centerlat,centerlon,zoomlevel){ intStartPage = 1; iQ.Utils.setFieldValue('DataForm','StartPage',intStartPage); iQ.Utils.doHideMessageOverlay(); iQ.Utils.setFieldValue('DataForm','TopLeftLat',topleftlat); iQ.Utils.setFieldValue('DataForm','TopLeftLon',topleftlon); iQ.Utils.setFieldValue('DataForm','BottomRightLat',bottomrightlat); iQ.Utils.setFieldValue('DataForm','BottomRightLon',bottomrightlon); iQ.Utils.setFieldValue('DataForm','CenterLat',centerlat); iQ.Utils.setFieldValue('DataForm','CenterLon',centerlon); iQ.Utils.setFieldValue('DataForm','ZoomLevel',zoomlevel); iQ.Utils.SetCookie('MapLat',centerlat,365); iQ.Utils.SetCookie('MapLon',centerlon,365); iQ.Utils.SetCookie('MapZoomLevel',zoomlevel,365); //mapping code calls this func on init // but we only wanted to set above vals if(!bPageLoad){ doGetMapListings(); doGetListings(); } bPageLoad = false; } function OpenPWatch(){ objPWAtchAnim.animate(); } function doLoadAccordian(sID){ var AccordianOpenAttributes ={height:{from:30,to:150,unit:'px'}}; var AccordianCloseAttributes ={height:{from:150,to:30,unit:'px'}}; objAccordianOpen = new YAHOO.util.Anim(sID,AccordianOpenAttributes,.5,YAHOO.util.Easing.easeOut); objAccordianClose = new YAHOO.util.Anim(sID,AccordianCloseAttributes,.5,YAHOO.util.Easing.easeOut); } function doAccordianState(){ if(AccordianState == 'closed'){ AccordianState = 'open'; objAccordianOpen.animate(); }else{ AccordianState = 'closed'; objAccordianClose.animate(); } } function doShowMaxRecords(iRecordsFound){ var iRecordsFound = 500; iQ.Utils.doShowMessageOverlay('
A maximum of ' + iMaxMapPoints + ' properties may be displayed. We found ' + iRecordsFound + ' properties matching your search criteria.

Please modify your search criteria or adjust the map to change the search area.

click to close
','iQ_VEMap','200px','Right',-2,'Top',2); } function doInfoButtons(InfoBox,Action){ var InfoPopUp = iQ.Utils.getBrowserObject(InfoBox).style; //var ImageFade = iQ.Utils.getBrowserObject(Image); if (Action == 'On'){ InfoPopUp.visibility='visible'; InfoPopUp.display = 'block'; } else{ InfoPopUp.visibility='hidden'; InfoPopUp.display = 'none'; } }