I think there's a clear way to assign the confirmc/cancel object here.
``` js
var _ = navigator.mozL10n.get;
var confirm = {
  title: _('ok'),
  callback: (okfn instanceof Function) ?
    okfn : function() {
       start_accumulator();
       CustomDialog.hide();   // Do you need this?
    }
};
var cancel = {
  title: _('close'),
  callback: (okfn instanceof Function) ?
     okfn: function() {
        start_accumulator();
        CustomDialog.hide();   // Do you need this?
     }
}
```