Find proper id of active tab.