<!-- TIME OF DAY BACKGROUND COLOUR --> <!-- This part can go in the HEAD of the html file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2005, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- function timeBg() { var morning = "#ffc080"; // change the colour on the left to suit your needs var noon = "#00c0ff"; // change the colour on the left to suit your needs var evening = "#ff8080"; // change the colour on the left to suit your needs var night = "#c0c0c0"; // change the colour on the left to suit your needs now = new Date(); hour = now.getHours(); if (hour >= "6" && hour < 12) { document.bgColor = morning; } else if (hour >= "12" && hour < 15) { document.bgColor = noon; } else if (hour >= "15" && hour < 20) { document.bgColor = evening; } else { document.bgColor = night; } } //--> </script> <!-- Note the script in the BODY tag --> <body onLoad="timeBg()">