<?php 
require_once('init.php');
include(''.INCLUDE_PATH.'settings.php');
include(''.INCLUDE_PATH.'agreement_info.php');
include('./include/header_VU.php'); 
include('./include/menu_university.php');
$university_name = 'Victoria University';
?>
<div class="container terms_and_conditions">
	<div class="allied-form">
		<div class="allied-form-heading"><?php echo $university_name; ?> Airport Pick-up</div>
		<div class="allied-form-elements">
			<div class="panel panel-info">
				<div class="panel-heading"><font color="#000000;"> Conditions of service for <?php echo $university_name; ?> Airport pick-up: </font></div>
				<div class="panel-body">
					<?php echo $VICTORIA_UNIVERSITY_AGREEMENT_TERMS; ?>
					<br/><br>
					<div class="form-group  col-sm-12 col-md-6 col-lg-6">
						<label>
							I have read the above conditions and agree<br/>
							<div class="radio-inline">
								<label><input type="radio" name="agreement" value="1" class="agreement">YES</label><br/>
							</div>
							<div class="radio-inline">
								<label><input type="radio" name="agreement" value="0" class="agreement">NO</label>
							</div>
						</label>
					</div>
					<span class="must_agree"><br/><font color="red">You must agree to the Conditions of Service to continue</font></span>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="container booking_form">
	<form name="students_form" id="students_form" method="post" action="#">
		<div class="allied-form">
			<div class="allied-form-elements">
				<h3><?php echo $university_name; ?> Students Booking Request</h3>
				<div class="panel panel-info">
					<div class="panel-body">
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>
								Are you an agent booking on behalf of a student?<br/>
								<div class="radio-inline">
									<label><input type="radio" name="on_behalf" value="0" class="on_behalf" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" name="on_behalf" value="1" class="on_behalf">Yes</label>
								</div>
							</label>
						</div>
						<div class="clearfix"></div>
						<div class="form-group col-sm-6 col-md-4 col-lg-3 on_behalf_fields">
							<label for="on_behalf_title">Your Title *</label>
							<select class="form-control" name="on_behalf_title" id="on_behalf_title">
								<option value="">Title</option>
								<option value="Mr" <?php if($_POST['on_behalf_title'] == 'Mr') echo 'selected';?>>Mr</option>
								<option value="Ms" <?php if($_POST['on_behalf_title'] == 'Ms') echo 'selected';?>>Ms</option>
								<option value="Mrs" <?php if($_POST['on_behalf_title'] == 'Mrs') echo 'selected';?>>Mrs</option>
							</select>
						</div>
						<div class="form-group col-sm-6 col-md-4 col-lg-3 on_behalf_fields">
							<label for="on_behalf_fname">Your Given Name *</label>
							<input type="text" class="form-control" name="on_behalf_fname" id="on_behalf_fname" placeholder="Your First Name" value="<?php if(!empty($_POST['on_behalf_fname'])) echo $_POST['on_behalf_fname']; ?>">
							<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
						</div>
						<div class="form-group col-sm-6 col-md-4 col-lg-3 on_behalf_fields">
							<label for="on_behalf_lname">Your Family Name *</label>
							<input type="text" class="form-control" name="on_behalf_lname" id="on_behalf_lname" placeholder="Your Last Name" value="<?php if(!empty($_POST['on_behalf_lname'])) echo $_POST['on_behalf_lname']; ?>">
							<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
						</div>	
						<div class="clearfix"></div>	
						<div class="form-group col-sm-12 col-md-6 col-lg-6 on_behalf_fields">
							<label for="on_behalf_email">Your Email *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-envelope"></i></div>
								<input type="email" class="form-control" name="on_behalf_email" id="on_behalf_email" placeholder="Your Email" value="<?php if(!empty($_POST['on_behalf_email'])) echo $_POST['on_behalf_email']; ?>">
							</div>
						</div>
						<div class="form-group col-sm-12 col-md-3 col-lg-3 on_behalf_fields">
							<label for="on_behalf_phone">Your Phone Number * </label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-phone"></i></div>
								<input type="phone" class="form-control" name="on_behalf_phone" id="on_behalf_phone" placeholder="Your Phone Number" value="<?php if(!empty($_POST['on_behalf_phone'])) echo $_POST['on_behalf_phone']; ?>">
							</div>
						</div>	
						<div class="clearfix"></div>
					</div>
				</div>
				<div class="panel panel-info">
					<div class="panel-heading"><font color="#000000;">Student Information </font></div>
					<div class="panel-body">
						<div class="form-group col-sm-6 col-md-3 col-lg-3">
							<label for="std_title">Gender *</label>
							<select class="form-control" name="std_title" id="std_title" placeholder="Title">
								<option value="">Title</option>
								<option value="Female" <?php if($_POST['std_title'] == 'Female') echo 'selected';?>>Female</option>
								<option value="Male" <?php if($_POST['std_title'] == 'Male') echo 'selected';?>>Male</option>
								<!--<option value="Miss" <?php if($_POST['std_title'] == 'Miss') echo 'selected';?>>Miss</option>
								<option value="Mr" <?php if($_POST['std_title'] == 'Mr') echo 'selected';?>>Mr</option>-->
								<option value="PNTS" <?php if($_POST['std_title'] == 'PNTS') echo 'selected';?>>Prefer not to say</option>
								<option value="Other" <?php if($_POST['std_title'] == 'Other') echo 'selected';?>>Other</option> 
							</select>
						</div>
						<div class="form-group col-sm-6 col-md-3 col-lg-3">
							<label for="std_fname">Given Name *</label>
							<input type="text" class="form-control" name="std_fname" id="std_fname" placeholder="Given Name" value="<?php if(!empty($_POST['std_fname'])) echo $_POST['std_fname']; ?>">
						</div>
						<div class="form-group col-sm-6 col-md-3 col-lg-3">
							<label for="std_lname">Family Name *</label>
							<input type="text" class="form-control" name="std_lname" id="std_lname" placeholder="Family Name" value="<?php if(!empty($_POST['std_lname'])) echo $_POST['std_lname']; ?>">
						</div>	
						<div class="clearfix"></div>	
						<div class="form-group col-sm-12 col-md-3 col-lg-3">
							<label for="std_id">VU Student ID number *</label>
							<div id="student_duplicate_check_loading"></div>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-hashtag"></i></div>
								<input type="text" class="form-control"  maxlength="8" name="std_id" id="std_id" placeholder="VU Student ID" value="<?php if(!empty($_POST['std_id'])) echo $_POST['std_id']; ?>">
							</div>
						</div>
						
						<div class="form-group col-sm-12 col-md-3 col-lg-3 ">
							<label for="std_ph">Your Phone Number * [include your country and area code]</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-phone"></i></div>
								<input type="text" class="form-control"  name="std_ph" id="std_ph" placeholder="Student Phone Number" value="<?php if(!empty($_POST['std_ph'])) echo $_POST['std_ph']; ?>">
							</div>
						</div>
						<div class="clearfix"></div>							
						<div class="form-group col-sm-12 col-md-6 col-lg-6">
							<label for="std_email">Personal Email *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-envelope"></i></div>
								<input type="email" class="form-control" name="std_email" id="std_email" placeholder="Your email address" value="<?php if(!empty($_POST['std_email'])) echo $_POST['std_email']; ?>">
							</div>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label for="std_email_confirm">Confirm Personal Email *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-envelope"></i></div>
								<input type="email" class="form-control" name="std_email_confirm" id="std_email_confirm" placeholder="Confirm your email address" value="<?php if(!empty($_POST['std_email_confirm'])) echo $_POST['std_email_confirm']; ?>">
							</div>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>
								Do you have an Agent?<br/>
								<div class="radio-inline">
									<label><input type="radio" name="has_agent" value="0" class="has_agent" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" id="yes_agent" name="has_agent" value="1" class="has_agent">Yes</label>
								</div>
							</label>
						</div>
						
						<script>
document.addEventListener("DOMContentLoaded", function () {
    var yesAgent = document.getElementById("yes_agent");

    yesAgent.addEventListener("blur", function () {
        showDialog("If you are an Agent entering a booking on behalf of a student, and would like a confirmation sent to your email address, you need to use *Are you an agent submitting this form on behalf of a student* at the top of this form ");
    });

    // Dialog function in raw JS using jQuery UI
    function showDialog(message) {
        // Requires jQuery UI dialog to be initialized (only if jQuery UI is already in use)
        var dialog = document.getElementById("dialog_submit");
        dialog.innerHTML = message;
        $(dialog).dialog({
            title: "Info",
            modal: true,
            buttons: {
                Ok: function () {
                    $(this).dialog("close");
                }
            }
        });
    }
});
</script>

						<div class="clearfix"></div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3 agents_fields">
							<label for="agents_name">Agent Phone number *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-user"></i></div>
								<input type="text" class="form-control" name="agents_name" id="agents_name" placeholder="Agent Phone number" value="<?php if(!empty($_POST['agents_name'])) echo $_POST['agents_name']; ?>">
							</div>
						</div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3 agents_fields">
							<label for="agents_email">Agent Email *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-envelope"></i></div>
								<input type="email" class="form-control"  name="agents_email" id="agents_email" placeholder="Agents Email" value="<?php if(!empty($_POST['agents_email'])) echo $_POST['agents_email']; ?>">
							</div>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>
								Will you be <strong>under 18 </strong>years old when you arrive in Australia?<br/>
								<div class="radio-inline">
									<label><input type="radio" name="under_18" value="0" class="under_18" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" name="under_18" value="1" class="under_18">Yes</label>
								</div>
							</label>
						</div>
						<div class="clearfix"></div>
						<div class="form-group col-sm-6 col-md-3 col-lg-3 guardian_fields">
							<label for="std_guar_title">Guardian's Title *</label>
							<select class="form-control"  name="std_guar_title" id="std_guar_title" placeholder="Title">
								<option value="">Title</option>
								<option value="Mr" <?php if($_POST['std_guar_title'] == 'Mr') echo 'selected';?>>Mr</option>
								<option value="Ms" <?php if($_POST['std_guar_title'] == 'Ms') echo 'selected';?>>Ms</option>
								<option value="Mrs" <?php if($_POST['std_guar_title'] == 'Mrs') echo 'selected';?>>Mrs</option>
							</select>
						</div>
						<div class="form-group   col-sm-6 col-md-3 col-lg-3  guardian_fields">
							<label for="std_guar_fname">Guardian's Given Name *</label>
							<input type="text" class="form-control" name="std_guar_fname" id="std_guar_fname" placeholder="Given Name" value="<?php if(!empty($_POST['std_guar_fname'])) echo $_POST['std_guar_fname']; ?>">
						</div>
						<div class="form-group   col-sm-6 col-md-3 col-lg-3  guardian_fields">
							<label for="std_guar_lname">Guardian's Family Name *</label>
							<input type="text" class="form-control" name="std_guar_lname" id="std_guar_lname" placeholder="Family Name" value="<?php if(!empty($_POST['std_guar_lname'])) echo $_POST['std_guar_lname']; ?>">
						</div>	
						<div class="clearfix"></div>	
						<div class="form-group  col-sm-12 col-md-6 col-lg-6  guardian_fields">
							<label for="std_guar_email">Guardian's Email *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-envelope"></i></div>
								<input type="email" class="form-control"  name="std_guar_email" id="std_guar_email" placeholder="Guardian's Email" value="<?php if(!empty($_POST['std_guar_email'])) echo $_POST['std_guar_email']; ?>">
							</div>
						</div>
						<div class="form-group  col-sm-12 col-md-3 col-lg-3  guardian_fields">
							<label for="std_guar_phone">Guardian's Phone *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-phone"></i></div>
								<input type="text" class="form-control"  name="std_guar_phone" id="std_guar_phone" placeholder="Guardian's Phone" value="<?php if(!empty($_POST['std_guar_phone'])) echo $_POST['std_guar_phone']; ?>">
							</div>
						</div>	
						<div class="clearfix"></div>
					</div>
				</div>

				<div class="panel panel-info">
					<div class="panel-heading"><font color="#000000;"> Arrival Information to Melbourne </font> </div>
					<div class="panel-body">
						<div class="form-group col-sm-12 col-md-3 col-lg-3">
							<label for="j1_date">Arrival Date *</label>
							<div class="input-group date" data-provide="datepicker">
								<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
								<input type="text" class="form-control"  placeholder="Date" id="j1_date" name="j1_date" value="<?php if(!empty($_POST['j1_date'])) echo $_POST['j1_date']; ?>">
								<input type="hidden" name="j1_date_cap" id="j1_date_cap" size="15" value="<?php if(!empty($_POST['j1_date_cap'])) echo $_POST['j1_date_cap']; ?>">
							</div>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-3 col-lg-3">
							<label for="j1_flight_no">Flight Number *</label>
							<input type="text" class="form-control" name="j1_flight_no" id="j1_flight_no" placeholder="Flight Information" value="<?php if(!empty($_POST['j1_flight_no'])) echo $_POST['j1_flight_no']; ?>">
						</div>
						<div class="clearfix"></div>
						<div class="form-group col-sm-12 col-md-4 col-lg-4">
						<!--<font color="#0909FF;"> </font> --> <b><u>Ensure you enter the correct flight arrival time</u>.</b><br><br>
							<label for="j1_time_hrs">Flight Arrival Time * [24 hour format]:</label>
							<div class="input-group">
								<span class="input-group-addon"><i class="fa fa-clock-o"></i></span>
								<select class="form-control"  name="j1_time_hrs" id="j1_time_hrs">
									<option value="">Hours</option>
									<?php
									for($x=0; $x<=23; $x++)
											{
												if($x<10)
													{
														$x = '0'.$x.'';
													}
												echo '<option value="'.$x.'">'.$x.'</option>';
											}
									?>
								</select>
							</div>
						</div>
						<!-- <font color="blue;"> </font> --> <b><u>Aero will review the accuracy of the flight time entered prior to your arrival</u>.</b><br><br>
						<div class="form-group col-sm-12 col-md-3 col-lg-3">
							<label for="j1_time_hrs">Time (Mins.) *</label>
							<div class="input-group">
								<span class="input-group-addon"><i class="fa fa-clock-o"></i></span>
								<select class="form-control"  name="j1_time_mins" id="j1_time_mins">
									<option value="">Mins</option>
									<?php
									for($x=0; $x<=60; $x++)
											{
												if($x<10)
													{
														$x = '0'.$x.'';
													}
												echo '<option value="'.$x.'">'.$x.'</option>';
											}
									?>
								</select>
							</div>
						</div>
						<div class="clearfix"></div>
						<div class="form-group col-sm-6 col-md-3 col-lg-3">  <!-- had<div class="form-group col-sm-6 col-md-3 col-lg-3 on_behalf_fields"> -->
							<label for="j1_airport">Select Airport</label>
							<select class="form-control"  name="j1_airport" id="j1_airport" placeholder="Airport Terminal">
								<option value="1" <?php if($_POST['j1_airport'] == '1') echo 'selected';?>>T2 Int</option>
								<option value="2" <?php if($_POST['j1_airport'] == '2') echo 'selected';?>>T1 Qantas</option>
								<option value="3" <?php if($_POST['j1_airport'] == '3') echo 'selected';?>>T3 Virgin</option>
								<option value="4" <?php if($_POST['j1_airport'] == '4') echo 'selected';?>>T4 Jetstar/Tiger/Rex</option>
								<option value="5" <?php if($_POST['j1_airport'] == '5') echo 'selected';?>>Avalon Airport</option>
							</select>
						</div>
					</div>
				</div>
				
				
				<div class="panel panel-info">
					<div class="panel-heading"><font color="#000000;">Destination Address in Australia </font></div>
					<div class="panel-body">
					<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label></b><u>If</u> you are <u>under 18</u>: <br>Have you booked Homestay accommodation with 'Australian Homestay Network' (AHN)? <b><br>(Only answer this question if you are under 18 years of age)</b>*<br/>
								<div class="radio-inline">
									<label><input type="radio" name="homestay" value="0" class="homestay" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" name="homestay" value="1" class="homestay">Yes</label>
								</div>
							</label>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label for="j1_line_1">Destination Address *</label>
							<input type="text" class="form-control" name="j1_line_1" id="j1_line_1" placeholder="Address Line 1" value="<?php if(!empty($_POST['j1_line_1'])) echo $_POST['j1_line_1']; ?>">
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<input type="text" class="form-control" name="j1_line_2" id="j1_line_2" placeholder="Address Line 2" value="<?php if(!empty($_POST['j1_line_2'])) echo $_POST['j1_line_2']; ?>">
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3">
							<input type="text" class="form-control" name="j1_sub" id="j1_sub" placeholder="Suburb" value="<?php if(!empty($_POST['j1_sub'])) echo $_POST['j1_sub']; ?>">
						</div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3">
							<input type="text" class="form-control" name="j1_pc" id="j1_pc" placeholder="Postcode" value="<?php if(!empty($_POST['j1_pc'])) echo $_POST['j1_pc']; ?>">
						</div>
						<div class="clearfix"></div>
						<div class="form-group col-sm-12 col-md-6 col-lg-6 on_behalf_fields">
						<label for="j1_airport">Select State</label>
							<select class="form-control"  name="j1_state" id="j1_state" placeholder="Select State">
								<option value="VIC" <?php if($_POST['j1_state'] == 'VIC') echo 'selected';?>>VIC</option>
							
								<!--<option value="">SELECT STATE</option>
								<option value="VIC" <?php if($_POST['j1_state'] == 'VIC') echo 'selected';?>>VIC</option>
								<option value="NSW" <?php if($_POST['j1_state'] == 'NSW') echo 'selected';?>>NSW</option>
								<option value="BNE" <?php if($_POST['j1_state'] == 'BNE') echo 'selected';?>>QLD</option>
								<option value="ADL" <?php if($_POST['j1_state'] == 'ADL') echo 'selected';?>>ADL</option>
								<option value="NT" <?php if($_POST['j1_state'] == 'NT') echo 'selected';?>>NT</option>
								<option value="ACT" <?php if($_POST['j1_state'] == 'ACT') echo 'selected';?>>ACT</option>
								<option value="TAS" <?php if($_POST['j1_state'] == 'TAS') echo 'selected';?>>TAS</option>
								<option value="NZ" <?php if($_POST['j1_state'] == 'NZ') echo 'selected';?>>NZ</option> -->
							</select>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>Do you have a contact person at destination?<br/>
								<div class="radio-inline">
									<label><input type="radio" name="has_destination_contact" value="0" class="has_destination_contact" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" name="has_destination_contact" value="1" class="has_destination_contact">Yes</label>
								</div>
							</label>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3 contact_person_fields">
							<label for="destination_contact_name">Name *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-user"></i></div>
								<input type="text" class="form-control" name="destination_contact_name" id="destination_contact_name" placeholder="Contact Name" value="<?php if(!empty($_POST['destination_contact_name'])) echo $_POST['destination_contact_name']; ?>">
							</div>
						</div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3 contact_person_fields">
							<label for="destination_contact_phone">Phone Number *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-phone"></i></div>
								<input type="text" class="form-control" name="destination_contact_phone" id="destination_contact_phone" placeholder="Phone Number" value="<?php if(!empty($_POST['destination_contact_phone'])) echo $_POST['destination_contact_phone']; ?>">
							</div>
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6  contact_person_fields">
							<label for="destination_contact_email">Email *</label>
							<div class="input-group">
								<div class="input-group-addon"><i class="fa fa-envelope"></i></div>
								<input type="email" class="form-control"  name="destination_contact_email" id="destination_contact_email" placeholder="Email" value="<?php if(!empty($_POST['destination_contact_email'])) echo $_POST['destination_contact_email']; ?>">
							</div>
						</div>
						<!--<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>Did VU arrange your homestay? *<br/>
								<div class="radio-inline">
									<label><input type="radio" name="homestay" value="0" class="homestay" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" name="homestay" value="1" class="homestay">Yes</label>
								</div>
							</label>
						</div>-->
					</div>
				</div> 

				<div class="panel panel-info">
					<div class="panel-heading"> <font color="#000000;"> Additional Information <br><b> <!-- <font color="#0909FF;"> </font> --> <h6>Do not bring food. Biosecurity delays may result in cancellation of your pick-up
					<br>Other Students arriving on the same flight and going to the same destination, will travel together in the same Aero vehicle.</b></h6></font></div>
					<div class="panel-body">
					
						<div class="form-group col-sm-12 col-md-6 col-lg-6">
							<label for="pax_nos">Total Number of Passengers <u>including yourself</u><br>
							You will need to pay AU$50 in cash to the driver per additional passenger. <br>Receipt can be provided upon request. <br>Maximum luggage allowance per additional paying passenger is 1x 76cm. <br><br>
							 If you select 1 below, it means that you are arriving on your own. <br> If you select 2 or more below, it means that you are arriving with additional passengers.</label>
							<select class="form-control"  name="pax_nos" id="pax_nos">
								<!--<option value="1">1</option>
								<?php
								for($x=2; $x<=4; $x++)
										{
											echo '<option value="'.$x.'">'.$x.'</option>';
										}
								?> -->
							</select>
						</div>
						<div class="clearfix"></div>
						<div class="form-group col-sm-12 col-md-6 col-lg-8">
							
							<br><b>Luggage - Your selection below must be accurate.</b><br>
							<ol>
							<!-- <font color="#0909FF;"> </font> --> <h6><b><li>If your luggage doesn’t meet the luggage allowance (2x 76cm, and 1x 55cm bags/suitcases), <u>this will result in cancellation of your pick-up.</u><br>
							<!-- <font color="#0909FF;"> </font> --> <b><li>Additional passengers and or luggage will incur an AU$50 charge, Aero needs to be advised in advance of your arrival.<br></b>
							<ul>
							<!-- <font color="#0909FF;"> </font> --> <li>Your out-of-pocket cost will be AU$50 per additional passenger, you will need to pay 'in cash' directly to the driver prior to departing the Airport. </b></h6> </font>  <!--from a sedan to a van--></label>
							</ul>
							</ol>
							<label for="lug_nos">Total number of bags/suitcases <br>
							<select class="form-control"  name="lug_nos" id="lug_nos">
								<option value="1">2</option> ?>">
								<?php
								for($x=1; $x<=7; $x++)
										{
											echo '<option value="'.$x.'">'.$x.'</option>';
										}
								?>
							</select>
						</div>
						
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>Are there passengers under 7 years of age arriving with you?<br/>
								<div class="radio-inline">
									<label><input type="radio" name="below_7" value="0" class="below_7" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" name="below_7" value="1" class="below_7">Yes</label>
								</div>
							</label>
						</div>

						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6 children_under_7_fields">
							<label>For Families Only<br/>Please state age group of all children under the age of 7 years</label>
						</div>
						<div class="clearfix"></div>
						<div class="form-group col-sm-12 col-md-3 col-lg-3 children_under_7_fields">
							<select class="form-control"  name="child_age_1" id="child_age_1">
								<option value="">----------------------</option>
								<option value="1">0 Months - 6 Months</option>
								<option value="2">7 Months - 4 Years</option>
								<option value="3">5 Years - 7 Years</option>
							</select>
						</div>
						<div class="form-group col-sm-12 col-md-3 col-lg-3 children_under_7_fields">
							<select class="form-control"  name="child_age_2" id="child_age_2">
								<option value="">----------------------</option>
								<option value="1">0 Months - 6 Months</option>
								<option value="2">7 Months - 4 Years</option>
								<option value="3">5 Years - 7 Years</option>
							</select>
						</div>
						<div class="form-group col-sm-12 col-md-3 col-lg-3 children_under_7_fields">
							<select class="form-control"  name="child_age_3" id="child_age_3">
								<option value="">----------------------</option>
								<option value="1">0 Months - 6 Months</option>
								<option value="2">7 Months - 4 Years</option>
								<option value="3">5 Years - 7 Years</option>
							</select>
						</div>
						<div class="form-group col-sm-12 col-md-3 col-lg-3 children_under_7_fields">
							<select class="form-control" name="child_age_4" id="child_age_4">
								<option value="">----------------------</option>
								<option value="1">0 Months - 6 Months</option>
								<option value="2">7 Months - 4 Years</option>
								<option value="3">5 Years - 7 Years</option>
							</select>
						</div>
					</div>
				</div>
				
				<div class="panel panel-info">
					<div class="panel-heading"><font color="#000000;">Course information </font></div>
					<div class="panel-body">
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<input type="text" class="form-control" rows="3" name="int_notes" id="$int_notes" value="<?php if(!empty($_POST['int_notes'])) echo $_POST['int_notes']; ?>">
						</div>
					</div>
					<div class="clearfix"></div> 
						</div>
				
				<div class="panel panel-info">
					<div class="panel-heading"><font color="#000000;">Extra Information or Requirements </font></div>
					<div class="panel-body">
						<div class="form-group  col-sm-12 col-md-9 col-lg-9">
							<label for="ext_notes"><h5><b>Each student (or Education agent) must enter their own booking. 1 booking per student.</b><br><br>Please do not ask to be picked up later. We cannot accept such requests. <br><b>Do not enter a later pick-up time for your flight as we will always change it to the official flight arrival time as indicated on your ticket.</b><br><br><b>Even</b> if Aero sends you a confirmation with your incorrect arrival time, your <b>driver</b> will <b>only</b> look at the <b>official flight arrival time as indicated on your ticket</b>. <br><br>We know that it takes time to get your luggage and clear customs.<br>Most students meet their drivers in <u><b>under</b> 55 minutes</u>.<br><br> Just make sure that you do not bring <b>any</b> kind of food.<br>Your driver will text or call you after your flight lands.<br><h5>Please make sure that you have given us <b>your</b> full phone number, including your country code.<br><b>Your</b> phone number <b>must</b> be connected to <b>WhatsApp</b>.<br> <br>The flight arrival time that shows on your airline ticket is the <b>actual</b> flight arrival <b>Melbourne time</b>. </u></h5></label>
							<textarea class="form-control" rows="3" name="ext_notes" id="ext_notes" value="<?php if(!empty($_POST['ext_notes'])) echo $_POST['ext_notes']; ?>"></textarea>
						</div>
					</div>
				</div>

				<div>
					<!--<p style="display: inline-block;"><b>Tick this box if you are a PhD Student or an AAS Awardee</b></p> <input type="checkbox" name="aas" id ="aas"  > 
				</div>
				<h3 style="margin: 0;">OR</h3> 
				<div>
					<p style="display: inline-block;"><b><u>Only</b></u> tick this box if you have accepted your <a href="https://www.deakin.edu.au/study/how-to-apply/offer-and-enrolment" class="">offer</a> from Deakin</p> <input type="checkbox" name="accepted" id="accepted"> 
				</div>
				<div>
					<p style="display: inline-block;"><b><u>Only</b></u> tick this box if you have <a href="https://www.deakin.edu.au/study/how-to-apply/offer-and-enrolment" class="">enrolled</a> in units</p> <input type="checkbox" name="enrolled" id = "enrolled"> -->
				</div>					

				<input type="hidden" name="job_src" id="job_src" value="Website">
				<input type="hidden" name="acc_type" id="acc_type" value="3">
				<input type="hidden" name="charge_acc" id="charge_acc" value="1035">
				<input type="hidden" name="acc_contact" id="acc_contact" value="7814">  <!-- This ID needs to be the "SELF" ID-->
				<input type="hidden" name="agent_contact" id="agent_contact" value="7815">
				<input type="hidden" name="acc_passenger" id="acc_passenger" value="7812">
				<input type="hidden" name="entered_by" id="entered_by" value="1">
				<input type="hidden" name="job_type" id="job_type" value="1">
				<input type="hidden" name="charge_mode" id="charge_mode" value="1">
				<input type="hidden" name="university_name" id="university_name" value="VIC Uni"> <!-- whatever is inside the 2 " " shows in the driver's notes-->
				<button type="submit" name="make_booking" id="make_booking" class="btn btn-success">MAKE BOOKING</button>
				<div id="form_submit"></div>
				<p>* Mandatory Fields</p>
			</div>
		</div>
	</form>
</div>
<div id="dialog_submit" style="display:none;"></div>
<nav class="navbar navbar-default navbar-static-bottom">
		<div class="container">
			<div class="row"> 
				<div class="col-md-4">
					<h4>USEFUL LINKS</h4>
					<ul class="list-unstyled link-list">
					    <li><a href= https://www.studymelbourne.vic.gov.au/home-overseas href="#">Study in Melbourne Information</a></li>
						<li><a href= https://www.studymelbourne.vic.gov.au/living-here/getting-around-melbourne-victoria href="#">Transport in Melbourne</a></li>
						<li><a href= https://www.studyaustralia.gov.au/english/live/student-support href="#">Australian Government Student's Information</a></li>
					</ul>
				</div>
				<div class="col-md-4">
					<h4>USEFUL LINKS</h4>
					<ul class="list-unstyled link-list">
					    <li><a href= https://www.vu.edu.au/about-vu/university-profile/moondani-balluk-indigenous-academic-unit/acknowledging-country/traditional-owners-languages-of-our-campuses href="#">Traditional Owners & languages of our campuses</a></li>
					    <li><a href= https://www.vu.edu.au/about-vu/teaching-colleges-schools href="#">Victoria University</a></li>
						<li><a href= https://www.vu.edu.au/about-vu/teaching-colleges-schools/college-of-english-foundation-pathways href="#">College of English, Foundation & Pathways</a></li>
					</ul>
				</div>
				<div class="col-md-4">
					<h4>CONTACT US</h4>
					<ul class="list-unstyled link-list">
						<li><a href="https://aerocorporatecars.com" class="">Aero Cars Website</a></li>
						<li><i class="fa fa-envelope"></i> <a href="mailto:aero@aerocorporatecars.com" class="">aero@aerocorporatecars.com</a></li>
						<li><i class="fa fa-phone-square"></i> <a href="tel:1800 350 850">1800 350 850</a></li>
						<li><i class="fa fa-phone-square"></i> <a href="tel:+61 425 865 955">Use WhatsApp to message us on +61 425 865 955</a></li>
					</ul>
				</div>
				<div class="clearfix"></div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<p style="text-align:center;"> <strong>&copy; Copyright 2025 Aero Corporate Cars Pty Ltd, ABN - 186 2673 9884. All Rights Reserved.</strong></p>
				</div>
			</div>
			<div class="clearfix"></div>
		</div>
	</nav>
<script>
document.addEventListener("DOMContentLoaded", function () {
    const paxSelect = document.getElementById("pax_nos");
    const lugSelect = document.getElementById("lug_nos");
    const agentRadios = document.getElementsByName("has_agent");
    const warningBox = document.getElementById("vehicleUpgradeWarning");
    const dialogContainer = document.getElementById("dialog_submit");


    function getAgentStatus() {
        for (let radio of agentRadios) {
            if (radio.checked && radio.value === "1") return true;
        }
        return false;
    }

     //function checkUpgradeRequirement() { 
         //const pax = parseInt(paxSelect.value || "0"); 
         //const lug = parseInt(lugSelect.value || "0"); 
         //const hasAgent = getAgentStatus(); 

         //if (hasAgent || pax > 1 || lug > 3) { 
          //   showUpgradeDialog(); 
        // } 
        
     // } 
    function checkUpgradeRequirement() {
        const pax = parseInt(paxSelect.value || "0");
        const lug = parseInt(lugSelect.value || "0");
        const hasAgent = getAgentStatus();
        
        if (hasAgent || pax > 1 || lug > 3) {
            showUpgradeDialog();
        }
        
        if (pax == 1 && lug > 2) {
            showLugerInfoDialog();
            paxSelect.value = "1";
            lugSelect.value = "3";
        }
        
    }    
  
    function showUpgradeDialog() {
        dialogContainer.innerHTML = `
            <div>
                You have selected an option that requires a vehicle upgrade.<br><br>
                By clicking this option, you are agreeing to pay <strong>AU$50</strong> per extra passenger in cash to the driver upon arrival.<br><br>
                Do you accept this upgrade fee?<br><br> 
                <label><input type="radio" id="vehicle_yes" name="vehicle_confirm" value="yes"> Agree & Confirm</label><br>
                <label><input type="radio" id="vehicle_no" name="vehicle_confirm" value="no"> Do Not Accept</label><br><br>
				Please be advised that if you do not accept the upgrade fee, your booking will revert to 1 passenger and 2 bags.
            </div>
        `;

        $(dialogContainer).dialog({
            title: "Vehicle Upgrade Confirmation",
            modal: true,
            width: 420,
            buttons: {
                Ok: function () {
                    const yes = document.getElementById("vehicle_yes");
                    const no = document.getElementById("vehicle_no");
                    const ext_notes = document.getElementById("ext_notes");


                    if (no && no.checked) {
                        paxSelect.value = "1";
                        lugSelect.value = "3";
                        document.querySelector('input[name="has_agent"][value="0"]').checked = true;
                        ext_notes.value = "I Don't agree to pay AU$50 for an extra passenger";
                        $(this).dialog("close");
                    } else if (yes && yes.checked) {
                        ext_notes.value = "I agree to pay AU$50 in cash per extra passenger.";
                            $(this).dialog("close");
                        showPesengerInfoDialog();
                    } else {
                        alert("Please choose an option to proceed.");
                        warningBox.style.display = "none";
                    }
                }
            }//,
            //close: function () {
             //  const yes = document.getElementById("vehicle_yes");
             //   const no = document.getElementById("vehicle_no");
                // const ext_notes = document.getElementById("ext_notes");

             //   if (!yes || (!yes.checked && !no.checked)) {
             //        paxSelect.value = "1";
             //       lugSelect.value = "2";
             //       document.querySelector('input[name="has_agent"][value="0"]').checked = true;
             //       ext_notes.value = "I Do not agree to pay AU$50 per passenger";
             //       //warningBox.style.display = "none";
             //   }
            //}
        });
    }
    function showPesengerInfoDialog() {
    dialogContainer.innerHTML = `
        <div>
            <label for="passenger_name">Passenger Name:</label><br>
            <input type="text" id="passenger_name"><br><br>

                        <label for="passenger_email" style=" display: none; ">Passenger Email:</label><br>
                        <input type="email" id="passenger_email" style=" display: none; ">

            <label for="passenger_phone">Passenger Phone:</label><br>
            <input type="tel" id="passenger_phone"><br><br>

            <label for="passenger_flight">Flight Number:</label><br>
            <input type="text" id="passenger_flight"><br><br>

            <label for="arrival_time">Arrival Date & Time:</label><br>
            <input type="datetime-local" id="arrival_time"><br><br>

            <label for="relationship">Relationship to You:</label><br>
            <input type="text" id="relationship"><br><br>
        </div>
    `;

    $(dialogContainer).dialog({
        title: "Second Passenger Information",
        modal: true,
        width: 420,
        buttons: {
            Submit: function () {
                const name = document.getElementById("passenger_name").value.trim();
                const email = document.getElementById("passenger_email").value.trim();
                const phone = document.getElementById("passenger_phone").value.trim();
                const flight = document.getElementById("passenger_flight").value.trim();
                const arrival = document.getElementById("arrival_time").value.trim();
                const relationship = document.getElementById("relationship").value.trim();
                const ext_notes = document.getElementById("ext_notes");

                if (!name || !phone || !flight || !arrival || !relationship) {
                    alert("Please fill in all the fields.");
                    return;
                }

                ext_notes.value = `I agree to pay AU$50 per extra passenger.
Passenger: ${name}. 
Email: ${email}. 
Phone: ${phone}. 
Flight: ${flight}. 
Arrival: ${arrival}. 
Relationship: ${relationship}`;
                $(this).dialog("close");
                showLugerInfoDialog();
            }
        }
    });
}

    function showLugerInfoDialog() {
    dialogContainer.innerHTML = `
        <div>
            <label for="small_lug">Number of carry-on (small 55cm) luggage:</label><br>
            <input type="number" id="small_lug" min="0"><br><br>

            <label for="big_lug">Number of checked in (large 76cm) luggage:</label><br><b>maximum</b> luggage is: <br><b>1x 55cm and 2x 76cm</b> <br>
            <input type="number" id="big_lug" min="0"><br><br>
        </div>
    `;

    $(dialogContainer).dialog({
        title: "Luggage Information",
        modal: true,
        width: 430,
        buttons: {
            Submit: function () {
                const smallLug = document.getElementById("small_lug").value.trim();
                const bigLug = document.getElementById("big_lug").value.trim();
                const ext_notes = document.getElementById("ext_notes");

                if (smallLug === "" || bigLug === "") {
                    alert("Please enter both carry-on and checked in luggage quantities.");
                    return;
                }

                const luggageInfo = ` 
55cm bags: ${smallLug}. 
76cm bags: ${bigLug}.`;
                    
                    if (lugSelect) {
                        lugSelect.value = parseInt(smallLug) + parseInt(bigLug);
                    } else {
                        console.error("lug_nos not found.");
                    }
                    
                    
                if (ext_notes) {
                    ext_notes.value += luggageInfo;
                } else {
                    console.error("ext_notes not found.");
                }

                $(this).dialog("close");
            }
        }
    });
}

    paxSelect.addEventListener("change", checkUpgradeRequirement);
    lugSelect.addEventListener("change", checkUpgradeRequirement);
    agentRadios.forEach = Array.prototype.forEach; // Fallback for NodeList on old browsers
    agentRadios.forEach(function (radio) {
        radio.addEventListener("change", checkUpgradeRequirement);
    });
});
</script>



	<!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
	<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
	<!--<script src="scripts/minified/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>-->
	<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
    <script src="scripts/bootstrap.min.js"></script>
	
	
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="scripts/ie10-viewport-bug-workaround.js"></script>
	<script src="scripts/jquery.validate.js"></script>
	<script src="scripts/VU_College_booking.js"></script>
  </body>
</html>