function validateSellFormData(form) 
{
  //alert('Checking form...');
  var errorMsg = '';
  
  // Test that all the required fields are filled out ok
  	
  if (form.firstname.value == "")
    errorMsg += 'Your first name is required\n';
  	
  if (form.tel.value == "")
    errorMsg += 'Your own telephone number is required\n';

  if (form.condition.value == "")
    errorMsg += 'Please describe the condition of your guitar\n';
  
  if (form.manufacturer.value == "")
    errorMsg += 'We need to know the guitar manufacturer\n';
	
  if (form.model.value == "")
    errorMsg += 'We need to know the guitar model\n';
	
  if (form.price.value == "")
    errorMsg += 'We need to know what price you require\n';
	
  if (form.price.value < 0.00)
    errorMsg += 'Please enter a valid price\n';

  if (form.Email.value == "")
  {
    errorMsg += 'An email (To...) 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 == '');
}