function SendMessage() {
	
	the_form=document.contact_form;
	
	var req = new Array('Name', 'Email', 'Message');
	
	for (var i=0; i<req.length; i++) {
		if (the_form.elements[req[i]].value == "") {
			// make a list of the required fields
			var req_list = "<ul>";
			for (var j=0; j<req.length; j++) {
				req_list += "<li>" + req[j] + "</li>";
			}
			req_list += "</ul>";
			ets_ShowMessage("<p>The following information is required to send your message:</p>" + req_list, "Please fill in required fields");
			return false;
		}
	}
	
	if (!ets_ValidEmail(the_form.Email.value)) {
		ets_ShowMessage("I think you mistyped your email address. The one you entered does not appear to be valid.", "Please check the email address you entered");
		the_form.Email.focus();
		the_form.Email.select();
		return false;
	}
	
	var target = '/contact_form/send_message.php?';
	target += 'Name=' + the_form.Name.value;
	target += '&Email=' + the_form.Email.value;
	target += '&Message=' + the_form.Message.value;
	target += '&key=' + the_form.key.value;
	
	document.getElementById('send_status').innerHTML = "sending message...";
	
	
	// what to do on reply	
	reply = ContactFormReply;
	
	ets_AjaxSubmit(target);
}


function ContactFormReply() {
	document.getElementById('contact_form').innerHTML = responseText;
	responseText = "";
}