// JavaScript Document

function validate()
{
	var subjectchk,namechk,emailchk,companychk,address1chk,address2chk,citychk,statechk,countrychk,homephonechk,homefaxchk,workphchk,workfaxchk,ownBoatchk,boatTypechk,commentschk
	
	
	subjectchk = emptyField(document.contactform.subject)
	if(!subjectchk)
	{
		alert("Please fill in the Subject .")
		return false	
	}
	
	namechk = emptyField(document.contactform.name)
	if(!namechk)
	{
		alert("Please fill in your Name .")
		return false	
	}

	emailchk = emptyField(document.contactform.email)
	if(!emailchk)
	{
		alert("Please fill in your email.")
		return false	
	}
	
	
	
	emailchk = checkemail(document.contactform.email)
	if (!emailchk)
	{
		alert("Please fill in a valid Email Address.")
		return false
	}
	
	
	companychk = emptyField(document.contactform.company)
	if(!companychk)
	{
		alert("Please fill in your Company.")
		return false	
	}
	
	address1chk = emptyField(document.contactform.address1)
	address2chk = emptyField(document.contactform.address1)
	if(!address1chk || !address1chk && !address2chk)
	{
		alert("Please fill in your Address.")
		return false	
	}
	
	citychk = emptyField(document.contactform.city)
	if(!citychk)
	{
		alert("Please fill in your City.")
		return false	
	}
	
	statechk = emptyField(document.contactform.state)
	if(!statechk)
	{
		alert("Please fill in your State.")
		return false	
	}
	
	countrychk = emptyField(document.contactform.country)
	if(!countrychk)
	{
		alert("Please fill in your Country.")
		return false	
	}

	homephonechk = emptyField(document.contactform.homephone)
	if(!homephonechk)
	{
		alert("Please fill in your Home Phone.")
		return false	
	}
	
	homefaxchk = emptyField(document.contactform.homefax)
	if(!homefaxchk)
	{
		alert("Please fill in your Home Fax.")
		return false	
	}


	workphchk = emptyField(document.contactform.workphone)
	if(!workphchk)
	{
		alert("Please fill in your Work Phone.")
		return false	
	}


	workfaxchk = emptyField(document.contactform.workfax)
	if(!workfaxchk)
	{
		alert("Please fill in your Work Fax.")
		return false	
	}

	ownBoatchk = document.contactform.ownBoat[0].checked;

	boatTypechk = emptyField(document.contactform.boatType)
	if(ownBoatchk && !boatTypechk  )
	{
		alert("Please fill in your Boat Type.")
		return false	
	}

	commentschk = emptyField(document.contactform.comments)
	if(!commentschk)
	{
		alert("Please fill in your Comments")
		return false	
	}

	return true;
}