Javascript source

This javascript will display a different background every 4 hours. There is a default background provided for those using a browser that doesn't support javascript (or who surf with javascript turned off). Since the background is an attribute of the BODY tag, you can use different link colors to match the background used.

See how it's used       Grab the source

See more javascripts
<SCRIPT>
<!-- start hiding
// Written by:
//   C. Schaar  aka sleepy
//   http://www.geocities.com/Heartland/Hollow/1000/

var now = new Date();
var hours = now.getHours();

if (hours > 1 || hours < 6)
{
document.write("<BODY BACKGROUND='bg1.gif' TEXT='000000' LINK='0000FF' VLINK='CC3300' ALINK='CC0000'>")
}

if (hours > 5 || hours < 10)
{
document.write("<BODY BACKGROUND='bg2.gif' TEXT='000000' LINK='0000FF' VLINK='CC3300' ALINK='CC0000'>")
}

if (hours > 9 || hours < 14)
{
document.write("<BODY BACKGROUND='bg3.jpg' TEXT='000000' LINK='0000FF' VLINK='CC3300' ALINK='CC0000'>")
}

if (hours > 13 || hours < 18)
{
document.write("<BODY BACKGROUND='bg4.jpg' TEXT='000000' LINK='0000FF' VLINK='CC3300' ALINK='CC0000'>")
}

if (hours > 17 || hours < 22)
{
document.write("<BODY BACKGROUND='bg5.jpg' TEXT='000000' LINK='0000FF' VLINK='CC3300' ALINK='CC0000'>")
}

else
{
document.write("<BODY BACKGROUND='bg6.gif' TEXT='000000' LINK='0000FF' VLINK='CC3300' ALINK='CC0000'>")
}
// stop hiding -->
</SCRIPT>


<!-- provide alternative for javascript disabled browsers -->
<NOSCRIPT>
    <BODY BACKGROUND="bg7.jpg" TEXT="000000" LINK="0000FF" VLINK="CC3300" ALINK="CC0000">
</NOSCRIPT>





Copyright ©1997-2001  Charlene C. Schaar
All rights reserved.

Hosted by www.Geocities.ws

1