// TabObj
function TabObject(id)
{
	// eigenschaften
	this.id				= id;
	this.containerObj	= new LayerObject(id);
	this.tabCardObj		= new Array();
	// methoden
	this.showTab		= _showTab;
	this.hideTab		= _hideTab;
	this.initTabCard	= _initTabCard;
	this.addTabCard		= _addTabCard;
	this.findTabCard	= _findTabCard;
	this.showTabCard	= _showTabCard;	
	this.hideTabCard	= _hideTabCard;
	// objektreferen
	this.obj = id + "TabObj"; 
	eval(this.obj + "=this");
	// ende
	return;
}

function _showTab()
{
	this.containerObj.setVisible(true);
	this.initTabCard();
	return;
}

function _hideTab()
{
	this.containerObj.setVisible(false);
	this.hideTabCard();
	return;
}

function _initTabCard()
{
	var i = 0;
	while(i < this.tabCardObj.length)
	{
		this.tabCardObj[i].cardObj.setVisible(this.tabCardObj[i].visible);
		i++;
	}
}

function _addTabCard(id,visible)
{
	this.tabCardObj[this.tabCardObj.length] = new CardObj(id,visible);
	return;
}

function _findTabCard(id,cnt)
{
	if(!cnt)
	{
		cnt = 0;
	}
	if(this.tabCardObj[cnt].id != id)
	{
		obj = this.findTabCard(id,++cnt);
	}
	else
	{
		obj = this.tabCardObj[cnt].cardObj;
	}
	return obj;
}

function _showTabCard(id)
{
	this.hideTabCard();
	obj = this.findTabCard(id);
	obj.setVisible(true);
	return;
}

function _hideTabCard()
{
	var i = 0;
	while(i < this.tabCardObj.length)
	{
		this.tabCardObj[i].cardObj.setVisible(false);
		i++;
	}
	return;
}

// CardObj
function CardObj(id,visible)
{
	// eigenschaften
	this.id			= id;
	this.cardObj	= new LayerObject(id);
	this.visible	= visible
	// ende
	return;
}

