Implements 'alert' and 'noalert'.