function OnBodyLoad(e)
{
	document.EmailForm.email.focus();
}

function ValidateMessage(f)
{
	if (glbUserId == "") {
		if (!ValidateEmailAddress(f.email.value)) {
			alert("The email address you have entered does not appear to be valid.");
			f.email.focus();
			return false;
		}
	}

	if (f.message.value == "") {
		alert("Please fill in a message to send to us.");
		return false;
	}
	
	f.btnSend.disabled = true;
	var strPost = GetFormContents(f);
	

	XMLTransmission("POST", "_SendContact.aspx", strPost, OnSendContact);

	return false;
}

function OnSendContact(objXML)
{
	document.EmailForm.btnSend.disabled = false;
	if (IsXmlHttpResponseSuccess(objXML)) {
		alert("Your message has been sent to MT4i.com. Thank you.");
		document.EmailForm.message.value = "";
	} else {
		HandleXmlHttpResponse(objXML);
	}
}

