I have written a basic javascript that will show whether or not we are Open/Closed based on our hours. It works great in JS fiddle but when I insert it into my Joomla site using the Jumi module, it is loaded at the very bottom of the page. I'm very new to Javascript so it's likely something incorrectly coded that is causing this problem.
Website: http://askc.org/galacticos/index.php - Scroll to the bottom
<script>
function show_image(src, width, height, alt) {
var img = document.createElement("img");
img.src = src;
img.width = width;
img.height = height;
img.alt = alt;
document.body.appendChild(img);
}
var month = new Date().getMonth();
var time = new Date().getHours();
var day = new Date().getDay();
if (month > "3" && month < "10" && day == "6" && time > "19" && time <= "22") {
show_image("http://bizeebee.com/wp-content/uploads/2013/07/open-sign.jpg",500,450, "Powell is OPEN");
}
else { show_image("http://get.whotrades.com/u3/photoBB09/20171363290-0/blogpost.jpeg",500,450, "Powell is CLOSED");}
</script>
Any ideas? Help is much appreciated!