+ 'input': function(e) {
+ if(e.onfocus==undefined) {
+ e.onfocus = function() {
+ save_focus(this);
+ if (string_contains(this.className, 'combo') || string_contains(this.className, 'combo3'))
+ this.select();
+ };
+ }
+ if (string_contains(e.className, 'combo') || string_contains(e.className, 'combo2') || string_contains(e.className, 'combo3')) {
+ _set_combo_input(e);
+ }
+ else
+ if(e.type == 'text' ) {
+ e.onkeydown = function(ev) {
+ ev = ev||window.event;
+ key = ev.keyCode||ev.which;
+ if(key == 13) {
+ if(e.className == 'searchbox') e.onblur();
+ return false;
+ }
+ return true;
+ }
+ }
+ },
+ 'input.combo2,input[aspect="fallback"]':
+ function(e) {
+ // this hides search button for js enabled browsers
+ e.style.display = 'none';
+ },
+ 'div.js_only':
+ function(e) {
+ // this shows divs for js enabled browsers only
+ e.style.display = 'block';
+ },
+ 'button': function(e) {
+ e.onclick = function(){
+ if (validate(e)) {
+ setTimeout(function() { var asp = e.getAttribute('aspect');
+ if (asp && asp.indexOf('download') === -1)
+ set_mark((asp && ((asp.indexOf('process') !== -1) || (asp.indexOf('nonajax') !== -1))) ? 'progressbar.gif' : 'ajax-loader.gif');
+ }, 100);
+ return true;
+ }
+ return false;
+ },
+ e.onkeydown = function(ev) { // block unintentional page escape with 'history back' key pressed on buttons
+ ev = ev||window.event;
+ key = ev.keyCode||ev.which;
+ if(key == 8 || (key==37 && ev.altKey)) {
+ ev.returnValue = false;
+ return false;
+ }
+ }
+
+ },
+// '.ajaxsubmit,.editbutton,.navibutton': // much slower on IE7
+ 'button.ajaxsubmit,input.ajaxsubmit,input.editbutton,button.editbutton,button.navibutton':
+ function(e) {
+ e.onclick = function() {
+ if (validate(e)) {
+ save_focus(e);
+ var asp = e.getAttribute('aspect')
+ if (asp && (asp.indexOf('process') !== -1))
+ JsHttpRequest.request(this, null, 600000); // ten minutes for backup
+ else
+ JsHttpRequest.request(this);
+ }
+ return false;
+ }
+ },
+ '.amount': function(e) {
+ if(e.onblur==undefined) {
+ e.onblur = function() {
+ var dec = this.getAttribute("dec");