/*
mailinglist.js
===============
Validates mailing list data before submitting form.
--Rodzilla 8/1/01 8:26:16 AM
--Updated 3/3/2006 resized mailing window for new site.
*/
if (location.search == "?thanks")
{
	window.alert("Thank you for signing up for The Rigbees mailing list!");
	window.close();
}

function pop_list()
{
	window.open("mailinglist.php","","width=300,height=430");
} // end function pop_list

function validate()
{
if (document.mailme.First_Name.value == "")
{
	window.alert("Please fill in your first name!");
	document.mailme.First_Name.focus();
//	return false;
}
else if (document.mailme.Last_Name.value == "")
{
	window.alert("Please fill in your last name!");
	document.mailme.Last_Name.focus();
//	return false;
}
else if (document.mailme.Email_.value == "")
{
	window.alert("What's your email address???");
	document.mailme.Email_.focus();
//	return false;
}
else if (document.mailme.Email_.value.indexOf("@") < 1 || document.mailme.Email_.value.indexOf(".") < 1 || document.mailme.Email_.value.length < 5)
{
	window.alert("Hey, that doesn't look like a valid email address!");
	document.mailme.Email_.focus();
//	return false;
}
else
{
	document.mailme.submit();
}


} // end validate()