

function AttributesControl (strControlType, intControlId, mixInitialState, strHtmlId, strUrlPart, strLabel, intAttributeId, intAttributeValue, intParentId, intParentValue){
	this.objControl = null;
	
	switch (strControlType){
		case 'checkbox': 
				this.objControl = new AttributesControlTypeCheckbox(intControlId, mixInitialState, strHtmlId, strUrlPart, strLabel, intAttributeId, intAttributeValue, intParentId, intParentValue);
			break;
		case 'radio': 
				this.objControl = new AttributesControlTypeRadio(intControlId, mixInitialState, strHtmlId, strUrlPart, strLabel, intAttributeId, intAttributeValue, intParentId, intParentValue);
			break;
		default:
			alert('Internal error, cannot instantiate the control type: ' + strControlType);
	}
	
	this.getUrlParam = function (){
		return this.objControl.getUrlParam();
	}
	
	this.resetState = function (){
		return this.objControl.resetState();
	}
	
	this.updateControls = function (){
		return this.objControl.updateControls();
	}
	
	this.getHtml = function (){
		return this.objControl.getHtml();
	}
	
	this.changeState = function (intControlId, mixNewState){
		return this.objControl.changeState(intControlId, mixNewState);
	}
	
	this.updateState = function (intAttributeId, intAttributeValue){
		return this.objControl.updateState(intAttributeId, intAttributeValue);
	}
	
	this.getState = function (intControlId){
		return this.objControl.getState(intControlId);
	}
	
	this.getAttributeId = function (intControlId){
		return this.objControl.getAttributeId(intControlId);
	}
	
	this.getParent = function (intControlId){
		return this.objControl.getParent(intControlId);
	}
	
	this.getValue = function (intControlId){
		return this.objControl.getValue(intControlId);
	}
	
	this.isActive = function (){
		return this.objControl.isActive();
	}
	
	this.hideDependent = function (intParentId, intParentValue){
		this.objControl.hideDependent(intParentId, intParentValue);
	}
	
	this.hideDependentFilters = function (intParentId, intParentValue){
		this.objControl.hideDependentFilters(intParentId, intParentValue);
	}
	
	this.showDependent = function (intParentId, intParentValue){
		this.objControl.hideDependent(intParentId, intParentValue);
	}
	
	this.hideDependentByAttributeId = function (intAttributeId){
		this.objControl.hideDependentByAttributeId(intAttributeId);
	}
	
	this.isVisible = function (){
		return this.objControl.isVisible();
	}
	
	this.hasActiveFilters = function (){
		return this.objControl.hasActiveFilters();
	}
	
	this.rebuildFilters = function (strGroupId){
		return this.objControl.rebuildFilters(strGroupId);
	}
	
	this.build = function (){
		this.objControl.build();
	}
	
	this.dump = function (){
		return this.objControl.dump();
	}
	
}