function writeBox(aid,prefix) {
	setupMainSettings(aid,prefix);
	
	if(OKToRun(1)) {
	    document.write("<table width=350 cellpadding=0 cellspacing=5 border=0 align=center>");
	    document.write("<form name='quick_booking_tool' action='http://" + agencyPrefix + "/do/flight/ProcessRoundTripSearch?ag=" + agencyID + "' method='POST'>");

//NOT USED
	    document.write("<tr><td colspan='2' id='booking_flight_type'>Flight Type: ");
        document.write("<label id='booking_round_label' class='selected'>Round-Trip:<input type='radio' name='flightType' onclick=\"switchType('flights-roundtrip')\" value='0' id='booking_flights_round' checked></label> ");
        document.write("<label id='booking_oneway_label'>One-Way:<input type='radio' name='flightType' onclick=\"switchType('flights-oneway')\" value='1'></label> ");
        document.write("<label id='booking_multi_label'>Multiple Destination:<input type='radio' name='flightType' onclick=\"switchType('flights-multi')\" value='2'></label>");
        document.write("</td></tr><tr id='booking_titleset_1'><td colspan='2' id='booking_title_1' class='titlebar'>Departing From:</td></tr><tr id='booking_fieldset_1'>");
        document.write("<td></td></tr>");
///////


        document.write("<TR><TD colspan=3><B>FROM:</b><BR><TABLE BORDER=0 WIDTH='100%' CELLSPACING=1 CELLPADDING=0 ><TR><TD BGCOLOR='#FFFFFF'><img src='images/spacer.gif' width='1' height='1' alt=''></TD></TR></TABLE></TD></TR>");
        document.write("<TR><TD class=input>Airport 3 Letter Code:</TD><TD><input type='text' class='airportcodebox' name='origin' accesskey='d' onfocus='void hideCalendar()' onblur=\"replaceLocation('origin')\" autocomplete='off' value='" + defaultSource + "'></label></TD><TD class=input><a href=\"javascript:void codeList('origin')\">Airport Codes</a></td></TR>");
        document.write("<TR><td class=input><label>Departure Date:</TD><TD><input type='text' name='departDate' value='mm/dd/yyyy' class='datebox'></label></TD>");
        document.write("<TD><select name='departTime' onfocus='void hideCalendar()' id='booking_timeofday_1'><option value='anytime'>Entire Day</option><option value='06:00'>Morning</option>");
        document.write("<option value='12:00'>Afternoon</option><option value='18:00'>Evening</option></select></td></tr>");

        document.write("<TR><TD><img src='images/spacer.gif' width='1' height='3' alt=''></TD></TR>");
        document.write("<TR><TD colspan=3><B>TO:</b><BR><TABLE BORDER=0 WIDTH='100%' CELLSPACING=1 CELLPADDING=0 ><TR><TD BGCOLOR='#FFFFFF'><img src='images/spacer.gif' width='1' height='1' alt=''></TD></TR></TABLE></TD></TR>");
        document.write("<TR><TD class=input>Airport 3 Letter Code:</TD><TD><input type='text' class='airportcodebox' name='destination' onfocus='void hideCalendar()' onblur=\"replaceLocation('destination')\" autocomplete='off'></label></TD><TD class=input><a href=\"javascript:void codeList('destination')\">Airport Codes</a></td><TR>");
        document.write("<TR><td  class=input><span id='booking_return_date'><label>Return Date:</TD><TD><input type='text' name='returnDate' value='mm/dd/yyyy' class='datebox'></label></TD>");
        document.write("<TD><select name='departTime' onfocus='void hideCalendar()'><option value='anytime'>Entire Day</option><option value='06:00'>Morning</option>");
        document.write("<option value='12:00'>Afternoon</option><option value='18:00'>Evening</option></select></span></td></tr>");

//NOT USED

        document.write("<tr id='booking_titleset_3' style='display: none'><td colspan='2' id='booking_title_3' class='titlebar'>Flight 1:</td></tr><tr id='booking_fieldset_3' style='display: none'><td>");
        document.write("<label>From:<br><input type='text' class='airportcodebox' name='origins[0]' onfocus='void hideCalendar()' onblur=\"replaceLocation('origins[0]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('origins[0]')\" value='" + defaultSource + "'>Airport Codes</a><br>");
        document.write("<label>To:<br><input type='text' class='airportcodebox' name='dests[0]' onfocus='void hideCalendar()' onblur=\"replaceLocation('dests[0]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('dests[0]')\">Airport Codes</a></td>");
        document.write("<td class='date'><label>Departure Date:<br><input type='text' name='departDates[0]' value='mm/dd/yyyy' class='datebox'></label> ");
        document.write("<select name='departTimes[0]' onfocus='void hideCalendar()'><option value='anytime'>Entire Day</option><option value='06:00'>Morning</option>");
        document.write("<option value='12:00'>Afternoon</option><option value='18:00'>Evening</option></select></td></tr>");
        document.write("<tr id='booking_titleset_4' style='display: none'><td colspan='2' id='booking_title_4' class='titlebar'>Flight 2:</td></tr><tr id='booking_fieldset_4' style='display: none'>");
        document.write("<td><label>From:<br><input type='text' class='airportcodebox' name='origins[1]' onfocus='void hideCalendar()' onblur=\"replaceLocation('origins[1]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('origins[1]')\">Airport Codes</a><br>");
        document.write("<label>To:<br><input type='text' class='airportcodebox' name='dests[1]' onfocus='void hideCalendar()' onblur=\"replaceLocation('dests[1]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('dests[1]')\">Airport Codes</a></td>");
        document.write("<td class='date'><label>Departure Date:<br><input type='text' name='departDates[1]' value='mm/dd/yyyy' class='datebox'></label> ");
        document.write("<select name='departTimes[1]' onfocus='void hideCalendar()'><option value='anytime'>Entire Day</option><option value='06:00'>Morning</option>");
        document.write("<option value='12:00'>Afternoon</option><option value='18:00'>Evening</option></select></td></tr><tr id='booking_titleset_5' style='display: none'>");
        document.write("<td colspan='2' id='booking_title_5' class='titlebar'>Flight 3:</td></tr><tr id='booking_fieldset_5' style='display: none'><td>");
        document.write("<label>From:<br><input type='text' class='airportcodebox' name='origins[2]' onfocus='void hideCalendar()' onblur=\"replaceLocation('origins[2]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('origins[2]')\">Airport Codes</a><br>");
        document.write("<label>To:<br><input type='text' class='airportcodebox' name='dests[2]' onfocus='void hideCalendar()' onblur=\"replaceLocation('dests[2]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('dests[2]')\">Airport Codes</a>");
        document.write("</td><td class='date'><label>Departure Date:<br><input type='text' name='departDates[2]' value='mm/dd/yyyy' class='datebox'></label> ");
        document.write("<select name='departTimes[2]' onfocus='void hideCalendar()'><option value='anytime'>Entire Day</option><option value='06:00'>Morning</option>");
        document.write("<option value='12:00'>Afternoon</option><option value='18:00'>Evening</option></select></td></tr><tr id='booking_titleset_6' style='display: none'>");
        document.write("<td colspan='2' id='booking_title_6' class='titlebar'>Flight 4:</td></tr><tr id='booking_fieldset_6' style='display: none'><td>");
        document.write("<label>From:<br><input type='text' class='airportcodebox' name='origins[3]' onfocus='void hideCalendar()' onblur=\"replaceLocation('origins[3]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('origins[3]')\">Airport Codes</a><br>");
        document.write("<label>To:<br><input type='text' class='airportcodebox' name='dests[3]' onfocus='void hideCalendar()' onblur=\"replaceLocation('dests[3]')\" autocomplete='off'></label> <a href=\"javascript:void codeList('dests[3]')\">Airport Codes</a></td>");
        document.write("<td class='date'><label>Departure Date:<br><input type='text' name='departDates[3]' value='mm/dd/yyyy' class='datebox'></label> ");
        document.write("<select name='departTimes[3]' onfocus='void hideCalendar()'><option value='anytime'>Entire Day</option><option value='06:00'>Morning</option>");
        document.write("<option value='12:00'>Afternoon</option><option value='18:00'>Evening</option></select></td></tr><tr id='booking_optiontitle_1'>");
        document.write("<td colspan='2' class='titlebar' id='booking_options_1_title'>Options:</td></tr>");
        
 /////////////

	//MILITARY
		document.write("<TR><TD colspan=3><table cellpadding=0 cellspacing=5 border=0><tr><td  class=input>Adult Military (ID-Req)</TD><TD><select name='numberOfMilitary' onfocus='void hideCalendar()' onchange='checkForMilitary();checkForChildAlone()'><option value='0'>0</option><option value='1' selected>1</option><option value='2'>2</option>");
        document.write("<option value='3'>3</option><option value='4'>4</option><option value='5'>5</option></select></TD>");
							
	//MILITARY DEPENDENTS
		document.write("<TD  class=input>Dependent/Child</TD><TD><select name='numberOfMilitaryDependents' onfocus='void hideCalendar()'>");
        document.write("<option value='0' selected>0</option><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>");
        document.write("</select></td></tr></table></TD></TR>");

        document.write("<TR><TD colspan=3><TABLE BORDER=0 WIDTH='100%' CELLSPACING=1 CELLPADDING=0 ><TR><TD BGCOLOR='#FFFFFF'><img src='images/spacer.gif' width='1' height='1' alt=''></TD></TR></TABLE></TD></TR>");
					
        document.write("<tr><td  class=input colspan=2 align=center>For Civilian Airfare or more options<Br>try our <a href='http://" + agencyPrefix + "/do/flight/RoundTripSearch?ag=" + agencyID + "' id='booking_adv_link'>Advanced Search</a></td>");
        document.write("<td align=right><input type='image' src='images/btn_search.gif' name='submitbutton' onmouseover='checkForChildAlone()' onclick='submitForm()' value='Search Flights'></td></tr></form></table>");
   }
}

