Вот код
function Pict () {
var date = new Date();
var vr;
if(date.getHours() >= 5 & date.getHours() < 12)
{
vr = 'utro.jpg';
}
else if(date.getHours() >= 12 & date.getHours() < 18)
{
vr = 'deni.jpg';
}
else if(date.getHours() >= 18 & date.getHours() < 0)
{
vr = 'vecher.jpg';
}
else if(date.getHours() >= 0 & date.getHours() < 5)
{
vr = 'noch.jpg';
}
document.getElementById("hor").innerHTML='<img src="' + vr + '" class="den">';
};
setTimeout(Pict, 1000);
setInterval(Pict, 1000*60);