function frmchk()
{

	if (document.getElementById('chkTerms').checked==false)
	{
		alert("Please read and accept terms of use and privacy policy !!!");
		document.getElementById('chkTerms').focus();
		return false;
	}


	var re=/^[a-zA-Z\s\-\']+$/;
	var reFL=/^[a-zA-Z\s\-\']+$/;	
	var reN=/^[0-9]+$/;
	
	if (trim(document.getElementById('vchFillPerson').value)=="")
	{
		alert("Enter filling person name !!!");
		document.getElementById('vchFillPerson').focus();
		return false;
	}
	
	if (!re.test(trim(document.getElementById('vchFillPerson').value)))
	{
		alert("Special symbols and numeric values are not allowed !!!");
		document.getElementById('vchFillPerson').focus();
		return false;
	}	
	
	if (trim(document.getElementById('lastName').value)=="")
	{
		alert("Enter filling person's Last Name !!!");
		document.getElementById('lastName').focus();
		return false;
	}
	
	if (trim(document.getElementById('dtGrantApp').value)=="")
	{
		alert("Enter Grant Application Date !!!");
		document.getElementById('dtGrantApp').focus();
		return false;
	}	
	if (isDate(trim(document.getElementById('dtGrantApp').value))==false)
	{
		document.getElementById('dtGrantApp').focus();
		return false;
	}
	
	if (document.frmApp.firstTime[0].checked == false && document.frmApp.firstTime[1].checked == false)
	{
		alert("Select camper eligibility option");
		document.frmApp.firstTime[0].focus();
		return false;
	}
	
	if (document.frmApp.appliedYet[0].checked == false && document.frmApp.appliedYet[1].checked == false && 
																					 document.frmApp.appliedYet[2].checked == false && 
 																					 document.frmApp.appliedYet[3].checked == false )
	{
		alert("Have you applied to one of the participating camps yet? (Select an option)");
		document.frmApp.appliedYet[0].focus();
		return false;
	}

	if (trim(document.getElementById('optCamp').value)=="")
	{
		alert("Select a camp");
		document.getElementById('optCamp').focus();
		return false;
	}
	
	if (trim(document.getElementById('optSession').value)=="")
	{
		alert("Select a Session");
		document.getElementById('optSession').focus();
		return false;
	}
	
	if (trim(document.getElementById('optSessionLength').value)=="")
	{
		alert("Select Session Length");
		document.getElementById('optSessionLength').focus();
		return false;
	}

	
	if (trim(document.getElementById('vchFirstName').value)=="")
	{
		alert("Enter Child's First Name !!!");
		document.getElementById('vchFirstName').focus();
		return false;
	}
	
	if (!reFL.test(trim(document.getElementById('vchFirstName').value)))
	{
		alert("Special symbols, spaces and numeric values are not allowed !!!");
		document.getElementById('vchFirstName').focus();
		return false;
	}			
	if (trim(document.getElementById('vchLastName').value)=="")
	{
		alert("Enter Child's Last Name !!!");
		document.getElementById('vchLastName').focus();
		return false;
	}			
	if (!reFL.test(trim(document.getElementById('vchLastName').value)))
	{
		alert("Special symbols, spaces and numeric values are not allowed !!!");
		document.getElementById('vchLastName').focus();
		return false;
	}
	
	
	if (document.frmApp.optSex[0].checked == false && document.frmApp.optSex[1].checked == false)
	{
		alert("Select Gender");
		document.frmApp.optSex[0].focus();
		return false;
	}
	
	if (isDate(trim(document.getElementById('dtBirth').value))==false)
	{
		document.getElementById('dtBirth').focus();
		return false;
	}
	
	if (trim(document.getElementById('optGrade').value)=="")
	{
		alert("Select Current Grade");
		document.getElementById('optGrade').focus();
		return false;
	}

	if (trim(document.getElementById('vchSchool').value)=="")
	{
		alert("Enter Child's School Name !!!");
		document.getElementById('vchSchool').focus();
		return false;
	}

	if (trim(document.getElementById('vchStreet').value)=="")
	{
		alert("Enter Street Name !!!");
		document.getElementById('vchStreet').focus();
		return false;
	}

	if (trim(document.getElementById('vchCity').value)=="")
	{
		alert("Enter City Name !!!");
		document.getElementById('vchCity').focus();
		return false;
	}

	if (trim(document.getElementById('vchPostal').value)=="")
	{
		alert("Enter Postal Code!!!");
		document.getElementById('vchPostal').focus();
		return false;
	}

	if (trim(document.getElementById('vchPhone').value)=="")
	{
		alert("Enter Phone No. !!!");
		document.getElementById('vchPhone').focus();
		return false;
	}
	if (!reN.test(trim(document.getElementById('vchPhone').value)))
	{
		alert("Phone no should be numeric without any spaces !!!");
		document.getElementById('vchPhone').focus();
		return false;
	}

	
	if (trim(document.getElementById('vchAge').value)=="")
	{
		alert("Enter Age !!!");
		document.getElementById('vchAge').focus();
		return false;
	}
	if (!reN.test(trim(document.getElementById('vchAge').value)))
	{
		alert("Age should be numeric !!!");
		document.getElementById('vchAge').focus();
		return false;
	}

	if (trim(document.getElementById('vchParent1').value)=="")
	{
		alert("Enter Parent/Guardian Name !!!");
		document.getElementById('vchParent1').focus();
		return false;
	}
	if (!re.test(trim(document.getElementById('vchParent1').value)))
	{
		alert("No special symbols or numeric values are allowed !!!");
		document.getElementById('vchParent1').focus();
		return false;
	}
	
	if (trim(document.getElementById('parent1LastName').value)==false)
	{
		alert("Enter a valid Parent Last Name!!!");
		document.getElementById('parent1LastName').focus();
		return false;		
	}
	
	
	if (trim(document.getElementById('vchOccupation1').value)=="")
	{
		alert("Enter Parent/Guardian occupation !!!");
		document.getElementById('vchOccupation1').focus();
		return false;
	}


	if (trim(document.getElementById('vchStreet1').value)=="")
	{
		alert("Enter Street Name !!!");
		document.getElementById('vchStreet1').focus();
		return false;
	}

	if (trim(document.getElementById('vchCity1').value)=="")
	{
		alert("Enter City Name !!!");
		document.getElementById('vchCity1').focus();
		return false;
	}

	if (trim(document.getElementById('vchPostal1').value)=="")
	{
		alert("Enter Postal Code!!!");
		document.getElementById('vchPostal1').focus();
		return false;
	}

	if (trim(document.getElementById('vchPhone1').value)=="")
	{
		alert("Enter Phone No. !!!");
		document.getElementById('vchPhone1').focus();
		return false;
	}
	if (!reN.test(trim(document.getElementById('vchPhone1').value)))
	{
		alert("Phone no should be numeric without any spaces !!!");
		document.getElementById('vchPhone1').focus();
		return false;
	}

	if (validEmail(trim(document.getElementById('vchEmail1').value))==false)
	{
		alert("Enter valid email address !!!");
		document.getElementById('vchEmail1').focus();
		return false;		
	}

	if (trim(document.getElementById('vchWorkPhone1').value)=="")
	{
		alert("Enter Phone No. !!!");
		document.getElementById('vchWorkPhone1').focus();
		return false;
	}
	if (!reN.test(trim(document.getElementById('vchWorkPhone1').value)))
	{
		alert("Phone no should be numeric without any spaces !!!");
		document.getElementById('vchWorkPhone1').focus();
		return false;
	}	


	if	(trim(document.getElementById('vchEmail2').value)!="")
	{
		if (validEmail(trim(document.getElementById('vchEmail2').value))==false)
		{
			alert("Enter valid email address !!!");
			document.getElementById('vchEmail2').focus();
			return false;		
			
		}	
	}
	/*
	if (isDate(trim(document.getElementById('dtCampApp').value))==false)
	{
		document.getElementById('dtCampApp').focus();
		return false;
	}		
*/
	if (document.frmApp.optJSchool[0].checked==false && document.frmApp.optJSchool[1].checked==false && document.frmApp.optJSchool[2].checked==false && document.frmApp.optJSchool[3].checked==false && document.frmApp.optJSchool[4].checked==false)
	{
		alert('Please choose type of Jewish schooling you have received !!!');
		document.frmApp.optJSchool[0].focus();
		return false;
	}

	if (document.frmApp.optIsrael[0].checked==false && document.frmApp.optIsrael[1].checked==false)
	{
		alert('Please choose Has your child ever been to Israel !!!');
		document.frmApp.optIsrael[0].focus();
		return false;
	}

	if (document.frmApp.optIsrael[0].checked==true)
	{
		if (document.frmApp.optIsraelTime[0].checked==false && document.frmApp.optIsraelTime[1].checked==false && document.frmApp.optIsraelTime[2].checked==false && document.frmApp.optIsraelTime[3].checked==false)
		{
			alert('Please choose how many times your child ever been to Israel !!!');
			document.frmApp.optIsraelTime[0].focus();
			return false;
		}
	}
/*
	if (document.frmApp.optAttend[0].checked==false && document.frmApp.optAttend[1].checked==false)
	{
		alert('Please choose Has your child ever attended Centre Camp !!!');
		document.frmApp.optAttend[0].focus();
		return false;
	}

	if (document.frmApp.optAttend[0].checked==true)
	{
		if (document.frmApp.chkAttendYear1.checked==false && document.frmApp.chkAttendYear2.checked==false && document.frmApp.chkAttendYear3.checked==false && document.frmApp.chkAttendYear4.checked==false && document.frmApp.chkAttendYear5.checked==false && document.frmApp.chkAttendYear6.checked==false)
		{
			alert('Please choose period of attend Centre Camp !!!');
			document.frmApp.chkAttendYear1.focus();
			return false;
		}
	}
*/

	if (document.frmApp.optDenom[0].checked==false && document.frmApp.optDenom[1].checked==false && document.frmApp.optDenom[2].checked==false && document.frmApp.optDenom[3].checked==false && document.frmApp.optDenom[4].checked==false && document.frmApp.optDenom[5].checked==false && document.frmApp.optDenom[6].checked==false)
	{
		alert('Please choose your denomination do you currently consider yourself to be !!!');
		document.frmApp.optDenom[0].focus();
		return false;
	}

	/*
	if (document.frmApp.optServe[0].checked==false && document.frmApp.optServe[1].checked==false)
	{
		alert('Please choose our spouse/partner serve as an officer or Board member of a synagogue/Temple, JCC, UJA, or other Jewish organization !!!');
		document.frmApp.optServe[0].focus();
		return false;
	}
	*/

	if (document.frmApp.optSpouseIsrael[0].checked==false && document.frmApp.optSpouseIsrael[1].checked==false)
	{
		alert('Please choose your spouse/partner ever been to Israel !!!');
		document.frmApp.optSpouseIsrael[0].focus();
		return false;
	}

	if (document.frmApp.optSpouseIsrael[0].checked==true)
	{
		if (document.frmApp.optIsraelTimes[0].checked==false && document.frmApp.optIsraelTimes[1].checked==false && document.frmApp.optIsraelTimes[2].checked==false && document.frmApp.optIsraelTimes[3].checked==false)
		{
			alert('Please choose how many times your spouse/partner ever been to Israel !!!');
			document.frmApp.optIsraelTimes[0].focus();
			return false;
		}
	}

	if (document.frmApp.optJSchoolChild[0].checked==false && document.frmApp.optJSchoolChild[1].checked==false && document.frmApp.optJSchoolChild[2].checked==false && document.frmApp.optJSchoolChild[3].checked==false && document.frmApp.optJSchoolChild[4].checked==false && document.frmApp.optJSchoolChild[5].checked==false)
	{
		alert('Please choose main type of Jewish schooling you received as a child !!!');
		document.frmApp.optJSchoolChild[0].focus();
		return false;
	}

	if (document.frmApp.chkOvernight1.checked==false && document.frmApp.chkOvernight2.checked==false && document.frmApp.chkOvernight3.checked==false && document.frmApp.chkOvernight4.checked==false && document.frmApp.chkOvernight5.checked==false)
	{
		alert('Please choose who among the following in your family has attended overnight camp !!!');
		document.frmApp.chkOvernight1.focus();
		return false;
	}

	if (document.frmApp.chkOvernightS1.checked==false && document.frmApp.chkOvernightS2.checked==false && document.frmApp.chkOvernightS3.checked==false && document.frmApp.chkOvernightS4.checked==false && document.frmApp.chkOvernightS5.checked==false)
	{
		alert('Please choose who among the following in your family has attended a Jewish sponsored overnight camp !!!');
		document.frmApp.chkOvernightS1.focus();
		return false;
	}

	if (document.frmApp.optMarital[0].checked==false && document.frmApp.optMarital[1].checked==false && document.frmApp.optMarital[2].checked==false && document.frmApp.optMarital[3].checked==false && document.frmApp.optMarital[4].checked==false)
	{
		alert('Please choose your marital status !!!');
		document.frmApp.optMarital[0].focus();
		return false;
	}
	
	if (trim(document.frmApp.optProgram.value) == "")
	{
		alert('Please tell us how you found out about the TopBunk Program');
		document.frmApp.optProgram.focus();
		return false;
	}

	if (document.getElementById('chkTerms').checked==false)
	{
		alert("Please read and accept terms of use and privacy policy !!!");
		document.getElementById('chkTerms').focus();
		return false;
	}			
}

function putValue()
{
	if (document.getElementById('chkAddress1').checked)
	{
		document.getElementById('vchStreet1').value=document.getElementById('vchStreet').value;
		document.getElementById('vchCity1').value=document.getElementById('vchCity').value;		
		document.getElementById('vchPostal1').value=document.getElementById('vchPostal').value;
		document.getElementById('vchPhone1').value=document.getElementById('vchPhone').value;
		//document.getElementById('vchEmail1').value=document.getElementById('vchEmail').value;		
		//document.getElementById('vchWorkPhone1').value=document.getElementById('vchPhone').value;
	}
	else
	{
		document.getElementById('vchStreet1').value='';
		document.getElementById('vchCity1').value='';		
		document.getElementById('vchPostal1').value='';
		document.getElementById('vchPhone1').value='';
		//document.getElementById('vchEmail1').value='';		
		document.getElementById('vchWorkPhone1').value='';	
	}
	if (document.getElementById('chkAddress2').checked)
	{
		document.getElementById('vchStreet2').value=document.getElementById('vchStreet').value;
		document.getElementById('vchCity2').value=document.getElementById('vchCity').value;		
		document.getElementById('vchPostal2').value=document.getElementById('vchPostal').value;
		document.getElementById('vchPhone2').value=document.getElementById('vchPhone').value;
		document.getElementById('vchEmail2').value=document.getElementById('vchEmail1').value;		
		//document.getElementById('vchWorkPhone2').value=document.getElementById('vchPhone').value;
	}	
	else
	{
		document.getElementById('vchStreet2').value='';
		document.getElementById('vchCity2').value='';		
		document.getElementById('vchPostal2').value='';
		document.getElementById('vchPhone2').value='';
		document.getElementById('vchEmail2').value='';		
		document.getElementById('vchWorkPhone2').value='';	
	}	
}