<!--
// contact.js - spolem.net - copyright Jake Laack - ekaj@spolem.net

function CheckContactError(message)
// Displays given error message in a dialog
{
  alert(message);
  return false;
}

function CheckContactForm(form)
// Validates the data in the contact form
{
  var today = new Date();

  if(form.contact_name.value == "") {
    form.contact_name.focus();
    return CheckContactError("Please enter your name.");
  }

  if(form.contact_message.value == "") {
    form.contact_message.focus();
    return CheckContactError("Please enter your message.");
  }

  if(form.contact_day.value != today.getDay()) {
    form.contact_day.focus();
    return CheckContactError("Help stop the spread of spam!\nPlease select the current day of the week.");
  }
  
  return true;
}

-->

