function[Bool]=IfEmptyInputBo(string1,string2,In,Default,ClearStatus);

%   IfEmptyInputBo

%   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.    

if nargin<5; ClearStatus=0; end;
if nargin<4; Default=[]; end;
if nargin<3; In=[]; end;
if nargin<2; string2=[]; end;
if nargin<1; string1=[]; end;
if ~isempty(In); Bool=In; return; end

if nargin<5; ClearStatus=0; end;
if ClearStatus;fprintf('\n');clc;end

	
if ~isempty(string1)
	fprintf(string1)
	fprintf('\n')
end
if ~isempty(string2)
	fprintf(string2)
	fprintf('\n')
end
fprintf('\n')
if Default==0 
	fprintf('Please insert your choice  Y/N [N] :  ');
elseif Default==1
	fprintf('Please insert your choice  Y/N [Y] :  ');
end
Again=1;
while Again
	Bool= input(' ','s');
	if isempty(Bool)
		Bool=Default;
		return;
	end
	if Bool=='y' | Bool=='Y'
		Bool=1;
		return;
	elseif Bool=='n' | Bool=='N'
		Bool=0;
		return;
	else
		fprintf('Sorry, this input is not permitted !\n\n');
		fprintf('Please insert "y" or "n" !\n\n');
	end	
end
