+
+function submit_click(obj)
+{
+ obj.form.elements['realsub'].value = obj.id;
+}
+
+function class_check(item, cls_name)
+{
+ if ((" " + item.className + " ").indexOf(" " + cls_name + " ") == -1)
+ return (false);
+ else
+ return (true);
+}
+
+function class_add(item, cls_name)
+{
+ for (i = 1 ; i < arguments.length ; i++) {
+ if (! class_check(item, arguments[i])) {
+ item.className = item.className + " " + arguments[i];
+ }
+ }
+}
+
+function class_rem(item, cls_name)
+{
+ for (i = 1 ; i < arguments.length ; i++) {
+ var item_spc = " " + item.className + " ";
+ var cls_spc = " " + arguments[i] + " ";
+ var cls_out;
+
+ var pos = item_spc.indexOf(cls_spc);
+ if (pos != -1) {
+ cls_out = item_spc.substring(0, pos) + item_spc.substring(pos + cls_spc.length - 1);
+ if (cls_out == " ") {
+ item.className = "";
+ }
+ else {
+ item.className = cls_out.substring(1, cls_out.length - 1);
+ }
+ }
+ }
+}
+
+function class_subst(item, cls_out, cls_in)
+{
+ class_rem(item, cls_out);
+ class_add(item, cls_in);
+}
+
+function nexst(after)
+{
+ if (after != undefined) {
+ this._after = after;
+ }
+}
+
+nexst.next = function(st)
+{
+ if (st === null || st === undefined)
+ st = new nexst();
+ st._step++;
+
+ return st;
+};
+
+nexst.prev = function(st)
+{
+ st._step--;
+}
+
+nexst.reprise = function ()
+{
+ var thiz, args_in, args = [];
+
+ if (arguments.length > 1) {
+ thiz = arguments[0];
+ args_in = arguments[1];
+ }
+ else {
+ thiz = null;
+ args_in = arguments[0];
+ }
+
+ for (var i = 0 ; i < args_in.length ; i++) {
+ args[i] = args_in[i];
+ }
+ return args_in.callee.apply(thiz, args);
+};
+
+nexst.prototype = {
+ _step: 0, // current step for the async multistep command
+ _data: null, // data returned at the end of the async command
+ _subst: null, // substatus for nested async command
+ _after: null, // callback (as 'arguments' object) to run at the end
+ // of last step
+
+ step_set: function(step) {
+ this._step = step;
+ },
+
+ step_get: function() {
+ return this._step;
+ },
+
+ data_set: function(data) {
+ this._data = data;
+ },
+
+ data_get: function() {
+ return this._data;
+ },
+
+ subst_set: function(subst) {
+ this._subst = subst;
+ },
+
+ subst_get: function() {
+ return this._subst;
+ },
+
+ after_set: function(after) {
+ this._after = after;
+ },
+
+ after_get: function() {
+ return this._after;
+ },
+
+ done_set: function() {
+ this.done = true;
+ },
+
+ done_get: function() {
+ return (this.done);
+ }
+};