function cpListBox_GetSingleValue(source) {
    return source.options[source.selectedIndex].value;
}

function cpListBox_GetMultipleValues(name) {
	var checkbox = eval('document.forms[0].' + name);
	if (checkbox.length == undefined) return checkbox.value;
	var result = '';
	for (var i = 0; i < checkbox.length; i++)
	{
		if (checkbox[i].checked)
		{
			if (result.length > 0) result += ', ';
			result += checkbox[i].value;
		}
	}
	return result;
}

function cpListBox_GroupSelector(group, checked) {
	for (i = 0; i < group.length; i++) {
		if (!group[i].disabled)
			group[i].checked = checked;
	}
}
