function validateFormData(form) 
{
  //  alert('Checking your form data...');
  var errorMsg = '';
  
  // Test that all the required fields are filled out ok
  	
  if (form.Name.value == "" )
  {
    errorMsg += 'Your Full name is required\n'; 
	form.Name.focus();
	form.Name.select();
  }
 
 // begin email string
  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 any spaces\n';
	  form.email.focus();
	  form.email.select();
	}
  }	
 // end of email string
	
    if (form.Phone.value == "" )
	{
    	errorMsg += 'A Telephone Number is required\n';	
	    form.Phone.focus();
	    form.Phone.select();
	}
 
  // closing string 
  if (errorMsg) 
	alert('Required form fields:\n\n'+errorMsg);
  document.returnValue = (errorMsg == '');
}