function addflight(flight, flightsection)
{
  holder = flight+flightsection;
  document.getElementById(holder).innerHTML = "<table width='810'><tr><td width='10%'></td>"
		+ "    		<td width='15%'><b>Arrival Airline:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"aa' name='aa"+flightsection+"' /></td>"
		+ "    		<td width='15%'><b>Flight Number:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"af' name='af"+flightsection+"' /></td>"
		+ "    		<td width='20%'><b>From:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"ao' name='ao"+flightsection+"' /></td>"
		+ "    		<td width='20%'><b>To:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"ad' name='ad"+flightsection+"' /></td>"
		+ "    		<td width='15%'><b>Arrival Date/Time:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"at' name='at"+flightsection+"' /></td>"
		+ "       <td width='5%'></td>"
		+ "    	</tr>"
		+ "    	<tr><td width='10%'></td>"
		+ "    		<td width='15%'><b>Depart Airline:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"da' name='da"+flightsection+"' /></td>"
		+ "    		<td width='15%'><b>Flight Number:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"df' name='df"+flightsection+"' /></td>"
		+ "    		<td width='20%'><b>From:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"do' name='do"+flightsection+"' /></td>"
		+ "    		<td width='20%'><b>To:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"dd' name='dd"+flightsection+"' /></td>"
		+ "    		<td width='15%'><b>Depart Date/Time:</b><br>"
		+ "    			<input class='regular' type='text' id='"+flight+flightsection+"dt' name='dt"+flightsection+"' /></td>"
		+ "       <td width='5%'></td></tr></table>"
		+ "     <br>";
		
}

function hideflight(flight, flightsection)
{
  holder = flight+flightsection;
  document.getElementById(holder).innerHTML = "<table width='810'><tr><td width='15%'></td>"
      + "<td width='20%'></td>"
      + "<td width='20%'></td>"
      + "<td width='15%'></td>"
      + "<td width='15%'></td>"
      + "<td width='15%'></td></tr></table>";
}

function autogroup(grade, entry)
{
  holder = "groupcd"+entry;
  if (grade == "1" || grade == "2" || grade == "3" || grade == "4" || grade == "5")
  {
    document.getElementById(holder).innerHTML = "<input class='regular' readonly='readonly' size='30' type='text' name='"+holder+"' value = 'Juniors (2nd-5th grade)' />";
  }
  else if (grade == "6" || grade == "7" || grade == "8")
  {
    document.getElementById(holder).innerHTML = "<input class='regular' readonly='readonly' size='30' type='text' name='"+holder+"' value = 'Junior High (6th-8th grade)' />";
  }
  else if (grade == "9" || grade == "10" || grade == "11" || grade == "12")
  {
    document.getElementById(holder).innerHTML = "<input class='regular' readonly='readonly' size='30' type='text' name='"+holder+"' value = 'Youth (9th-12th grade)' />";
  }
  else if (grade == "CF" || grade == "CSo" || grade == "CJ" || grade == "CSr" || grade == "PC")
  {
    document.getElementById(holder).innerHTML = "<input class='regular' readonly='readonly' size='30' type='text' name='"+holder+"' value = 'TAFLabs (College-Professional)' />";
  }
  else if(grade == "P")
  {
    document.getElementById(holder).innerHTML = "<input class='regular' readonly='readonly' size='30' type='text' name='"+holder+"' value = 'Parents (Weekend Only)' />";
  }
  
}

function parentprogram(entry)
{
  holder = "gradeind"+entry;
  document.getElementById(holder).innerHTML = "<select readonly='readonly' class='dropreq' name='<?php echo 'grade$x'; ?>' onchange='autogroup(this.value, '<?php echo $x; ?>');'>"
    + "<option value='1'>1</option>"
    + "<option value='2'>2</option>"
    + "<option value='3'>3</option>"
    + "<option value='4'>4</option>"
    + "<option value='5'>5</option>"
    + "<option value='6'>6</option>"
    + "<option value='7'>7</option>"
    + "<option value='8'>8</option>"
    + "<option value='9'>9</option>"
    + "<option value='10'>10</option>"
    + "<option value='11'>11</option>"
    + "<option value='12'>12</option>"
    + "<option value='CF'>College Freshman</option>"
    + "<option value='CSo'>College Sophomore</option>"
    + "<option value='CJ'>College Junior</option>"
    + "<option value='CSr'>College Senior</option>"
    + "<option value='PC'>Post-College</option>"
    + "<option selected value='P'>Parent</option>"
    + "</select>";
}