The Code

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="description" content="JavaScript examples page">
<meta name="AUTHOR" content="ALAN BARASCH alan@barasch.com">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>JavaScript Examples Page</title>
</head>


<script language="JavaScript"><!--
var now= new Date();
var mCol = now.getMonth();
if (mCol == 0) BackCol = "#FFFFFF";
if (mCol == 1) BackCol = "#E6E600";
if (mCol == 2) BackCol = "#FFFF80";
if (mCol == 3) BackCol = "#FF915B";
if (mCol == 4) BackCol = "#C0C0C0";
if (mCol == 5) BackCol = "#FFE9BB";
if (mCol == 6) BackCol = "#EDD080";
if (mCol == 7) BackCol = "#5EC3E3";
if (mCol == 8) BackCol = "#CFB49A";
if (mCol == 9) BackCol = "#80FF80";
if (mCol == 10) BackCol = "#FF80FF";
if (mCol == 11) BackCol = "#8080FF";

document.write("<BODY BGCOLOR=" + BackCol + ">");

// --></script>

<script language="JavaScript"><!--
var daily= new Date();
var dName = daily.getDay();
if (dName == 0) Mast = "js1.gif";
if (dName == 1) Mast = "js2.gif";
if (dName == 2) Mast = "js3.gif";
if (dName == 3) Mast = "js4.gif";
if (dName == 4) Mast = "js5.gif";
if (dName == 5) Mast = "js6.gif";
if (dName == 6) Mast = "js7.gif";



document.write("<CENTER><IMG SRC=images/" + Mast + " BORDER=0></CENTER>");

// --></script>

<script language="JavaScript"><!--
var One= new Date();
var xName = One.getDay();
if (xName == 0) TheDay = "Sunday";
if (xName == 1) TheDay = "Monday";
if (xName == 2) TheDay = "Tuesday";
if (xName == 3) TheDay = "Wednesday";
if (xName == 4) TheDay = "Thursday";
if (xName == 5) TheDay = "Friday";
if (xName == 6) TheDay = "Saturday";
// -->
</SCRIPT>

<p>In my company’s Intranet site, my group maintains an
extensive site of it’s own to disseminate research papers
and installation instructions. I was looking for a way to make
the opening page “look” fresh all the time even if the
content was behind the times.</p>

<p>I had been wanting to learn JavaScript and this seemed like a
ready-made application. I looked all over the web for something
similar but everyone had the same 5 applications.<font
color="#FF0000"> Enjoy!</font></p>

<UL><LI>What you are looking for is in the background and the masthead. I wrote a
little ditty that changes the Background Color based on the
month. For example, White (FFFFFF) in January or Vomit Yellow
(E6E600) in February. <script>
document.write(" This month’s background = " + BackCol);
</script>.</LI><P>
<LI>There is a second script that changes the JavaScript
 image at the top based on the day of the week.
 <script>document.write("The one displayed today is " + Mast + " for day " + dName)</SCRIPT>
<SCRIPT>document.write(" corresponding to " + TheDay + ".")</SCRIPT>
</LI></UL>
<P>Remember in JavaScript that zero (Ø) is the first logical 
number so Sunday or January corresponds to zero.</P>
<P>Following is the code for the page:
<CENTER><TABLE border=0 BGCOLOR="#FFFFE1"><TR><TD VALIGN="top"><PRE>
<P>
</PRE></TD></TR></TABLE></CENTER>


<p>Last update: 2 August 1997 @ 13:19</p>
<CENTER>
<table border="0">
    <tr>
        <td align="middle"><a href="../"><img
        src="../images/alanhbut.gif" alt="Alan's Home" border="0"
        width="144" height="31"></a></td>
        <td align="middle"><a href="../philatelic/"><img
        src="../images/falkisbut.gif" alt="Falkland Stamps"
        border="0" width="144" height="31"></a></td>
        <td align="middle"><a href="../excel/"><img
        src="../images/xlvbabut.gif" alt="Excel & VBA"
        border="0" width="144" height="31"></a></td>
        <td align="middle"><a href="../genealogy/olimpix.htm"><img
        src="../images/famtreebut.gif" alt="Family Tree"
        border="0" width="144" height="31"></a></td>
        <td align="middle"><a href="../themes/stlouish.htm"><img
        src="../images/stluthme.gif" alt="Plus! Themes"
        border="0" width="144" height="31"></a></td>
    </tr>
    <tr>
        <td align="middle"> </td>
        <td align="middle"> </td>
    </tr>
</table></CENTER>

<form name="form1">
    <p align="center"><input type="button" value="<-- Return"
    onclick="history.back();"> . . . <input type="button"
    value="Forward -->" onclick="history.forward();"> </p>
</form>
</body>
</html>

. . .