window.onload = function() {
  new MainNavWrapper('ButtomNavMain');
  
  // -----------------------------
  // MAIN NAV
  var oNavMain = MainNavWrapper.instances.ButtomNavMain;
  LoadMenu(oNavMain, "../");

  //only applies to product finder pages
                        if (document.dropdown) {
                                    if (document.dropdown.Product[0].checked == true) {
                                    toggleDiv('ProductFinderContainer',1);
                                    toggleDiv('DiseaseFinderContainer',0);
                                    }
                                    else {
                                    toggleDiv('ProductFinderContainer',0);
                                    toggleDiv('DiseaseFinderContainer',1);
                                    }
                        }

 };
 window.onunload = function() {
  // Clean up
  MainNavWrapper.destroy();
 };

function toggleDiv(id,flagit) {
                if (flagit=="1"){
                        if (document.layers) document.layers[''+id+''].visibility = "show";
                                else if (document.all) document.all[''+id+''].style.visibility = "visible";
                                else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible";
                        }
                else
                if (flagit=="0"){
                        if (document.layers) document.layers[''+id+''].visibility = "hide";
                                else if (document.all) document.all[''+id+''].style.visibility = "hidden";
                                else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden";
                }
        }
        function gothere(){
                if (document.dropdown.Product[0].checked){
                        window.location.href = document.dropdown.ProductType[document.dropdown.ProductType.selectedIndex].value;
                }
                else
                if (document.dropdown.Product[1].checked){
                        window.location.href = document.dropdown.DiseaseType[document.dropdown.DiseaseType.selectedIndex].value;
                }
                return false;
        }
