1 function initialize (result) {
2 // ----------------------------
3 var state = search.state.value;
5 if (state == "inWORK" || state == "inDRAFT" || state == "inCHECK") {
6 search.visibility[0].checked = true;
7 search.visibility[1].disabled = true;
8 search.visibility[2].disabled = true;
10 if (result == "obsolete") changeFilter(); // Hides the result section and enables the Search button
13 function setState () {
14 // --------------------
15 var state = search.state.value;
17 if (state == "inWORK" || state == "inDRAFT" || state == "inCHECK") {
18 search.visibility[0].checked = true;
19 search.visibility[1].disabled = true;
20 search.visibility[2].disabled = true;
21 } else if (search.visibility[1].value != "onlypublic") {
22 search.visibility[1].disabled = false;
23 search.visibility[2].disabled = false;
28 function changeFilter () {
29 // ------------------------
30 var result = document.getElementById("resulist");
32 search.elements[0].value = "0"; // Marks the result obsolete
33 result.style.display = "none"; // Hides the result section
34 search.refresh.disabled = false; // Enables the Search button
37 function removeContext (index) {
38 // ------------------------------
39 search.elements[0].value = index;
45 search.elements[0].value = "-1";