1function getRefToDiv(divID,oDoc) { 2 if( document.getElementById ) { 3 return document.getElementById(divID); } 4 if( document.all ) { 5 return document.all[divID]; } 6 if( !oDoc ) { oDoc = document; } 7 if( document.layers ) { 8 if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else { 9 //repeatedly run through all child layers 10 for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) { 11 //on success, return that layer, else return nothing 12 y = getRefToDiv(divID,oDoc.layers[x].document); } 13 return y; } } 14 return false; 15} 16 17function changeDisplay( elementId, setTo ) { 18 var theElement; 19 theElement = getRefToDiv(elementId); 20 if( !theElement ) { 21 /* The page has not loaded, or the browser claims to 22 support document.getElementById or document.all but 23 cannot actually use either */ 24 return; 25 } 26 //Reference the style ... 27 if( theElement.style ) { theElement = theElement.style; } 28 if( typeof( theElement.display ) == 'undefined' ) { 29 //The browser does not allow us to change the display style 30 //Alert something sensible (not what I have here ...) 31 //window.alert( 'Your browser does not support this' ); 32 return; 33 } 34 //Change the display style 35 theElement.display = setTo; 36} 37 38function hideElement( elementId , dontHideSelects) { 39 if (!dontHideSelects) dontHideSelects=0; 40 changeDisplay( elementId, 'none' ); 41 if (dontHideSelects!=1) showSelects(); 42 return; 43} 44 45function showElement( elementId , dontHideSelects) { 46 if (!dontHideSelects) dontHideSelects=0; 47 changeDisplay( elementId, 'block' ); 48 if (dontHideSelects!=1) hideSelects(); 49 return; 50} 51 52function showElement2( elementId ) { 53 changeDisplay( elementId, 'inline' ); 54 return; 55} 56 57function showTableSingleRow( elementId , dontHideSelects) { 58 if (!dontHideSelects) dontHideSelects=0; 59 changeDisplay( elementId, 'table-row' ); 60 if (dontHideSelects!=1) hideSelects(); 61 return; 62} 63 64function showTableRow( elementId , dontHideSelects) { 65 if (!dontHideSelects) dontHideSelects=0; 66 changeDisplay( elementId, 'table-row-group' ); 67 if (dontHideSelects!=1) hideSelects(); 68 return; 69} 70 71function changeEnabled( elementId, setTo ) { 72 var theElement; 73 theElement = getRefToDiv(elementId); 74 if( !theElement ) { 75 return; 76 } 77 //if( theElement.style ) { theElement = theElement.style; } 78 if( typeof( theElement.disabled ) == 'undefined' ) { 79 return; 80 } 81 theElement.disabled = setTo; 82 //document.form1.description.value = theElement.disabled; 83} 84 85function enableElement( elementId ) { 86 changeEnabled( elementId, false ); 87 return; 88} 89 90function disableElement( elementId ) { 91 changeEnabled( elementId, true ); 92 return; 93} 94 95function changeVisibility( elementId, setTo ) { 96 var theElement; 97 theElement = getRefToDiv(elementId); 98 if( !theElement ) { 99 return; 100 } 101 if( theElement.style ) { theElement = theElement.style; } 102 if( typeof( theElement.visibility ) == 'undefined' ) { 103 return; 104 } 105 theElement.visibility = setTo; 106} 107 108function visualizeElement( elementId ) { 109 changeVisibility( elementId, 'visible' ); 110 return; 111} 112 113function devisualizeElement( elementId ) { 114 changeVisibility( elementId, 'hidden' ); 115 return; 116} 117 118// hide all selects 119function hideSelects(){ 120 selects = document.getElementsByTagName("select"); 121 for(i=0;i<selects.length;i++){ 122 selects[i].style.visibility="hidden"; 123 } 124} 125 126// show all selects 127function showSelects(){ 128 selects = document.getElementsByTagName("select"); 129 for(i=0;i<selects.length;i++){ 130 selects[i].style.visibility="visible"; 131 } 132} 133 134function redirect(pageURL){ 135 window.location = pageURL; 136} 137 138function changeDisplaySelect( elementId, flag ) { 139 if (flag==1) showElement( elementId , 1); 140 else if (flag==0) hideElement( elementId , 1); 141 return; 142} 143 144function changeDisplayStraight( elementId, flag ) { 145 if (flag!=0) showElement( elementId , 1); 146 else hideElement( elementId , 1); 147 return; 148} 149 150function changeDisplayReverse( elementId, flag ) { 151 if (flag==0) showElement( elementId , 1); 152 else hideElement( elementId , 1); 153 return; 154} 155 156function changeDisplayValue( elementId, flag, value ) { 157 if (flag==value) showElement( elementId , 1); 158 else hideElement( elementId , 1); 159 return; 160} 161
162function changeDisplayValueReverse( elementId, flag, value ) { 163 if (flag!=value) showElement( elementId , 1); 164 else hideElement( elementId , 1); 165 return; 166} 167 168function changeDisplayThreshold( elementId, flag, threshold ) { 169 if (!threshold) threshold=1; 170 if (flag>=threshold) showElement( elementId , 1); 171 else hideElement( elementId , 1); 172 return; 173} 174 175function changeDisplayThresholdReverse( elementId, flag, threshold ) { 176 //if (!threshold) threshold=1; 177 if (flag>=threshold) hideElement( elementId , 1); 178 else if (flag>0) showElement( elementId , 1); 179 return; 180} 181 182function LinkedSelect(from,to,optionArray) { 183 var fromCode = from.options[from.selectedIndex].value; 184 to.options.length = 0; 185 for (i = 0; i < optionArray.length; i++) { 186 if (optionArray[i][0] == fromCode) { 187 to.options[to.options.length] = 188 new Option(optionArray[i][1], optionArray[i][2], optionArray[i][3], optionArray[i][3]); 189 } 190 } 191} 192 193function refreshForm(command) { 194document.form1.c.value = command; 195document.form1.submit(); 196} 197 198 199function prepareFormData (formelems) { 200 var formattedRequestData = ""; 201 var sep = ""; 202 for (var i = 0; i < formelems.length; i++) 203 if( getRefToDiv(formelems[i]) ) { 204 if( typeof( getRefToDiv(formelems[i]).options ) == 'undefined' ) { 205 if( typeof( getRefToDiv(formelems[i]).checked ) != 'undefined' && typeof( getRefToDiv(formelems[i]).type ) != 'undefined' && getRefToDiv(formelems[i]).type == 'checkbox' ) { 206 formattedRequestData = 207 formattedRequestData + sep + formelems[i] + '=' + encodeURIComponent(stringToBoolean(getRefToDiv(formelems[i]).checked)); 208 } else { 209 formattedRequestData = 210 formattedRequestData + sep + formelems[i] + '=' + encodeURIComponent(getRefToDiv(formelems[i]).value); 211 } 212 } else 213 formattedRequestData = 214 formattedRequestData + sep + formelems[i] + '=' + encodeURIComponent(getRefToDiv(formelems[i]).options[getRefToDiv(formelems[i]).selectedIndex].value); 215 sep = "&"; 216 } 217 return formattedRequestData; 218} 219 220function prepareData (elems, values) { 221 var formattedRequestData = ""; 222 var sep = ""; 223 for (var i = 0; i < elems.length; i++) { 224 formattedRequestData = 225 formattedRequestData + sep + elems[i] + '=' + encodeURIComponent(values[i]); 226 sep = "&"; 227 } 228 return formattedRequestData; 229} 230 231function setImgTarget (value) { 232 233} 234 235function stringToBoolean(string){ 236 //to avoid interprtation of javascript "false" as php true 237 if (typeof(string) != 'undefined' && typeof(string) == 'boolean') { 238 if (string) return 1; 239 else return 0; 240 } 241 if (typeof(string) != 'undefined' && typeof(string) == 'string') { 242 switch(string.toLowerCase()){ 243 case "true": case "yes": case "1": return 1; 244 case "false": case "no": case "0": case null: return 0; 245 default: return Boolean(string); 246 } 247 } 248 return 0; 249} 250
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.