}//end ready state change else{ directions.innerHTML = 'Please zoom out to choose another city area'; message.innerHTML = '0 property(s) found'; } }//end eventcode function //Send request contentRequest('POST','data.php',params,eventCode); }//end fetch listings function function fetch_cities(county,lat,lng,state){ if(!lat){//point not found, fetch last city point if(debugMap) alert('Restoring point from saved point'); lat = lastCpoint.y; lng = lastCpoint.x; state = lastCpoint.state; county = lastCpoint.county; if(debugMap) alert('Lat:'+lat+',Lng:'+lng+',State:'+state+',County:'+county); if(debugMap) alert('Clearing overlays'); map.clearOverlays();// clear all overlays if(debugMap) alert('Centering and Zooming Map'); map.centerAndZoom(new GPoint(parseFloat(lng),parseFloat(lat)), 8); //center and zoom to city level if(debugMap) alert('Clearing zoom events'); GEvent.clearListeners(map, 'zoom');//clear all zoom events if(debugMap) alert('Adding zoom event fetch counties'); addZoomEvent(9,'fetch_counties();'); //enable zoom level event for zooming to state level } directions.innerHTML = '
Loading Cities...
'; //Build params if(debugMap) alert('Building Request Params');