
function validate(theForm)
{


 if (theForm.FullName.value == "" )
  {
    alert("Please enter your name.");
   theForm.FullName.focus();
    return (false);
  }
  
   if (theForm.PhoneNumber.value == "" )
  {
    alert("Please enter your phone number.");
   theForm.PhoneNumber.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 == "" )
  {
    alert("Please confirm your Email address.");
   theForm.ConfirmEmail.focus();
    return (false);
  }
  
 if (theForm.Email.value != theForm.ConfirmEmail.value )
  {
    alert("Your Email addresses do not match.");
   theForm.ConfirmEmail.focus();
    return (false);
  }
  
   if (theForm.CountryOfOrigin.value == "" )
  {
    alert("Please enter your country of origin.");
   theForm.CountryOfOrigin.focus();
    return (false);
  } 
  
     if (theForm.SpamCheck.value == "" )
  {
    alert("Please enter red number displayed to the right.");
   theForm.SpamCheck.focus();
    return (false);
  } 
  
 if (theForm.IAgreeToTheTerms.checked == false)
  {
    alert("You must accept the terms & conditions\navailable via the \"Terms\" link at the bottom of the page.");
    return (false);
  }
}
