function Validator(theForm)
{
  var error = "";

if (theForm.realname.value == "")
  {
    error += "Please supply your name.\n";
  }
  
if (theForm.age.checked == false)
  {
    error += "Please confirm your age.\n";
  }

if (theForm.address.value == "")
  {
    error += "Please supply an address.\n";
  }

if (theForm.postcode.value == "")
  {
    error += "Please supply a postcode.\n";
  }

if (theForm.phone.value == "")
  {
    error += "Please supply a phone number.\n";
  }

if (theForm.email.value == "")
  {
    error += "Please supply a valid email address.\n";
  }

if ((theForm.email.value.indexOf ('@',0) == -1 ||
   theForm.email.value.indexOf ('.',0) == -1) &&
   theForm.email.value != "")
  {
    error += "Please supply a valid email address.";
  }


if (theForm.comments.value == "")
  {
    error += "Please add more details.\n";
  }


if (error != "")
  {
    alert(error);
    return (false);
  } else {
    return (true);
  }


}
