xpanel("External Stimulus Type")
	xstatebutton("Uniform Field", &stimtypefield, "xfield()")

xpanel(0,100)


objectvar save_window_, rvp_
objectvar scene_vector_[9]
objectvar ocbox_, ocbox_list_, scene_, scene_list_
{ocbox_list_ = new List()  scene_list_ = new List()}

{
save_window_ = new Graph(0)
save_window_.size(0,500,-80,40)
scene_vector_[2] = save_window_
{save_window_.view(0, -80, 500, 120, 342, 85, 412.2, 172.9)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("Cell_Cell[0].soma.v(0.5)", 1, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[1].soma.v(0.5)", 2, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[2].soma.v(0.5)", 3, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[3].soma.v(0.5)", 4, 1, 0.8, 0.9, 2)
save_window_.addexpr("OLMCell[1].soma.v(0.5)", 5, 1, 0.8, 0.9, 2)
save_window_.addexpr("BasketCell[0].soma.v(0.5)", 6, 1, 0.8, 0.9, 2)
save_window_.addexpr("OLMCell[2].soma.v(0.5)", 7, 1, 0.8, 0.9, 2)

}
{
save_window_ = new Graph(0)
save_window_.size(0,500,-80,40)
scene_vector_[3] = save_window_
{save_window_.view(0, -80, 500, 120, 322, 213, 419.4, 251.2)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("Cell_Cell[4].soma.v(0.5)", 1, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[5].soma.v(0.5)", 2, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[6].soma.v(0.5)", 3, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[7].soma.v(0.5)", 4, 1, 0.8, 0.9, 2)
save_window_.addexpr("OLMCell[5].soma.v(0.5)", 5, 1, 0.8, 0.9, 2)
save_window_.addexpr("BasketCell[4].soma.v(0.5)", 6, 1, 0.8, 0.9, 2)
save_window_.addexpr("OLMCell[6].soma.v(0.5)", 7, 1, 0.8, 0.9, 2)

}
{
save_window_ = new Graph(0)
save_window_.size(0,500,-80,40)
scene_vector_[4] = save_window_
{save_window_.view(0, -80, 500, 120, 336, 452, 868.5, 451.9)}
graphList[0].append(save_window_)
save_window_.save_name("graphList[0].")
save_window_.addexpr("Cell_Cell[12].soma.v(0.5)", 1, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[13].soma.v(0.5)", 2, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[14].soma.v(0.5)", 3, 1, 0.8, 0.9, 2)
save_window_.addexpr("Cell_Cell[15].soma.v(0.5)", 4, 1, 0.8, 0.9, 2)
save_window_.addexpr("BasketCell[12].soma.v(0.5)", 6, 1, 0.8, 0.9, 2)
save_window_.addexpr("OLMCell[13].soma.v(0.5)", 5, 1, 0.8, 0.9, 2)
save_window_.addexpr("OLMCell[14].soma.v(0.5)", 7, 1, 0.8, 0.9, 2)

}


objectvar scene_vector_[1]
{doNotify()}





objref d 

proc paneldeck(){
d = new Deck() 
d.intercept(1)
xpanel("External Field")	
	xvalue("E-field (mV/mm)", "efield", 1, "xfield()", 1)
	xvalue("Pulse Width (ms)", "pw", 1, "xfield()", 1)
	xvalue("Delay (ms)", "delay", 1, "xfield()", 1)
	xvalue("Theta (degrees)", "theta", 1, "xfield()", 1)
xpanel()
d.intercept(0)



}
paneldeck()






proc xfield(){
	if(stimtypefield = 1){stimtypepoint = 0 stimtypeline = 0 stimtypenosource = 0}
	//print "efield", efield
	Cell_Cell[0].fieldextstimulus(efield)
      Cell_Cell[1].fieldextstimulus(efield)
      Cell_Cell[2].fieldextstimulus(efield)
      Cell_Cell[3].fieldextstimulus(efield)
      Cell_Cell[4].fieldextstimulus(efield)
      Cell_Cell[5].fieldextstimulus(efield)
      Cell_Cell[6].fieldextstimulus(efield)
      Cell_Cell[7].fieldextstimulus(efield)
      Cell_Cell[8].fieldextstimulus(efield)
      Cell_Cell[9].fieldextstimulus(efield)
      Cell_Cell[10].fieldextstimulus(efield)
      Cell_Cell[11].fieldextstimulus(efield)
      Cell_Cell[12].fieldextstimulus(efield)
      Cell_Cell[13].fieldextstimulus(efield)
      Cell_Cell[14].fieldextstimulus(efield)
      Cell_Cell[15].fieldextstimulus(efield)
      Cell_Cell[16].fieldextstimulus(efield)
      Cell_Cell[17].fieldextstimulus(efield)
      Cell_Cell[18].fieldextstimulus(efield)
      Cell_Cell[19].fieldextstimulus(efield)

	d.unmap()
	d.unmap()
	d.flip_to(0)
// need the line below to show field controls
	d.map("Uniform Field",1000,0,300,100)
	// drawxfield()
}