function SelectAll(ob) { try{ formShortcutInterface.activeElement = ob.tabIndex; } catch(e){} ob.select(); } function shortcutInterface(container){ this.elements = new Array(); this.activeElement = null; this.container = container; this.sortFn = function(a, b){ if(a.compareDocumentPosition(b)==2) return true; else return false; } this.debug = function(){ var temp = ''; for(var i=0; i-1; i--){ if(this.checkIfCan(this.elements[i])){ this.activeElement = i; nextToSelect = this.elements[this.activeElement]; try{ if(document.getElementById('debugForSI')){ document.getElementById('debugForSI').innerHTML=this.activeElement; } setTimeout(function(aEl) {aEl.focus()}, 0, nextToSelect); } catch(e){} break; } } setTimeout(function(aEl) {aEl.focus()}, 0, nextToSelect); } this.initShortcuts = function(){ var engine = this; var oryginalOnKeyDown = window.onkeydown; if(oryginalOnKeyDown != undefined){ var oryginalOnKeyDownTXT = ''+window.onkeydown; var endOfFunction = oryginalOnKeyDownTXT.lastIndexOf("}"); var checkFormEvent = function(event){ } var fu = '' + oryginalOnKeyDownTXT.substring(0,endOfFunction)+';checkFormEvent(event);}'; eval('window.onkeydown='+fu); }else{ window.onkeydown = function(event){ if(event.keyCode==8){ if(event.target.tagName!='INPUT' && event.target.tagName!='TEXTAREA'){ event.preventDefault(); } } } } } }