var cnt=0;

function ValidateForm(form) {
	if (cnt==0) {
		if (IsEmpty(form.email)) {
			form.email.focus();
			alert("You haven't entered your e-mail address!");
			return false;
		} else if (!IsValidEmail(form.email)) {
			form.email.select();
			alert("\""+form.email.value+"\" isn't a valid e-mail address! Please correct and try again.");
			return false;
		} else if (IsEmpty(form.message)) {
			form.message.focus();
			if (!confirm("You haven't filled the message field. Are you sure you want to send an empty message?")) return false;
		}
		form.button.value="Please wait...";
		form.button.disabled=true;
		form.submit();
		cnt++;
	}
}
