let slideIndex = 0;
automaticSlides();

function automaticSlides() {
  let i;
  let slides = document.getElementsByClassName("automaticSlides");
  let dots = document.getElementsByClassName("dot");
  for (i = 0; i < slides.length; i++) {
    slides[i].style.display = "none";
  }
  slideIndex++;
  if (slideIndex > slides.length) {
    slideIndex = 1;
  }
  for (i = 0; i < dots.length; i++) {
    dots[i].className = dots[i].className.replace(" active", "");
  }
  slides[slideIndex - 1].style.display = "block";
  dots[slideIndex - 1].className += " active";
  setTimeout(automaticSlides, 2000); // Ganti gambar setiap 2 detik
}
