function updateTag(tagSelect) {
		var tag = tagSelect.value;
		var add = tagSelect.checked;
		var e = document.getElementById('filter');
		var f = e.value;
		tags = f.split(',');
		var nf = '';
		var contained = false;
		for ( var i = 0; i < tags.length; i++) {
			var aTag = tags[i];
			if (!aTag)
				continue;
			if (aTag == tag) {
				contained = true;
				if (!add)
					continue; // remove it
			}
			if (nf.length > 0)
				nf += ',';
			nf += aTag;
		}
		if (!contained && add) {
			if (nf.length > 0)
				nf += ',';
			nf += tag;
		}
		e.value = nf;
		saveVar('filterVar', nf);
		updateForCreateItems(nf);
		filter();
		return false;
	}
// New tags management function, will add it and remove it based on tagSelect.checked value.
New tags management function, will add it and remove it based on tagSelect.checked value.
New tags management function will add it and remove it based on tagSelect . checked value .
function updateTag(tagSelect) {
		var tag = tagSelect.value;
		var add = tagSelect.checked;
		var e = document.getElementById('filter');
		var f = e.value;
		tags = f.split(',');
		var nf = '';
		var contained = false;
		for ( var i = 0; i < tags.length; i++) {
			var aTag = tags[i];
			if (!aTag)
				continue;
			if (aTag == tag) {
				contained = true;
				if (!add)
					continue; 
			}
			if (nf.length > 0)
				nf += ',';
			nf += aTag;
		}
		if (!contained && add) {
			if (nf.length > 0)
				nf += ',';
			nf += tag;
		}
		e.value = nf;
		saveVar('filterVar', nf);
		updateForCreateItems(nf);
		filter();
		return false;
	}
function updateTag ( tagSelect ) { var tag = tagSelect . value ; var add = tagSelect . checked ; var e = document . getElementById ( 'filter' ) ; var f = e . value ; tags = f . split ( ',' ) ; var nf = '' ; var contained = false ; for ( var i = 0 ; i < tags . length ; i ++ ) { var aTag = tags [ i ] ; if ( ! aTag ) continue ; if ( aTag == tag ) { contained = true ; if ( ! add ) continue ; } if ( nf . length > 0 ) nf += ',' ; nf += aTag ; } if ( ! contained && add ) { if ( nf . length > 0 ) nf += ',' ; nf += tag ; } e . value = nf ; saveVar ( 'filterVar' , nf ) ; updateForCreateItems ( nf ) ; filter ( ) ; return false ; }
New tags management function, will add it and remove it based on tagSelect.checked value.
New tags management function will add it and remove it based on tagSelect . checked value .
// remove it