function oldOn=AfterDark(on)
% oldOn=AfterDark([on])
% 
% OBSOLETE--please use ScreenSaver.mex instead. It's an exact replacement.
% 
% Control AfterDark-compatible screen savers. 
% Most of the popular screen savers use the same external control
% interface, so this may work with your screen saver. Try it and tell us.
% 
% Gets current status before call.  If an input is passed, sets it.  1
% means on, 0 means off.

% 3/4/97  dhb  Wrote it at suggestion of dgp.
% 9/26/99 dgp  Rewrote it to use the new ScreenSaver.mex instead of the obsolete AD.mex.

if nargin==0
	oldOn=ScreenSaver;
else
	oldOn=ScreenSaver(on);
end
