function doSubmit(){
	var theForm = document.forms[0];
	var EMPTY = 0;
	var mess = "\n";
	if(theForm.Name.value == '' || theForm.Name.value == null) {
		EMPTY = 1;
		mess += "\nName";
	}
	if((theForm.Email.value == '') || (theForm.Email.value == null)) {
		EMPTY = 1;
		mess += "\nEmail";
	}else if((theForm.Email.value.indexOf('@')<0) || (theForm.Email.value.indexOf('.')<0)) {
		EMPTY = 1;
		mess += "\nEmail: The address entered is invalid.";
	}
	if(theForm.Message.value == '' || theForm.Message.value == null) {
		EMPTY = 1;
		mess += "\nMessage";
	}

	if(EMPTY == 1) {
		alert("Please complete the following fields:\n" + mess);
	} else {
		var dataInterface = './includes/mail.asp';
		var options = {
			postBody: 'Name=' + encodeURIComponent($('Name').value) + '&Email=' + encodeURIComponent($('Email').value) + '&Company=' + encodeURIComponent($('Company').value) + '&Phone=' + encodeURIComponent($('Phone').value) + '&Title=' + encodeURIComponent($('Title').value) + '&Mobile=' + encodeURIComponent($('Mobile').value) + '&Message=' + encodeURIComponent($('Message').value),
			onSuccess: function(response){
			},
			onFailure: function(){
				alert('ERROR!');
			}
		}

		new Ajax.Request(dataInterface, options);

		output = '<h2>Thank you for your email.</h2>I will respond to your request as soon as I can.<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />';
		document.getElementById("theForm").innerHTML = output;
	}
}

