function chkfield()
	{

// This check ensures the title on the form is chosen
var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.";
  var checkStr = document.wizard.title.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("Please Select a Title");
    document.wizard.title.focus();
    return (false);
  }


//Check required fields are not empty
var obj = document.wizard.firstname;

if (obj.value == "" || obj.value == null)
{
        alert("You must enter your First Name");
        obj.focus();
        return false;
}

//Check required fields are not empty
var obj = document.wizard.email;

if (obj.value == "" || obj.value == null)
{
        alert("You must enter an email address");
        obj.focus();
        return false;
}


var obj = document.wizard.lastname;

if (obj.value == "" || obj.value == null)
{
        alert("You must enter your Last Name");
        obj.focus();
        return false;
}

var obj = document.wizard.address;

if (obj.value == "" || obj.value == null)
{
        alert("You must enter your Address");
        obj.focus();
        return false;
}

var obj = document.wizard.city;

if (obj.value == "" || obj.value == null)
{
        alert("You must enter your city");
        obj.focus();
        return false;
}

var obj = document.wizard.postcode;

if (obj.value == "" || obj.value == null)
{
        alert("You must enter your Postcode");
        obj.focus();
        return false;
}

var obj = document.wizard.daytimeno;

if (obj.value == "" || obj.value == null)
{
        alert("You must enter your Daytime contact number");
        obj.focus();
        return false;
}

if (obj.value.length < 11 || obj.value.length > 11)
{
        alert("Your Daytime contains too many/too few digits");
        obj.focus();
        return false;
}




// This check ensures the first name does not contain invalid characters
var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-'";
  var checkStr = document.wizard.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("Please enter only letters in the First Name Field");
    document.wizard.firstname.focus();
    return (false);
  }


// This check ensures the last first name does not contain invalid characters
var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-'";
  var checkStr = document.wizard.lastname.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("Please enter only letters in the Last Name Field");
    document.wizard.lastname.focus();
    return (false);
  }


// This check ensures that the address does not contain invalid characters
var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- '1234567890";
  var checkStr = document.wizard.address.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("Please enter only numbers and letters in  the Address Field");
    document.wizard.address.focus();
    return (false);
  }



// This check ensures that the address does not contain invalid characters
var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-";
  var checkStr = document.wizard.city.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("Please enter only letters in the City Field");
    document.wizard.city.focus();
    return (false);
  }



// This check ensures that the county field has been chosen
var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  var checkStr = document.wizard.county.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("Please select a county from the list");
    document.wizard.county.focus();
    return (false);
  }


// This check ensures that the postcode field has been chosen 
var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
  var checkStr = document.wizard.postcode.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("Please do not use spaces or lowercase letters in the postcode field - enter your Postcode as follows: BT379TH");
    document.wizard.postcode.focus();
    return (false);
  }


// This check ensures that the daytime telephone number field has no invalid characters
var checkOK = "1234567890";
  var checkStr = document.wizard.daytimeno.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("Please do not use spaces or letters in a number field");
    document.wizard.daytimeno.focus();
    return (false);
  }


// This check ensures that the daytime telephone number field has no invalid characters
var checkOK = "1234567890";
  var checkStr = document.wizard.mobiletimeno.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("Please do not use spaces or letters in a number field");
    document.wizard.mobiletimeno.focus();
    return (false);
  }


}

