
function AttributesPopupTabList () {
	/**
	 * @var AttributePopupTabList
	 */
	this.objNext = null;
	/**
	 * @var AttributePopupTab
	 */
	this.objTab = null;
	
	/**
	 * Add a tab to the list
	 * @param AttributePopupTab objTab
	 * @return bool
	 */
	this.addTab = function(objTab) {
		if (this.objTab == null){
			this.objTab = objTab;
			return true;
		}
		if (this.objNext == null){
			this.objNext = new AttributesPopupTabList();
		}
		return this.objNext.addTab(objTab);
	}
	
	this.addControl = function(objControl){
		this.objTab.addControl(objControl);
	}

	this.getUrlParam = function (){
		if (this.objNext == null){
			return this.objTab.getUrlParam();
		}
		return this.objTab.getUrlParam() + this.objNext.getUrlParam();
	}
	
	this.resetState = function (){
		if (this.objNext == null){
			return this.objTab.resetState();
		}
		return (this.objTab.resetState() && this.objNext.resetState());
	}
	
	this.updateControls = function (){
		if (this.objNext == null){
			return this.objTab.updateControls();
		}
		return (this.objTab.updateControls() && this.objNext.updateControls());
	}
	
	this.displayTab = function (strGroupId){
		if (this.objTab.displayTab(strGroupId)){
			return true;
		}
		if (this.objNext != null){
			return this.objNext.displayTab(strGroupId);
		}
		return false;
	}
	
	this.getButtons = function (strGroupId){
		if (this.objNext == null){
			return this.objTab.getButton(strGroupId);
		}
		return this.objTab.getButton(strGroupId) + this.objNext.getButtons(strGroupId);
	}
	
	this.changeState = function (intControlId, mixNewState){
		if (this.objTab.changeState(intControlId, mixNewState)){
			return true;
		}
		if (this.objNext != null){
			return this.objNext.changeState(intControlId, mixNewState);
		}
		return false;
	}
	
	this.updateState = function (intAttributeId, intAttributeValue){
		if (this.objTab.updateState(intAttributeId, intAttributeValue)){
			return true;
		}
		if (this.objNext != null){
			return this.objNext.updateState(intAttributeId, intAttributeValue);
		}
		return false;
	}
	
	this.getState = function (intControlId){
		var mixState = this.objTab.getState(intControlId);
		if (mixState != null){
			return mixState;
		}
		if (this.objNext != null){
			return this.objNext.getState(intControlId);
		}
		return null;
	}
	
	this.getAttributeId = function (intControlId){
		var intAttributeId = this.objTab.getAttributeId(intControlId);
		if (intAttributeId != null){
			return intAttributeId;
		}
		if (this.objNext != null){
			return this.objNext.getAttributeId(intControlId);
		}
		return null;
	}
	
	this.getParent = function (intControlId){
		var intParent = this.objTab.getParent(intControlId);
		if (intParent != null){
			return intParent;
		}
		if (this.objNext != null){
			return this.objNext.getParent(intControlId);
		}
		return null;
	}
	
	this.getValue = function (intControlId){
		var intValue = this.objTab.getValue(intControlId);
		if (intValue != null){
			return intValue;
		}
		if (this.objNext != null){
			return this.objNext.getValue(intControlId);
		}
		return null;
	}
	
	this.hideDependent = function (intParentId, intParentValue){
		this.objTab.hideDependent(intParentId, intParentValue);
		if (this.objNext != null){
			this.objNext.hideDependent(intParentId, intParentValue);
		}
	}
	
	this.hideDependentFilters = function (intParentId, intParentValue){
		this.objTab.hideDependentFilters(intParentId, intParentValue);
		if (this.objNext != null){
			this.objNext.hideDependentFilters(intParentId, intParentValue);
		}
	}
	
	this.showDependent = function (intParentId, intParentValue){
		this.objTab.showDependent(intParentId, intParentValue);
		if (this.objNext != null){
			this.objNext.showDependent(intParentId, intParentValue);
		}
	}
	
	this.updateFilters = function (){
		if (this.objTab != null){
			this.objTab.updateFilters();
		}
		if (this.objNext != null){
			this.objNext.updateFilters();
		}
	}
	
	this.hideDependentByAttributeId = function (intAttributeId){
		if (this.objTab != null){
			this.objTab.hideDependentByAttributeId(intAttributeId);
		}
		if (this.objNext != null){
			this.objNext.hideDependentByAttributeId(intAttributeId);
		}
	}
	
	this.build = function (){
		if (this.objTab != null){
			this.objTab.build();
		}
		if (this.objNext != null){
			this.objNext.build();
		}
	}
	
	this.dump = function (){
		return (this.objTab==null?'':this.objTab.dump())+''+(this.objNext==null?'':this.objNext.dump());
	}
}