Closes the tab that meets the conditions.
procedure CloseTab(aTabIndex:integer);
//Close the first tab CloseTab(0);