function ClientTabControl(){	var tabs;	var name;	var contentArea;	var currentIndex = -1;    this.Init = function(controlName)    {		tabs = new Array();		name = controlName;		contentArea = document.getElementById(controlName + "_ContentArea");    }        this.AddTab = function(id)    {		tabs[tabs.length] = document.getElementById(id);    }        this.SetSelectedIndex = function(nextIndex)    {		if (nextIndex != currentIndex)		{			if (tabs.length >= nextIndex)			{				currentIndex = nextIndex;				HideGrid(contentArea.id);				xajax_GetTabContent(name, nextIndex);				/*				for (var i = 0; i < tabs.length; i++)					tabs[i].className = "TabControlTabItem";				tabs[nextIndex].className = "TabControlSelectedTabItem";				*/			}		}    }		this.ChangeTabCallback = function(nextIndex)	{		for (var i = 0; i < tabs.length; i++)			tabs[i].className = "TabControlTabItem";		tabs[nextIndex].className = "TabControlSelectedTabItem";		ShowGrid();	}}