try and find config.h in one more location
[amitay/build-farm.git] / web / build_farm.js
1 function handle(id)
2 {
3         // get a reference to the output block
4         outputBlock = document.getElementById("output-" + id);
5
6         // and the image that's next to the block
7         img = document.getElementById("img-" + id);
8
9         old_src = img.getAttribute("src");
10
11         current_display = outputBlock.style.display;
12
13         // try to handle the case where the display is not explicitly set
14         if (current_display == "") {
15                 if (outputBlock.currentStyle) { // ack, IE
16                         current_display = outputBlock.currentStyle.display;
17                 }
18                 else if (document.defaultView.getComputedStyle) { // oooh, DOM
19                         var style_list = document.defaultView.getComputedStyle(outputBlock, "");
20
21                         // konqueor has getComputedStyle, but it does not work
22                         if (style_list != null) {
23                                 current_display = style_list.getPropertyValue("display");
24                         }
25                 }
26                 // in the case than neither works, we will do nothing. it just
27                 // means the user will have to click twice to do the initial
28                 // closing
29         }
30
31         if (current_display == "block") {
32                 outputBlock.style.display = "none";
33                 img.setAttribute("src", old_src.replace("_hide", "_unhide"));
34         }
35         else {
36                 outputBlock.style.display = "block";
37                 img.setAttribute("src", old_src.replace("_unhide", "_hide"));
38         }
39 }