<!--
function Validator(theForm)
{

  if (theForm.FirstName.value == "")
  {
    alert("Please insert your Name.");
    theForm.FirstName.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-' \t\r\n\f";
  var checkStr = theForm.FirstName.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Sorry, you have characters in the NAME field that are not allowed (e.g. numbers).");
    theForm.FirstName.focus();
    return (false);
  }

  if (theForm.Surname.value == "")
  {
    alert("Please insert your surname.");
    theForm.Surname.focus();
    return (false);
  }

  
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-' \t\r\n\f";
  var checkStr = theForm.Surname.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Sorry, you have characters in the SURNAME field that are not allowed (e.g. numbers).");
    theForm.Surname.focus();
    return (false);
  }

  if (theForm.Email.value == "")
  {
    alert("Please insert your Email address.");
    theForm.Email.focus();
    return (false);
  }


if (theForm.CFNEMAIL.value != theForm.Email.value)
  {
    alert("Your confirm Email doesn't match.");
    theForm.Email.focus();
    return (false);
  }
  
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_-.@$£&+";
  var checkStr = theForm.Email.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Sorry, you have characters in the EMAIL field that are not allowed (e.g. no spaces allowed).");
    theForm.Email.focus();
    return (false);
  }

if (theForm.EventName.value == "")
  {
    alert("Please insert the name of your Event.");
    theForm.EventName.focus();
    return (false);
  }

  
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_-.,@$£&+' \t\r\n\f";
  var checkStr = theForm.EventName.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Sorry, you have characters in the EVENT NAME field that are not allowed.");
    theForm.EventName.focus();
    return (false);
  }

if (theForm.StartDate.value == "")
  {
    alert("Please insert the Start Date of your event.");
    theForm.StartDate.focus();
    return (false);
  }

  
  var checkOK = "0123456789/";
  var checkStr = theForm.StartDate.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Sorry, you have characters in the START DATE field that are not allowed. The format is dd/mm/yyyy.");
    theForm.StartDate.focus();
    return (false);
  }

  if (theForm.EndDate.value == "")
  {
    alert("Please insert the End Date of your event.");
    theForm.EndDate.focus();
    return (false);
  }

  
  var checkOK = "0123456789/";
  var checkStr = theForm.EndDate.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Sorry, you have characters in the END DATE field that are not allowed. The format is dd/mm/yyyy.");
    theForm.EndDate.focus();
    return (false);
  }

  return (true);
}
//-->