function onLoad(loggedin)
{
  document.getElementById(loggedin ? "subject" : "name").focus()
}

function onChange()
{
  document.getElementById("submit").disabled =
     document.getElementById("name").value == "" ||
     document.getElementById("email").value == "" ||
     document.getElementById("confirmemail").value == "" ||
     document.getElementById("subject").value == "" ||
     document.getElementById("message").value == ""
}

function onSubmit()
{
  if (document.getElementById("email").value != document.getElementById("confirmemail").value)
  {
    window.alert("The email and confirmation do not match.  Please correct them and submit again.")
    return false
  }
  else
  {
    return true
  }
}