function validateform (form) {

	// variable for email validation
	var str=document.validation.email1.value
	var filter=/^.+@.+\..{2,3}$/

	// check name text box
	if (form.name.value=="") {
		alert ("You must enter a name!");
		form.name.focus();
		return false;
	}

	// check email text box
	if (!filter.test(str)) {
		alert("Please input a valid email address!")
		form.email1.focus();
		return false;
	}

	// check if email 1 is not equal with email 2
	if (!(form.email1.value==form.email2.value)) {
		alert ("Your e-mail address is not valid!");
		form.email2.focus();
		return false;
	}

	// check country list menu
	if (form.country.value=="") {
		alert ("You must select a country!");
		form.country.focus();
		return false;
	}

	// check date of trip text box
	if (form.dateoftrip.value=="") {
		alert ("You must input date of your trip!");
		form.dateoftrip.focus();
		return false;
	}
	
	// everythings is OK!
	return true;
}