function checkEmailForm() {
checkEmail = document.EmailEntry.email.value

if (document.EmailEntry.to.value == 'Choose a contact address...') {
        alert('Please select a \'To\' address!');
        document.EmailEntry.to.focus();
	return false;
	}
else if (document.EmailEntry.fullname.value == '') {
        alert('The \'Name\' field is mandatory!');
        document.EmailEntry.fullname.focus();
	return false;
	}
else if (document.EmailEntry.email.value == '') {
        alert('The \'E-mail\' field is mandatory!');
        document.EmailEntry.email.focus();
	return false;
	}
else if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) 
	{alert("You have entered an invalid email address. Please re-enter the address.");
	document.EmailEntry.email.select();
	return false;
	}
else if (document.EmailEntry.subject.value == '') {
        alert('The \'Subject\' field is mandatory!');
        document.EmailEntry.subject.focus();
	return false;
	}
else if (document.EmailEntry.message.value == '') {
        alert('The \'Message\' field is mandatory!');
        document.EmailEntry.message.focus();
	return false;
	}
    return true;
}
