 by everybody
    // and safe to use.
    var spinner = null;
    function _spinner_gen(elt_id){
	var spinner_args = {
	    //timeout: 5,
	    //timeout: 500,
	    timeout: 10,
	    //classes: 'bbop-widget-search_pane-spinner',
	    visible_p: false
	};
	spinner = new bbop.widget.spinner(elt_id,
					  ui_spinner_search_source,
					  spinner_args);
    }
    function _spin_up(){
	if( spinner ){
	    spinner.start_wait();
	}
    }
    function _spin_down(){
	if( spinner ){
	    spinner.finish_wait();
	}
    }

    // Additional id hooks for easy callbacks. While these are not as
    // easily changable as the above, we use them often enough and
    // across functions to have a hook.
    var accordion_div_id = mangle + 'filter-accordion-id';
    
    // These pointers are used in multiple functions (e.g. both
    // *_setup and *_draw).
    var filter_accordion_widget = null;
    //var current_filters_div = null;

    /*
     * Function: show_checkboxes_p
     *
     * External function to show the item checkboxes in the use interface.
     * 
     * Parameters:
     *  new_setting - *[optional]* show or not; defaults to false
     *
     * Returns:
     *  true/false--the current state of showing the select boxes
     */
    this.show_checkboxes_p = function(new_setting){
	if( bbop.core.is_defined(new_setting) ){
	    if( new_setting ){
		show_checkboxes_p = true;
	    }else{
		show_checkboxes_p = false;		
	    }
	}

	return show_checkboxes_p;
    };

    /*
     * Function: set_linker
     *
     * Set the linker to be used when creating links.
     * If not set, a null function is used.
     * 
     * Parameters:
     *  linker - the linker function to be used
     *
     * Returns:
     *  true/false on whether it was properly set
     */
    this.set_linker = function(linker){

	var retval = false;

	if( bbop.core.is_defined(linker) ){
		anchor.linker = linker;
		retval = true;
	}

	return retval;
    };

    /*
     * Function: set_handler
     *
     * Set the handler to be used when dealing with displaying special fields.
     * If not set, a null function is used.
     * 
     * Parameters:
     *  handler - the handler function to be used
     *
     * Returns:
     *  true/false on whether it was properly set
     */
    this.set_handler = function(handler){

	var retval = false;

	if( bbop.core.is_defined(handler) ){
		anchor.handler = handler;
		retval = true;
	}

	return retval;
    };

    /*
     * Function: selected_name
     *
     * External function to show give the name of the input name group
     * for the selectable items in the checkboxes (if they are being
     * used). Null otherwise.
     * 
     * Keep in mind that this variable changes every times that the
     * results table refreshes.
     * 
     * Parameters:
     *  n/a
     *
     * Returns:
     *  string or null
     */
    this.selected_name = function(){
	return ui_results_selection_item_name;
    };

    /*
     * Function: setup_query
     *
     * Setup the free text query display under contructed tags for
     * later population.
     * 
     * If no icon_clear_source is defined, icon_clear_label will be
     * used as the defining text.
     * 
     * Parameters:
     *  label_str - *[optional]* string or bbop.html for input label
     *  icon_clear_label - *[optional]* string or bbop.html for clear icon
     *  icon_clear_source - *[optional]* string to define the src of img 
     *
     * Returns:
     *  n/a
     */
    this.setup_query = function(label_str, icon_clear_label, icon_clear_source){
	ll('setup_query for:'+ ui_query_input_id);

	// Some defaults.
	if(! label_str ){ label_str = ''; }
	if(! icon_clear_label ){ icon_clear_label = ''; }
	if(! icon_clear_source ){ icon_clear_source = ''; }
	
	// The incoming label.
	var query_label_attrs = {
	    'class': 'bbop-js-search-pane-query-label'
	};
	var query_label_div =
	    new bbop.html.tag('div', query_label_attrs, label_str);

	// The text area.
	var ta_args = {
	    'id': ui_query_input_id,
	    'class': 'bbop-js-search-pane-textarea'
	};
	var query_area = new bbop.html.tag('textarea', ta_args);

	// Figure out an icon or a label.
	var clear_query_obj =
	    bbop.widget.display.clickable_object(icon_clear_label,
						 icon_clear_source,
						 ui_clear_query_span_id);
	// And a div to put it in.
	var clear_div_attrs = {
	    'class': 'bbop-js-search-pane-clear-button',
	    'generate_id': true
	};
	var clear_div =
	    new bbop.html.tag('div', clear_div_attrs, clear_query_obj);	

	// General container div.
	var gen_div_attrs = {
	    'generate_id': true
	};
	var gen_div = new bbop.html.tag('div', gen_div_attrs);

	// Add to display.
	query_label_div.add_to(clear_div.to_string());
	gen_div.add_to(query_label_div.to_string());
	gen_div.add_to(query_area.to_string());
	jQuery('#' + ui_controls_section_id).append(gen_div.to_string());
    };

    // /*
    //  * Function: setup_count_control
    //  *
    //  * Setup the results count control for later use. This is a kind
    //  * of semi-permanent structure like the accordion.
    //  * 
    //  * Parameters:
    //  *  n/a
    //  *
    //  * Returns:
    //  *  n/a
    //  */
    // this.setup_count_control = function(manager){
    // 	ll('setup_count_control for:'+ ui_query_input_id);
	
    // 	// Create inputs (the current order is important for proper
    // 	// for/id creation).
    // 	var cinputs = [];
    // 	each([10, 25, 50, 100],
    // 	     function(num, cindex){
    // 		 // Create and store the option.
    // 		 var sel_input_attrs = {
    // 		     'generate_id': true,
    // 		     'value': num
    // 		 };
    // 		 var sel_input =
    // 		     new bbop.html.tag('option', sel_input_attrs, num);
    // 		 var sel_input_id = sel_input.get_id();
    // 		 cinputs.push(sel_input);
    // 	     });
    // 	// Option container div.
    // 	var sel_attrs = {
    // 	    'id': ui_count_control_div_id
    // 	};
    // 	var sel = new bbop.html.tag('select', sel_attrs, cinputs);

    // 	// Create a text label.
    // 	var sel_label = new bbop.html.tag('label', {},
    // 					  'Results count&nbsp;&