function [index,cindex,confq]=fiactham
%FIACTHA Finds the selected models.
%   confq contains the handles of the axes whose models may be
%   prepared for confidence interval computations.

%   L. Ljung 4-4-94
%   Copyright 1986-2004 The MathWorks, Inc.
%   $Revision: 1.7.4.1 $  $Date: 2004/07/31 23:22:11 $

alc = allchild(0);
%oon = get(0,'showhiddenhandles');
%set(0,'showhiddenhandles','on');
%Xsum = findobj(get(0,'children'),'flat','tag','sitb16');
Xsum = findobj(alc,'flat','tag','sitb16');

%set(0,'showhiddenhandles',oon);
XID = get(Xsum,'Userdata');
%sumb=findobj(get(0,'children'),'flat','tag','sitb30');
sumb=findobj(alc,'flat','tag','sitb30');

models=findobj([XID.sumb(1);sumb(:)],'tag','modelline');
ind=findobj(models,'flat','linewidth',3);
cind=findobj(models,'flat','linewidth',0.5);
if isempty(ind)
  iduistat('No models selected. Click on model icons to select desired ones.')
end

confq=[];
index=[];
cindex=[];
for kh=ind(:)'
    hax=get(kh,'parent');
    tag=get(hax,'tag');
    if nargout==3,
       hc=findobj(hax,'tag','ny0');
       if ~isempty(hc),confq=[confq,hax];end
    end
    index=[index,eval(tag(6:length(tag)))];
end
for kh=cind(:)'
    tag=get(get(kh,'parent'),'tag');
    cindex=[cindex,eval(tag(6:length(tag)))];
end
