source: tags/Mars-V0.10.3/datacenter/db/menu.js

Last change on this file was 7962, checked in by Daniela Dorner, 18 years ago
*** empty log message ***
File size: 1.3 KB
Line 
1
2ids = new Array( "all", "info", "info2", "stat", "fail", "cal", "star", "ranges", "limits", "showquery");
3statarr = new Array( 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
4
5function setdisplays ()
6{
7 var blub="";
8 for (var i = 0 ; i < ids.length ; i++)
9 {
10 var d = document.getElementById(ids[i]);
11 if (d)
12 d.style.display == 'none' ? statarr[i]=0 : statarr[i]=1;
13 if (i==0)
14 statarr[i]=0;
15 blub=blub+statarr[i];
16 }
17 return blub;
18}
19
20function show(el,img)
21{
22 el.style.display="none";
23 if (img)
24 img.src='../plus.png';
25}
26
27function hide(el,img)
28{
29 el.style.display="block";
30 if (img)
31 img.src='../minus.png';
32}
33
34function showhide (id)
35{
36 var el = document.getElementById(id);
37 var img = document.getElementById(id+"button");
38 el.style.display == 'block' ? show(el,img) : hide(el,img);
39 var soso = document.getElementById("sh");
40 soso.value = setdisplays();
41}
42
43function getdisplay()
44{
45 var stat = document.getElementById("sh");
46 statvalue=stat.value;
47 for (var i = 0 ; i < ids.length ; i++)
48 {
49 var status = statvalue.slice(i,i+1);
50 var el = document.getElementById(ids[i]);
51 var img = document.getElementById(ids[i]+"button");
52 if (!el)
53 continue;
54 status==0 ? show(el,img) : hide(el,img);
55 }
56}
Note: See TracBrowser for help on using the repository browser.