// JavaScript Document

function validateForm() 
{
	if (document.Reviews.Restaurant.selectedIndex == 0)
	{
		alert("Please select a restaurant.");
		return false;
        }
	
	if (document.Reviews.Name.value == "")
	{
		alert("Please enter name.");
		document.Reviews.Name.focus();
		document.Reviews.Name.select();
		return false;
        }

	if (document.Reviews.Email.value == "")
	{
		alert("Please enter your Email address.");
		document.Reviews.Email.focus();
		document.Reviews.Email.select();
		return false;
        }
		
	if (document.Reviews.Stars.selectedIndex == 0)
	{
		alert("Please select a star value.");
		return false;
        }
	
	if ((document.Reviews.Email.value.indexOf('@') < 0) || ((document.Reviews.Email.value.charAt(document.Reviews.Email.value.length-4) != '.') && (document.Reviews.Email.value.charAt(document.Reviews.Email.value.length-3) != '.'))) 
{alert("You have entered an invalid Email address. Please try again.");
		document.Reviews.Email.focus();
		document.Reviews.Email.select();
		return false;
} 
	if (document.Reviews.Description.value == "")
	{
		alert("Please enter your Review.");
		document.Reviews.Description.focus();
		document.Reviews.Description.select();
		return false;
        }
		
	if (document.Reviews.Authorization.checked == false)
	{
		alert("Please authorize our use of this review.");
		return false;
        }
		
	if (document.Reviews.Passit.value == "")
	{
		alert("Please enter the text you see in the graphic.");
		document.Reviews.Passit.focus();
		document.Reviews.Passit.select();
		return false;
        }
		
	return true;
}