Place the relevant code only on the pages you wish the image to appear. The Javascript should be an external file.
UTC time is not the same as London Time when daylight saving is in operation.
It would help if you indicated your country. You refer to "Labor Day" (USA) but also London GMT.
Here is another shop open/closed script:-
Code:
<html>
<head>
<style type="text/css">
#openSign.OPEN {
color: green;
background-color: yellow;
font-size: x-large;
width:350px;
}
#openSign.CLOSED {
color : red;
background-color: pink;
font-size: large;
width:350px;
}
</style>
<script type="text/javascript">
var OPENAT = 7.5; // 7:30 AM ... change as appropriate - can be fractions of an hour e.g. 7.5 = 7:30am
var CLOSEAT = 21; // 9:00 PM ... change as appropriate
var OPENATSAT = 8.75; // 8.45 AM .. change as appropriate
var CLOSEATSAT = 13; // 1.00 PM ... change as appropriate
function areWeOpen( ) {
var sign = document.getElementById("openSign");
var day = new Date().getDay();
var hour = new Date().getHours();
var mins = new Date().getMinutes();
hour = hour + mins/60;
if ( day >=1 && day <=5 && hour >= OPENAT && hour < CLOSEAT ) { // Monday - Friday
sign.innerHTML = "We are now OPEN";
sign.className = "OPEN";
}
else if ( day == 6 && hour >= OPENATSAT && hour < CLOSEATSAT ) { // day 6 = Saturday
sign.innerHTML = "We are now OPEN";
sign.className = "OPEN";
}
else {
sign.innerHTML = "Sorry, we are now CLOSED";
sign.className = "CLOSED";
}
}
</script>
</head>
<body onload = "areWeOpen()">
<center>
<h2>Welcome to our Store</h2>
<br/>
<h3 id="openSign"></h3>
<br/>
</center>
... rest of page ...
</body>
</html>
Obviously you can replace the text by an image.