1function tabSwitch(tabSwitchOnIdArg, tabSwitchIdArg_ary){ 2 3 var tabSwitchOffId_aly = new Array(); 4 for(var i = 0; i < tabSwitchIdArg_ary.length; i++){ 5 if(tabSwitchIdArg_ary[i] != tabSwitchOnIdArg){ 6 tabSwitchOffId_aly.push(tabSwitchIdArg_ary[i]); 7 } 8 } 9 10 var tabSwitchCurrendtabOnId = ''; 11 if(tabSwitchCurrendtabOnId != tabSwitchOnIdArg){ 12 tabSwitchCurrendtabOnId = tabSwitchOnIdArg; 13 14 var tabSwitchOnClassName = 'tabSwitchOn'; 15 var tabSwitchOffClassName = 'tabSwitchOff'; 16 var tabSwitchBtnHeadName = 'tabSwitch-btn-'; 17 var tabSwitchContentsHeadName = 'tabSwitch-contents-'; 18 19 tabSwitchOnBtnHtml = 20 document.getElementById(tabSwitchBtnHeadName + tabSwitchOnIdArg).innerHTML; 21 22 tmpReOn = new RegExp(tabSwitchOnClassName); 23 tmpReOff = new RegExp(tabSwitchOffClassName); 24 if(tabSwitchOnBtnHtml.match(tmpReOff)){ 25 document.getElementById(tabSwitchBtnHeadName + tabSwitchOnIdArg).innerHTML = 26 tabSwitchOnBtnHtml.replace(tmpReOff, tabSwitchOnClassName); 27 28 }else if(!tabSwitchOnBtnHtml.match(tmpReOn)){ 29 document.getElementById(tabSwitchBtnHeadName + tabSwitchOnIdArg).innerHTML = 30 '<span class="' + tabSwitchOnClassName + '">' + tabSwitchOnBtnHtml + '</span>'; 31 } 32 document.getElementById(tabSwitchContentsHeadName + tabSwitchOnIdArg).style.display = 'block'; 33 34 35 for(var i=0; i < tabSwitchOffId_aly.length; i++){ 36 tabSwitchOffBtnHtml = 37 document.getElementById(tabSwitchBtnHeadName + tabSwitchOffId_aly[i]).innerHTML; 38 39 if(tabSwitchOffBtnHtml.match(tmpReOn)){ 40 document.getElementById(tabSwitchBtnHeadName + tabSwitchOffId_aly[i]).innerHTML = 41 tabSwitchOffBtnHtml.replace(tmpReOn, tabSwitchOffClassName); 42 43 }else if(!tabSwitchOffBtnHtml.match(tmpReOff)){ 44 document.getElementById(tabSwitchBtnHeadName + tabSwitchOffId_aly[i]).innerHTML = 45 '<span class="' + tabSwitchOffClassName + '">' + tabSwitchOffBtnHtml + '</span>'; 46 } 47 48 document.getElementById(tabSwitchContentsHeadName + tabSwitchOffId_aly[i]).style.display = 'none'; 49 } 50 } 51}
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.