function Validate()
{
	var Msg="";

	if (document.getElementById("firstname").value.length == 0)
	{ Msg=Msg + "* The first name to list on the death certificate.\n"; }

	if (document.getElementById("middlename").value.length == 0)
	{ Msg=Msg + "* The middle name to list on the death certificate.\n"; }

	if (document.getElementById("lastname").value.length == 0)
	{ Msg=Msg + "* The last name to list on the death certificate.\n"; }

	if (document.getElementById("dob").value.length == 0)
	{ Msg=Msg + "* The date of birth to list on the death certificate.\n"; }

	if (document.getElementById("birthcity").value.length == 0)
	{ Msg=Msg + "* The birthplace city to list on the death certificate.\n"; }

	if (document.getElementById("birthstate").options[document.getElementById("birthstate").selectedIndex].value == "")
	{ Msg=Msg + "* The birthplace state to list on the death certificate.\n"; }

	if (document.getElementById("education").value.length == 0)
	{ Msg=Msg + "* The highest education level achieved to list on the death certificate.\n"; }

	if ((document.getElementById("armedforcesno").checked == false) && (document.getElementById("armedforcesyes").checked == false))
	{ Msg=Msg + "* Please indicate if time was served in the U.S. Armed Forces.\n"; }

	if (document.getElementById("ssnumber").value.length == 0)
	{ Msg=Msg + "* The social security number to list on the death certificate.\n"; }

	if (document.getElementById("occupation").value.length == 0)
	{ Msg=Msg + "* The usual occupation or title to list on the death certificate.\n"; }

	if (document.getElementById("industry").value.length == 0)
	{ Msg=Msg + "* The industry to list on the death certificate.\n"; }

	if (document.getElementById("currentaddress").value.length == 0)
	{ Msg=Msg + "* The current address to list on the death certificate.\n"; }

	if (document.getElementById("currentcity").value.length == 0)
	{ Msg=Msg + "* The current city to list on the death certificate.\n"; }

	if (document.getElementById("currentstate").options[document.getElementById("currentstate").selectedIndex].value == "")
	{ Msg=Msg + "* The current state to list on the death certificate.\n"; }

	if (document.getElementById("currentzipcode").value.length == 0)
	{ Msg=Msg + "* The current zip code to list on the death certificate.\n"; }

	if ((document.getElementById("citylimitsno").checked == false) && (document.getElementById("citylimitsyes").checked == false))
	{ Msg=Msg + "* Please indicate if within city limits.\n"; }

	if ((document.getElementById("martialstatussingle").checked == false) && (document.getElementById("martialstatusmarried").checked == false) 
	&& (document.getElementById("martialstatuswidowed").checked == false) && (document.getElementById("martialstatusdivorced").checked == false))
	{ Msg=Msg + "* Please indicate the marital status to list on the death certificate.\n"; }

	if ((document.getElementById("martialstatusmarried").checked == false) && (document.getElementById("martialstatuswidowed").checked == false) 
	&& (document.getElementById("martialstatusdivorced").checked == false))
	{
		if (document.getElementById("spousename").value.length == 0)
		{ Msg=Msg + "* The spouse's name to list on the death certificate.\n"; }
	}

	if (document.getElementById("fathersname").value.length == 0)
	{ Msg=Msg + "* The father's name to list on the death certificate.\n"; }

	if (document.getElementById("mothersname").value.length == 0)
	{ Msg=Msg + "* The mother's name to list on the death certificate.\n"; }

	if (document.getElementById("name").value.length == 0)
	{ Msg=Msg + "* Your Name\n"; }

	if (document.getElementById("phone").value.length < 12)
	{ Msg=Msg + "* Your Valid Phone Number\n"; }

	if (document.getElementById("email").value.length == 0)
	{ Msg=Msg + "* Your Email Address\n"; }

	else
	{
		if ((document.getElementById("email").value.indexOf("@") == -1) || (document.getElementById("email").value.indexOf(".") == -1) 
		|| (document.getElementById("email").value.length < 7))
		{ Msg=Msg + "* Your 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("preplanfrm").onsubmit=Validate;
