function TabCard(activeImg, inactiveImg, cardId, tabId)
{
	this.activeImg = activeImg;
	this.inactiveImg = inactiveImg;
	this.cardId = cardId;
	this.tabId = tabId;
	
	return this;
}
TabCard.prototype.preload = function()
{
	this.activePreload = new Image();
	this.activePreload.src = this.activeImg;
	this.inactivePreload = new Image();
	this.inactivePreload.src = this.inactiveImg;
}


function TabCardDeck()
{
	this.cards = new Array();
	this.activeCard = 0;
	
	return this;
}
TabCardDeck.prototype.addCard = function(activeImg, inactiveImg, cardId, tabId)
{
	this.cards[this.cards.length] = new TabCard(activeImg, inactiveImg, cardId, tabId);
}
TabCardDeck.prototype.setActiveCard = function(theCard)
{
	this.activeCard = theCard;
}
TabCardDeck.prototype.setCard = function(theCard)
{
	if(this.activeCard != theCard && theCard < this.cards.length)
	{
		this.cards[this.activeCard].deactivate();
		this.cards[theCard].activate();
		this.activeCard = theCard;
	}
}
TabCardDeck.prototype.preloadImages = function()
{
	for(var i = 0; i < this.cards.length; i++)
	{
		this.cards[i].preload();
	}
}


