function matchingFilter( oCache, sFilterValue ){
	for (i = oCache.length - 1; i >= 0; i -= 1) {
		if (oCache[i].value != sFilterValue){
			var filter_match = true;
			oCache[i].element.style.display = "none"
		}			
	}
	if (filter_match = true){
		return oCache;
	}
	else {
		return null;
	}
}

function substringFilter( oCache, sFilterValue, display )
{
	for (i = oCache.length - 1; i >= 0; i -= 1){
		if (oCache[i].value.indexOf(sFilterValue) < 0){
			var filter_match = true;
			oCache[i].element.style.display = display
		}
	}
	if (filter_match = true){
		return oCache;
	}
	else {
		return null;
	}
}

function greaterThanFilter( oCache, sFilterValue, display )
{
	for (i = oCache.length - 1; i >= 0; i -= 1){
		if (oCache[i].value <= sFilterValue){
			var filter_match = true;
			oCache[i].element.style.display = display;
		}
	}
	if (filter_match = true){
		return oCache;
	}
	else {
		return null;
	}
}

function greaterThanOrEqualFilter( oCache, sFilterValue )
{
	for (i = oCache.length - 1; i >= 0; i -= 1){
		if (oCache[i].value < sFilterValue){
			var filter_match = true;
			oCache[i].element.style.display = "none";
		}
	}
	if (filter_match = true){
		return oCache;
	}
	else {
		return null;
	}
}

function lessThanFilter( oCache, sFilterValue, display ) {
	for (i = oCache.length - 1; i >= 0; i -= 1) {
		if (oCache[i].value >= parseFloat(sFilterValue)) {
			var filter_match = true;
			oCache[i].element.style.display = display;
		}
	}
	if (filter_match = true){
		return oCache;
	}
	else {
		return null;
	}
}


function lessThanOrEqualFilter( oCache, sFilterValue )
{
	for (i = oCache.length - 1; i >= 0; i -= 1){
		if (oCache[i].value > sFilterValue){
			var filter_match = true;
			oCache[i].element.style.display = "none"
		}
	}
	if (filter_match = true){
		return oCache;
	}
	else {
		return null;
	}
}

/*function itemFilter( str )
{
	var strarray = val.split(",");
			innershow = false;
			for (ss=0;ss<strarray.length;ss++){
				if (con==_TF_trimWhitespace(strarray[ss])){
					innershow=true;
					break;
				}
			}
			if (innershow == false)
				toshow=false;

}*/

/*function substring1Filter( str )
{
		default: //is "substring1" search
			if (val.indexOf(con)!=0) //pattern must start from 1st char
				toshow = false;
			if (con.charAt(con.length-1) == " ")
			{ //last char is a space, so lets do a full search as well
				if (_TF_trimWhitespace(con) != val)
					toshow = false;
				else
					toshow = true;
			}
}*/

//SortableTable.prototype.addFilterType( "Matching", matchingFilter );
//SortableTable.prototype.addFilterType( "Substring", substringFilter );
//SortableTable.prototype.addFilterType( ">", greaterThanFilter );
//SortableTable.prototype.addFilterType( ">=", greaterThanOrEqualFilter );
SortableTable.prototype.addFilterType( "<", lessThanFilter );
//SortableTable.prototype.addFilterType( "<=", lessThanOrEqualFilter );