1function changeCSS(el_act, el_deact) { 2 Element.setStyle(el_act, {"background-position":"center 4px", "border-bottom":"0"}) ; 3 Element.setStyle(el_deact, {"background-position":"center -36px", "border-bottom":"1px solid #e5e6e5"}) ; 4} 5 6function changeButton(b) { 7 document.qsearch.submit.disabled = b ; 8} 9 10function clearDiv(div) { 11 switch (div) { 12 case 'name': 13 document.getElementById('nameDiv').innerHTML = "<select><option>---------------</option></select>" ; 14 case 'body': 15 document.getElementById('bodyDiv').innerHTML = "<select><option>---------------</option></select>" ; 16 case 'category': 17 document.getElementById('categoryDiv').innerHTML = "<select><option>---------------</option></select>" ; 18 } 19} 20 21function setMaker() { 22 clearDiv('name') ; 23 var param = '' ; 24 sendRequest(onloadedMaker, '', 'GET', "script/qsearch/getmaker.php") ; 25} 26 27function onloadedMaker(res) { 28 document.getElementById('makerDiv').innerHTML = res.responseText ; 29} 30 31function setName() { 32 clearDiv('body') ; 33 changeButton(true) ; 34 var n = document.qsearch.maker.selectedIndex ; 35 var param = 'makerId=' + document.qsearch.maker[n].value ; 36 sendRequest(onloadedName, {makerId:document.qsearch.maker[n].value}, 'POST', "script/qsearch/getname.php") ; 37} 38 39function onloadedName(res) { 40 document.getElementById('nameDiv').innerHTML = res.responseText ; 41} 42 43function setBody() { 44 clearDiv('category') ; 45 var n = document.qsearch.car_name.selectedIndex ; 46 var param = 'car_name=' + document.qsearch.car_name[n].text ; 47 sendRequest(onloadedBody, {car_name:document.qsearch.car_name[n].value}, 'POST', "script/qsearch/getbody.php") ; 48} 49 50function onloadedBody(res) { 51 document.getElementById('bodyDiv').innerHTML = res.responseText ; 52} 53 54function setCategory() { 55 var n = document.qsearch.car_name.selectedIndex ; 56 var m = document.qsearch.body_name.selectedIndex ; 57// var param = 'car_name=' + document.qsearch.car_name[n].text + '&body_name=' + document.qsearch.body_name[n].text ; 58 sendRequest(onloadedCategory, {car_name:document.qsearch.car_name[n].value, body_name:document.qsearch.body_name[m].value}, 'POST', "script/qsearch/getcount.php") ; 59} 60 61function onloadedCategory(res) { 62 document.getElementById('categoryDiv').innerHTML = res.responseText ; 63} 64 65function setHash() { 66 var n = document.qsearch.car_name.selectedIndex ; 67// var hash = document.qsearch.car_name[n].value ; 68 var hash = encodeURI(document.qsearch.car_name[n].value) ; 69 n = document.qsearch.body_name.selectedIndex ; 70 hash += '&' + document.qsearch.body_name[n].value ; 71 n = document.qsearch.category.selectedIndex ; 72 hash += '&' + document.qsearch.category[n].value ; 73 74 return hash ; 75} 76 77function search() { 78 var hash = setHash() ; 79 var src = "script/itemsearch/index.html?" + hash ; 80 81 window.open(src, "_blank") ; 82} 83
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.