        function ToggleCurrentControls(e){
        // Fix the Font on the Guided Search Label
            if(navigator.userAgent.indexOf("Firefox")!=-1){
              var obj = e.target;
              if(obj.innerHTML == "(+) More"){
                  ShowCurrentFirefoxControls(obj)
              }
              else if(obj.innerHTML == "(-) More"){ 
                  HideCurrentFirefoxControls(obj)
              };
            }
            else{
              var obj = window.event.srcElement;
              if(obj.innerHTML == "(+) More"){
                  ShowCurrentControls(obj)
              }
              else if(obj.innerHTML == "(-) More"){ 
                  HideCurrentControls(obj)
              };
            }
        }
    
        function HideCurrentControls(node){
            node.innerHTML = "(+) More"
            
            // find the parent
            while(node.childNodes.length < 8){
                    node = node.parentElement;
            }
            //    alert (node.innerHTML);    
            // hide the padded slot above the (+) more,
            // skip the (+) more and hide the rest
            var numChildren = node.childNodes.length;  
            var categoryID = node.id;
            for(i=5;i<numChildren;i++){
                if (i != 6){
                    node = node.childNodes[i];
                    node = node.firstChild;
                    node = node.childNodes[1];
                    node = node.childNodes[1];
                    node = node.childNodes[0];
                    node.style.display="none";
                    while(node.id != categoryID){
                        node = node.parentNode;
                    }
                };
            }
        }
 
         function HideCurrentFirefoxControls(node){
            node.innerHTML = "(+) More"
            
            // find the parent
            while(node.childNodes.length < 8){
                    node = node.parentNode;
            }
            //    alert (node.innerHTML);    
            // hide the padded slot above the (+) more,
            // skip the (+) more and hide the rest
            var numChildren = node.childNodes.length;  
            var categoryID = node.id;
            for(i=5;i<numChildren-2;i++){
                if (i != 6){
                    node = node.childNodes[i+1];
                    var anchor = GetAnchorTag(node);
                    anchor[0].style.display="none";
                    while(node.id != categoryID){
                        node = node.parentNode;
                    }
                };
            }
        }
               
        function ShowCurrentControls(node){
              node.innerHTML = "(-) More"
              // find the parent
              while(node.childNodes.length < 8){
                      node = node.parentNode;
              }
              
              // show the items after the (+) more item
              var numChildren = node.childNodes.length;  
              var categoryID = node.id;
              for(i=8;i<numChildren;i++){
                  node = node.childNodes[i];
                  node = node.firstChild;
                  node = node.childNodes[1];
                  node = node.childNodes[1];
                  node = node.childNodes[0];
                  node.style.display="block";
                  while(node.id != categoryID){
                      node = node.parentNode;
                  }
              }
        }

        function ShowCurrentFirefoxControls(node){
              node.innerHTML = "(-) More"
              // find the parent
              while(node.childNodes.length < 8){
                      node = node.parentNode;
              }
              
              // show the items after the (+) more item
              var numChildren = node.childNodes.length;  
              var categoryID = node.id;
              for(i=8;i<numChildren-2;i++){
                  node = node.childNodes[i+1];
                  var anchor = GetAnchorTag(node);
                  anchor[0].style.display="block";
                  while(node.id != categoryID){
                      node = node.parentNode;
                  }
              }
        }

        function HideAllControls(){
            // Fix the Font on the Guided Search Label
            if(navigator.userAgent.indexOf("Firefox")!=-1){
              HideAllFirefoxControls();
            }
            else{
            var node = document.getElementById("ctl00_ContentPlaceHolder1_LeftMenu2_1_lblCurrentCategory");
            node.style.fontFamily = "Arial, Helvetica, sans-serif";
            // find the TreeView1 parent
            node = document.getElementById("ctl00_ContentPlaceHolder1_LeftMenu2_1_TreeView1");
            // loop through Main Categories
            var treeViewID = node.id;
            var numCategories = node.childNodes.length;
            for (j=0;j<numCategories;j++){   
                // hide the padded slot above the (+) more,
                // skip the (+) more and hide the rest
                node = node.childNodes[j];
                if (node.tagName.toUpperCase() == "DIV"){    
                    var numChildren = node.childNodes.length;  
                    var categoryID = node.id;
                    for(i=0;i<numChildren;i++){
                        if (i == 5 || i > 6){
                            node = node.childNodes[i];
                            node = node.firstChild;
                            node = node.childNodes[1];
                            node = node.childNodes[1];
                            node = node.childNodes[0];
                            node.style.display="none";
                            node.style.color="white";
                            node.style.fontFamily = "Arial, Helvetica, sans-serif";
                            while(node.id != categoryID){
                                node = node.parentNode;
                            }
                            
                        }
                        else if (i == 6 ){
                            node = node.childNodes[i];
                            node = node.childNodes[0];
                            node = node.childNodes[1];
                            node = node.childNodes[1];
                            node = node.firstChild;
                            node.innerHTML = "(+) More";
                            node.style.color = '#a57418';
                            node.style.fontFamily = "Arial, Helvetica, sans-serif";
                            while(node.id != categoryID){
                                node = node.parentNode;
                            }
                            //while(node.tagName != "DIV"){
                            //    node = node.parentNode;
                            //    alert (node.innerHTML);
                            //}
                        }
                        else{
                            node = node.childNodes[i];
                            node = node.childNodes[0];
                            node = node.childNodes[1];
                            node = node.childNodes[1];
                            node = node.firstChild;
                            node.style.color="white";
                            node.style.fontFamily = "Arial, Helvetica, sans-serif";
                            while(node.id != categoryID){
                                node = node.parentNode;
                            }
                        }// close if statement;
                    }; 
                    // go back to the root
                    while (node.id != treeViewID){
                        node = node.parentNode;
                    }
                }
                else if (node.tagName == "TABLE"){
                            var anchor = GetAnchorTag(node);
                            anchor[0].style.color="white";
                            anchor[0].style.fontFamily = "Arial, Helvetica, sans-serif";
                    // go back to the root
                    while (node.id != treeViewID){
                        node = node.parentNode;
                    }
                }
                else{
                    // go back to the root
                    while (node.id != treeViewID){
                        node = node.parentNode;
                    }
                };
            }
            };
        }
        function HideAllFirefoxControls(){
            var node = document.getElementById("ctl00_ContentPlaceHolder1_LeftMenu2_1_lblCurrentCategory");
            node.style.fontFamily = "Arial, Helvetica, sans-serif";
            // find the TreeView1 parent
            node = document.getElementById("ctl00_ContentPlaceHolder1_LeftMenu2_1_TreeView1");
            // loop through Main Categories
            var treeViewID = node.id;
            var numCategories = node.childNodes.length;
            for (j=1;j<numCategories;j++){   
                // hide the padded slot above the (+) more,
                // skip the (+) more and hide the rest
                node = node.childNodes[j];
                if (node.tagName.toUpperCase() == "DIV"){              
                    var numChildren = node.childNodes.length;
                    var categoryID = node.id;
                    for(i=0;i<numChildren-2;i++){
                        if (i == 5 || i > 6){
                            node = node.childNodes[i+1];
                            var anchor = GetAnchorTag(node);
                            anchor[0].style.display="none";
                            anchor[0].style.color="white";
                            anchor[0].style.fontFamily = "Arial, Helvetica, sans-serif";
                            while(node.id != categoryID){
                                node = node.parentNode;
                            }
                            
                        }
                        else if (i == 6 ){
                            node = node.childNodes[i+1];
                            var anchor = GetAnchorTag(node);
                            anchor[0].innerHTML = "(+) More";
                            anchor[0].style.color = '#a57418';
                            anchor[0].style.fontFamily = "Arial, Helvetica, sans-serif";
                            while(node.id != categoryID){
                                node = node.parentNode;
                            }
                        }
                        else{
                            node = node.childNodes[i+1];
                            var anchor = GetAnchorTag(node);
                            anchor[0].style.color="white";
                            anchor[0].style.fontFamily = "Arial, Helvetica, sans-serif";
                            while(node.id != categoryID){
                                node = node.parentNode;
                            }
                        }// close if statement;
                    }; 
                    // go back to the root
                    while (node.id != treeViewID){
                        node = node.parentNode;
                    }
                }
                else if (node.tagName.toUpperCase() == "TABLE"){
                            var anchor = GetAnchorTag(node);
                            anchor[0].style.color="white";
                            anchor[0].style.fontFamily = "Arial, Helvetica, sans-serif";
                    // go back to the root
                    while (node.id != treeViewID){
                        node = node.parentNode;
                    }
                }
                else{
                    // go back to the root
                    while (node.id != treeViewID){
                        node = node.parentNode;
                    }
                };
            }
        }
        function HideCategoryControls(strCategory){
        // find the TreeView1 parent
            var node = document.getElementById("ctl00_ContentPlaceHolder1_LeftMenu2_1_TreeView1");
            // loop through Main Categories
            //alert (node.childNodes[j].firstChild.firstChild.firstChild.innerHTML);
            var treeViewID = node.id;
            var numCategories = node.childNodes.length;
            var j=0;
            // find the appropriate category
            while (j<numCategories){
                if (node.childNodes[j].tagName == "TABLE"){
                    var anchor = node.childNodes[j].getElementsByTagName("A");
                        if (anchor[0].innerHTML == strCategory){
                                anchor[0].style.display="none";
                                return;
                        };
                };
                j++;
            } 
        }
        
        function GetAnchorTag(node){
            var currentID = node.id;
            return node.getElementsByTagName("A");
        }
