function indshow(action, organization, type)
% Shows where and how MATLAB and Toolboxes are used. 

%   Yama Habibzai
%   Copyright (c) 1984-98 by The MathWorks, Inc. All Rights Reserved
%   $Revision: 1.8 $
%   $Date: 1998/08/21 18:06:05 $

if nargin < 1
  action = 'show';
  organization = 'MIT';
  type = 1;
end

% Depending on action, organization and type, display 
% different information

if strcmp(action, 'show')
  prevfig = findobj('Type', 'figure',...
           'Name', 'Where is MATLAB used?');
  
  if ~isempty(prevfig)
    listhand = findobj(prevfig, 'Style', 'listbox');
    ttlhand  = findobj(prevfig, 'Style', 'Edit');
    
    if ~isempty(listhand)
      delete(listhand)
      delete(ttlhand)
    end
  else
    figurePos = getfgpos(560, 420);
    prevfig = figure('NumberTitle', 'off',...
        'Name', 'Where is MATLAB used?',...
        'Units', 'pixels', 'Position', figurePos,...
        'Color', [.8 .8 .8]);
    
  end

%Type is 1 for Education and 2 for industry
if type == 1
  [who, what, how] = eduinfo(organization);
elseif type == 2;
  [who, what, how] = indinfo(organization);
end

%%%% The Pop-up of WHO %%%
h = uicontrol(prevfig,'Style', 'Edit',...
    'String',who,...
    'Units', 'normal',...
    'Position', [.2 .8 .75 .05],...
    'Tag','who',...
    'FontSize', 12,...
    'BackGroundColor', [1 1 1]);

%%%% The WHAT list box %%%%%
edit = uicontrol(prevfig, 'Style', 'Edit',...
    'Units', 'normal',...
    'Position', [.2 .7 .75 .05],...
    'Tag', 'what',...
    'fontsize', 12,...
    'backgroundcolor', [1 1 1],...
    'String', what);


%%%%% The HOW List box %%%%
how = uicontrol(prevfig, 'Style', 'list',...
    'Units', 'normal',...
    'Position', [.2 .1 .75 .55],...
    'String',how,...
    'Tag', 'how',...
    'FontSize', 12,...
    'backgroundcolor', [1 1 1],...
    'Max', 2, 'value', []);

  
%%%% The Close button %%%%%
cl = uicontrol(prevfig, 'Style', 'PushButton',...
    'String', 'Close',...
    'Units', 'normal',...
    'Position', [.5 .03 .1 .05],...
    'callback', 'close');

%%%% The Text %%%%%%
txt1 = uicontrol(prevfig, 'Style', 'Text',...
    'BackgroundColor',[.8 .8 .8],...
    'ForeGroundColor', [0 0 0],...
    'FontSize',15, ...
    'FontWeight','bold', ...
    'Units', 'normal',...
    'Position',[.19 .88 .8 .08], ...
    'HorizontalAlignment', 'center',...
    'String','Where is MATLAB used?');

txt2 = uicontrol(prevfig, 'Style', 'Text',...
    'BackgroundColor',[.8 .8 .8], ...
    'ForeGroundColor', [0 0 0 ],...
    'FontSize',14, ...
    'Units', 'normal',...
    'Position',[.02 .76 .15 .1], ...
    'HorizontalAlignment', 'right',...
    'String','User:');

txt3 = uicontrol(prevfig, 'Style', 'Text',...
    'BackgroundColor',[.8 .8 .8],...
    'ForeGroundColor', [0 0 0 ],...
    'FontSize',14, ...
    'Units', 'normal',...
    'Position',[.02 .66 .15 .1], ...
    'HorizontalAlignment', 'right',...
    'String','Products:');

txt3 = uicontrol(prevfig, 'Style', 'Text',...
    'BackgroundColor',[.8 .8 .8],...
    'ForeGroundColor', [0 0 0],...
    'FontSize',14, ...
    'Units', 'normal',...
    'Position',[.02 .56 .15 .1], ...
    'HorizontalAlignment', 'right',...
    'String','How:');

% Now the little membrane
  axes('Position', [.01 .865 .11 .15]);
  set(gca, 'Tag', 'LittleAxes');
  logo5;
end 

