
formId = '';
var extraCheckboxes = ['parking','garden','leasehold','freehold','furnished','unfurnished'];

function ListSearch(formId) {
    formId = formId;
    this.form = '#'+ formId + ' fieldset';
    this.init();
    this.initExtend();
}

ListSearch.prototype.initExtend = function() {
	//this is called after init, just so I can extend init
	return false;
}

// inherit from HomeSearch
ListSearch.prototype = new HomeSearch(formId);


ListSearch.prototype.init = function(resultType) {
    var params = [resultType];
    HomeSearch.prototype.init.apply(this,params);

    $('.advancedSearchOptions :checkbox').click(function() {
        searchForm.criteriaChanged();
    });

    $("#location").result(function(handle, item) {
        $('#geoLocationType').val($.evalJSON(item).geoLocationType);
        $('#geoLocationId').val($.evalJSON(item).geoLocationId);
        searchForm.clearBoundary();
        searchForm.switchCenterTypeToGeoName();
    });

};
