/*
  _estat_bootstrap_pr

*!  VERSION 1.0.2  03nov2005

	// SCRIPTS and PROGRAMS for external use
		* SCRIPT main_bootstrap_show
		* SCRIPT main_bootstrap_hide
		* PROGRAM bootstrap_output

	****
		SPECIAL NOTE:
		  All dialogs that use this must implement SCRIPT main_hide_all
	****
*/

SCRIPT main_PREINIT
BEGIN
	main._ed_prefix.hide
END

PROGRAM main_POSTINIT_PROGRAM
BEGIN
	call main.lb_subcmd.additem "Bootstrap confidence intervals (bootstrap)"
	call main_subcommand_values.Arrpush "bootstrap"
	call main_subcommand_scripts.Arrpush "script _sel_bootstrap"
END

SCRIPT _sel_bootstrap
BEGIN
	script main_hide_all
	program main_bootstrap_check
END

PROGRAM main_bootstrap_check
BEGIN
	if main._ed_prefix.iseq("bootstrap") {
		call script main_bootstrap_show
	}
	if ! main._ed_prefix.iseq("bootstrap") {
		call script main_bootstrap_errmsg
	}
END

SCRIPT main_bootstrap_errmsg
BEGIN
	script main_bootstrap_hide
	main._tx_bs.show
END

SCRIPT main_bootstrap_show
BEGIN
	main._gb_ci.show
	main._ck_all.show
	main._ck_bc.show
	main._ck_bca.show
	main._ck_norm.show
	main._ck_p.show
	main._ck_verbose.show
	main._ck_noheader.show
	main._ck_nolegend.show
	main._tx_title.show
	main._ed_title.show
END
SCRIPT main_bootstrap_hide
BEGIN
	main._tx_bs.hide
	main._gb_ci.hide
	main._ck_all.hide
	main._ck_bc.hide
	main._ck_bca.hide
	main._ck_norm.hide
	main._ck_p.hide
	main._ck_verbose.hide
	main._ck_noheader.hide
	main._ck_nolegend.hide
	main._tx_title.hide
	main._ed_title.hide
END


PROGRAM _bs_check_all
BEGIN
	if main._ck_all {
		call gaction main._ck_bc.disable
		call gaction main._ck_bca.disable
		call gaction main._ck_norm.disable
		call gaction main._ck_p.disable
	}
	if !main._ck_all {
		call gaction main._ck_bc.enable
		call gaction main._ck_bca.enable
		call gaction main._ck_norm.enable
		call gaction main._ck_p.enable
	}
END

PROGRAM _bs_verbose_check
BEGIN
	if main._ck_verbose {
		call main._ck_noheader.disable
		call main._ck_nolegend.disable
	}
	if ! main._ck_verbose {
		call main._ck_noheader.enable
		if ! main._ck_noheader {
			call main._ck_nolegend.enable
		}
	}
END

PROGRAM bootstrap_output
BEGIN
	if main.lb_subcmd.iseq("bootstrap") ///
	 & ! main._ed_prefix.iseq("bootstrap") {
		stopbox stop "Bootstrap estimation results are not available."
	}
	option main._ck_all
	option main._ck_bc
	option main._ck_bca
	option main._ck_norm
	option main._ck_p
	option main._ck_noheader
	option main._ck_nolegend
	option main._ck_verbose
	optionarg main._ed_title
END
