function  sendresults
% to return activated checkboxes from picksections dialog

global ALLFIG
load sectinfo
len = length(sect_info);

if ALLFIG.type == 1
   out = zeros(len,1);
   for j = 1:len
      tagname = ['box_', sect_info(j).name];
      tagchk = findobj(gcf,'tag', tagname);
      out(j) = get(tagchk, 'value');
   end
   ALLFIG.out = flipud(out);
   close
end

if ALLFIG.type == 2
   out = zeros(len,3);
   for j = 1:len
      tagname = ['box_', sect_info(j).name];
      tagchk = findobj(gcf,'tag', tagname);
      out(j,1) = get(tagchk, 'value');
      tagname = ['cchk_', sect_info(j).name];
      tagchk = findobj(gcf,'tag', tagname);
      out(j,2) = get(tagchk, 'value');
      tagname = ['vchk_', sect_info(j).name];
      tagchk = findobj(gcf,'tag', tagname);
      out(j,3) = get(tagchk, 'value');
   end
   ALLFIG.out = flipud(out);
   close
end