Timer selection

by Cosette Girardot

HTML

<div id="opened">
</div>

CSS

#opened {
    background-color: rgb(112,112,112);
    border-width: 5px;
    border-color: white
}

JavaScript

var currentTime = new Date().getHours();
if (7 <= currentTime && currentTime < 20) {
    if (document.body) {
        document = "http://itsnotch.com/tumblr/images/daytime_bg.jpg";
    }
}
else {
    if (document.body) {
        document= "http://itsnotch.com/tumblr/images/nighttime_bg.jpg";
    }
}