<?php 
require_once('init.php');
include(''.INCLUDE_PATH.'settings.php');
include(''.INCLUDE_PATH.'agreement_info.php');
include('./include/header_monash_uni.php'); 
include('./include/menu_university.php');
$university_name = 'Monash';
?>
<div class="container terms_and_conditions">
	<div class="allied-form">
		<div class="allied-form-heading"><?php echo $university_name; ?> University Airport Pick-up</div>
		<div class="allied-form-elements">
			<div class="panel panel-info">
				<div class="panel-heading">Conditions of service for <?php echo $university_name; ?> University Airport pick-up:</div>
				<div class="panel-body">
					<?php echo $MONASH_CLAYTON_2026_AGREEMENT_TERMS; ?>
					<br/><br>
					<div class="form-group  col-sm-12 col-md-8 col-lg-8">
						<label>
							I have read the above conditions and agree<br/>
							<font color="#8B0000;"> 在进入此预定之前，请确保您已经接受莫纳什的邀请并已完成注册登记。否则您将无法得到批准</font></font><br>
			Your booking will NOT be approved by Monash unless you have accepted your offer and are enrolled in units.<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>Monash University 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 submitting this form 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="Ms" <?php if($_POST['on_behalf_title'] == 'Ms') echo 'selected';?>>Ms</option>
								<option value="Mr" <?php if($_POST['on_behalf_title'] == 'Mr') echo 'selected';?>>Mr</option>
								<option value="Mrs" <?php if($_POST['on_behalf_title'] == 'Mrs') echo 'selected';?>>Mrs</option>
								<option value="Dr" <?php if($_POST['on_behalf_title'] == 'Dr') echo 'selected';?>>Dr</option>
								<option value="Prof" <?php if($_POST['on_behalf_title'] == 'Prof') echo 'selected';?>>Prof</option>
								<option value="Sir" <?php if($_POST['on_behalf_title'] == 'Sir') echo 'selected';?>>Sir</option>
								<option value="PNTS" <?php if($_POST['on_behalf_title'] == 'PNTS') echo 'selected';?>>Prefer not to say</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="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="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-4 col-lg-4 on_behalf_fields">
							<label for="on_behalf_phone">Your Phone </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">Please select the category that applies to you</div>
					<div class="panel-body">
						<div class="form-group col-sm-12 col-md-8 col-lg-8">
					
			
				<div>
					<p style="display: inline-block;"></b>Australia Awards Scholars. Tick this circle.</b></p> <input type="radio" name="aas" id ="aas"  > 
				</div>
				<!--<h4 style="margin: 0;">OR</h4>-->
				<div>
					<p style="display: inline-block;">Exchange or Study Abroad students from a partner institution overseas. Tick this circle. </p> <input type="radio" name="aas" id="abroad"> 
				</div>
				<div>
					<p style="display: inline-block;">Under 18 years of age students. Tick this circle.</p> <input type="radio" name="aas" id = "under18"> 
				</div>
				<div>
					<p style="display: inline-block;">Monash University scholarship recipients <br>(undergraduate or postgraduate by coursework students only). Tick this circle.</p> <input type="radio" name="aas" id = "PhD"> 
				</div>
				<div>
					<!-- <p style="display: inline-block;">Recipients of Australia for ASEAN scholarship. Tick this circle.</p> <input type="radio" name="aas" id = "ASEAN"> 
				</div>
				<div> -->
					<p style="display: inline-block;">Recipients of a fully funded foreign entity or state-owned enterprise sponsorship. Tick this circle.</p> <input type="radio" name="aas" id = "foreign"> 
				</div>		
				</div>
						</div>
						</div>
					<!--<div>
					<p style="display: inline-block;"><b><u>Only</b></u> tick this circle if you are commencing a <b><a href="https://www.monashcollege.edu.au/study/courses/monash-advanced-preparation-program" class="">Monash Advanced Preparation Program</a></b> at Monash College</p> <input type="checkbox" name="mapp" id = "mapp"> 
				</div>	
					<div>
					<p style="display: inline-block;"><b><u>Only</b></u> tick this circle if you are commencing a <b><a href="https://www.monashcollege.edu.au/study/courses/monash-advanced-preparation-program" class="">Monash Advanced Preparation Program</a></b> at Monash College</p> <input type="checkbox" name="mapp" id = "mapp"> 
				</div>	-->
					
				
				<!-- this is new
				<div class="panel panel-info"> 
					<div class="panel-body">
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>
								Do you require pick-up from Hotel quarantine accommodation<br/> 
								<div class="radio-inline">
									<label><input type="radio" name="frm_via_sub" value="0" class="frm_via_sub" checked>No</label><br/>
								</div>
								<div class="radio-inline">
									<label><input type="radio" name="frm_via_sub" value="1" class="frm_via_sub">Yes</label>
								</div>
							</label> 
						
						</div>
						</div>
						<div class="clearfix"> <!-- if the student select yes, the Airport pick-up fields disappear and the Hotel Quarantine accommodation for students who require pick up from hotel quarantine show -->
						
				<div class="panel panel-info">
					<div class="panel-heading">Student Information</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="">Gender</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="Ms" <?php if($_POST['std_title'] == 'Ms') echo 'selected';?>>Ms</option>
								<option value="Mr" <?php if($_POST['std_title'] == 'Mr') echo 'selected';?>>Mr</option>
								<option value="Mrs" <?php if($_POST['std_title'] == 'Mrs') echo 'selected';?>>Mrs</option>
								<option value="Dr" <?php if($_POST['std_title'] == 'Dr') echo 'selected';?>>Dr</option>
								<option value="Prof" <?php if($_POST['std_title'] == 'Prof') echo 'selected';?>>Prof</option>
								<option value="Sir" <?php if($_POST['std_title'] == 'Sir') echo 'selected';?>>Sir</option>
								<!--<option value="MD" <?php if($_POST['std_title'] == 'MD') echo 'selected';?>>MD</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(s)" 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">MONASH Student ID </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="9" name="std_id" id="std_id" placeholder="Monash Student ID" value="<?php if(!empty($_POST['std_id'])) echo $_POST['std_id']; ?>">
							</div>
						</div>
						
						<div class="form-group col-sm-12 col-md-4 col-lg-4 ">
							<label for="std_ph">Your full phone Number including your country code. <br>(Enable international roaming  and have <a href="https://www.whatsapp.com" class="">WhatsApp or <a href="https://www.wechat.com" class="">WeChat</a> ready before you arrive at Melbourne Airport) </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="Include country and area code" 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  <!---<br><h6>(<font color="#0909FF;"><b><u>Check your spam/junk folder </u></font> for your confirmation)</b></h6><b> you may <font color="#FF0000;">NOT</font> receive our confirmation if you use any of the below emails</b><br><br> (<font color="#FF0000;">Outlook.com or Live.com</font>)--></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  <!--(<font color="#FF0000;">Outlook.com or Live.com</font>) --></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">Agents 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="Agents 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">Agents 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><u>under 18</u> </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&#39;s Title </label>
							<select class="form-control"  name="std_guar_title" id="std_guar_title" placeholder="Title">
								<option value="">Title</option>
								<option value="Ms" <?php if($_POST['std_guar_title'] == 'Ms') echo 'selected';?>>Ms</option>
								<option value="Mr" <?php if($_POST['std_guar_title'] == 'Mr') echo 'selected';?>>Mr</option>
								<option value="Mrs" <?php if($_POST['std_guar_title'] == 'Mrs') echo 'selected';?>>Mrs</option>
								<option value="Dr" <?php if($_POST['std_guar_title'] == 'Dr') echo 'selected';?>>Dr</option>
								<option value="Prof" <?php if($_POST['std_guar_title'] == 'Prof') echo 'selected';?>>Prof</option>
								<option value="Sir" <?php if($_POST['std_guar_title'] == 'Sir') echo 'selected';?>>Sir</option>
								<option value="PNTS" <?php if($_POST['std_guar_title'] == 'PNTS') echo 'selected';?>>Prefer not to say</option>
							</select>
						</div>
						<div class="form-group   col-sm-6 col-md-3 col-lg-3  guardian_fields">
							<label for="std_guar_fname">Guardian&#39;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&#39;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&#39;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&#39;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&#39;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&#39;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 arrival_fields">Arrival Information to Melbourne<br>
					<h6>Aero needs the flight arrival date, Aero does not need your departure date.<br>
						<!--Your driver will only look at the official flight arrival time, and will be at the 'meeting point' to align with the official flight arrival time.<br>-->
						The flight arrival time shown on your airline ticket is the <u>actual flight arrival Melbourne time</u></h6></div>
					<div class="panel-body">
						<div class="form-group col-sm-12 col-md-3 col-lg-3 arrival_fields">
							<label for="j1_date">flight <u>Arrival</u> Date. <!--<br>Must be in 4 days (96 hours) from today. <br>(Australian Eastern Standard Time (AEST) Melbourne time</u>.--> </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-4 col-lg-4 arrival_fields">
							 <label for="j1_flight_no">Flight landing in Melbourne is required.<br>
							 Flight number - <b><u>NOT</b></u> your booking reference number</label> 
							<input type="text" class="form-control" name="j1_flight_no" id="j1_flight_no" placeholder="Flight Number (eg: QF10)" 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 arrival_fields">
						<!--(AEST) Melbourne time</u>.</b>-->
							<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>
						
						<div class="form-group col-sm-12 col-md-4 col-lg-4 arrival_fields">
							<label for="j1_time_hrs"> <label>Aero will review the accuracy of the flight time entered.</label> </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/Rex</option>
								<!--<option value="5" <?php if($_POST['j1_airport'] == '5') echo 'selected';?>>Avalon Airport</option>-->
							</select>
						</div>
						</div>
					<!--<div class="clearfix"></div>
				                    This is new When selected the terminals don't work
					<div class="panel panel-info">
					<div class="panel-heading frm_via_sub_fields quarantine_fields">Hotel quarantine accommodation<br/> (for students who require pick-up from hotel quarantine)</div>
					<div class="panel-body">
						<div class="form-group col-sm-12 col-md-3 col-lg-3 frm_via_sub_fields">
							<label for="j3_date">Pick up Date - You must select the date from the drop down calendar *</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="j3_date" name="j3_date" value="<?php if(!empty($_POST['j1_date'])) echo $_POST['j1_date']; ?>">
								<input type="hidden" name="j3_date_cap" id="j3_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="panel-body">
						<div class="form-group  col-sm-12 col-md-6 col-lg-6 frm_via_sub_fields">
							<label for="frm_via_line_1">Hotel name  </label>
							<input type="text" class="form-control" name="j1_airport" id="j1_airport" placeholder="Hotel name" value="<?php if(!empty($_POST['j1_airport'])) echo $_POST['j1_airport']; ?>">
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6 frm_via_sub_fields">
						<label for="frm_via_line_2">Hotel address  </label>
							<input type="text" class="form-control" name="frm_via_line_2" id="frm_via_line_2" placeholder="Hotel address" value="<?php if(!empty($_POST['frm_via_line_2'])) echo $_POST['frm_via_line_2']; ?>">
						</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3 frm_via_sub_fields">
						<label for="frm_via_sub">Suburb  </label>
							<input type="text" class="form-control" name="frm_via_sub" id="frm_via_sub" placeholder="Suburb" value="<?php if(!empty($_POST['frm_via_sub'])) echo $_POST['frm_via_sub']; ?>">
						</div>
						</div>
						<div class="form-group  col-sm-6 col-md-3 col-lg-3 frm_via_sub_fields">
							<input type="text" class="form-control" name="frm_via_pc" id="frm_via_pc" placeholder="Postcode" value="<?php if(!empty($_POST['frm_via_pc'])) echo $_POST['frm_via_pc']; ?>">
						</div> DO NOT SHOW THIS -->
						<div class="clearfix"></div>
						
						<div class="form-group col-sm-12 col-md-3 col-lg-3 frm_via_sub_fields">
							<label for="j3_time_hrs">Pick up 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="j3_time_hrs" id="j3_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>
						<div class="form-group col-sm-12 col-md-3 col-lg-3 frm_via_sub_fields">
							<label for="j3_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="j3_time_mins" id="j3_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>
						
				<div class="panel panel-info">
					<div class="panel-heading">Destination Address in <u>Melbourne </u>
							<label for="j1_line_1"> <!-- you can enter things here --> </label></div> 
					<div class="panel-body">
						<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>
								
							<!--<select class="form-control"  name="j1_state" id="j1_state" placeholder="From State" value="<?php if(!empty($_POST['j1_state'])) echo $_POST['j1_state']; ?>">
								<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 your 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">Host 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="Host 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-5 contact_person_fields">
							<label for="destination_contact_phone">Host 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="Host 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">Host 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="Host 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>If you are under 18, have you booked Homestay accommodation with Australian Homestay Network (AHN)?<br> <b><u>Only answer this question if you are under 18 years of age</u>. </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>
								
								</div>
						<div class="clearfix"></div>
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label>Have you got a host's phone number (destination)?<br> If you are <u>under 18</u>, we <u>must</u> have your host's phone number.<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>
				</div>

				<div class="panel panel-info">
					<div class="panel-heading">Passenger and luggage information <br><h6>Each student must enter their own booking.</h6></div>
					<div class="panel-body">
						<div class="form-group col-sm-12 col-md-6 col-lg-6">
							<label for="pax_nos">Passenger limits - U18 can book 1 extra passenger (parent or guardian)<!--maximum two passengers (1 student + 1 family member = 2 passengers) for students studying an undergraduate or postgraduate course.<br>Refer to the terms an conditions for all paasengers limits <br> <font color="#0909FF;"><b><h6>Other students arriving on the same flight and going to the same destination, will travel together in the same Aero vehicle.</b></font></h6>--><br><br>Enter total passenger number including yourself </label>
                            <select class="form-control"  name="pax_nos" id="pax_nos">
                            								<?php
                            								for($x=0; $x<=2; $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 <u>must</u> be accurate.</b><br> 
							<ol>
							
							Including: Checked, carry-on, duffle bags, backpacks. Anything bigger than 46cm.<br> Basically, <u><b>all</u></b> the bags that you need Aero to transport for you.<br>
							Any excess bags other than what you have told us below, will need to be transported in a taxi at your own expense.<br>
							</ol>
							
							<ol>
							Note: Monash will not approve your booking if you are a single passenger flying with <u>more than</u> 2x 76cm, and 1x 55cm bags/suitcases.
							<!--<font color="#0909FF;"><b><li>Additional luggage will require a bigger vehicle and must be booked in advance of your arrival.</font></b>
							<ul>
							<font color="#0909FF;"><b><li>Your out of pocket cost will be AU$80, (up to 50km) you will need to pay 'in cash' directly to the driver  prior to departing Tullamarine Airport.</b></font></h6> </font>  <!--from a sedan to a van--></label>
							
							</b>No boxes, Golf bags, Bike boxes. Piano boxes, Surfboards, Guitar Cases<br/>
							
							</ol>
<select class="form-control" name="lug_nos" id="lug_nos">
  <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> -->
</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>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 - 12 Months</option>
								<option value="2">13 Months - 6 Years</option>
								<option value="3">7 Years - 8 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 - 12 Months</option>
								<option value="2">13 Months - 6 Years</option>
								<option value="3">7 Years - 8 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 - 12 Months</option>
								<option value="2">13 Months - 6 Years</option>
								<option value="3">7 Years - 8 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 - 12 Months</option>
								<option value="2">13 Months - 6 Years</option>
								<option value="3">7 Years - 8 Years</option>
							</select>
						</div>
					</div>
				</div>
				
				<div class="panel panel-info">
					<div class="panel-heading">Course information and Campus</div>
					<div class="panel-body">
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<!--<label for="int_notes">Your Course and Campus</label> -->
							<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="panel-body">
						<div class="form-group  col-sm-12 col-md-6 col-lg-6">
							<label for="j1_line_1">Address<br/>Airport pickup will <strong>NOT</strong> be confirmed unless a proper address is supplied (NO PO BOX). </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>
						
					<div class="panel panel-info"> 
					<div class="panel-heading">Extra Information or Requirements <br><h6>Do not bring food. Biosecurity delays will result in cancellation of your pick-up.</h6> </div>
					<div class="panel-body">
						<div class="form-group  col-sm-12 col-md-8 col-lg-8">
							<label for="ext_notes"><h5><!--Aero <b><u>cannot</u></b> accept money from Monash University students.<br>Each student (or Education agent) must enter their own booking. 1 booking per student.<br>-->There is no need to tell Aero that it is your first time in Australia. Aero is aware of this.<br><!--Please do not ask to be picked up later. We cannot accept such requests. <br>Aero will cancel your airport request if the wrong flight arrival time is given.--> <br>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.<br><br><b>Even</b> if Aero sends you a confirmation with your incorrect arrival time, your driver will <b>only</b> look at the <b>official flight</b> arrival time as indicated on your ticket. <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> 50 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><!--<br>We can take you to <b>one</b> address only. We cannot take you to get keys to your accommodation first.<br><br>Aero <b>cannot</b> pick you up if you arrive with more than <b>2x76cm and 1x55cm</b>.<br>We <b>cannot</b> accept sporting equipment or musical instruments.<br>Please make sure that you have given us <b>your full</b> 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>. <br><br>Monash will cancel your booking if you are not enrolled.</font></b> <font color="8B0000;"><b><h5>  在进入此预定之前，请确保您已经接受莫纳什的邀请并已完成注册登记。否则您将无法得到批准</b><br> </u>--></font></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 class="clearfix"></div> 
				</div>

								<form>
 <input type="BUTTON" value="Back to top of page" onclick="window.location.href='#top'">
</form>
				
				
				<!--<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>
				<h4 style="margin: 0;">OR</h4>
				<div>
					<p style="display: inline-block;"><b><u>Only</b></u> tick this box if you have accepted your <a href="https://www.monash.edu/study/how-to-apply/after-you-apply/accept-your-offer" class="">offer</a> from Monash</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.monash.edu/students/admin/enrolments" class="">enrolled</a> in units</p> <input type="checkbox" name="enrolled" id = "enrolled"> 
				</div>	-->
				<p><b><font color="#8B0000;"><h5>在进入此预定之前，请确保您已经接受莫纳什的邀请并已完成注册登记。否则您将无法得到批准</h5></font></b>
				<p><b><u><!--<font color="#FF0000;">--><h6>Your booking will NOT be approved by Monash unless you have accepted your offer and are enrolled in units.</h6></u><!--</font>--></b>
				<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="9"> <!-- was MU 9 --> 
				<input type="hidden" name="acc_contact" id="acc_contact" value="2303">  <!-- was MU 2303 This ID needs to be the "SELF" ID-->
				<input type="hidden" name="agent_contact" id="agent_contact" value="4603">  <!-- was MU 4603 --> 
				<input type="hidden" name="acc_passenger" id="acc_passenger" value="2190"> <!-- was MU 2190 --> 
				<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=" "> <!-- whatever is inside the 2 " " shows in the driver's notes-->
				<button type="submit" name="make_booking" id="make_booking" class="btn btn-success">I HAVE READ AND AGREE TO THE ABOVE TERMS AND CONDITIONS <br> I can confirm that I am enrolled.<br>NOTE: Your booking will be cancelled if you are not enrolled. </button>
				
				<div id="form_submit"></div>
				<p><!--Mandatory Fields *--></p>
			</div>
		</div>
	</form>
</div>
</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.monash.edu href="#">MONASH University</a></li>
						<li><a href= https://www.monash.edu/students/support/connect/contact-us href="#">Ask Monash</a></li>
						<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">
					</ul>
				</div>	
					<!--<h4>USEFUL LINKS</h4>
					<ul class="list-unstyled link-list">
					    <li><a href= https://www.use right website href="#">MONASH University</a></li>
						<li><a href= http://www.studymelbourne.vic.gov.au/help-and-advice/support-services href="#">Study in Melbourne Information</a></li>
						<li><a href= http://www.studymelbourne.vic.gov.au/life/transport href="#">Transport in Melbourne</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 2026 Aero Corporate Cars Pty Ltd, ABN - 18 626 739 884. 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 approval from Monash.<br><br>
                <!--you agree to pay 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 Monash needs to approve your extra passenger and or luggage.
				Please be advised that if you do not accept, your booking will revert to 1 passenger and 2 bags.-->
            </div>
        `;

        $(dialogContainer).dialog({
            title: "Monash Approval Required",
            modal: true,
            width: 440,
            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 = "2";
                        document.querySelector('input[name="has_agent"][value="0"]').checked = true;
                        ext_notes.value = "I Don't agree";
                        $(this).dialog("close");
                    } else if (yes && yes.checked) {
                        ext_notes.value = "I understand that Monash needs to approve the 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 Dont agree to pay AU$80";
            //         //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: "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 = `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 luggage:</label><br>
            <input type="number" id="small_lug" min="0"><br><br>

            <label for="big_lug">Number of checked in luggage:</label><br>
            <input type="number" id="big_lug" min="0"><br><br>
        </div>
    `;

    $(dialogContainer).dialog({
        title: "Luggage Information",
        modal: true,
        width: 420,
        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 = 
` 
${smallLug}x55cm.* 
${bigLug}x76cm.* 

`;
                    
                    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/Monash_booking_2026.js"></script>
  </body>
</html>