var numTabs = 0function formArray(tab){	tabid = tab.id;	arr = new Array();	tabid.match(/(tab)(\d*)/); //Extract the number part which comes after 'tab'	var curTabNumber = RegExp.$2;	var j=0;		//from current level to top level, extract the parent tab ids (only number part)	for (i=1; i <= RegExp.$2.length;i++)	{		arr[j] = curTabNumber.substring(0,i);		j = j + 1;	}	//arr[0]= 5;	//Now see if any more levels ( downward direction)	curTabNumber = curTabNumber + "1";	while ( eval("objTab = document.getElementById('divtab" + curTabNumber +"');") )	{		arr[j] = curTabNumber;		j = j + 1;		curTabNumber = curTabNumber + "1";	}	return arr;}function resetTabs(){	var id_td;	for (i=0;i< numTabs;i++)	{		objDiv = document.getElementById("divtab"+(i+1))		objDiv.style.display = "none";		objDiv.id.match(/div(.*)/gi); //Take the right of 'div', which is the id of the td.		id_td = RegExp.$1;		objTd = document.getElementById("tab"+ (i+1))		objTd.className = 'Tab';	}}function TabClkd( tab ){	resetTabs(); //Reset all tabs (Hide, assign inactive style)	arr1 = formArray( tab ); //Get all active tab ids in array	document.getElementById("divtab").style.display='block'; //This was also made hidden during resetting.	for (i = 0; i < arr1.length ; i++)	{		document.getElementById("tab" + arr1[i]).className = "SelTab"		document.getElementById("divtab" + arr1[i]).style.visibility = "visible"		document.getElementById("divtab" + arr1[i]).style.display = "inline"if (arr1[i] == 5 )	{		var CatAObj = document.getElementById("CatA");		var EnvCatCodeObj = document.forms[0].EnvCatCode;		if (EnvCatCodeObj != null)		{				if (EnvCatCodeObj.value == 'A')				{								document.getElementById("CatA").style.visibility = "visible";							document.getElementById("CatA").style.display = "inline";												}								}			}		}}