function initForms() {
	if (document.getElementById("customeremail").value == "") {
		document.getElementById("customeremail").value = "Enter your Email Address";
	}
	document.getElementById("bodydata").value = "Enter your question or comments here";
	document.getElementById("subject").selectedIndex = 0;
}

function clearBodyData() {
	if (document.getElementById("bodydata").value == "Enter your question or comments here") {
		document.getElementById("bodydata").value = ""
	}
}

function clearEmail() {
	var customeremail = document.getElementById("customeremail").value;
	if (customeremail == "Enter your Email Address") {document.getElementById("customeremail").value = ""}
}

function checkForm() {
	var customeremail = document.getElementById("customeremail").value;
	if (customeremail == "" || customeremail == "Enter your Email Address") {
		alert("Please enter your email address.");
		return false;
	}
	var re = new RegExp("^[a-zA-Z0-9&\+._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$");
	if (!customeremail.match(re)) {
		alert("The email address is not of a valid form for our software. Please check to make sure it was entered correctly.");
		return false;
	}
	var subject = document.getElementById("subject").options[document.getElementById("subject").selectedIndex].value;
	
	var bodydata = document.getElementById("bodydata").value;
	if ( bodydata == "" || bodydata == "Enter your question or comments here") {
		alert("Please enter a question or a comment.");
		return false;
	}
	
	xmlHttp = GetXmlHttpObject();
	xmlHttp.onreadystatechange = emailResponse;
	xmlHttp.open("GET", "/contact_us_send.asp?e="+customeremail+"&s="+subject+"&b="+bodydata, true);		
	// send the request
	xmlHttp.send(null);
	return false;
}

function emailResponse() {
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		alert(xmlHttp.responseText);
	}
}