function [stat,post] = blkzcross(path,prop,bstr,bint,bflt,parent,name)
%BLKZCROSS This block detects a change from positive to negetive or from negative to
%          positive in an input signal.
%
% See also 

% Initial coding by A S Bozin, 6-12-97
% Copyright 1997-2000 The MathWorks, Inc.
% $Revision: 1.4 $ $Date: 2000/06/14 16:11:44 $

   stat = 0;			   		   % Error flag
   nInputs = bint(5);
   nOutputs = bint(6);
   %
   % Build mux and demux if necessary
   %
   [post,rect] = blkio('port',nOutputs,nOutputs,prop,path);
   %
   % Zero crossing block
   %
   bh = add_block('built-in/HitCross',path,...
		  'ForegroundColor',prop.fgColor,...
		  'BackgroundColor',prop.bgColor,...
		  'Orientation',prop.orientation,...
		  'DropShadow',prop.border,...
		  'Position',rect,...
		  'HitCrossingOffset','0',...
		  'HitCrossingDirection','either',...
		  'ShowOutputPort',mapoutput(nOutputs));
   %
   % Connect the current block with the mux and demux blocks (if any)
   %
   blkio('line',nOutputs,nOutputs,post,parent,name);
   return					   % Last card of BLKZCROSS


function showstr = mapoutput(nout)
%MAPOUTPUT
%

   if (nout == 0)
      showstr = 'off';
   else
      showstr = 'on';
   end
   return					   % Last card of MAPOUTPUT
