function onCheckBoxChange(field, class) {
	var display = (field.checked);
	var hasChildren = showHideChildBoxes(class, display);
	var checkBoxList = $(field).getParent().getParent('dl');
	
	if(checkBoxList.hasClass('multiple-checkboxes-singlelimit')){
		checkBoxList.getChildren('dt').each(function(el){
			var input = $(el).getChildren('input');
			if(input.getProperty('name')!='' && $(field).getProperty('name')!=input.getProperty('name')) {
				input.removeProperty('checked');
				input.removeProperty('disabled');
				var childClass = input.getProperty('id');
				//alert(childClass);
				showHideChildBoxes(childClass, false);
			}
		});
	}
	
	if(hasChildren){
		$(field).setProperty('disabled', 'disabeld');
	}
	else {
		$(field).removeProperty('disabled');
	}
}

function showHideChildBoxes(class, display) {
	
	var hasChildren = false;
	
	$$("."+class).each(function(el){
		if(display) {
			$(el).addClass('checkbox-children-visible');
			hasChildren = true;
		}
		else {
			$(el).removeClass('checkbox-children-visible');
		}
	});
	
	return hasChildren;
}