// Time of Day Image Script
// copyright Stephen Chapman, 20th Jan 2005
// you may copy this script but please keep the copyright notice as well

function timeOfDayImage() {
var now = new Date;
var timeNow = now.getHours();
var img = null; var mess = '';
if (timeNow < 4 || timeNow > 20) {
img = 'images/s2.jpg'; mess = 'night';
} else if (timeNow < 6) {
img = 'images/s1.jpg'; mess = 'dawn';
} else if (timeNow < 8) {
img = 'images/s1.jpg'; mess = 'early morning';
} else if (timeNow < 11) {
img = 'images/s1.jpg'; mess = 'morning';
} else if (timeNow < 13) {
img = 'images/s5.jpg'; mess = 'noon';
} else if (timeNow < 16) {
img = 'images/s5.jpg'; mess = 'afternoon';
} else if (timeNow < 18) {
img = 'images/s5.jpg'; mess = 'late afternoon';
} else {
img = 'images/s5.jpg'; mess = 'sunset';
}
document.write('<img src="'+img+'" width="521" height="345" alt="'+mess+'" title="'+mess+'" />');
}
         
		 