1var dwc__Divs = new Array("dwc_git_advanced","dwc_repos_div","dcw_update_git","dcw_db_update","dwc_info_div","dwc_query_div","dwc_prune_div");
2
3
4function dwc_toggle_div(div) {
5
6    var d = document.getElementById(div);
7    if(!d) return;
8
9    if(d.style.display && d.style.display == 'block') {
10        d.style.display="none";
11    }
12    else {
13       d.style.display="block";
14       dwc_toggle_msg('block');
15   }
16   return d.style.display;
17}
18
19function dwc_toggle_msg(which) {
20
21    var dtop = document.getElementById('dwc_msgareatop');
22    var dma = document.getElementById('dwc_msgarea');
23
24    dtop.style.display = which;
25    dma.style.display = which;
26}
27
28function dwc_toggle_info(div) {
29  var status = dwc_toggle_div(div);
30
31  if(status == 'block') {
32     dwc_toggle_msg('none');
33  }
34  else dwc_toggle_msg('block');
35
36}
37
38function dwc_branch(op) {
39
40    var selected = op.options[op.selectedIndex];
41    op.form['dwc__branch'].value=selected.text;
42
43
44}
45function dwc_repro(op) {
46
47    var selected = op.options[op.selectedIndex];
48    op.form['dwc__repro'].value=selected.text;
49
50
51}
52
53function dwc_close_all() {
54
55    for(var i=0; i<dwc__Divs.length; i++) {
56         var d = document.getElementById(dwc__Divs[i]);
57         d.style.display = 'none';
58    }
59   dwc_toggle_msg('block')
60}
61
62/* get the help/info document from the currently displayed working div and put its contents at
63   the hash position relevant to the displayed div
64*/
65function dwc_help(infoid) {
66
67  var state = dwc_toggle_div("dwc_info_div");
68  if(state == 'none')dwc_toggle_div("dwc_info_div");
69  location = '#'+ infoid;
70}
71
72function msg_area_bigger() {
73   var dom = document.getElementById('dwc_msgarea');
74   if(!dom.style.height) {
75       dom.style.height = '200px';
76       return;
77   }
78  var h = parseInt(dom.style.height);
79  h+=50;
80  dom.style.height = h+'px';
81
82}
83
84function msg_area_smaller() {
85  var dom = document.getElementById('dwc_msgarea');
86  if(!dom.style.height) {
87   dom.style.height = "50px";
88   return;
89  }
90  var h = parseInt(dom.style.height);
91  if(h <=50) return;
92  h-=50;
93  dom.style.height = h+'px';
94
95}
96
97