function [mode]=searchenable(mode)
%  

%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION.                                                                      

%batchmode
%==============
batchmoderadio=findobj('tag','batchmoderadio');

%dir-mode
directoryradio=findobj('tag','directoryradio');
directorybutton=findobj('tag','directorybutton');
directorymonitor=findobj('tag','directorymonitor');

%batchfilemode
batchfileradio=findobj('tag','batchfileradio');
batchfilebutton=findobj('tag','batchfilebutton');
batchfilemonitor=findobj('tag','batchfilemonitor');

%searchmode
searchradio=findobj('tag','searchradio');
searchbutton=findobj('tag','searchbutton');
searchmonitor=findobj('tag','searchmonitor');
filterstringedit = findobj('tag','filterstringedit');
filterstringtext = findobj('tag','filterstringtext');
subdircheck = findobj('tag','subdircheck');



%singlefilemode
%==================
fileradio=findobj('tag','fileradio');
filebutton=findobj('tag','filebutton');
filemonitor=findobj('tag','filemonitor');





activitystatus=get(searchradio,'Value');

if activitystatus==1
   mode=13;
   set(searchbutton,'Enable','on');
   set(filterstringedit,'Enable','on');
   set(filterstringtext,'Enable','on');
   set(subdircheck ,'Enable','on');
   set(batchfilebutton,'Enable','off');
   set(directorybutton,'Enable','off');
   set(directoryradio,'Value',0);
   set(batchfileradio,'Value',0);
   
else
   set(searchbutton,'Enable','off');
   set(filterstringtext,'Enable','off');
   set(filterstringedit,'Enable','off');
   set(subdircheck ,'Enable','off');
   set(batchfilebutton,'Enable','off');
   set(directorybutton,'Enable','off');
   set(searchradio,'Value',0);
   mode=1;
end
return