JavaLikeCalc.JavaScript
if(f_start) { select_items = elItems; select_value = selValue; }

//Events for commands process
for(off = 0, ev_rez = ""; (ev_cur=event.parse(0,"\n",off)).length; ) {
	//SYS.messInfo("Prescription edit control","Event: "+ev_cur);
	if(ev_cur == "ws_BtPress:/apply") {
		if(select_value.length)	{ selValue = select_value; elEvent += "dlg_Apply\n"; }
		this.attrSet("pgOpen", false);
	}
	else if(ev_cur == "ws_BtPress:/cancel")	this.attrSet("pgOpen", false);
	else ev_rez += ev_cur + "\n";
}
event = ev_rez;