+ 'form': function(e) {
+ e.onkeydown = function(ev) {
+ ev = ev||window.event;
+ key = ev.keyCode||ev.which;
+ if((ev.ctrlKey && key == 13) || key == 27) {
+ ev.cancelBubble = true;
+ if(ev.stopPropagation) ev.stopPropagation();
+ // activate submit/escape form
+ for (var i=0; i<this.elements.length; i++){
+ var asp = this.elements[i].getAttribute('aspect');
+ if ((asp=='default' && key==13)||(asp=='cancel' && key==27))
+ JsHttpRequest.request(this.elements[i]);
+ }
+
+ ev.returnValue = false;
+ return false;
+ }
+ return true;
+ }
+ },
+ 'input': function(e) {
+ if(e.onfocus==undefined) {
+ e.onfocus = function() {
+ save_focus(this);
+ if (this.className == 'combo')
+ this.select();
+ };
+ }
+ if (e.className == 'combo' || e.className == 'combo2') {
+ _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';
+ },
+// '.ajaxsubmit,.editbutton,.navibutton': // much slower on IE7
+ 'button.ajaxsubmit,input.ajaxsubmit,input.editbutton,button.navibutton':
+ function(e) {
+ e.onclick = function() {
+ if (this.getAttribute('aspect') == 'process')
+ progbar();
+ save_focus(this);
+ JsHttpRequest.request(this);
+ return false;
+ }
+ },
+ '.amount': function(e) {
+ if(e.onblur==undefined) {
+ e.onblur = function() {
+ var dec = this.getAttribute("dec");