function checkForm(form) {
    var name = form.Name.value;
    if (name == null || (name = name.replace(/^\s+|\s+$/g,'')).length == 0) {
	alert("Please enter your name.");	
	return false;
    }

    var email = form.email.value;
    if (email == null || (email = email.replace(/^\s+|\s+$/g,'')).length == 0) {
	alert("Please enter your email.");	
	return false;
    }

    if (!/^[^\s@]+@[\w-]+\.[\w-]+(?:\.[\w-]+)*$/.test(email)) {
	alert("Your email address should be in a form similar to name@domain.com");	
	return false;
    }

    return true;
}
