load_file("nrngui.hoc")

objref menubox

proc run_fig1a() {
	load_file("initf1a.hoc")
	menubox.unmap()
}

proc run_fig1b() {
	load_file("initf1b.hoc")
	menubox.unmap()
}

proc run_fig1c() {
	load_file("initf1c.hoc")
	menubox.unmap()
}

proc make_demopanel() {
	menubox = new VBox()
	menubox.intercept(1)       //all following creations go into the "vbox" box
	xpanel("Short-term synaptic plasticity")
	xlabel("Models of short-term synaptic plasticity")
	xlabel("Choose one of the following:")
	xbutton("Fig. 1A pyramid-->pyramid (depression)", "run_fig1a()")
	xbutton("Fig. 1B pyramid-->interneuron at 20 Hz (facilitation)", "run_fig1b()")
	xbutton("Fig. 1C pyramid-->interneuron at 70 Hz (facilitation-depression)", "run_fig1c()")
	xpanel()
	menubox.intercept(0)       //ends intercept mode
	menubox.map()              //draw the box and its contents
}

make_demopanel()