<!DOCTYPE html>
<html>
<head>
<title>gpdods.com</title>
<style>
body, html {
height: 100%;
margin: 0;
padding: 0;
}
.bg {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: -1;
}
</style>
</head>
<body>
<div class="bg" id="bg1" style="background: url('images/image1.jpg'); background-size: cover;"></div>
<div class="bg" id="bg2" style="background: url('images/image2.jpg'); background-size: cover; display: none;"></div>
<div class="bg" id="bg3" style="background: url('images/image3.jpg'); background-size: cover; display: none;"></div>
<div class="bg" id="bg4" style="background: url('images/image4.jpg'); background-size: cover; display: none;"></div>
<script>
let bgArray = [document.getElementById("bg1"), document.getElementById("bg2"), document.getElementById("bg3"), document.getElementById("bg4")];
let i = 0;
setInterval(function() {
bgArray[i % 4].style.display = "none";
bgArray[(++i) % 4].style.display = "block";
}, 5000); // Change image every 5 seconds
</script>
</body>
</html>