1var isNN = (navigator.appName.indexOf('Netscape')!=-1); 2function autoTab(input,len, e) 3{ 4 var keyCode = (isNN) ? e.which : e.keyCode; 5 var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46]; 6 if(input.value.length >= len && !containsElement(filter,keyCode)) 7 { 8 input.value = input.value.slice(0, len); 9 input.form[(getIndex(input)+1) % input.form.length].focus(); 10 } 11 12 return true; 13} 14 15function containsElement(arr, ele) 16{ 17 var found = false, index = 0; 18 while(!found && index < arr.length) 19 { 20 if(arr[index] == ele) 21 { 22 found = true; 23 } 24 else 25 { 26 index++; 27 } 28 } 29 30 return found; 31} 32 33function getIndex(input) 34{ 35 var index = -1, i = 0, found = false; 36 37 while (i < input.form.length && index == -1) 38 { 39 if (input.form[i] == input) 40 { 41 index = i; 42 } 43 else 44 { 45 i++; 46 } 47 } 48 49 return index; 50}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.