1 function initialize (result) {
2 var state = search.state.value;
4 if (state == "inWORK" || state == "inDRAFT" || state == "inCHECK") {
5 search.visibility[0].checked = true;
6 search.visibility[1].disabled = true;
7 search.visibility[2].disabled = true;
9 if (result == "obsolete") changeFilter(); // Hides the result section and enables the Search button
12 function setState () {
13 var state = search.state.value;
15 if (state == "inWORK" || state == "inDRAFT" || state == "inCHECK") {
16 search.visibility[0].checked = true;
17 search.visibility[1].disabled = true;
18 search.visibility[2].disabled = true;
19 } else if (search.visibility[1].value != "onlypublic") {
20 search.visibility[1].disabled = false;
21 search.visibility[2].disabled = false;
26 function changeFilter () {
27 var result = document.getElementById("resulist");
29 search.elements[0].value = "0"; // Marks the result obsolete
30 result.style.display = "none"; // Hides the result section
31 search.refresh.disabled = false; // Enables the Search button
34 function removeContext (index) {
35 search.elements[0].value = index;
40 search.elements[0].value = "-1";