function rowby_motherrace_back()
{
				 var startyear= document.birthform.startyear.value;
				 var endyear=document.birthform.endyear.value;
				 if (startyear< 1990 && endyear>=1990)
				 {
				 		rowby_motherrace();
				 }
	
}
function rowby_motherrace()
{
 				 var startyear= document.birthform.startyear.value;
				 var endyear=document.birthform.endyear.value;
				 var sep_year=document.birthform.separateyear.options[document.birthform.separateyear.selectedIndex].value;
				 if ((startyear< 1990 && endyear<1990) || (startyear>= 1990 && endyear>=1990) || sep_year=="separate")
				 {
						if(document.birthform.pagetype.value=="birthform")
						{
						document.birthform.rowby1.options.length=0;
						document.birthform.rowby1.options.length=24;
						document.birthform.rowby1.options[0].text="None";
						document.birthform.rowby1.options[0].value="None";
						document.birthform.rowby1.options[1].text="Child's Gender";
						document.birthform.rowby1.options[1].value="birth_gender";
						document.birthform.rowby1.options[2].text="Child's Weight";
						document.birthform.rowby1.options[2].value="birth_weight";
						document.birthform.rowby1.options[3].text="Mother's Race";
						document.birthform.rowby1.options[3].value="mothers_race";
						document.birthform.rowby1.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby1.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby1.options[5].text="Mother's Marital Status";
						document.birthform.rowby1.options[5].value="mothers_marital_status";
						document.birthform.rowby1.options[6].text="Mother's Age";
						document.birthform.rowby1.options[6].value="mothers_age";
						document.birthform.rowby1.options[7].text="Mother's Education";
						document.birthform.rowby1.options[7].value="mothers_education";
						document.birthform.rowby1.options[8].text="Prenatal Care";
						document.birthform.rowby1.options[8].value="prenatal_care";
						document.birthform.rowby1.options[9].text="Adequate Care";
						document.birthform.rowby1.options[9].value="adequacy";
						document.birthform.rowby1.options[10].text="Plurality";
						document.birthform.rowby1.options[10].value="plurality";
						document.birthform.rowby1.options[11].text="Previous Live Births";
						document.birthform.rowby1.options[11].value="previous_births";
						document.birthform.rowby1.options[12].text="Hosp/Inst";
						document.birthform.rowby1.options[12].value="hospital_institution";	
						document.birthform.rowby1.options[13].text="County (Residence)";
						document.birthform.rowby1.options[13].value="county_of_residence";
						document.birthform.rowby1.options[14].text="County (Occurance)";
						document.birthform.rowby1.options[14].value="county_of_birth";
						document.birthform.rowby1.options[15].text="Planning District";
						document.birthform.rowby1.options[15].value="planning_district";		
						document.birthform.rowby1.options[16].text="Region";
						document.birthform.rowby1.options[16].value="region";
						/*document.birthform.rowby1.options[17].text="City (Residence)";
						document.birthform.rowby1.options[17].value="city_of_residence";
						document.birthform.rowby1.options[18].text="Zip Code";
						document.birthform.rowby1.options[18].value="address_zip";
						document.birthform.rowby1.options[19].text="Alcohol Use";
						document.birthform.rowby1.options[19].value="alcohol";
						document.birthform.rowby1.options[20].text="Tobacco Use";
						document.birthform.rowby1.options[20].value="tobacco";
						document.birthform.rowby1.options[21].text="Gestational Age";
						document.birthform.rowby1.options[21].value="gestation";
						document.birthform.rowby1.options[22].text="Prenatal Visits";
						document.birthform.rowby1.options[22].value="prenatal_visits";
						document.birthform.rowby1.options[23].text="Method of Delivery";
						document.birthform.rowby1.options[23].value="method";
						document.birthform.rowby1.options[24].text="Birth Interval <18";
						document.birthform.rowby1.options[24].value="spacing18";
						document.birthform.rowby1.options[25].text="Birth Interval <24";
						document.birthform.rowby1.options[25].value="spacing24";*/
						document.birthform.rowby1.options[17].text="Alcohol Use";
						document.birthform.rowby1.options[17].value="alcohol";
						document.birthform.rowby1.options[18].text="Tobacco Use";
						document.birthform.rowby1.options[18].value="tobacco";
						document.birthform.rowby1.options[19].text="Gestational Age";
						document.birthform.rowby1.options[19].value="gestation";
						document.birthform.rowby1.options[20].text="Prenatal Visits";
						document.birthform.rowby1.options[20].value="visits";
						document.birthform.rowby1.options[21].text="Method of Delivery";
						document.birthform.rowby1.options[21].value="method";
						document.birthform.rowby1.options[22].text="Birth Interval <18";
						document.birthform.rowby1.options[22].value="spacing18";
						document.birthform.rowby1.options[23].text="Birth Interval <24";
						document.birthform.rowby1.options[23].value="spacing24";
						
						document.birthform.rowby2.options.length=0;				
						document.birthform.rowby2.options.length=24;
						document.birthform.rowby2.options[0].text="None";
						document.birthform.rowby2.options[0].value="";
						document.birthform.rowby2.options[1].text="Child's Gender";
						document.birthform.rowby2.options[1].value="birth_gender";
						document.birthform.rowby2.options[2].text="Child's Weight";
						document.birthform.rowby2.options[2].value="birth_weight";
						document.birthform.rowby2.options[3].text="Mother's Race";
						document.birthform.rowby2.options[3].value="mothers_race";
						document.birthform.rowby2.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby2.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby2.options[5].text="Mother's Marital Status";
						document.birthform.rowby2.options[5].value="mothers_marital_status";
						document.birthform.rowby2.options[6].text="Mother's Age";
						document.birthform.rowby2.options[6].value="mothers_age";
						document.birthform.rowby2.options[7].text="Mother's Education";
						document.birthform.rowby2.options[7].value="mothers_education";
						document.birthform.rowby2.options[8].text="Prenatal Care";
						document.birthform.rowby2.options[8].value="prenatal_care";
						document.birthform.rowby2.options[9].text="Adequate Care";
						document.birthform.rowby2.options[9].value="adequacy";
						document.birthform.rowby2.options[10].text="Plurality";
						document.birthform.rowby2.options[10].value="plurality";
						document.birthform.rowby2.options[11].text="Previous Live Births";
						document.birthform.rowby2.options[11].value="previous_births";
						document.birthform.rowby2.options[12].text="Hosp/Inst";
						document.birthform.rowby2.options[12].value="hospital_institution";	
						document.birthform.rowby2.options[13].text="County (Residence)";
						document.birthform.rowby2.options[13].value="county_of_residence";
						document.birthform.rowby2.options[14].text="County (Occurance)";
						document.birthform.rowby2.options[14].value="county_of_birth";
						document.birthform.rowby2.options[15].text="Planning District";
						document.birthform.rowby2.options[15].value="planning_district";		
						document.birthform.rowby2.options[16].text="Region";
						document.birthform.rowby2.options[16].value="region";
						/*document.birthform.rowby2.options[17].text="City (Residence)";
						document.birthform.rowby2.options[17].value="city_of_residence";
						document.birthform.rowby2.options[18].text="Zip Code";
						document.birthform.rowby2.options[18].value="address_zip";
						document.birthform.rowby2.options[19].text="Alcohol Use";
						document.birthform.rowby2.options[19].value="alcohol";
						document.birthform.rowby2.options[20].text="Tobacco Use";
						document.birthform.rowby2.options[20].value="tobacco";
						document.birthform.rowby2.options[21].text="Gestational Age";
						document.birthform.rowby2.options[21].value="gestation";
						document.birthform.rowby2.options[22].text="Prenatal Visits";
						document.birthform.rowby2.options[22].value="prenatal_visits";
						document.birthform.rowby2.options[23].text="Method of Delivery";
						document.birthform.rowby2.options[23].value="method";
						document.birthform.rowby2.options[24].text="Birth Interval <18";
						document.birthform.rowby2.options[24].value="spacing18";
						document.birthform.rowby2.options[25].text="Birth Interval <24";
						document.birthform.rowby2.options[25].value="spacing24";*/
						document.birthform.rowby2.options[17].text="Alcohol Use";
						document.birthform.rowby2.options[17].value="alcohol";
						document.birthform.rowby2.options[18].text="Tobacco Use";
						document.birthform.rowby2.options[18].value="tobacco";
						document.birthform.rowby2.options[19].text="Gestational Age";
						document.birthform.rowby2.options[19].value="gestation";
						document.birthform.rowby2.options[20].text="Prenatal Visits";
						document.birthform.rowby2.options[20].value="visits";
						document.birthform.rowby2.options[21].text="Method of Delivery";
						document.birthform.rowby2.options[21].value="method";
						document.birthform.rowby2.options[22].text="Birth Interval <18";
						document.birthform.rowby2.options[22].value="spacing18";
						document.birthform.rowby2.options[23].text="Birth Interval <24";
						document.birthform.rowby2.options[23].value="spacing24";
						
						document.birthform.rowby3.options.length=0;
						document.birthform.rowby3.options.length=24;
						document.birthform.rowby3.options[0].text="None";
						document.birthform.rowby3.options[0].value="";
						document.birthform.rowby3.options[1].text="Child's Gender";
						document.birthform.rowby3.options[1].value="birth_gender";
						document.birthform.rowby3.options[2].text="Child's Weight";
						document.birthform.rowby3.options[2].value="birth_weight";
						document.birthform.rowby3.options[3].text="Mother's Race";
						document.birthform.rowby3.options[3].value="mothers_race";
						document.birthform.rowby3.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby3.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby3.options[5].text="Mother's Marital Status";
						document.birthform.rowby3.options[5].value="mothers_marital_status";
						document.birthform.rowby3.options[6].text="Mother's Age";
						document.birthform.rowby3.options[6].value="mothers_age";
						document.birthform.rowby3.options[7].text="Mother's Education";
						document.birthform.rowby3.options[7].value="mothers_education";
						document.birthform.rowby3.options[8].text="Prenatal Care";
						document.birthform.rowby3.options[8].value="prenatal_care";
						document.birthform.rowby3.options[9].text="Adequate Care";
						document.birthform.rowby3.options[9].value="adequacy";
						document.birthform.rowby3.options[10].text="Plurality";
						document.birthform.rowby3.options[10].value="plurality";
						document.birthform.rowby3.options[11].text="Previous Live Births";
						document.birthform.rowby3.options[11].value="previous_births";
						document.birthform.rowby3.options[12].text="Hosp/Inst";
						document.birthform.rowby3.options[12].value="hospital_institution";	
						document.birthform.rowby3.options[13].text="County (Residence)";
						document.birthform.rowby3.options[13].value="county_of_residence";
						document.birthform.rowby3.options[14].text="County (Occurance)";
						document.birthform.rowby3.options[14].value="county_of_birth";
						document.birthform.rowby3.options[15].text="Planning District";
						document.birthform.rowby3.options[15].value="planning_district";		
						document.birthform.rowby3.options[16].text="Region";
						document.birthform.rowby3.options[16].value="region";
						/*document.birthform.rowby3.options[17].text="City (Residence)";
						document.birthform.rowby3.options[17].value="city_of_residence";
						document.birthform.rowby3.options[18].text="Zip Code";
						document.birthform.rowby3.options[18].value="address_zip";
						document.birthform.rowby3.options[19].text="Alcohol Use";
						document.birthform.rowby3.options[19].value="alcohol";
						document.birthform.rowby3.options[20].text="Tobacco Use";
						document.birthform.rowby3.options[20].value="tobacco";
						document.birthform.rowby3.options[21].text="Gestational Age";
						document.birthform.rowby3.options[21].value="gestation";
						document.birthform.rowby3.options[22].text="Prenatal Visits";
						document.birthform.rowby3.options[22].value="prenatal_visits";
						document.birthform.rowby3.options[23].text="Method of Delivery";
						document.birthform.rowby3.options[23].value="method";
						document.birthform.rowby3.options[24].text="Birth Interval <18";
						document.birthform.rowby3.options[24].value="spacing18";
						document.birthform.rowby3.options[25].text="Birth Interval <24";
						document.birthform.rowby3.options[25].value="spacing24";*/
						document.birthform.rowby3.options[17].text="Alcohol Use";
						document.birthform.rowby3.options[17].value="alcohol";
						document.birthform.rowby3.options[18].text="Tobacco Use";
						document.birthform.rowby3.options[18].value="tobacco";
						document.birthform.rowby3.options[19].text="Gestational Age";
						document.birthform.rowby3.options[19].value="gestation";
						document.birthform.rowby3.options[20].text="Prenatal Visits";
						document.birthform.rowby3.options[20].value="visits";
						document.birthform.rowby3.options[21].text="Method of Delivery";
						document.birthform.rowby3.options[21].value="method";
						document.birthform.rowby3.options[22].text="Birth Interval <18";
						document.birthform.rowby3.options[22].value="spacing18";
						document.birthform.rowby3.options[23].text="Birth Interval <24";
						document.birthform.rowby3.options[23].value="spacing24";
						
						}
						else if(document.birthform.pagetype.value=="birthform2")
						{
						document.birthform.rowby1.options.length=0;
						document.birthform.rowby1.options.length=25;
						document.birthform.rowby1.options[0].text="None";
						document.birthform.rowby1.options[0].value="None";
						document.birthform.rowby1.options[1].text="Child's Gender";
						document.birthform.rowby1.options[1].value="birth_gender";
						document.birthform.rowby1.options[2].text="Child's Weight";
						document.birthform.rowby1.options[2].value="birth_weight";
						document.birthform.rowby1.options[3].text="Mother's Race";
						document.birthform.rowby1.options[3].value="mothers_race";
						document.birthform.rowby1.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby1.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby1.options[5].text="Mother's Marital Status";
						document.birthform.rowby1.options[5].value="mothers_marital_status";
						document.birthform.rowby1.options[6].text="Mother's Age";
						document.birthform.rowby1.options[6].value="mothers_age";
						document.birthform.rowby1.options[7].text="Mother's Education";
						document.birthform.rowby1.options[7].value="mothers_education";
						document.birthform.rowby1.options[8].text="Prenatal Care";
						document.birthform.rowby1.options[8].value="prenatal_care";
						document.birthform.rowby1.options[9].text="Adequate Care";
						document.birthform.rowby1.options[9].value="adequacy";
						document.birthform.rowby1.options[10].text="Plurality";
						document.birthform.rowby1.options[10].value="plurality";
						document.birthform.rowby1.options[11].text="Previous Live Births";
						document.birthform.rowby1.options[11].value="previous_births";
						document.birthform.rowby1.options[12].text="Hosp/Inst";
						document.birthform.rowby1.options[12].value="hospital_institution";	
						document.birthform.rowby1.options[13].text="County (Residence)";
						document.birthform.rowby1.options[13].value="county_of_residence";
						//document.birthform.rowby1.options[13].selected=true;
						document.birthform.rowby1.options[14].text="County (Occurance)";
						document.birthform.rowby1.options[14].value="county_of_birth";
						document.birthform.rowby1.options[15].text="Planning District";
						document.birthform.rowby1.options[15].value="planning_district";		
						document.birthform.rowby1.options[16].text="Region";
						document.birthform.rowby1.options[16].value="region";
						/*document.birthform.rowby1.options[17].text="City (Residence)";
						document.birthform.rowby1.options[17].value="city_of_residence";
						document.birthform.rowby1.options[18].text="Zip Code";
						document.birthform.rowby1.options[18].value="address_zip";
						document.birthform.rowby1.options[19].text="Year";
						document.birthform.rowby1.options[19].value="year";
						document.birthform.rowby1.options[20].text="Alcohol Use";
						document.birthform.rowby1.options[20].value="alcohol";
						document.birthform.rowby1.options[21].text="Tobacco Use";
						document.birthform.rowby1.options[21].value="tobacco";
						document.birthform.rowby1.options[22].text="Gestational Age";
						document.birthform.rowby1.options[22].value="gestation";
						document.birthform.rowby1.options[23].text="Prenatal Visits";
						document.birthform.rowby1.options[23].value="prenatal_visits";
						document.birthform.rowby1.options[24].text="Method of Delivery";
						document.birthform.rowby1.options[24].value="method";
						document.birthform.rowby1.options[25].text="Birth Interval <18";
						document.birthform.rowby1.options[25].value="spacing18";
						document.birthform.rowby1.options[26].text="Birth Interval <24";
						document.birthform.rowby1.options[26].value="spacing24";*/
						document.birthform.rowby1.options[17].text="Year";
						document.birthform.rowby1.options[17].value="year";
						document.birthform.rowby1.options[18].text="Alcohol Use";
						document.birthform.rowby1.options[18].value="alcohol";
						document.birthform.rowby1.options[19].text="Tobacco Use";
						document.birthform.rowby1.options[19].value="tobacco";
						document.birthform.rowby1.options[20].text="Gestational Age";
						document.birthform.rowby1.options[20].value="gestation";
						document.birthform.rowby1.options[21].text="Prenatal Visits";
						document.birthform.rowby1.options[21].value="prenatal_visits";
						document.birthform.rowby1.options[22].text="Method of Delivery";
						document.birthform.rowby1.options[22].value="method";
						document.birthform.rowby1.options[23].text="Birth Interval <18";
						document.birthform.rowby1.options[23].value="spacing18";
						document.birthform.rowby1.options[24].text="Birth Interval <24";
						document.birthform.rowby1.options[24].value="spacing24";
						
						
						document.birthform.rowby2.options.length=0;				
						document.birthform.rowby2.options.length=23;
						document.birthform.rowby2.options[0].text="None";
						document.birthform.rowby2.options[0].value="";
						document.birthform.rowby2.options[1].text="Child's Gender";
						document.birthform.rowby2.options[1].value="birth_gender";
						document.birthform.rowby2.options[2].text="Child's Weight";
						document.birthform.rowby2.options[2].value="birth_weight";
						document.birthform.rowby2.options[3].text="Mother's Race";
						document.birthform.rowby2.options[3].value="mothers_race";
						document.birthform.rowby2.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby2.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby2.options[5].text="Mother's Marital Status";
						document.birthform.rowby2.options[5].value="mothers_marital_status";
						document.birthform.rowby2.options[6].text="Mother's Age";
						document.birthform.rowby2.options[6].value="mothers_age";
						document.birthform.rowby2.options[7].text="Mother's Education";
						document.birthform.rowby2.options[7].value="mothers_education";
						document.birthform.rowby2.options[8].text="Prenatal Care";
						document.birthform.rowby2.options[8].value="prenatal_care";
						document.birthform.rowby2.options[9].text="Adequate Care";
						document.birthform.rowby2.options[9].value="adequacy";
						document.birthform.rowby2.options[10].text="Plurality";
						document.birthform.rowby2.options[10].value="plurality";
						document.birthform.rowby2.options[11].text="Previous Live Births";
						document.birthform.rowby2.options[11].value="previous_births";
						document.birthform.rowby2.options[12].text="Hosp/Inst";
						document.birthform.rowby2.options[12].value="hospital_institution";	
						/*document.birthform.rowby2.options[13].text="County (Residence)";
						document.birthform.rowby2.options[13].value="county_of_residence";
						document.birthform.rowby2.options[14].text="County (Occurance)";
						document.birthform.rowby2.options[14].value="county_of_birth";*/
						document.birthform.rowby2.options[13].text="Planning District";
						document.birthform.rowby2.options[13].value="planning_district";		
						document.birthform.rowby2.options[14].text="Region";
						document.birthform.rowby2.options[14].value="region";
						/*document.birthform.rowby2.options[17].text="City (Residence)";
						document.birthform.rowby2.options[17].value="city_of_residence";
						document.birthform.rowby2.options[18].text="Zip Code";
						document.birthform.rowby2.options[18].value="address_zip";
						document.birthform.rowby2.options[19].text="Year";
						document.birthform.rowby2.options[19].value="year";
						document.birthform.rowby2.options[20].text="Alcohol Use";
						document.birthform.rowby2.options[20].value="alcohol";
						document.birthform.rowby2.options[21].text="Tobacco Use";
						document.birthform.rowby2.options[21].value="tobacco";
						document.birthform.rowby2.options[22].text="Gestational Age";
						document.birthform.rowby2.options[22].value="gestation";
						document.birthform.rowby2.options[23].text="Prenatal Visits";
						document.birthform.rowby2.options[23].value="prenatal_visits";
						document.birthform.rowby2.options[24].text="Method of Delivery";
						document.birthform.rowby2.options[24].value="method";
						document.birthform.rowby2.options[25].text="Birth Interval <18";
						document.birthform.rowby2.options[25].value="spacing18";
						document.birthform.rowby2.options[26].text="Birth Interval <24";
						document.birthform.rowby2.options[26].value="spacing24";*/
						document.birthform.rowby2.options[15].text="Year";
						document.birthform.rowby2.options[15].value="year";
						document.birthform.rowby2.options[16].text="Alcohol Use";
						document.birthform.rowby2.options[16].value="alcohol";
						document.birthform.rowby2.options[17].text="Tobacco Use";
						document.birthform.rowby2.options[17].value="tobacco";
						document.birthform.rowby2.options[18].text="Gestational Age";
						document.birthform.rowby2.options[18].value="gestation";
						document.birthform.rowby2.options[19].text="Prenatal Visits";
						document.birthform.rowby2.options[19].value="visits";
						document.birthform.rowby2.options[20].text="Method of Delivery";
						document.birthform.rowby2.options[20].value="method";
						document.birthform.rowby2.options[21].text="Birth Interval <18";
						document.birthform.rowby2.options[21].value="spacing18";
						document.birthform.rowby2.options[22].text="Birth Interval <24";
						document.birthform.rowby2.options[22].value="spacing24";
						
						document.birthform.rowby3.options.length=0;
						document.birthform.rowby3.options.length=26;
						document.birthform.rowby3.options[0].text="None";
						document.birthform.rowby3.options[0].value="";
						document.birthform.rowby3.options[1].text="Child's Gender";
						document.birthform.rowby3.options[1].value="birth_gender";
						document.birthform.rowby3.options[2].text="Child's Weight";
						document.birthform.rowby3.options[2].value="birth_weight";
						document.birthform.rowby3.options[3].text="Mother's Race";
						document.birthform.rowby3.options[3].value="mothers_race";
						document.birthform.rowby3.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby3.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby3.options[5].text="Mother's Marital Status";
						document.birthform.rowby3.options[5].value="mothers_marital_status";
						document.birthform.rowby3.options[6].text="Mother's Age";
						document.birthform.rowby3.options[6].value="mothers_age";
						document.birthform.rowby3.options[7].text="Mother's Education";
						document.birthform.rowby3.options[7].value="mothers_education";
						document.birthform.rowby3.options[8].text="Prenatal Care";
						document.birthform.rowby3.options[8].value="prenatal_care";
						document.birthform.rowby3.options[9].text="Adequate Care";
						document.birthform.rowby3.options[9].value="adequacy";
						document.birthform.rowby3.options[10].text="Plurality";
						document.birthform.rowby3.options[10].value="plurality";
						document.birthform.rowby3.options[11].text="Previous Live Births";
						document.birthform.rowby3.options[11].value="previous_births";
						document.birthform.rowby3.options[12].text="Hosp/Inst";
						document.birthform.rowby3.options[12].value="hospital_institution";	
						document.birthform.rowby3.options[13].text="County (Residence)";
						document.birthform.rowby3.options[13].value="county_of_residence";
						document.birthform.rowby3.options[14].text="County (Occurance)";
						document.birthform.rowby3.options[14].value="county_of_birth";
						document.birthform.rowby3.options[15].text="Planning District";
						document.birthform.rowby3.options[15].value="planning_district";		
						document.birthform.rowby3.options[16].text="Region";
						document.birthform.rowby3.options[16].value="region";
						document.birthform.rowby3.options[17].text="City (Residence)";
						document.birthform.rowby3.options[17].value="city_of_residence";
						/*document.birthform.rowby3.options[18].text="Zip Code";
						document.birthform.rowby3.options[18].value="address_zip";
						document.birthform.rowby3.options[19].text="Alcohol Use";
						document.birthform.rowby3.options[19].value="alcohol";
						document.birthform.rowby3.options[20].text="Tobacco Use";
						document.birthform.rowby3.options[20].value="tobacco";
						document.birthform.rowby3.options[21].text="Gestational Age";
						document.birthform.rowby3.options[21].value="gestation";
						document.birthform.rowby3.options[22].text="Prenatal Visits";
						document.birthform.rowby3.options[22].value="prenatal_visits";
						document.birthform.rowby3.options[23].text="Method of Delivery";
						document.birthform.rowby3.options[23].value="method";
						document.birthform.rowby3.options[24].text="Birth Interval <18";
						document.birthform.rowby3.options[24].value="spacing18";
						document.birthform.rowby3.options[25].text="Birth Interval <24";
						document.birthform.rowby3.options[25].value="spacing24";*/
						document.birthform.rowby3.options[18].text="Year";
						document.birthform.rowby3.options[18].value="year";
						document.birthform.rowby3.options[19].text="Alcohol Use";
						document.birthform.rowby3.options[19].value="alcohol";
						document.birthform.rowby3.options[20].text="Tobacco Use";
						document.birthform.rowby3.options[20].value="tobacco";
						document.birthform.rowby3.options[21].text="Gestational Age";
						document.birthform.rowby3.options[21].value="gestation";
						document.birthform.rowby3.options[22].text="Prenatal Visits";
						document.birthform.rowby3.options[22].value="visits";
						document.birthform.rowby3.options[23].text="Method of Delivery";
						document.birthform.rowby3.options[23].value="method";
						document.birthform.rowby3.options[24].text="Birth Interval <18";
						document.birthform.rowby3.options[24].value="spacing18";
						document.birthform.rowby3.options[25].text="Birth Interval <24";
						document.birthform.rowby3.options[25].value="spacing24";
						
						
						}
						
							

				}
				else if ((startyear< 1990 && endyear>=1990)&& sep_year=="combined")
				{
						if (document.birthform.pagetype.value=="birthform")
						{
						document.birthform.rowby1.options.length=0;
						document.birthform.rowby1.options.length=24;
						document.birthform.rowby1.options[0].text="None";
						document.birthform.rowby1.options[0].value="None";
						document.birthform.rowby1.options[1].text="Child's Gender";
						document.birthform.rowby1.options[1].value="birth_gender";
						document.birthform.rowby1.options[2].text="Child's Weight";
						document.birthform.rowby1.options[2].value="birth_weight";
						document.birthform.rowby1.options[3].text="Mother's Race (Disabled)";
						document.birthform.rowby1.options[3].value="None";
						document.birthform.rowby1.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby1.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby1.options[5].text="Mother's Marital Status";
						document.birthform.rowby1.options[5].value="mothers_marital_status";
						document.birthform.rowby1.options[6].text="Mother's Age";
						document.birthform.rowby1.options[6].value="mothers_age";
						document.birthform.rowby1.options[7].text="Mother's Education";
						document.birthform.rowby1.options[7].value="mothers_education";
						document.birthform.rowby1.options[8].text="Prenatal Care";
						document.birthform.rowby1.options[8].value="prenatal_care";
						document.birthform.rowby1.options[9].text="Adequate Care";
						document.birthform.rowby1.options[9].value="adequacy";
						document.birthform.rowby1.options[10].text="Plurality";
						document.birthform.rowby1.options[10].value="plurality";
						document.birthform.rowby1.options[11].text="Previous Live Births";
						document.birthform.rowby1.options[11].value="previous_births";
						document.birthform.rowby1.options[12].text="Hosp/Inst";
						document.birthform.rowby1.options[12].value="hospital_institution";	
						document.birthform.rowby1.options[13].text="County (Residence)";
						document.birthform.rowby1.options[13].value="county_of_residence";
						document.birthform.rowby1.options[14].text="County (Occurance)";
						document.birthform.rowby1.options[14].value="county_of_birth";
						document.birthform.rowby1.options[15].text="Planning District";
						document.birthform.rowby1.options[15].value="planning_district";		
						document.birthform.rowby1.options[16].text="Region";
						document.birthform.rowby1.options[16].value="region";
						/*document.birthform.rowby1.options[17].text="City (Residence)";
						document.birthform.rowby1.options[17].value="city_of_residence";
						document.birthform.rowby1.options[18].text="Zip Code";
						document.birthform.rowby1.options[18].value="address_zip";
						document.birthform.rowby1.options[19].text="Alcohol Use";
						document.birthform.rowby1.options[19].value="alcohol";
						document.birthform.rowby1.options[20].text="Tobacco Use";
						document.birthform.rowby1.options[20].value="tobacco";
						document.birthform.rowby1.options[21].text="Gestational Age";
						document.birthform.rowby1.options[21].value="gestation";
						document.birthform.rowby1.options[22].text="Prenatal Visits";
						document.birthform.rowby1.options[22].value="prenatal_visits";
						document.birthform.rowby1.options[23].text="Method of Delivery";
						document.birthform.rowby1.options[23].value="method";
						document.birthform.rowby1.options[24].text="Birth Interval <18";
						document.birthform.rowby1.options[24].value="spacing18";
						document.birthform.rowby1.options[25].text="Birth Interval <24";
						document.birthform.rowby1.options[25].value="spacing24";*/
						document.birthform.rowby1.options[17].text="Alcohol Use";
						document.birthform.rowby1.options[17].value="alcohol";
						document.birthform.rowby1.options[18].text="Tobacco Use";
						document.birthform.rowby1.options[18].value="tobacco";
						document.birthform.rowby1.options[19].text="Gestational Age";
						document.birthform.rowby1.options[19].value="gestation";
						document.birthform.rowby1.options[20].text="Prenatal Visits";
						document.birthform.rowby1.options[20].value="visits";
						document.birthform.rowby1.options[21].text="Method of Delivery";
						document.birthform.rowby1.options[21].value="method";
						document.birthform.rowby1.options[22].text="Birth Interval <18";
						document.birthform.rowby1.options[22].value="spacing18";
						document.birthform.rowby1.options[23].text="Birth Interval <24";
						document.birthform.rowby1.options[23].value="spacing24";
						
						
						document.birthform.rowby2.options.length=0;				
						document.birthform.rowby2.options.length=24;
						document.birthform.rowby2.options[0].text="None";
						document.birthform.rowby2.options[0].value="";
						document.birthform.rowby2.options[1].text="Child's Gender";
						document.birthform.rowby2.options[1].value="birth_gender";
						document.birthform.rowby2.options[2].text="Child's Weight";
						document.birthform.rowby2.options[2].value="birth_weight";
						document.birthform.rowby2.options[3].text="Mother's Race (Disabled)";
						document.birthform.rowby2.options[3].value="";
						document.birthform.rowby2.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby2.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby2.options[5].text="Mother's Marital Status";
						document.birthform.rowby2.options[5].value="mothers_marital_status";
						document.birthform.rowby2.options[6].text="Mother's Age";
						document.birthform.rowby2.options[6].value="mothers_age";
						document.birthform.rowby2.options[7].text="Mother's Education";
						document.birthform.rowby2.options[7].value="mothers_education";
						document.birthform.rowby2.options[8].text="Prenatal Care";
						document.birthform.rowby2.options[8].value="prenatal_care";
						document.birthform.rowby2.options[9].text="Adequate Care";
						document.birthform.rowby2.options[9].value="adequacy";
						document.birthform.rowby2.options[10].text="Plurality";
						document.birthform.rowby2.options[10].value="plurality";
						document.birthform.rowby2.options[11].text="Previous Live Births";
						document.birthform.rowby2.options[11].value="previous_births";
						document.birthform.rowby2.options[12].text="Hosp/Inst";
						document.birthform.rowby2.options[12].value="hospital_institution";	
						document.birthform.rowby2.options[13].text="County (Residence)";
						document.birthform.rowby2.options[13].value="county_of_residence";
						document.birthform.rowby2.options[14].text="County (Occurance)";
						document.birthform.rowby2.options[14].value="county_of_birth";
						document.birthform.rowby2.options[15].text="Planning District";
						document.birthform.rowby2.options[15].value="planning_district";		
						document.birthform.rowby2.options[16].text="Region";
						document.birthform.rowby2.options[16].value="region";
						/*document.birthform.rowby2.options[17].text="City (Residence)";
						document.birthform.rowby2.options[17].value="city_of_residence";
						document.birthform.rowby2.options[18].text="Zip Code";
						document.birthform.rowby2.options[18].text="Zip Code";
						document.birthform.rowby2.options[18].value="address_zip";
						document.birthform.rowby2.options[19].text="Alcohol Use";
						document.birthform.rowby2.options[19].value="alcohol";
						document.birthform.rowby2.options[20].text="Tobacco Use";
						document.birthform.rowby2.options[20].value="tobacco";
						document.birthform.rowby2.options[21].text="Gestational Age";
						document.birthform.rowby2.options[21].value="gestation";
						document.birthform.rowby2.options[22].text="Prenatal Visits";
						document.birthform.rowby2.options[22].value="prenatal_visits";
						document.birthform.rowby2.options[23].text="Method of Delivery";
						document.birthform.rowby2.options[23].value="method";
						document.birthform.rowby2.options[24].text="Birth Interval <18";
						document.birthform.rowby2.options[24].value="spacing18";
						document.birthform.rowby2.options[25].text="Birth Interval <24";
						document.birthform.rowby2.options[25].value="spacing24";*/
						document.birthform.rowby2.options[17].text="Alcohol Use";
						document.birthform.rowby2.options[17].value="alcohol";
						document.birthform.rowby2.options[18].text="Tobacco Use";
						document.birthform.rowby2.options[18].value="tobacco";
						document.birthform.rowby2.options[19].text="Gestational Age";
						document.birthform.rowby2.options[19].value="gestation";
						document.birthform.rowby2.options[20].text="Prenatal Visits";
						document.birthform.rowby2.options[20].value="visits";
						document.birthform.rowby2.options[21].text="Method of Delivery";
						document.birthform.rowby2.options[21].value="method";
						document.birthform.rowby2.options[22].text="Birth Interval <18";
						document.birthform.rowby2.options[22].value="spacing18";
						document.birthform.rowby2.options[23].text="Birth Interval <24";
						document.birthform.rowby2.options[23].value="spacing24";
						
						document.birthform.rowby3.options.length=0;
						document.birthform.rowby3.options.length=24;
						document.birthform.rowby3.options[0].text="None";
						document.birthform.rowby3.options[0].value="";
						document.birthform.rowby3.options[1].text="Child's Gender";
						document.birthform.rowby3.options[1].value="birth_gender";
						document.birthform.rowby3.options[2].text="Child's Weight";
						document.birthform.rowby3.options[2].value="birth_weight";
						document.birthform.rowby3.options[3].text="Mother's Race (Disabled)";
						document.birthform.rowby3.options[3].value="";
						document.birthform.rowby3.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby3.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby3.options[5].text="Mother's Marital Status";
						document.birthform.rowby3.options[5].value="mothers_marital_status";
						document.birthform.rowby3.options[6].text="Mother's Age";
						document.birthform.rowby3.options[6].value="mothers_age";
						document.birthform.rowby3.options[7].text="Mother's Education";
						document.birthform.rowby3.options[7].value="mothers_education";
						document.birthform.rowby3.options[8].text="Prenatal Care";
						document.birthform.rowby3.options[8].value="prenatal_care";
						document.birthform.rowby3.options[9].text="Adequate Care";
						document.birthform.rowby3.options[9].value="adequacy";
						document.birthform.rowby3.options[10].text="Plurality";
						document.birthform.rowby3.options[10].value="plurality";
						document.birthform.rowby3.options[11].text="Previous Live Births";
						document.birthform.rowby3.options[11].value="previous_births";
						document.birthform.rowby3.options[12].text="Hosp/Inst";
						document.birthform.rowby3.options[12].value="hospital_institution";	
						document.birthform.rowby3.options[13].text="County (Residence)";
						document.birthform.rowby3.options[13].value="county_of_residence";
						document.birthform.rowby3.options[14].text="County (Occurance)";
						document.birthform.rowby3.options[14].value="county_of_birth";
						document.birthform.rowby3.options[15].text="Planning District";
						document.birthform.rowby3.options[15].value="planning_district";		
						document.birthform.rowby3.options[16].text="Region";
						document.birthform.rowby3.options[16].value="region";
						/*document.birthform.rowby3.options[17].text="City (Residence)";
						document.birthform.rowby3.options[17].value="city_of_residence";
						document.birthform.rowby3.options[18].text="Zip Code";
						document.birthform.rowby3.options[18].value="address_zip";
						document.birthform.rowby3.options[19].text="Alcohol Use";
						document.birthform.rowby3.options[19].value="alcohol";
						document.birthform.rowby3.options[20].text="Tobacco Use";
						document.birthform.rowby3.options[20].value="tobacco";
						document.birthform.rowby3.options[21].text="Gestational Age";
						document.birthform.rowby3.options[21].value="gestation";
						document.birthform.rowby3.options[22].text="Prenatal Visits";
						document.birthform.rowby3.options[22].value="prenatal_visits";
						document.birthform.rowby3.options[23].text="Method of Delivery";
						document.birthform.rowby3.options[23].value="method";
						document.birthform.rowby3.options[24].text="Birth Interval <18";
						document.birthform.rowby3.options[24].value="spacing18";
						document.birthform.rowby3.options[25].text="Birth Interval <24";
						document.birthform.rowby3.options[25].value="spacing24";*/
						document.birthform.rowby3.options[17].text="Alcohol Use";
						document.birthform.rowby3.options[17].value="alcohol";
						document.birthform.rowby3.options[18].text="Tobacco Use";
						document.birthform.rowby3.options[18].value="tobacco";
						document.birthform.rowby3.options[19].text="Gestational Age";
						document.birthform.rowby3.options[19].value="gestation";
						document.birthform.rowby3.options[20].text="Prenatal Visits";
						document.birthform.rowby3.options[20].value="visits";
						document.birthform.rowby3.options[21].text="Method of Delivery";
						document.birthform.rowby3.options[21].value="method";
						document.birthform.rowby3.options[22].text="Birth Interval <18";
						document.birthform.rowby3.options[22].value="spacing18";
						document.birthform.rowby3.options[23].text="Birth Interval <24";
						document.birthform.rowby3.options[23].value="spacing24";
						}
						else if (document.birthform.pagetype.value=="birthform2")
						{
							
						document.birthform.rowby1.options.length=0;
						document.birthform.rowby1.options.length=25;
						document.birthform.rowby1.options[0].text="None";
						document.birthform.rowby1.options[0].value="None";
						document.birthform.rowby1.options[1].text="Child's Gender";
						document.birthform.rowby1.options[1].value="birth_gender";
						document.birthform.rowby1.options[2].text="Child's Weight";
						document.birthform.rowby1.options[2].value="birth_weight";
						document.birthform.rowby1.options[3].text="Mother's Race (Disabled)";
						document.birthform.rowby1.options[3].value="None";
						document.birthform.rowby1.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby1.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby1.options[5].text="Mother's Marital Status";
						document.birthform.rowby1.options[5].value="mothers_marital_status";
						document.birthform.rowby1.options[6].text="Mother's Age";
						document.birthform.rowby1.options[6].value="mothers_age";
						document.birthform.rowby1.options[7].text="Mother's Education";
						document.birthform.rowby1.options[7].value="mothers_education";
						document.birthform.rowby1.options[8].text="Prenatal Care";
						document.birthform.rowby1.options[8].value="prenatal_care";
						document.birthform.rowby1.options[9].text="Adequate Care";
						document.birthform.rowby1.options[9].value="adequacy";
						document.birthform.rowby1.options[10].text="Plurality";
						document.birthform.rowby1.options[10].value="plurality";
						document.birthform.rowby1.options[11].text="Previous Live Births";
						document.birthform.rowby1.options[11].value="previous_births";
						document.birthform.rowby1.options[12].text="Hosp/Inst";
						document.birthform.rowby1.options[12].value="hospital_institution";	
						document.birthform.rowby1.options[13].text="County (Residence)";
						document.birthform.rowby1.options[13].value="county_of_residence";
						//document.birthform.rowby1.options[13].selected=true;
						document.birthform.rowby1.options[14].text="County (Occurance)";
						document.birthform.rowby1.options[14].value="county_of_birth";
						document.birthform.rowby1.options[15].text="Planning District";
						document.birthform.rowby1.options[15].value="planning_district";		
						document.birthform.rowby1.options[16].text="Region";
						document.birthform.rowby1.options[16].value="region";
						/*document.birthform.rowby1.options[17].text="City (Residence)";
						document.birthform.rowby1.options[17].value="city_of_residence";
						document.birthform.rowby1.options[18].text="Zip Code";
						document.birthform.rowby1.options[18].value="address_zip";
						document.birthform.rowby1.options[19].text="Year";
						document.birthform.rowby1.options[19].value="year";
						document.birthform.rowby1.options[20].text="Alcohol Use";
						document.birthform.rowby1.options[20].value="alcohol";
						document.birthform.rowby1.options[21].text="Tobacco Use";
						document.birthform.rowby1.options[21].value="tobacco";
						document.birthform.rowby1.options[22].text="Gestational Age";
						document.birthform.rowby1.options[22].value="gestation";
						document.birthform.rowby1.options[23].text="Prenatal Visits";
						document.birthform.rowby1.options[23].value="prenatal_visits";
						document.birthform.rowby1.options[24].text="Method of Delivery";
						document.birthform.rowby1.options[24].value="method";
						document.birthform.rowby1.options[25].text="Birth Interval <18";
						document.birthform.rowby1.options[25].value="spacing18";
						document.birthform.rowby1.options[26].text="Birth Interval <24";
						document.birthform.rowby1.options[26].value="spacing24";*/
						document.birthform.rowby1.options[17].text="Year";
						document.birthform.rowby1.options[17].value="year";
						document.birthform.rowby1.options[18].text="Alcohol Use";
						document.birthform.rowby1.options[18].value="alcohol";
						document.birthform.rowby1.options[19].text="Tobacco Use";
						document.birthform.rowby1.options[19].value="tobacco";
						document.birthform.rowby1.options[20].text="Gestational Age";
						document.birthform.rowby1.options[20].value="gestation";
						document.birthform.rowby1.options[21].text="Prenatal Visits";
						document.birthform.rowby1.options[21].value="visits";
						document.birthform.rowby1.options[22].text="Method of Delivery";
						document.birthform.rowby1.options[22].value="method";
						document.birthform.rowby1.options[23].text="Birth Interval <18";
						document.birthform.rowby1.options[23].value="spacing18";
						document.birthform.rowby1.options[24].text="Birth Interval <24";
						document.birthform.rowby1.options[24].value="spacing24";
						
						document.birthform.rowby2.options.length=0;				
						document.birthform.rowby2.options.length=23;
						document.birthform.rowby2.options[0].text="None";
						document.birthform.rowby2.options[0].value="";
						document.birthform.rowby2.options[1].text="Child's Gender";
						document.birthform.rowby2.options[1].value="birth_gender";
						document.birthform.rowby2.options[2].text="Child's Weight";
						document.birthform.rowby2.options[2].value="birth_weight";
						document.birthform.rowby2.options[3].text="Mother's Race (Disabled)";
						document.birthform.rowby2.options[3].value="";
						document.birthform.rowby2.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby2.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby2.options[5].text="Mother's Marital Status";
						document.birthform.rowby2.options[5].value="mothers_marital_status";
						document.birthform.rowby2.options[6].text="Mother's Age";
						document.birthform.rowby2.options[6].value="mothers_age";
						document.birthform.rowby2.options[7].text="Mother's Education";
						document.birthform.rowby2.options[7].value="mothers_education";
						document.birthform.rowby2.options[8].text="Prenatal Care";
						document.birthform.rowby2.options[8].value="prenatal_care";
						document.birthform.rowby2.options[9].text="Adequate Care";
						document.birthform.rowby2.options[9].value="adequacy";
						document.birthform.rowby2.options[10].text="Plurality";
						document.birthform.rowby2.options[10].value="plurality";
						document.birthform.rowby2.options[11].text="Previous Live Births";
						document.birthform.rowby2.options[11].value="previous_births";
						document.birthform.rowby2.options[12].text="Hosp/Inst";
						document.birthform.rowby2.options[12].value="hospital_institution";	
						/*document.birthform.rowby2.options[13].text="County (Residence)";
						document.birthform.rowby2.options[13].value="county_of_residence";
						document.birthform.rowby2.options[14].text="County (Occurance)";
						document.birthform.rowby2.options[14].value="county_of_birth";*/
						document.birthform.rowby2.options[13].text="Planning District";
						document.birthform.rowby2.options[13].value="planning_district";		
						document.birthform.rowby2.options[14].text="Region";
						document.birthform.rowby2.options[14].value="region";
						/*document.birthform.rowby2.options[17].text="City (Residence)";
						document.birthform.rowby2.options[17].value="city_of_residence";
						document.birthform.rowby2.options[18].text="Zip Code";
						document.birthform.rowby2.options[18].value="address_zip";
						document.birthform.rowby2.options[19].text="Year";
						document.birthform.rowby2.options[19].value="year";
						document.birthform.rowby2.options[20].text="Alcohol Use";
						document.birthform.rowby2.options[20].value="alcohol";
						document.birthform.rowby2.options[21].text="Tobacco Use";
						document.birthform.rowby2.options[21].value="tobacco";
						document.birthform.rowby2.options[22].text="Gestational Age";
						document.birthform.rowby2.options[22].value="gestation";
						document.birthform.rowby2.options[23].text="Prenatal Visits";
						document.birthform.rowby2.options[23].value="prenatal_visits";
						document.birthform.rowby2.options[24].text="Method of Delivery";
						document.birthform.rowby2.options[24].value="method";
						document.birthform.rowby2.options[25].text="Birth Interval <18";
						document.birthform.rowby2.options[25].value="spacing18";
						document.birthform.rowby2.options[26].text="Birth Interval <24";
						document.birthform.rowby2.options[26].value="spacing24";*/
						document.birthform.rowby2.options[15].text="Year";
						document.birthform.rowby2.options[15].value="year";
						document.birthform.rowby2.options[16].text="Alcohol Use";
						document.birthform.rowby2.options[16].value="alcohol";
						document.birthform.rowby2.options[17].text="Tobacco Use";
						document.birthform.rowby2.options[17].value="tobacco";
						document.birthform.rowby2.options[18].text="Gestational Age";
						document.birthform.rowby2.options[18].value="gestation";
						document.birthform.rowby2.options[19].text="Prenatal Visits";
						document.birthform.rowby2.options[19].value="visits";
						document.birthform.rowby2.options[20].text="Method of Delivery";
						document.birthform.rowby2.options[20].value="method";
						document.birthform.rowby2.options[21].text="Birth Interval <18";
						document.birthform.rowby2.options[21].value="spacing18";
						document.birthform.rowby2.options[22].text="Birth Interval <24";
						document.birthform.rowby2.options[22].value="spacing24";
						
						document.birthform.rowby3.options.length=0;
						document.birthform.rowby3.options.length=26;
						document.birthform.rowby3.options[0].text="None";
						document.birthform.rowby3.options[0].value="";
						document.birthform.rowby3.options[1].text="Child's Gender";
						document.birthform.rowby3.options[1].value="birth_gender";
						document.birthform.rowby3.options[2].text="Child's Weight";
						document.birthform.rowby3.options[2].value="birth_weight";
						document.birthform.rowby3.options[3].text="Mother's Race (Disabled)";
						document.birthform.rowby3.options[3].value="";
						document.birthform.rowby3.options[4].text="Mother's Hispanic Orgin";
						document.birthform.rowby3.options[4].value="mothers_hispanic_origin";
						document.birthform.rowby3.options[5].text="Mother's Marital Status";
						document.birthform.rowby3.options[5].value="mothers_marital_status";
						document.birthform.rowby3.options[6].text="Mother's Age";
						document.birthform.rowby3.options[6].value="mothers_age";
						document.birthform.rowby3.options[7].text="Mother's Education";
						document.birthform.rowby3.options[7].value="mothers_education";
						document.birthform.rowby3.options[8].text="Prenatal Care";
						document.birthform.rowby3.options[8].value="prenatal_care";
						document.birthform.rowby3.options[9].text="Adequate Care";
						document.birthform.rowby3.options[9].value="adequacy";
						document.birthform.rowby3.options[10].text="Plurality";
						document.birthform.rowby3.options[10].value="plurality";
						document.birthform.rowby3.options[11].text="Previous Live Births";
						document.birthform.rowby3.options[11].value="previous_births";
						document.birthform.rowby3.options[12].text="Hosp/Inst";
						document.birthform.rowby3.options[12].value="hospital_institution";	
						document.birthform.rowby3.options[13].text="County (Residence)";
						document.birthform.rowby3.options[13].value="county_of_residence";
						document.birthform.rowby3.options[14].text="County (Occurance)";
						document.birthform.rowby3.options[14].value="county_of_birth";
						document.birthform.rowby3.options[15].text="Planning District";
						document.birthform.rowby3.options[15].value="planning_district";		
						document.birthform.rowby3.options[16].text="Region";
						document.birthform.rowby3.options[16].value="region";
						document.birthform.rowby3.options[17].text="City (Residence)";
						document.birthform.rowby3.options[17].value="city_of_residence";
						document.birthform.rowby3.options[18].text="Zip Code";
						document.birthform.rowby3.options[18].value="address_zip";
						document.birthform.rowby3.options[19].text="Alcohol Use";
						document.birthform.rowby3.options[19].value="alcohol";
						document.birthform.rowby3.options[20].text="Tobacco Use";
						document.birthform.rowby3.options[20].value="tobacco";
						document.birthform.rowby3.options[21].text="Gestational Age";
						document.birthform.rowby3.options[21].value="gestation";
						document.birthform.rowby3.options[22].text="Prenatal Visits";
						document.birthform.rowby3.options[22].value="visits";
						document.birthform.rowby3.options[23].text="Method of Delivery";
						document.birthform.rowby3.options[23].value="method";
						document.birthform.rowby3.options[24].text="Birth Interval <18";
						document.birthform.rowby3.options[24].value="spacing18";
						document.birthform.rowby3.options[25].text="Birth Interval <24";
						document.birthform.rowby3.options[25].value="spacing24";
						
						
						}
						
						
						

						
				 } 
}

function spacing()
{
				 var spacing= document.birthform.sp.value;
				 
				 if( spacing == 18 )
				 {
				 		document.getElementById('sp18').style.display = 'block';
						document.getElementById('sp24').style.display = 'none';
						selectClear(document.birthform.spacing24);
				 }
				 else if ( spacing == 24 )
				 {
				 		document.getElementById('sp24').style.display = 'block';
						document.getElementById('sp18').style.display = 'none';
						selectClear(document.birthform.spacing18);
				 	
				 }	
}

function motherRace()
{
 				 var startyear= document.birthform.startyear.value;
				 var endyear=document.birthform.endyear.value;
				 if (startyear< 1990 && endyear<1990)
				 {
						document.getElementById('race75_89').style.display = 'block';
						document.getElementById('race90up').style.display = 'none';
						document.getElementById('motherrace').disabled= false;
						selectClear(document.birthform.motherrace);
				 }
				 else if (startyear>= 1990 && endyear>=1990)
				 {
						document.getElementById('race75_89').style.display = 'none';
						document.getElementById('race90up').style.display = 'block';
						document.getElementById('motherrace').disabled= false;
						selectClear(document.birthform.motherraceLess);
				 }
				 else if (startyear< 1990 && endyear>=1990)
				 {
						document.getElementById('race75_89').style.display = 'none';
						document.getElementById('race90up').style.display = 'block';
						document.getElementById('motherrace').disabled= true;
						selectClear(document.birthform.motherrace);
						selectClear(document.birthform.motherraceLess);		
				 } 
}
function race_msg()
{
				 var startyear= document.birthform.startyear.value;
				 var endyear=document.birthform.endyear.value;
				 if (startyear< 1990 && endyear>=1990)
				 {
						alert("The Race is disabled because of the selected Time Span");	
				 } 
	
	
}
function addBirthRateToSort()
{
         var sortSelect = document.birthform.sorting;
         sortLength=document.birthform.sorting.length;
				 var check = 0;
								 var deleteOption = -1;
                 for (var i=0; i < sortLength ; i++)
                 {
                          if ( sortSelect.options[i].value == "sortBirthRate" )
													{
                             check = 1;
														 deleteOption = i;
													}
                 }
         if ( document.birthform.birthrates.checked == true )
         {
				 				 if (check == 0)
                 sortSelect.options[sortLength]=new Option("Birth Rates","sortBirthRate");
                 if ( document.birthform.sorting.size != 1)
                         document.birthform.sorting.size = 1;
         }
         else if ( document.birthform.birthrates.checked == false )
         {
                 if (check == 1)
                 		sortSelect.options[deleteOption] = null;
                 document.birthform.sorting.size = 0;
         }
}

function addAdditionalRateToSort()
{
         var sortSelect = document.birthform.sorting;
         sortLength=document.birthform.sorting.length;
         var additionalRate = document.birthform.rates;
         var additionalRateValue = additionalRate.options[additionalRate.selectedIndex].value;
				 var fertAlreadyExist = "false";
				 var specAlreadyExist = "false";
				 
         if ( additionalRateValue == "fertility_rates" )
         {
                 for (var i=0; i < sortLength ; i++)
                 {
                          if ( sortSelect.options[i].value == "fertRates" )
                          {
                                  fertAlreadyExist = "true";
                          }
                }
                if ( fertAlreadyExist == "false" )
                {
                          sortSelect.options[sortLength]=new Option("Fertility Rates","sortFertRates");
                          if ( document.birthform.sorting.size != 1)
                                  document.birthform.sorting.size = 1;
                }
								
								
								var deleteOption = -1;
								var check = 0;
                for (var i=0; i < sortLength ; i++)
                {
                          if ( sortSelect.options[i].value == "sortSpecRates" )
													{
													 	 check = 1;
                             deleteOption = i;
													}
                }
								if (check == 1)
                 		sortSelect.options[deleteOption] = null;
                document.birthform.sorting.size = 0;

         }
				 else if ( additionalRateValue == "specific_rates" )
         {
                 for (var i=0; i < sortLength ; i++)
                 {
                          if ( sortSelect.options[i].value == "specRates" )
                          {
                                  specAlreadyExist = "true";
                          }
                }
                if ( specAlreadyExist == "false" )
                {
                          sortSelect.options[sortLength]=new Option("Specific Rates","sortSpecRates");
                          if ( document.birthform.sorting.size != 1)
                                  document.birthform.sorting.size = 1;
                }
								
								var deleteOption = -1;
								var check = 0;
                for (var i=0; i < sortLength ; i++)
                {
                          if ( sortSelect.options[i].value == "sortFertRates" )
													{
													 	 check = 1;
                             deleteOption = i;
													}
                }
								if (check == 1)
                 		sortSelect.options[deleteOption] = null;
                document.birthform.sorting.size = 0;

         }
         else if ( additionalRateValue == "None" )
         {
                 var deleteOption = -1;
								 var check = 0;
                 for (var i=0; i < sortLength ; i++)
                 {
                          if ( sortSelect.options[i].value == "sortFertRates" || sortSelect.options[i].value == "sortSpecRates")
													{
													 	 check = 1;
                             deleteOption = i;
													}
                 }
								 if (check == 1)
                 		sortSelect.options[deleteOption] = null;
                 document.birthform.sorting.size = 0;
         }
}

function addPercentBirthToSort()
{
				 var sortSelect = document.birthform.sorting;
         var sortLength=document.birthform.sorting.length;
				 var check = 0;
								 var deleteOption = -1;
                 for (var i=0; i < sortLength ; i++)
                 {
                          if ( sortSelect.options[i].value == "sortPercent" )
													{
                             check = 1;
														 deleteOption = i;
													}
                 }
         if ( document.birthform.percentbirth.checked == true )
         {
                 if (check == 0)
								 		sortSelect.options[sortLength]=new Option("Percent","sortPercent");
                 if ( document.birthform.sorting.size != 1)
                         document.birthform.sorting.size = 1;
         }
         else if ( document.birthform.percentbirth.checked == false )
         {			 
								 if (check == 1)
                 		sortSelect.options[deleteOption] = null;
                 document.birthform.sorting.size = 0;
         }
}


function sort()
{       
        var sortSelect = document.birthform.sorting;
        var sortSelectValue = sortSelect.options[sortSelect.selectedIndex].value;
        if (sortSelectValue != "None" )
        {
                document.birthform.sortingOrder[0].disabled= false;
                document.birthform.sortingOrder[1].disabled= false;
        }
        else
        {
                document.birthform.sortingOrder[0].disabled= true;
                document.birthform.sortingOrder[1].disabled= true;

        }
}

function nosort()
{
 				 var level2 = document.birthform.rowby2;
				 var level2Value = level2.options[level2.selectedIndex].value;
				 var level3 = document.birthform.rowby3;
				 var level3Value = level3.options[level3.selectedIndex].value;
				 
				
         document.birthform.sorting.selectedIndex=0; /*select none*/
				 sort();
				 
				 /*next 2 lines of code is for firfox*/
				  if (level2Value=="None") level2Value="";
				 if (level3Value=="None") level3Value="";
				 
				 if(level2Value != "" || level3Value != "")
				 {
				 		  document.birthform.sorting.disabled = true;
							document.getElementById('nosorting').style.display ='block';
				 }
				 else if(level2Value == "" && level3Value == "")
				 {
				 			document.birthform.sorting.disabled = false;
							document.getElementById('nosorting').style.display = 'none'
				 } 
}

function stateChecked()
{
	if (document.birthform.allstate.checked == true)
	{
		selectClear(document.birthform.county);
		selectClear(document.birthform.city);
	}
	if ((document.birthform.rowby1.selectedIndex >= 13)||
		 (document.birthform.rowby2.selectedIndex >= 13)||
		 (document.birthform.rowby3.selectedIndex >= 13))
	{
		document.birthform.graphics.options.length=1;
		document.birthform.graphics.options[0].text="Not Available";
		document.birthform.graphics.options[0].value="None";
		document.birthform.graphics.selectedIndex=0;
	}
	else
	{
		document.birthform.graphics.options.length=3;
		document.birthform.graphics.options[0].text="None";
		document.birthform.graphics.options[0].value="None";
		document.birthform.graphics.options[1].text="3-D Interactive";
		document.birthform.graphics.options[1].value="Java";
		document.birthform.graphics.options[2].text="Static GIF";
		document.birthform.graphics.options[2].value="GIF";
	}
}

function tabStateChecked()
{
	if (document.birthform.allstate.checked == true)
	{
		selectClear(document.birthform.county);
		selectClear(document.birthform.city);
	}
	
}

function clickCounty()
{
	selectClear(document.birthform.city);
	if (document.birthform.allstate.checked == true)
	{
		alert('You have requested a records search for the entire state.  '
		+ 'Any county selections you make will be ignored.  '
		+ 'If you wish to select only individual counties, please deselect '
		+ '"Entire State" and continue.');

		stateChecked();
	}
}

function clickcity()
{
	selectClear(document.birthform.county);
	if (document.birthform.allstate.checked == true)
	{
		alert('You have requested a records search for the entire state.  '
		+ 'Any city selections you make will be ignored.  '
		+ 'If you wish to select only individual cities, please deselect '
		+ '"Entire State" and continue.');

		stateChecked();
	}
}



function selectClear(selectBox)
{
	selectBox.selectedIndex = -1;
}

function changeRowBy()
{
	if (document.birthform.rowby.selectedIndex != 0)
		document.birthform.colby.options[0].text = "None -- Generate % Births";
	else
		document.birthform.colby.options[0].text = "None";

}
function birthRateStatus()
{
 				 
	if ((document.birthform.city.selectedIndex >= 0) ||

	    (document.birthform.rowby1.value == "county_of_birth") ||
	    (document.birthform.rowby1.value == "city_of_residence") ||
	    (document.birthform.rowby1.value == "address_zip") ||
			(document.birthform.rowby2.value == "county_of_birth") ||
	    (document.birthform.rowby2.value == "city_of_residence") ||
	    (document.birthform.rowby2.value == "address_zip") ||
			(document.birthform.rowby3.value == "county_of_birth") ||
	    (document.birthform.rowby3.value == "city_of_residence") ||
	    (document.birthform.rowby3.value == "address_zip") ||

	    (document.birthform.childgender.selectedIndex >= 0) ||

	    (document.birthform.birthweight.selectedIndex >= 0) ||

	    (document.birthform.mothermarital.selectedIndex >= 0) ||

	    (document.birthform.mothereducation.selectedIndex >= 0) ||

	    (document.birthform.motherprenatalcare.selectedIndex >= 0) ||

	    (document.birthform.motherplurality.selectedIndex >=0 ) ||

	    (document.birthform.motherprevious.selectedIndex >=0 ) ||
	    
	    (document.birthform.alcohol.selectedIndex >=0 ) ||
	    
	    (document.birthform.tobacco.selectedIndex >=0 ) ||
	    
	    (document.birthform.gestation.selectedIndex >=0 ) ||
	    
	    (document.birthform.prenatalcarevisits.selectedIndex >=0 ) ||
	    
	    (document.birthform.methods.selectedIndex >=0 ) ||
	    
	    (document.birthform.spacing18.selectedIndex >=0 ) ||
	    
	    (document.birthform.spacing24.selectedIndex >=0 ) ||

	    (document.birthform.rowby1.value == "previous_births") ||
			(document.birthform.rowby2.value == "previous_births") ||
	    (document.birthform.rowby3.value == "previous_births") ||
			
			

	(((document.birthform.rowby1.selectedIndex != 0) &&
	(document.birthform.rowby1.value != "mothers_race") &&
	(document.birthform.rowby1.value != "mothers_hispanic_origin") &&
	(document.birthform.rowby1.value != "mothers_age")&&
	(document.birthform.rowby1.value != "county_of_residence")&&
	(document.birthform.rowby1.value != "planning_district")&&
	(document.birthform.rowby1.value != "region"))||
	((document.birthform.rowby2.selectedIndex != 0) &&
	(document.birthform.rowby2.value != "mothers_race") &&
	(document.birthform.rowby2.value != "mothers_hispanic_origin") &&
	(document.birthform.rowby2.value != "mothers_age")&&
	(document.birthform.rowby2.value != "county_of_residence")&&
	(document.birthform.rowby2.value != "planning_district")&&
	(document.birthform.rowby2.value != "region"))||
	((document.birthform.rowby3.selectedIndex != 0) &&
	(document.birthform.rowby3.value != "mothers_race") &&
	(document.birthform.rowby3.value != "mothers_hispanic_origin") &&
	(document.birthform.rowby3.value != "mothers_age")&&
	(document.birthform.rowby3.value != "county_of_residence")&&
	(document.birthform.rowby3.value != "planning_district")&&
	(document.birthform.rowby3.value != "region"))||
	((document.birthform.rowby1.value == "mothers_race") &&
	(document.birthform.rowby2.value == "mothers_hispanic_origin")) ||
	((document.birthform.rowby2.value == "mothers_race") &&
	(document.birthform.rowby1.value == "mothers_hispanic_origin")) ||
	((document.birthform.rowby1.value == "mothers_race") &&
	(document.birthform.rowby3.value == "mothers_hispanic_origin")) ||
	((document.birthform.rowby3.value == "mothers_race") &&
	(document.birthform.rowby1.value == "mothers_hispanic_origin")) ||
	((document.birthform.rowby2.value == "mothers_race") &&
	(document.birthform.rowby3.value == "mothers_hispanic_origin")) ||
	((document.birthform.rowby2.value == "mothers_hispanic_origin") &&
	(document.birthform.rowby3.value == "mothers_race")))) 
	    
	{
		document.birthform.birthrates.checked = false;
		document.birthform.birthrates.disabled = true;
		document.birthform.rates.options.length=1;
		document.birthform.rates.options[0].text="Not Available";
		document.birthform.rates.options[0].value="None";
		document.birthform.rates.options.length=1;
		document.birthform.rates.selectedIndex = 0;
	}
	else
	{
		{document.birthform.birthrates.disabled = false;}
			if ((document.birthform.rowby1.selectedIndex !=0 &&
			document.birthform.rowby1.value != "county_of_residence" &&
			document.birthform.rowby1.value != "region" &&
			document.birthform.rowby1.value != "planning_district") ||
			((document.birthform.rowby2.selectedIndex >0) && 
			(document.birthform.rowby2.selectedIndex <13))||
			(document.birthform.motherage.selectedIndex >= 0))
			{
				document.birthform.rates.options.length=2;
				document.birthform.rates.options[0].text="None";
				document.birthform.rates.options[0].value="None";
				document.birthform.rates.options[1].text="Specific Rates";
				document.birthform.rates.options[1].value="specific_rates";

				if ((document.birthform.rowby1.selectedIndex ==3) ||
				(document.birthform.rowby1.selectedIndex ==4))
				{
					document.birthform.rates.options.length=3;
					document.birthform.rates.options[0].text="None";
					document.birthform.rates.options[0].value="None";
					document.birthform.rates.options[1].text="fertility Rates";
					document.birthform.rates.options[1].value="fertility_rates";
					document.birthform.rates.options[2].text="Specific Rates";
					document.birthform.rates.options[2].value="specific_rates";
				}
			}
			else if((document.birthform.motherrace.selectedIndex >= 0) ||
	      (document.birthform.motherraceLess.selectedIndex >= 0) ||
	      (document.birthform.motherhispanic.selectedIndex >= 0))
	    {
	    		document.birthform.rates.options.length=3;
					document.birthform.rates.options[0].text="None";
					document.birthform.rates.options[0].value="None";
					document.birthform.rates.options[1].text="fertility Rates";
					document.birthform.rates.options[1].value="fertility_rates";
					document.birthform.rates.options[2].text="Specific Rates";
					document.birthform.rates.options[2].value="specific_rates";	
			}
			else
			{
				document.birthform.rates.options.length=2;
				document.birthform.rates.options[0].text="None";
				document.birthform.rates.options[0].value="None";
				document.birthform.rates.options[1].text="fertility Rates";
				document.birthform.rates.options[1].value="fertility_rates";
			}
	}

	if ((document.birthform.rowby3.selectedIndex > 0 ) ||
	   (document.birthform.rowby2.selectedIndex > 0 && (document.birthform.rowby1.selectedIndex < 13
	   || document.birthform.rowby1.selectedIndex > 17))||
	   (document.birthform.rowby1.selectedIndex == 0)||
	   ((document.birthform.rowby1.selectedIndex >=13 && document.birthform.rowby1.selectedIndex <= 17 )&&
	    (document.birthform.rowby2.selectedIndex == 0 ||
		  (document.birthform.rowby2.selectedIndex >= 13 && document.birthform.rowby2.selectedIndex <= 17)) ))
	{
		document.birthform.percentbirth.checked = false;
		document.birthform.percentbirth.disabled = true;
	}
	else
	{
		document.birthform.percentbirth.disabled = false;
	}

}  

function checkBirthForm()
{
	var counties = "";
	var cities = "";
	var genders = "";
	var weights = "";
	var mom_races = "";
	var hispanics = "";
	var mom_marital ="";
	var mom_ages = "";
	var mom_education = "";
	var prenatals = "";
	var pluralities = "";
	var previousbths = "";
	var alcohol="";
	var tobacco="";
	var prenatalcarevisits="";
	var gestation="";
	var method_="";
	var spacing="";
	
	var startyear = document.birthform.startyear.value;
	var endyear = document.birthform.endyear.value;
	
	if (startyear< 1990 && endyear>=1990 
	&& (document.birthform.rowby1.value=="mothers_race" || document.birthform.rowby2.value=="mothers_race"
	||document.birthform.rowby3.value=="mothers_race"))
	{
		alert("Due to coding changes for decendent's race," +
					" queries cannot include 1989 and 1990");
		document.mother_race.startyear.focus();
		return false;
	}
	

	
	if (document.birthform.site.value == "internal")
	{
		if ((document.birthform.county.selectedIndex < 0) &&
		   (document.birthform.city.selectedIndex < 0) &&
		   (document.birthform.allstate.checked == false))
		{
			alert('At least one county or city must be selected or the  "Entire State" must be checked.  ' +
			      'Please correct and resubmit.');
			document.birthform.allstate.focus();
			return false;
		}
	}
	else if ((document.birthform.county.selectedIndex < 0) &&
	   (document.birthform.allstate.checked == false))
	{
		alert('At least one county must be selected or the  "Entire State" must be checked.  ' +
		      'Please correct and resubmit.');
		document.birthform.county.focus();
		return false;
	}

	if (document.birthform.startyear.selectedIndex > document.birthform.endyear.selectedIndex)
	{
		alert('Start year should be before or the same as the end year.  ' +
		      'Please correct and resubmit.');
		document.birthform.startyear.focus();
		return false;
	}
	
	if ((document.birthform.rowby2.selectedIndex > 0) && 
	    (document.birthform.rowby2.selectedIndex == document.birthform.rowby3.selectedIndex))
	{
		alert('The two drilldown levels you have selected are the same.  ' +
		      'Please correct and resubmit.');
		document.birthform.rowby2.focus();
		return false;
	}
	
	if ((document.birthform.rowby2.selectedIndex == 0)  &&
	    (document.birthform.rowby3.selectedIndex > 0))
	{
		alert('To select a "Drill Level 3" value, you must also select a ' +
		      '"Drill Level 2" value.  Please correct and resubmit.');
		document.birthform.rowby2.focus();
		return false;
	}
	
	if (((document.birthform.rowby1.selectedIndex == document.birthform.rowby2.selectedIndex)
		 			&& document.birthform.rowby1.selectedIndex != 0)||
				((document.birthform.rowby1.selectedIndex == document.birthform.rowby3.selectedIndex)
					&& document.birthform.rowby1.selectedIndex != 0)||
	    	((document.birthform.rowby2.selectedIndex == document.birthform.rowby3.selectedIndex)
					&& document.birthform.rowby2.selectedIndex != 0))
		 {
		 		  alert('The drilldown levels you have selected are the same.  ' +
		      			'Please correct and resubmit.');
					document.birthform.rowby2.focus();
					return false;
			}
	
			if ((document.birthform.rowby2.selectedIndex == 0)  &&
	    	 (document.birthform.rowby3.selectedIndex > 0))
			{
			 	 	 alert('To select a "Drill Level 3" value, you must also select a ' +
		             '"Drill Level 2" value.  Please correct and resubmit.');
					 document.birthform.rowby2.focus();
					 return false;
			}
			
			if (document.birthform.pagetype.value!="birthform2" &&((document.birthform.rowby1.selectedIndex == 0)  &&
	    	 (document.birthform.rowby2.selectedIndex > 0)))
			{
			 	 	 alert('To select a "Drill Level 2" value, you must also select a ' +
		             '"Drill Level 1" value.  Please correct and resubmit.');
					 document.birthform.rowby2.focus();
					 return false;
			}
	
	
	if (document.birthform.allstate.checked == true)
	{
		counties = "Entire State (All Counties)";
	}
	else if (document.birthform.county.selectedIndex >= 0)
	{
		for (var i=0; i < document.birthform.county.options.length; i++)
		{
			if (document.birthform.county.options[i].selected == true)
			{
				if (counties.length > 0) counties = counties + ", " + document.birthform.county.options[i].text;
				else counties = counties + document.birthform.county.options[i].text;
			}
		}
	}
	else if (document.birthform.city.selectedIndex >= 0)
	{
		for (var i=0; i < document.birthform.city.options.length; i++)
		{
			if (document.birthform.city.options[i].selected == true)
			{
				if (cities.length > 0) cities = cities + ", " + document.birthform.city.options[i].text;
				else cities = cities + document.birthform.city.options[i].text;
			}
		}
	}
	
	if (document.birthform.childgender.selectedIndex < 0)
	{
		genders = "None";
	}
	else
	{
		genders = document.birthform.childgender.options[document.birthform.childgender.selectedIndex].text;
	}

	if (document.birthform.birthweight.selectedIndex < 0)
	{
		weights = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.birthweight.options.length; i++)
		{
			if (document.birthform.birthweight.options[i].selected == true)
			{
				if (weights.length > 0) weights = weights + ", " + document.birthform.birthweight.options[i].text;
				else weights = weights + document.birthform.birthweight.options[i].text;
			}
		}
	}

	if (document.birthform.motherrace.selectedIndex < 0 && document.birthform.motherraceLess.selectedIndex < 0)
	{
		mom_races = "None";
	}
	else if (document.birthform.motherrace.selectedIndex >= 0 )
	{
		for (var i=0; i < document.birthform.motherrace.options.length; i++)
		{
			if (document.birthform.motherrace.options[i].selected == true)
			{
				if (mom_races.length > 0) mom_races = mom_races + ", " + document.birthform.motherrace.options[i].text;
				else mom_races = mom_races + document.birthform.motherrace.options[i].text;
			}
		}
	}
	else if ( document.birthform.motherraceLess.selectedIndex >= 0)
	{
		for (var i=0; i < document.birthform.motherraceLess.options.length; i++)
		{
			if (document.birthform.motherraceLess.options[i].selected == true)
			{
				if (mom_races.length > 0) mom_races = mom_races + ", " + document.birthform.motherraceLess.options[i].text;
				else mom_races = mom_races + document.birthform.motherraceLess.options[i].text;
			}
		}
	}


	if (document.birthform.motherhispanic.selectedIndex < 0)
	{
		hispanics = "None";
	}
	else
	{
		hispanics = document.birthform.motherhispanic.options[document.birthform.motherhispanic.selectedIndex].text;
	}

	if (document.birthform.mothermarital.selectedIndex < 0)
	{
		mom_marital = "None";
	}
	else
	{
		mom_marital  = document.birthform.mothermarital.options[document.birthform.mothermarital.selectedIndex].text;
	}

	if (document.birthform.motherage.selectedIndex < 0)
	{
		mom_ages = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.motherage.options.length; i++)
		{
			if (document.birthform.motherage.options[i].selected == true)
			{
				if (mom_ages.length > 0) mom_ages = mom_ages + ", " + document.birthform.motherage.options[i].text;
				else mom_ages = mom_ages + document.birthform.motherage.options[i].text;
			}
		}
	}
	
	if (document.birthform.mothereducation.selectedIndex < 0)
	{
		mom_education = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.mothereducation.options.length; i++)
		{
			if (document.birthform.mothereducation.options[i].selected == true)
			{
				if (mom_education.length > 0) mom_education = mom_education + ", " + document.birthform.mothereducation.options[i].text;
				else mom_education = mom_education + document.birthform.mothereducation.options[i].text;
			}
		}
	}
	
	if (document.birthform.motherprenatalcare.selectedIndex < 0)
	{
		prenatals = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.motherprenatalcare.options.length; i++)
		{
			if (document.birthform.motherprenatalcare.options[i].selected == true)
			{
				if (prenatals.length > 0) prenatals = prenatals + ", " + document.birthform.motherprenatalcare.options[i].text;
				else  prenatals = prenatals + document.birthform.motherprenatalcare.options[i].text;
			}
		}
	}

	if (document.birthform.motherplurality.selectedIndex < 0)
	{
		pluralities = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.motherplurality.options.length; i++)
		{
			if (document.birthform.motherplurality.options[i].selected == true)
			{
				if (pluralities.length > 0) pluralities = pluralities + ", " + document.birthform.motherplurality.options[i].text;
				else pluralities = pluralities + document.birthform.motherplurality.options[i].text;
			}
		}
	}

	if (document.birthform.motherprevious.selectedIndex < 0)
	{
		previousbths = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.motherprevious.options.length; i++)
		{
			if (document.birthform.motherprevious.options[i].selected == true)
			{
				if (previousbths.length > 0) previousbths = previousbths + ", " + document.birthform.motherprevious.options[i].text;
				else previousbths = previousbths + document.birthform.motherprevious.options[i].text;
			}
		}
	}
	
		if (document.birthform.alcohol.selectedIndex < 0)
	{
		alcohol = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.alcohol.options.length; i++)
		{
			if (document.birthform.alcohol.options[i].selected == true)
			{
				if (alcohol.length > 0) alcohol = alcohol + ", " + document.birthform.alcohol.options[i].text;
				else alcohol = alcohol + document.birthform.alcohol.options[i].text;
			}
		}
	}
	if (document.birthform.tobacco.selectedIndex < 0)
	{
		tobacco = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.tobacco.options.length; i++)
		{
			if (document.birthform.tobacco.options[i].selected == true)
			{
				if (tobacco.length > 0) tobacco = tobacco + ", " + document.birthform.tobacco.options[i].text;
				else tobacco = tobacco + document.birthform.tobacco.options[i].text;
			}
		}
	}
	
	if (document.birthform.gestation.selectedIndex < 0)
	{
		gestation = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.gestation.options.length; i++)
		{
			if (document.birthform.gestation.options[i].selected == true)
			{
				if (gestation.length > 0) gestation = gestation + ", " + document.birthform.gestation.options[i].text;
				else gestation = gestation + document.birthform.gestation.options[i].text;
			}
		}
	}
	
	if (document.birthform.prenatalcarevisits.selectedIndex < 0)
	{
		prenatalcarevisits = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.prenatalcarevisits.options.length; i++)
		{
			if (document.birthform.prenatalcarevisits.options[i].selected == true)
			{
				if (prenatalcarevisits.length > 0) prenatalcarevisits = prenatalcarevisits + ", " + document.birthform.prenatalcarevisits.options[i].text;
				else prenatalcarevisits = prenatalcarevisits + document.birthform.prenatalcarevisits.options[i].text;
			}
		}
	}
	
	
	if (document.birthform.spacing18.selectedIndex < 0 && document.birthform.spacing24.selectedIndex < 0 )
	{
		spacing = "None";
	}
	else if (document.birthform.spacing18.selectedIndex >=0 )
	{
		for (var i=0; i < document.birthform.spacing18.options.length; i++)
		{
			if (document.birthform.spacing18.options[i].selected == true)
			{
				if (spacing.length > 0) spacing = spacing + ", " + document.birthform.spacing18.options[i].text;
				else spacing = spacing + document.birthform.spacing18.options[i].text;
			}
		}
	}
	else if (document.birthform.spacing24.selectedIndex >=0 )
	{
		for (var i=0; i < document.birthform.spacing24.options.length; i++)
		{
			if (document.birthform.spacing24.options[i].selected == true)
			{
				if (spacing.length > 0) spacing = spacing + ", " + document.birthform.spacing24.options[i].text;
				else spacing = spacing + document.birthform.spacing24.options[i].text;
			}
		}
	}
	
	if (document.birthform.methods.selectedIndex < 0)
	{
		method_ = "None";
	}
	else
	{
		for (var i=0; i < document.birthform.methods.options.length; i++)
		{
			if (document.birthform.methods.options[i].selected == true)
			{
				if (method_.length > 0) method_ = method_ + ", " + document.birthform.methods.options[i].text;
				else method_ = method_ + document.birthform.methods.options[i].text;
			}
		}
	}


	document.birthform.popfile.value = "0";
	if ((document.birthform.birthrates.checked == true) || 
	(document.birthform.rates.selectedIndex != 0))
	{
		if (    (document.birthform.rowby2.selectedIndex == 4) ||
		    (document.birthform.rowby3.selectedIndex == 4))
		{
			document.birthform.popfile.value = "2";
		}
		else document.birthform.popfile.value = "1";
		
	}
	
	
	
	if (document.birthform.pagetype.value=="birthform2" && (document.birthform.rowby2.selectedIndex ==0 || document.birthform.rowby1.selectedIndex ==0))
	{
		
		 if(document.birthform.rowby2.selectedIndex ==0){
			 alert('You must select a ' +
						 '"Column Variable" value.  Please correct and resubmit.');
						 document.birthform.rowby1.focus();
		 }
		 else
		 {
			 alert('You must select a ' +
						 '"Row Variable" value.  Please correct and resubmit.');
						 document.birthform.rowby2.focus();	 
		 }
		 return false;
	}

	document.birthform.countytext.value = counties;
	document.birthform.citytext.value = cities;
	document.birthform.cgendertext.value = genders;
	document.birthform.cweighttext.value = weights;
	document.birthform.mracetext.value = mom_races;
	document.birthform.hispanictext.value = hispanics;
	document.birthform.mmaritaltext.value = mom_marital;
	document.birthform.magetext.value = mom_ages;
	document.birthform.meductext.value = mom_education;
	document.birthform.mprenataltext.value = prenatals;
	document.birthform.mpluralitytext.value = pluralities;
	document.birthform.mprevioustext.value = previousbths;
	document.birthform.alcoholtext.value = alcohol;
	document.birthform.prenatalcarevisitstext.value = prenatalcarevisits;
	document.birthform.tobaccotext.value = tobacco;
	document.birthform.gestationtext.value = gestation;
	document.birthform.methodtext.value = method_;
	document.birthform.spacingtext.value = spacing;
	
	document.birthform.rowby1.disabled = false;
	 
	document.birthform.submit();
}

