function addfixxmanage(filename,filepath,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.                                                                      
filezaehler=0;

format = questdlg('Do you wish to save as ''jpg'' or as ''bmp''?','Picture Format:','jpg','bmp','jpg');
width = questdlg('What line width shall I use?','Line Width','1','2','3','2');
length = questdlg('How big do you want the X to be','Size','10','20','30','20');

filepath(end)=[];

if mode==0
   modefehler
   return
   
   
% directory mode   
elseif mode==11
   cd ([filepath,'\']);
   filelist=dir(filepath);
   filelistsize=size(filelist);
   filepath = [];  
	% Schleife für Files
   for filezaehler=3:filelistsize(1)
      filename=filelist(filezaehler).name;
      addfixx(filename,filepath,format,width,length);
   end
   ok
     
% batchfile mode   
elseif mode==12
   return
      
% single file mode   
elseif mode==2
   addfixx(filename,filepath,format,width,length);
  
  
end



return