function checkAll(className, rootNodeId)
{
	if (rootNodeId) {
		rootNode = document.getElementById(rootNodeId);
	} else {
		rootNode = null;
	}
	
	currentEl = YAHOO.util.Dom.getElementsByClassName(className, 'input', rootNode);
	for(var i=0; i<currentEl.length; i++){
		currentEl[i].checked = true;
	}
}

function uncheckAll(className, rootNodeId)
{
	if (rootNodeId) {
		rootNode = document.getElementById(rootNodeId);
	} else {
		rootNode = null;
	}
	
	currentEl = YAHOO.util.Dom.getElementsByClassName(className, 'input', rootNode);
	for(var i=0; i<currentEl.length; i++){
		currentEl[i].checked = false;	
	}
}

function invertAll(className, rootNodeId)
{
	if (rootNodeId) {
		rootNode = document.getElementById(rootNodeId);
	} else {
		rootNode = null;
	}
	
	currentEl = YAHOO.util.Dom.getElementsByClassName(className, 'input', rootNode);
	for(var i=0; i<currentEl.length; i++){
		if ( currentEl[i].checked) {
			currentEl[i].checked = false;
		} else {
			currentEl[i].checked = true;
		}
	}
}

function boolAnyChecked(className, rootNodeId)
{
	if (rootNodeId) {
		rootNode = document.getElementById(rootNodeId);
	} else {
		rootNode = null;
	}
	
	currentEl = YAHOO.util.Dom.getElementsByClassName(className, 'input', rootNode);
	for(var i=0; i<currentEl.length; i++){
		if ( currentEl[i].checked) {
			return true;
		}
	}
	
	return false;
}