/****
*
* A set of javascript functions to do row filtering in a table given a
* form containing search parameters.
*
* Compatibility : IE4+
*
* Author : Sidney Chong
* Date : 24/8/2001
* Version : 1.0d
*
*
* Features
* ========
* This script offers the following set of features:
*
* #search criteria can be a text input, hidden input, single or multi-select list input.
* #allows a combination of search criteria (as an AND operation).
* #4 types of matching strategies are available:
* 1) substring1 - substring search (from 1st char) (default)
* eg. man will match "manhood" and "man is evil" NOT "superman" and "he is a man"
* 2) substring - substring search (anywhere within)
* eg. man will match "manhood" and "woman" and "superman" and "he is a man"
* 3) full - full string search
* eg. man will match "man" NOT "manhood", "superman", "man is evil" and "he is a man"
* 4) item - search for a word/phrase in a comma seperated string
* eg. man will match "man,woman,child" NOT "superman,superwoman,kid" and "boy,girl,dog"
* #performs full string match (in substring1 mode) if last char in search string is a whitespace.
* #allows search to be turned off/on.
*
* Usage
* =====
* Give the table and search form a handle (using the attribute id or name).
*
* In the cell elements of the table, include a custom atrribute called
* "TF_colKey" and give it a value to identify the column. Note that you only
* need to do this for columns that will take part in the search.
*
* In the form input elements, include also a custom attribute called
* "TF_colKey" whose value will reference the column on which this search
* parameter is applicable. Again, as in the table, you will only need to do this
* if this input field should take part in the search. Also, an optional custom
* attribute called "TF_searchType" can be specified to use another search strategy
* for a particular field.
*
* In an option tag for a select input, use the custom attribute "TF_not_used"
* to exclude the particular option from the search. (Very useful in drop down
* selection list box)
*
* Call TF_filterTable passing in the handles to the table and form to
* perform the filtering.
*
* NOTE that the value of TF_colKey & TF_searchType are case-insensitive.
*
* ChangeLog cum Version History
* =============================
* 24/8/2001 - version 1.0d release.
* 23/8/2001 - Added functions _TF_get_value and TF_concat_and_set.
* 23/8/2001 - hidden input can now be used as a search field.
* 22/8/2001 - implemented "substring" search mode.
* 22/8/2001 - improve robustness/flexibility: if a cell