// Enquires for functions

function valid_email(address)
{
  if (address.indexOf("@")  == -1 || address.indexOf(".") == -1)
  {
    alert("Email addresses must contain one @ symbol and at least one dot");
    return false;
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'0123456789_-.@";
  var checkStr = address;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);

    if (checkOK.indexOf(ch) == -1)
    {
      alert("Please enter only letter, digit and \"_-'.@\" characters in this email field.");
      return(false);
    }   
  }

  return(true);
}

function login_form_check(theform) {
  if (theform.email.value == "")
  {
    alert("Please enter a value for the Email Address field.");
    theform.email.focus();
    return (false);
  }

  if (!valid_email(theform.email.value))
  {
    theform.email.focus();
    return (false);
  }
  
  if (theform.message.value == "Message")
  {
    alert("Please enter a message");
    theform.message.focus();
    return (false);
  }
 return true;
}          


