+
+Ajax.Responders.register({
+ onCreate: function(){
+ if (Ajax.activeRequestCount > 0) {
+ document.getElementById("loadingnotice").style.display = \'block\';
+ }
+ },
+ onComplete: function(){
+ if (Ajax.activeRequestCount == 0) {
+ document.getElementById("loadingnotice").style.display = \'none\';
+ }
+ }
+});
+function replaceFunc(transport) {
+ try {
+ d = transport.responseText.evalJSON();
+ } catch (e) {
+ $(\'body\').innerHTML = \'<pre>\'+transport.responseText+\'</pre>\'
+ return;
+ }
+ for(key in d) {
+ $(key).innerHTML = d[key];
+ }
+}
+
+function jsFormSubmit(location, elt){
+ new Ajax.Request(location, {method: \'post\',
+ parameters: Form.serialize(elt)+\'&js=true\',
+ onSuccess: replaceFunc,
+ onComplete: function() {Form.enable(elt);}
+ });
+ Form.disable(elt);
+ return false;
+}
+
+function rowFormSubmit(elt, retpage){
+ new Ajax.Request(\'command\', {method: \'post\',
+ parameters: Form.serialize(elt)+\'&js=\'+retpage,
+ onSuccess: replaceFunc
+ });
+ return false;
+}
+
+window.onload = {
+ //Fix bug with disabled elements
+ $''')
+ _v = 'form' # "$('form')" on line 75, col 4
+ if _v is not None: write(_filter(_v, rawExpr="$('form')")) # from line 75, col 4.
+ write('''.each(Form.enable);
+}
+