]> WPIA git - gigi.git/blobdiff - static/static/menu.js
Add missagn newlines at EOF.
[gigi.git] / static / static / menu.js
index b73827eb6383bcff219200ee841e4b615a04ca97..aff0c36bfc1c3900a4db91502d7ebdff0f8ce600 100644 (file)
                        }
                }
        }
+       function showExpert(a)
+       {
+         b=document.getElementsByClassName("expert");
+         for(i=0;b.length>i;i++)
+         {
+           if(!a) {b[i].setAttribute("class","expert experthidden"); }
+           else {b[i].setAttribute("class","expert");}
+         }
+         b=document.getElementsByClassName("expertoff");
+         for(i=0;b.length>i;i++)
+         {
+          b[i].setAttribute("class","");
+         }
+
+       }
+       function init(){
+               initMenu();
+               showExpert(false);
+               var expert = document.getElementById("expertbox");
+               if(expert !== null) {
+                       expert.onchange = (function(expert){return function(){showExpert(expert.checked)}})(expert);
+               }
+       }
        (function(oldLoad) {
                if (oldLoad == undefined) {
-                       window.onload = initMenu;
+                       window.onload = init;
                } else {
                        window.onload = function() {
-                               initMenu();
+                               init();
                                oldLoad();
                        }
                }
        })(window.onload);
 
-})();
\ No newline at end of file
+})();