function validate(theForm)
{

  if (theForm.FullName.value == "")
  {
    alert("Please enter your name.");
    theForm.FullName.focus();
    return (false);
  }
 if (theForm.Email.value == "")
  {
    alert("Please enter your Email address");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length < 6)
  {
    alert("The Email address you entered is invalid");
    theForm.Email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-.";
  var checkStr = theForm.Email.value;
  var allValid = true;
  var validGroups = 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 letter, digit and \"@_-.\" characters in the Email field.");
    theForm.Email.focus();
    return (false);
  }
   if (theForm.ConfirmEmail.value != theForm.Email.value)
  {
    alert("Your Email addresses do not match");
    theForm.ConfirmEmail.focus();
    return (false);
  }
  if (theForm.ConfirmEmail.value == "")
  {
    alert("Please enter the confirm Email address field");
    theForm.ConfirmEmail.focus();
    return (false);
  }
  if (theForm.ConfirmEmail.value.length < 6)
  {
    alert("The Email address confirmation you entered is invalid");
    theForm.ConfirmEmail.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@_-.";
  var checkStr = theForm.ConfirmEmail.value;
  var allValid = true;
  var validGroups = 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 letter, digit and \"@_-.\" characters in the confirm Email field.");
    theForm.ConfirmEmail.focus();
    return (false);
  }
  
  if (theForm.Address.value == "")
  {
    alert("Please enter your Address.");
    theForm.Address.focus();
    return (false);
  }
  
     if (theForm.PhoneCode.value == "")
  {
    alert("Please enter your phone code.");
    theForm.PhoneCode.focus();
    return (false);
  }
  var checkOK = "0123456789- ()";
  var checkStr = theForm.PhoneCode.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch != " ")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the phone code field.");
    theForm.PhoneCode.focus();
    return (false);
  }
    if (theForm.PhoneNumber.value == "")
  {
    alert("Please enter your phone number.");
    theForm.PhoneNumber.focus();
    return (false);
  }
  var checkOK = "0123456789- ()";
  var checkStr = theForm.PhoneNumber.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch != " ")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the phone number field.");
    theForm.PhoneNumber.focus();
    return (false);
  }

  
 
myOption = -1;
for (i=document.forms.form.NatureOfQuery.length-1; i > -1; i--) {
if (document.forms.form.NatureOfQuery[i].checked) {
myOption = i;
}
}
if (myOption == -1) {
alert("Please select a query option");
return false;
}
  if (theForm.SpamCheck.value == "")
  {
    alert("Please enter the red number.");
    theForm.SpamCheck.focus();
    return (false);
  }
  return (true);
}