			function Cities() {
				var _realEstate = new Array();
				var _cities = new Array();
				this.setRealEstateProperties = function(city, addr, rooms, desc, price) {
					if (_realEstate[city] == undefined) {
						_realEstate[city] = new Array();
						_cities.push(city);
					} 
					var realEstateProp = new RealEstateProperty(city);
					realEstateProp.setAddress(addr);
					realEstateProp.setRooms(rooms);
					realEstateProp.setDesc(desc);
					realEstateProp.setPrice(price);
					_realEstate[city].push(realEstateProp);
				}
				this.getRealEstateProperties = function(city) {
					return _realEstate[city]; 
				}
				this.getRealEstateProperty = function(city, address) {
					var realEstateProps = _realEstate[city];
					var len = realEstateProps.length;
					for (var i=0;i<len;i++) {
						if (realEstateProps[i].getAddress() == address) {
							return realEstateProps[i];
						} 
					}  
					return null;
				}
				this.getNumberOfEntries = function(city) {
					return _realEstate[city].length;					
				}
				this.getNumberOfCities = function() {
					return _cities.length;
				}
				this.getCities = function() {
					return _cities;
				}
				// Debugging functions
				this.displayNumberOfEntries = function(city) {
					alert(this.getNumberOfEntries(city));					
				}
			}
			function RealEstateProperty(city) {
				var _city = city;
				var _address, _rooms, _desc, _price, _latitude = null, _longitude = null;

				this.setCity = function(city) { _city = city; }
				this.setAddress = function(addr) { _address = addr; }
				this.setRooms = function(rooms) { _rooms = rooms; }
				this.setDesc = function(desc) { _desc = desc; }
				this.setPrice = function(price) { _price = price; }
				this.setLatitude = function(lat) { _latitude = lat; }
				this.setLongitude = function(long) { _longitude = long; }

				this.getCity = function() { return _city; }
				this.getAddress = function() { return _address; }
				this.getRooms = function() { return _rooms; }
				this.getDesc = function() { return _desc; }
				this.getPrice = function() { return _price; }
				this.getLatitude = function() { return _latitude; }
				this.getLongitude = function() { return _longitude; }
			}
