function Validate()
{
	var Msg="";

	if (document.getElementById("name").value.length == 0)
	{ Msg=Msg + "* Your Name\n"; }

	if (document.getElementById("fromaddress").value.length == 0)
	{ Msg=Msg + "* Your Email Address\n"; }

	if (Msg == "")
	{
		if (document.getElementById("fromaddress").value.indexOf("@") == -1)
		{ Msg=Msg + "* Your Email Address\n"; }

		else if (document.getElementById("fromaddress").value.indexOf(".") == -1)
		{ Msg=Msg + "* Your Email Address\n"; }
	}

	if (document.getElementById("toaddress").value.length == 0)
	{ Msg=Msg + "* The Recipient's Email Address\n"; }

	if (Msg == "")
	{
		if (document.getElementById("toaddress").value.indexOf("@") == -1)
		{ Msg=Msg + "* The Recipient's Email Address\n"; }

		else if (document.getElementById("toaddress").value.indexOf(".") == -1)
		{ Msg=Msg + "* The Recipient's Email Address\n"; }
	}

	if (Msg != "")
	{ alert('Sorry, but before proceeding, you\nmust fill-in the following field(s):\n\n' + Msg); }

	else
     { return true; }

	return false;
}

document.getElementById("sendemailfrm").onsubmit=Validate;
