// Enci-Dynamic List (JS)
//*****************************************************************************
// Do not remove this notice.
//
// Copyright 2003 by G.Gentili - all rights reserved
// See http://www.gentili.org for more info
//*****************************************************************************

function sort_col(theText) {
	if (dsoElems.object.sort=="+"+theText) {
		dsoElems.object.sort="-"+theText;
	} else {
		dsoElems.object.sort="+"+theText;
	};
	dsoElems.Reset();
}
function do_filter(theFil) {
	temp=estratto(filterText.value);
	if (temp!='') {
		dsoElems.object.Filter = '(Ricerca=*'+temp+'*|Tipo=*'+temp+'*|Canale=*'+temp+'*)';
	}
	temp=dsoElems.object.Filter;
	if (!chkPerson.checked) {
		if (temp!='') {temp=temp+'&'}
		temp=temp+'cdTipo<>pe';
	}
	if (!chkEntity.checked) {
		if (temp!='') {temp=temp+'&'}
		temp=temp+'cdTipo<>en';
	}
	if (!chkCharacter.checked) {
		if (temp!='') {temp=temp+'&'}
		temp=temp+'cdTipo<>ch';
	}
	if (temp=='') {
		temp='Attivo=True';
	} else {
		temp='Attivo=True&('+temp+')';
	}
	dsoElems.object.Filter = temp;
	//alert(temp);
	dsoElems.Reset();
}

