function checkform()
{	
	if(document.form1.zipcode1.checked!=true && 
	   document.form1.zipcode3.checked!=true && 
	   document.form1.zipcode4.checked!=true && 
	   document.form1.zipcode5.checked!=true && 
	   document.form1.zipcode6.checked!=true && 
	   document.form1.zipcode7.checked!=true && 
	   document.form1.zipcode8.checked!=true && 
	   document.form1.zipcode9.checked!=true  && 
	   document.form1.zipcode_te.checked!=true)
	    {
		alert("Please select\nWhat zip code do you live in");
		document.form1.zipcode[0].focus();
		return false;
		}
		if(document.form1.zipcode_te.checked==true)
		{
			if(document.form1.radiozipcode.value=="")
			{
			alert("Please enter\nWhat zip code do you live in");	
			document.form1.zipcode_text.focus();
			return false;
			}
		}
		if(document.form1.zipcode_text.value!="")
		{
		if(isNaN(document.form1.zipcode_text.value))
		{
			alert("Zip code should be numeric value");
			document.form1.zipcode_text.focus();
			return false;
		}
		}
		if(document.form1.visit1.checked!=true &&
		   document.form1.visit2.checked!=true &&
		   document.form1.visit3.checked!=true)
	    {
		alert("Please select\nWhich clinic did you visit");
		document.form1.visit[0].focus();
		return false;
		}
		
		
		
		if(document.form1.services1.checked!=true && 
		   document.form1.services2.checked!=true && 
		   document.form1.services3.checked!=true && 
		   document.form1.services4.checked!=true && 
		   document.form1.services5.checked!=true && 
		   document.form1.services6.checked!=true &&
		   document.form1.services_te.checked!=true)
	    {
		alert("Please select\nHow did you hear about our services");
		document.form1.services[0].focus();
		return false;
		}
		if(document.form1.services_te.checked==true)
		{
			if(document.form1.radioservices.value=="")
			{
			alert("Please enter\nHow did you hear about our services");	
			document.form1.services_text.focus();
			return false;
			}
		}
		if(document.form1.services_text.value!="")
		{
		if(!isNaN(document.form1.services_text.value))
		{
			alert("Please enter\nHow did you hear about our services Alpha Value");
			document.form1.services_text.focus();
			return false;
		}
		}
		if(document.form1.age1.checked!=true && 
	       document.form1.age2.checked!=true && 
	  	   document.form1.age3.checked!=true && 
	       document.form1.age4.checked!=true && 
	       document.form1.age5.checked!=true)
	    {
		alert("Please select\nPatient is what age");
		document.form1.age[0].focus();
		return false;
		}
		if(document.form1.male1.checked!=true && 
	       document.form1.female1.checked!=true)
	    {
		alert("Please select\nPatient is what sex");
		document.form1.male[0].focus();
		return false;
		}
		
		if(document.form1.patient1.checked!=true && 
		   document.form1.patient2.checked!=true && 
		   document.form1.patient3.checked!=true && 
		   document.form1.patient4.checked!=true && 
		   document.form1.patient5.checked!=true &&
		   document.form1.patient_te.checked!=true)
	    {
		alert("Please select\nWhat is patient’s race or ethnicity");
		document.form1.patient[0].focus();
		return false;
		}
		if(document.form1.patient_te.checked==true)
		{
			if(document.form1.radiopatient.value=="")
			{
			alert("Please enter\nWhat is patient’s race or ethnicity");
			document.form1.patient_text.focus();
			return false;
			}
		}	
		if(document.form1.patient_text.value!="")
		{
		if(!isNaN(document.form1.patient_text.value))
		{
			alert("Please enter\nWhat is patient’s race or ethnicity Alpha Value");
			document.form1.patient_text.focus();
			return false;
		}
		}
		if(document.form1.residence1.checked!=true && 
		   document.form1.residence2.checked!=true && 
		   document.form1.residence3.checked!=true)
	    {
		alert("Please select\nDo you own or rent your residence");
		document.form1.residence[0].focus();
		return false;
		}
		if(document.form1.publichousing1.checked!=true && 
		   document.form1.publichousing2.checked!=true)
	    {
		alert("Please select\nDo you live in Public housing");
		document.form1.publichousing[0].focus();
		return false;
		}
		if(document.form1.totalincome1.checked!=true && 
		   document.form1.totalincome2.checked!=true && 
		   document.form1.totalincome3.checked!=true && 
		   document.form1.totalincome4.checked!=true && 
		   document.form1.totalincome5.checked!=true && 
		   document.form1.totalincome6.checked!=true && 
		   document.form1.totalincome7.checked!=true && 
		   document.form1.totalincome8.checked!=true && 
		   document.form1.totalincome9.checked!=true && 
		   document.form1.totalincome10.checked!=true)
		   
	    {
		alert("Please select\nWhat is the TOTAL annual income for all members of your household, before taxes");
		document.form1.totalincome[0].focus();
		return false;
		}
		if(document.form1.employmentstatus1.checked!=true && 
		   document.form1.employmentstatus2.checked!=true && 
		   document.form1.employmentstatus3.checked!=true && 
		   document.form1.employmentstatus4.checked!=true && 
		   document.form1.employmentstatus5.checked!=true && 
		   document.form1.employmentstatus6.checked!=true && 
		   document.form1.employmentstatus7.checked!=true && 
		   document.form1.employmentstatus8.checked!=true && 
		   document.form1.employmentstatus9.checked!=true  && 
		   document.form1.employmentstatus_te.checked!=true)
	    {
		alert("Please select\nWhat is your current employment status");
		document.form1.employmentstatus[0].focus();
		return false;
		}
		if(document.form1.employmentstatus_te.checked==true)
		{
			if(document.form1.radioemploymentstatus.value=="")
			{
			alert("Please enter\nWhat is your current employment status");	
			document.form1.employmentstatus_text.focus();
			return false;
			}
		}
		if(document.form1.employmentstatus_text.value!="")
		{
		if(!isNaN(document.form1.employmentstatus_text.value))
		{
			alert("Please enter\nWhat is your current employment status Alpha Value");
			document.form1.employmentstatus_text.focus();
			return false;
		}
		}
		if(document.form1.healthinsurance1.checked!=true && 
		   document.form1.healthinsurance2.checked!=true && 
		   document.form1.healthinsurance3.checked!=true && 
		   document.form1.healthinsurance4.checked!=true && 
		   document.form1.healthinsurance5.checked!=true)
	    {
		alert("Please select\nWhat type of health insurance do you have");
		document.form1.healthinsurance[0].focus();
		return false;
		}

		if(document.form1.healthcare1.checked!=true && 
		   document.form1.healthcare2.checked!=true  && 
		   document.form1.healthcare_te.checked!=true)
	    {
		alert("Please select\nWhere did you previously go for your health care needs prior to visiting us");
		document.form1.healthcare[0].focus();
		return false;
		}
		if(document.form1.healthcare_te.checked==true)
		{
			if(document.form1.radiohealthcare.value=="")
			{
			alert("Please enter\nWhere did you previously go for your health care needs prior to visiting us");	
			document.form1.healthcare_text.focus();
			return false;
			}
		}
		if(document.form1.healthcare_text.value!="")
		{
		if(!isNaN(document.form1.healthcare_text.value))
		{
			alert("Please enter\nWhere did you previously go for your health care needs prior to visiting us Alpha Value");
			document.form1.healthcare_text.focus();
			return false;
		}
		}
		if(document.form1.healthquality1.checked!=true && 
		   document.form1.healthquality2.checked!=true && 
		   document.form1.healthquality3.checked!=true && 
		   document.form1.healthquality4.checked!=true)
	    {
		alert("Please select\nIn general, what is the quality of your health");
		document.form1.healthquality[0].focus();
		return false;
		}
		if(document.form1.visiteddentist1.checked!=true && 
		   document.form1.visiteddentist2.checked!=true && 
		   document.form1.visiteddentist3.checked!=true &&
		   document.form1.visiteddentist4.checked!=true)
	    {
		alert("Please select\nHow often have you visited a dentist in the past year");
		document.form1.visiteddentist[0].focus();
		return false;
		}
		if(document.form1.visiteddoctor1.checked!=true && 
		   document.form1.visiteddoctor2.checked!=true && 
		   document.form1.visiteddoctor3.checked!=true && 
		   document.form1.visiteddoctor4.checked!=true)
	    {
		alert("Please select\nHow often have you visited a doctor in the past year");
		document.form1.visiteddoctor[0].focus();
		return false;
		}
		if(document.form1.appointment1.checked!=true && 
		   document.form1.appointment2.checked!=true && 
		   document.form1.appointment3.checked!=true)
	    {
		alert("Please select\nDid you Schedule an appointment by phone or did you drop in");
		document.form1.appointment[0].focus();
		return false;
		}
		if(document.form1.scheduledappointment1.checked!=true && 
		   document.form1.scheduledappointment2.checked!=true)
	    {
		alert("Please select\nIf you scheduled an appointment, did you have to wait longer that expected to get scheduled");
		document.form1.scheduledappointment[0].focus();
		return false;
		}
		if(document.form1.telephone1.checked!=true && 
		   document.form1.telephone2.checked!=true && 
		   document.form1.telephone3.checked!=true && 
		   document.form1.telephone4.checked!=true && 
		   document.form1.telephone5.checked!=true)
	    {
		alert("Please select\nHow easy was it to make an appointment by telephone");
		document.form1.telephone[0].focus();
		return false;
		}
		if(document.form1.schedulingmember1.checked!=true && 
		   document.form1.schedulingmember2.checked!=true && 
		   document.form1.schedulingmember3.checked!=true && 
		   document.form1.schedulingmember4.checked!=true)
	    {
		alert("Please select\nHow long did you wait to speak to a scheduling staff member");
		document.form1.schedulingmember[0].focus();
		return false;
		}
		if(document.form1.personscheduled1.checked!=true && 
		   document.form1.personscheduled2.checked!=true && 
		   document.form1.personscheduled3.checked!=true && 
		   document.form1.personscheduled4.checked!=true && 
		   document.form1.personscheduled5.checked!=true)
	    {
		alert("Please select\nWas the person who scheduled your appointment courteous and helpful");
		document.form1.personscheduled[0].focus();
		return false;
		}
		if(document.form1.specialist1.checked!=true && 
		   document.form1.specialist2.checked!=true)
	    {
		alert("Please select\nIf you were seeking a referral to a specialist, were you request handled in a timely manner");
		document.form1.specialist[0].focus();
		return false;
		}
		if(document.form1.courtesy1.checked!=true && 
		   document.form1.courtesy2.checked!=true && 
		   document.form1.courtesy3.checked!=true && 
		   document.form1.courtesy4.checked!=true && 
		   document.form1.courtesy5.checked!=true)
	    {
		alert("Please select\nHow would you rate the courtesy of the staff at the reception desk");
		document.form1.courtesy[0].focus();
		return false;
		}
		if(document.form1.appointmenttime1.checked!=true && 
		   document.form1.appointmenttime2.checked!=true  &&
		   document.form1.appointmenttime3.checked!=true  && 
		   document.form1.appointmenttime_te.checked!=true)
	    {
		alert("Please select\nHow long did you wait in the reception area beyond your scheduled appointment time");
		document.form1.appointmenttime[0].focus();
		return false;
		}
		if(document.form1.appointmenttime_te.checked==true)
		{
			if(document.form1.radioappointmenttime.value=="")
			{
			alert("Please enter\nHow long did you wait in the reception area beyond your scheduled appointment time");	
			document.form1.appointmenttime_text.focus();
			return false;
			}
		}
		if(document.form1.examroom1.checked!=true && 
		   document.form1.examroom2.checked!=true  &&
		   document.form1.examroom3.checked!=true  && 
		   document.form1.examroom_te.checked!=true)
	    {
		alert("Please select\nHow long did you wait in the exam room before you were seen by the doctor/dentist/other professional");
		document.form1.examroom[0].focus();
		return false;
		}
		if(document.form1.examroom_te.checked==true)
		{
			if(document.form1.radioexamroom.value=="")
			{
			alert("Please enter\nHow long did you wait in the exam room before you were seen by the doctor/dentist/other professional");
			document.form1.examroom_text.focus();
			return false;
			}
		}
		if(document.form1.department1.checked!=true && 
		   document.form1.department2.checked!=true  &&
		   document.form1.department3.checked!=true  && 
		   document.form1.department4.checked!=true  &&
		   document.form1.department5.checked!=true  && 
		   document.form1.department_te.checked!=true)
	    {
		alert("Please select\nIf dental, which department(s) did you visit during your appointment");
		document.form1.department[0].focus();
		return false;
		}
		if(document.form1.department_te.checked==true)
		{
			if(document.form1.radiodepartment.value=="")
			{
			alert("Please enter\nIf dental, which department(s) did you visit during your appointment");
			document.form1.department_text.focus();
			return false;
			}
		}
		if(document.form1.department_text.value!="")
		{
		if(!isNaN(document.form1.department_text.value))
		{
			alert("Please enter\nIf dental, which department(s) did you visit during your appointment Alpha Value");
			document.form1.department_text.focus();
			return false;
		}
		}
		if(document.form1.medical1.checked!=true && 
		   document.form1.medical2.checked!=true  &&
		   document.form1.medical3.checked!=true  && 
		   document.form1.medical4.checked!=true  && 
		   document.form1.medical5.checked!=true  && 
		   document.form1.medical6.checked!=true &&
		   document.form1.medical7.checked!=true)
	    {
		alert("Please select\nIf medical, which department(s) did you visit during your appointment");
		document.form1.medical[0].focus();
		return false;
		}
		if(document.form1.demeanor1.checked!=true && 
		   document.form1.demeanor2.checked!=true  &&
		   document.form1.demeanor3.checked!=true  && 
		   document.form1.demeanor4.checked!=true  && 
		   document.form1.demeanor5.checked!=true  && 
		   document.form1.demeanor6.checked!=true)
	    {
		alert("Please select\nWhat do you feel was the demeanor of your doctor/dentist");
		document.form1.demeanor[0].focus();
		return false;
		}
		if(document.form1.competence1.checked!=true && 
		   document.form1.competence2.checked!=true  &&
		   document.form1.competence3.checked!=true  && 
		   document.form1.competence4.checked!=true  && 
		   document.form1.competence5.checked!=true  && 
		   document.form1.competence6.checked!=true)
	    {
		alert("Please select\nHow would you rate the competence of your doctor/dentist");
		document.form1.competence[0].focus();
		return false;
		}
		if(document.form1.examination1.checked!=true && 
		   document.form1.examination2.checked!=true  && 
		   document.form1.examination3.checked!=true)
	    {
		alert("Please select\nDid you feel that your examination was thorough");
		document.form1.examination[0].focus();
		return false;
		}
		if(document.form1.explanation1.checked!=true && 
		   document.form1.explanation2.checked!=true  &&
		   document.form1.explanation3.checked!=true  && 
		   document.form1.explanation4.checked!=true  && 
		   document.form1.explanation5.checked!=true  && 
		   document.form1.explanation6.checked!=true)
	    {
		alert("Please select\nPlease rate the clarity of the doctor’s/dentist’s explanation of your condition and treatment options");
		document.form1.explanation[0].focus();
		return false;
		}
		if(document.form1.healthcare11.checked!=true && 
		   document.form1.healthcare21.checked!=true  &&
		   document.form1.healthcare31.checked!=true  && 
		   document.form1.healthcare41.checked!=true  && 
		   document.form1.healthcare51.checked!=true  && 
		   document.form1.healthcare61.checked!=true)
	    {
		alert("Please select\nHow well were you included in your healthcare decisions");
		document.form1.healthcares[0].focus();
		return false;
		}
		if(document.form1.answered1.checked!=true && 
		   document.form1.answered2.checked!=true  && 
		   document.form1.answered3.checked!=true)
	    {
		alert("Please select\nWere your questions answered to your satisfaction");
		document.form1.answered[0].focus();
		return false;
		}
		if(document.form1.facility1.checked!=true && 
		   document.form1.facility2.checked!=true  && 
		   document.form1.facility3.checked!=true)
	    {
		alert("Please select\nWould you recommend this facility and its staff to your family and friends");
		document.form1.facility[0].focus();
		return false;
		}
		if(document.form1.professionalism1.checked!=true && 
		   document.form1.professionalism2.checked!=true  &&
		   document.form1.professionalism3.checked!=true  && 
		   document.form1.professionalism4.checked!=true  && 
		   document.form1.professionalism5.checked!=true  && 
		   document.form1.professionalism6.checked!=true)
	    {
		alert("Please select\nHow would you rate the professionalism of the person who took your blood and worked on your lab exam");
		document.form1.professionalism[0].focus();
		return false;
		}
		if(document.form1.labexam1.checked!=true && 
		   document.form1.labexam2.checked!=true && 
		   document.form1.labexam3.checked!=true && 
		   document.form1.labexam4.checked!=true &&
		   document.form1.labexam5.checked!=true && 
		   document.form1.labexam6.checked!=true &&
		   document.form1.labexam7.checked!=true &&
		   document.form1.labexam8.checked!=true &&
		   document.form1.labexam_te.checked!=true)
	    {
		alert("Please select\nIf you received a lab exam, please indicate the type(s) if lab exam you received");
		document.form1.labexam[0].focus();
		return false;
		}
		if(document.form1.labexam_te.checked==true)
		{
			if(document.form1.radiolabexam.value=="")
			{
			alert("Please enter\nIf you received a lab exam, please indicate the type(s) if lab exam you received");
			document.form1.labexam_text.focus();
			return false;
			}
		}
		if(document.form1.labexam_text.value!="")
		{
		if(!isNaN(document.form1.labexam_text.value))
		{
			alert("Please enter\nIf you received a lab exam, please indicate the type(s) if lab exam you received Alpha Value");
			document.form1.labexam_text.focus();
			return false;
		}
		}
		if(document.form1.comfortable1.checked!=true && 
		   document.form1.comfortable2.checked!=true  &&
		   document.form1.comfortable3.checked!=true  && 
		   document.form1.comfortable4.checked!=true  && 
		   document.form1.comfortable5.checked!=true  && 
		   document.form1.comfortable6.checked!=true)
	    {
		alert("Please select\nIf you received a lab exam, was the service prompt, comfortable, and courteous");
		document.form1.comfortable[0].focus();
		return false;
		}
		if(document.form1.fname.value=="" )
	    {
		alert("Please enter your name");
		document.form1.fname.focus();
		return false;
		}


	
	if(document.form1.lname.value=="")
	{
	alert("Please enter your Email");
	document.form1.lname.focus();
	return false;
	}
	if(document.form1.lname.value!='') 
	{
	
		var emailPat=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/
		var matchArray;	
		var emailStr = document.form1.lname.value;	
		if(emailStr.length > 1)
		{  	  	
			matchArray = emailStr.match(emailPat);
			if (matchArray == null) 
			{
				alert("Please Enter Correct Email Address"); 
				return false;
			} 	

		}
	}
	
	if(document.form1.address.value=="" )
	    {
		alert("Please enter Address");
		document.form1.address.focus();
		return false;
		}
	if(document.form1.city.value=="" )
	    {
		alert("Please enter city");
		document.form1.city.focus();
		return false;
		}
		if(document.form1.state.value=="" )
	    {
		alert("Please enter state");
		document.form1.state.focus();
		return false;
		}
		if(document.form1.zcode.value=="" )
	    {
		alert("Please enter Zip code");
		document.form1.zcode.focus();
		return false;
		}
		if(document.form1.zcode.value!="")
		{
		if(isNaN(document.form1.zcode.value))
		{
			alert("Zip code should be numeric value");
			return false;
		}
		}
		if(document.form1.tnumber.value=="" )
	    {
		alert("Please enter Telephone Number");
		document.form1.tnumber.focus();
		return false;
		}
		if(document.form1.tnumber.value!="")
		{
		if(isNaN(document.form1.tnumber.value))
		{
			alert("Telephone no. should be numeric value");
			return false;	
		}
		}
		if(document.form1.responses1.checked!=true && 
		   document.form1.responses2.checked!=true)
	    {
		alert("Please select\nWould you like someone to contact you regarding your responses on this survey");
		document.form1.responsess[0].focus();
		return false;
		}
		if(document.form1.relationtreatment_te.checked!=true && 
		   document.form1.relationtreatment2.checked!=true)
	    {
		alert("Please select\nHas your visits to the clinics increased your knowledge base in relation to your treatment");
		document.form1.relationtreatment2[0].focus();
		return false;
		}
		
		
		if(document.form1.relationtreatment.checked==true && 
		    document.form1.whatyoulearnt.checked==true && document.form1.whatyoulearnt_text.value=="")
	    {
		alert("Please select\nWould you like to write something about what you learned");
		document.form1.relationtreatment[0].focus();
		return false;
		}
		/*if(document.form1.relationtreatment_te.checked==true)
		{
			if(document.form1.radioclicncsincreased.value=="")
			{
			alert("Please enter\nHas your visits to the clicncs increased your knowledbase in relation to your treatment");	
			document.form1.relationtreatment_text.focus();
			return false;
			}
		}*/
		/*if(document.form1.whatyoulearnt_te.checked!=true && 
		   document.form1.whatyoulearnt2.checked!=true)
	    {
		alert("Please select\nWould you like to write something about what you learnt");
		document.form1.whatyoulearnt[0].focus();
		return false;
		}
		if(document.form1.whatyoulearnt_te.checked==true)
		{
			if(document.form1.radiowhatyoulearnt.value=="")
			{
			alert("Please enter\nWould you like to write something about what you learnt");	
			document.form1.whatyoulearnt_text.focus();
			return false;
			}
		}
		if(document.form1.surveyover.value=="" )
	    {
		alert("Please enter\nGiven a ratingscale of 1-10, how much would you rate your experience with RHNMC");
		document.form1.surveyover.focus();
		return false;
		}*/
		if(document.form1.surveyover1.checked!=true && 
	   document.form1.surveyover2.checked!=true && 
	   document.form1.surveyover3.checked!=true && 
	   document.form1.surveyover4.checked!=true && 
	   document.form1.surveyover5.checked!=true && 
	   document.form1.surveyover6.checked!=true && 
	   document.form1.surveyover7.checked!=true && 
	   document.form1.surveyover8.checked!=true && 
	   document.form1.surveyover9.checked!=true  && 
	   document.form1.surveyover10.checked!=true)
	    {
		alert("Please give a rating of thihs survey");
		document.form1.surveyover[0].focus();
		return false;
		}
		
}

/*function openpopupwindow()
{
	window.open('surveycoupon.php','jav','width=500,height=250,resizable=yes');
}*/
