1function WebForm_FindFirstFocusableChild(control) { 2 if (!control || !(control.tagName)) { 3 return null; 4 } 5 var tagName = control.tagName.toLowerCase(); 6 if (tagName == "undefined") { 7 return null; 8 } 9 var children = control.childNodes; 10 if (children) { 11 for (var i = 0; i < children.length; i++) { 12 try { 13 if (WebForm_CanFocus(children[i])) { 14 return children[i]; 15 } 16 else { 17 var focused = WebForm_FindFirstFocusableChild(children[i]); 18 if (WebForm_CanFocus(focused)) { 19 return focused; 20 } 21 } 22 } catch (e) { 23 } 24 } 25 } 26 return null; 27} 28function WebForm_AutoFocus(focusId) { 29 var targetControl; 30 if (__nonMSDOMBrowser) { 31 targetControl = document.getElementById(focusId); 32 } 33 else { 34 targetControl = document.all[focusId]; 35 } 36 var focused = targetControl; 37 if (targetControl && (!WebForm_CanFocus(targetControl)) ) { 38 focused = WebForm_FindFirstFocusableChild(targetControl); 39 } 40 if (focused) { 41 try { 42 focused.focus(); 43 if (__nonMSDOMBrowser) { 44 focused.scrollIntoView(false); 45 } 46 if (window.__smartNav) { 47 window.__smartNav.ae = focused.id; 48 } 49 } 50 catch (e) { 51 } 52 } 53} 54function WebForm_CanFocus(element) { 55 if (!element || !(element.tagName)) return false; 56 var tagName = element.tagName.toLowerCase(); 57 return (!(element.disabled) && 58 (!(element.type) || element.type.toLowerCase() != "hidden") && 59 WebForm_IsFocusableTag(tagName) && 60 WebForm_IsInVisibleContainer(element) 61 ); 62} 63function WebForm_IsFocusableTag(tagName) { 64 return (tagName == "input" || 65 tagName == "textarea" || 66 tagName == "select" || 67 tagName == "button" || 68 tagName == "a"); 69} 70function WebForm_IsInVisibleContainer(ctrl) { 71 var current = ctrl; 72 while((typeof(current) != "undefined") && (current != null)) { 73 if (current.disabled || 74 ( typeof(current.style) != "undefined" && 75 ( ( typeof(current.style.display) != "undefined" && 76 current.style.display == "none") || 77 ( typeof(current.style.visibility) != "undefined" && 78 current.style.visibility == "hidden") ) ) ) { 79 return false; 80 } 81 if (typeof(current.parentNode) != "undefined" && 82 current.parentNode != null && 83 current.parentNode != current && 84 current.parentNode.tagName.toLowerCase() != "body") { 85 current = current.parentNode; 86 } 87 else { 88 return true; 89 } 90 } 91 return true; 92}
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.