// Below is for Include Callback form data checking
function validate_include_contact_brief(form) 
{
  //alert('Checking form...');
  var errorMsg = '';
  
  // Test that all the required fields are filled out ok
  	
  if (form.from.value == "" )
    errorMsg += 'Your name (From...)  is required\n';

if (form.tel.value == "" )
    errorMsg += 'Your Telephone number is required\n';

  if (form.email.value == "" )
  {
    errorMsg += 'Your email address is required\n';
	form.email.focus();
  }
  else
  {
	x = form.email.value.indexOf('@');
	y = form.email.value.indexOf('.');

    if (x < 1 || x == (form.email.value.length-1) || y < 1 ) 
	{
	  errorMsg += 'You must give a valid email address.\n';
	  form.email.focus();
	  form.email.select();
	}
	  
    s = form.email.value.indexOf(' ');
    if (s != -1)
	{
	  errorMsg += 'Please check your email address. It should not contain spaces\n';
	  form.email.focus();
	  form.email.select();
	}
  }	
   if (errorMsg) 
	alert('Required form fields:\n'+errorMsg);
  document.returnValue = (errorMsg == '');
}