function isValid(form) {
	if ((!form.name.value)) {
		alert("This field cannot be empty!");
		form.name.focus();
		form.name.select();
		return false;
	}
  
  if ((!form.surname.value)) {
		alert("This field cannot be empty!");
		form.surname.focus();
		form.surname.select();
		return false;
	} 
  
    if ((!form.address.value)) {
		alert("This field cannot be empty!");
		form.address.focus();
		form.address.select();
		return false;
	}
	
    if ((!form.city.value)) {
		alert("This field cannot be empty!");
		form.city.focus();
		form.city.select();
		return false;
	}
  if ((!form.post.value)) {
		alert("This field cannot be empty!");
		form.post.focus();
		form.post.select();
		return false;
	} 
  
    if ((!form.country.value)) {
		alert("This field cannot be empty!");
		form.country.focus();
		form.country.select();
		return false;
	}
    if ((!form.tcode.value)) {
		alert("This field cannot be empty!");
		form.tcode.focus();
		form.tcode.select();
		return false;
	}	
	if ((!form.email.value)) {
		alert("This field cannot be empty!");
		form.email.focus();
		form.email.select();
		return false;
	}	
	
	if ((form.email.value) && (form.email.value.indexOf ('@',0) == -1 || form.email.value.indexOf ('.',0) == -1))
{
alert("\nInvalid data!")
 document.getElementById('email').select();
 document.getElementById('email').focus();
return false;
}

	return true;
}
