	function TabsManager()
	{
		this.tabArray = new Array();
		this.tabClassOn = "activo";
		this.tabClassOff = "inactivo";
		this.contentClassOn = "contenidoOn";
		this.contentClassOff = "contenidoOff";
	}

	TabsManager.prototype.setTab = _TabsManagerSetTab;
	TabsManager.prototype.showTab = _TabsManagerShowTab;

	function _TabsManagerSetTab( tabId, contentId, tabState )
	{
		var tab = new Tab(tabId,contentId,tabState);
		this.tabArray.push(tab);
		switch(tabState)
		{
			case "on":
						document.getElementById(tabId).className = this.tabClassOn;
						document.getElementById(contentId).className = this.contentClassOn;
					break;
			case "off":
						document.getElementById(tabId).className = this.tabClassOff;
						document.getElementById(contentId).className = this.contentClassOff;
					break;
		}
	}

	function _TabsManagerShowTab( tabId )
	{
	    
		for(  i = 0 ; i < this.tabArray.length ; i ++)
		{		
			if ( this.tabArray[i].tabId == tabId)
			{
				document.getElementById(this.tabArray[i].tabId).className = this.tabClassOn;
				document.getElementById(this.tabArray[i].contentId).className = this.contentClassOn;
			}
			else
			{
				document.getElementById(this.tabArray[i].tabId).className = this.tabClassOff;
				document.getElementById(this.tabArray[i].contentId).className = this.contentClassOff;
			}
		}
	}


	function Tab( tabId, contentId, tabState)
	{
		this.tabId = tabId;
		this.contentId = contentId;
		this.tabState = tabState;
	}