var offImgArray = new Array()
offImgArray["home"] = new Image;
offImgArray["home"].src = "/images/home_cold.gif"
offImgArray["reunion"] = new Image;
offImgArray["reunion"].src = "/images/reunion_cold.gif"
offImgArray["classlist"] = new Image;
offImgArray["classlist"].src = "/images/classlist_cold.gif"
offImgArray["memoriam"] = new Image;
offImgArray["memoriam"].src = "/images/memoriam_cold.gif"
offImgArray["register"] = new Image;
offImgArray["register"].src = "/images/register_cold.gif"
offImgArray["myprofile"] = new Image;
offImgArray["myprofile"].src = "/images/myprofile_cold.gif"
offImgArray["help"] = new Image;
offImgArray["help"].src = "/images/help_cold.gif"

var onImgArray = new Array()
onImgArray["home"] = new Image;
onImgArray["home"].src = "/images/home_hot.gif"
onImgArray["reunion"] = new Image;
onImgArray["reunion"].src = "/images/reunion_hot.gif"
onImgArray["classlist"] = new Image;
onImgArray["classlist"].src = "/images/classlist_hot.gif"
onImgArray["memoriam"] = new Image;
onImgArray["memoriam"].src = "/images/memoriam_hot.gif"
onImgArray["register"] = new Image;
onImgArray["register"].src = "/images/register_hot.gif"
onImgArray["myprofile"] = new Image;
onImgArray["myprofile"].src = "/images/myprofile_hot.gif"
onImgArray["help"] = new Image;
onImgArray["help"].src = "/images/help_hot.gif"

function imageOff(imageName)
{
  if (document.images) { document.images[imageName].src = offImgArray[imageName].src }
}

function imageOn(imageName)
{
  if (document.images) { document.images[imageName].src = onImgArray[imageName].src }
}

function addButton(dest, name, where)
{
  if (name == where)
    document.write("<img name='" + name + "' src='" + offImgArray[name].src + "' border=0>&nbsp;")
  else
  {
    document.write("<a href='" + dest + "'>")
    document.write("<img name='" + name + "' src='" + offImgArray[name].src + "'")
    document.write(" onMouseOver='imageOn(\"" + name + "\")' onMouseOut='imageOff(\"" + name + "\")'")
    document.write(" border=0></a>&nbsp;")
  }
}

function siteHeader(cat, title, where)
{
  document.bgColor = "#cc66cc"
  document.write("<table border=0 width='100%'>")
  document.write("  <tr valign=bottom>")
  document.write("    <td><img src='/images/" + cat + "'></td>")
  document.write("    <td><table border=0>")
  document.write("        <tr><td><center>" + title + "</center></td></tr>")
  document.write("        <tr><td><center>")
    addButton("/index.html",       "home",      where)
    addButton("/reunion.html",     "reunion",   where)
    addButton("/class/index.html", "classlist", where)
    addButton("/memoriam.html",    "memoriam",  where); document.write("<br>")
    addButton("/register.html",    "register",  where)
    addButton("/class/view.html",  "myprofile", where)
    addButton("/help.html",        "help",      where)
  document.write("                        </center></td></tr>")
  document.write("    </table></td></tr>")
  document.write("</table>")
  document.write("<hr>")
}

function check(form)
{
    if (form.elements["name"].value == "")
    {
        alert("You must supply your name at graduation to register and gain access to the restricted areas of the site.");
        form.elements["name"].focus();
        return false;
    }
    if (form.elements["pass1"].value == "")
    {
        alert("You must supply a password to gain access to the restricted areas of the site.");
        form.elements["pass1"].focus();
        return false;
    }
    if (form.elements["pass1"].value != form.elements["pass2"].value)
    {
        alert("The first entry of a password does not match the second.");
        form.elements["pass1"].focus();
        return false;
    }
    return true
}
