/* Javascript for Rolodex autocomplete form fields */

var setACDataSourceConfig = function() {
	
	// Define autocomplete datasource configuration options
	// RY 7/3/07 Not doing queryMatchSubset because when queryMatchContains turned on (required here since
	// we return results not at right word boundary) we also get matches not at left word boundary. Tried
	// filtering these out in formatACResult(), but it screws up alignments within the ac box. E.g., 
	// if all results filtered out, we still get a short box; if top result filtered out, next result is
	// not highlighted at top of box.
	var dsConfig = { // queryMatchSubset : true,
				     // queryMatchContains : true,
				     // maxCacheEntries : 25, 
					 // Don't cache data on admin side, since then db changes aren't immediately reflected.
					 // (e.g., a deleted org can still appear in the list.)
					 // RY We want to cache when not in admin mode; pass the info to Javascript
					 // in a hidden form field or other hidden element.
					 maxCacheEntries : 0,
				     responseType : YAHOO.widget.DS_XHR.TYPE_FLAT };
	
	return dsConfig;
};

