;function toggleSearch() {document.getElementById("searchFormContainer").classList.toggle("show-search");}function myFunction() {var dropdown=document.getElementById("myDropdown");dropdown.classList.toggle("show");adjustDropdownPosition();}function adjustDropdownPosition() {var dropdown=document.getElementById("myDropdown");if (window.innerWidth <=320) {dropdown.style.right="0";dropdown.style.width="calc(100%-10px)";dropdown.style.maxWidth="280px";}else {dropdown.style.right="3px";dropdown.style.width="";dropdown.style.maxWidth="";}}function filterTable() {var input,filter,table,tr,td,i,txtValue;input=document.getElementById("tableSearchInput");if (!input) return;filter=input.value.toUpperCase();table=document.getElementById("categories-table");if (!table) {table=document.querySelector(".taxonomy-table");}if (table) {tr=table.getElementsByTagName("tr");for (i=0;i < tr.length;i++) {if (i===0) continue;td=tr[i].getElementsByTagName("td")[0];if (td) {txtValue=td.textContent || td.innerText;if (txtValue.toUpperCase().indexOf(filter) >-1) {tr[i].style.display="";}else {tr[i].style.display="none";}}}}}document.addEventListener('DOMContentLoaded',function () {document.addEventListener('click',function (event) {if (!event.target.matches('.dropbtn') && !event.target.closest('.dropbtn')) {var dropdowns=document.getElementsByClassName("dropdown-content");for (var i=0;i < dropdowns.length;i++) {var openDropdown=dropdowns[i];if (openDropdown.classList.contains('show')) {openDropdown.classList.remove('show');}}}if (!event.target.matches('.search-btn') && !event.target.closest('.search-btn') && !event.target.closest('.search-container')) {var searchContainer=document.getElementById("searchFormContainer");if (searchContainer && searchContainer.classList.contains('show-search')) {searchContainer.classList.remove("show-search");}}});var tableSearchInput=document.getElementById("tableSearchInput");if (tableSearchInput) {tableSearchInput.addEventListener("keyup",filterTable);}window.addEventListener('resize',function () {var dropdown=document.getElementById("myDropdown");if (dropdown && dropdown.classList.contains('show')) {adjustDropdownPosition();}});});jQuery(document).ready(function ($) {let lastScrollTop=0;const header=$('.main-header');if (header.length) {const headerHeight=header.outerHeight();header.wrap('
');$('.header-wrapper').css('height',headerHeight+'px');$(window).scroll(function () {const scrollTop=$(this).scrollTop();if (scrollTop > headerHeight) {if (!header.hasClass('header-sticky')) {header.addClass('header-sticky');}if (scrollTop > lastScrollTop) {header.removeClass('header-sticky-visible');}else {header.addClass('header-sticky-visible');}}else {header.removeClass('header-sticky header-sticky-visible');}lastScrollTop=scrollTop;});}if ($(".mySlides").length > 0) {var slideIndex=1;var slideInterval;function createSlideIndicators() {if ($('.slider-indicators').length===0) {var indicatorsContainer=$('
');for (var i=1;i <=$(".mySlides").length;i++) {var dot=$('');indicatorsContainer.append(dot);}$(".slider").append(indicatorsContainer);$(".slide-dot").on("click",function () {stopAutoSlide();showDivs(slideIndex=parseInt($(this).data("slide")));startAutoSlide();});}updateActiveDot();}function updateActiveDot() {$(".slide-dot").removeClass("active").attr('aria-current','false');$(".slide-dot[data-slide='"+slideIndex+"']").addClass("active").attr('aria-current','true');}function startAutoSlide() {stopAutoSlide();slideInterval=setInterval(function () {showDivs(slideIndex+=1);},3000);}function stopAutoSlide() {clearInterval(slideInterval);}function showDivs(n) {var x=$(".mySlides");if (n > x.length) {slideIndex=1}if (n < 1) {slideIndex=x.length}x.hide();x.eq(slideIndex-1).show();updateActiveDot();}createSlideIndicators();showDivs(slideIndex);startAutoSlide();$(".slider").hover( function () {stopAutoSlide();},function () {startAutoSlide();});$(".slbtns").on("click",function () {stopAutoSlide();var direction=$(this).data("slide");if (direction==="prev") {showDivs(slideIndex-=1);}else {showDivs(slideIndex+=1);}startAutoSlide();});$(".mySlides").hide();$(".mySlides").first().show();}});