/**
 * @author schmidt
 */
function Group (a_label, a_numChildren) {
	
	this.name = "Group"
	this.type = "Element"
	
	var label = a_label;
	var numChildren = a_numChildren; 
	
	var _isCheckable = true;
	var _self = this;
	
	this.getCheckable = function () {
		return _isCheckable;
	}
		
	this.setCheckable = function(a_isCheckable) {
		_isCheckable = a_isCheckable;
	}
	
	this.getLabel = function () {
		return label.replace (/\*/g, "");
	}
	
	this.getNumChildren = function () {
		return numChildren;
	}
	
	this.addDependency = function (a_id, a_valueFnc, a_compareFnc, a_handleFnc) {
		var el = Form.idMap[a_id];
		el.addEvent("propChange", function () {
			var value = el[a_valueFnc]();
			var compareResult = CompareFunctions[a_compareFnc](value);
			_self[a_handleFnc](compareResult);
		});
	}
}

