function doEmail()

{
	if (document.getElementById("address").value=="")
{ 
	alert("Please enter your email address in the form provided")
}
	else
{
document.location.href="mailto:nancy@aikenanimalhospital.com?subject=Mailing list request from aikenanimalhospital.com&body=Please add "+document.getElementById("address").value+" to your mailing list";
}
}


function doMessage()

{
	var msg = "Name:"+document.getElementById("name").value+"\n\nEmail:"+document.getElementById("email").value+"\n\nQuestion or Comment:"+document.getElementById("message").value;

msg = encodeURI(msg); //<------important to encode the text first before send to my php script in order to keep the line break.

	if (document.getElementById("name").value=="")
{ 
	alert("Please enter your name in the form provided")
}
	if (document.getElementById("email").value=="")
{ 
	alert("Please enter your email address in the form provided")
}
	else
{
document.location.href="mailto:nancy@aikenanimalhospital.com?subject=Question or comment from aikenanimalhospital.com&body="+msg
}
}
