" ).insertAfter( "#res" );
// $('.res_msg').show().html('');
// $('.submit_btn').html('Proceed').removeAttr('disabled', 'disabled');
// }
}
});
}
});
});
$('#full_course').change(function () {
var c = $(this).val();
if(c=='Manual Shift Individual Lessons'){
$("#No_of_Lessons").attr("readonly", false);
}
else{
$("#No_of_Lessons").attr("readonly", true);
}
$("#Start_Date").attr("readonly", false);
$("#disclaimer").html("(DISCLAIMER: Please note that AMB Driving School requires a deposit of $50.00 for the Full course, 4-Day course and Manual Shift Packages. The remainder of the payment can be paid in the school on the start date. For ALL independent lessons, full payment is required to be made online)");
if(c=='Full Course' || c=='Manual Shift' || c=='Manual Shift Full Course'){
$("#session_dates").show();
var s = $('#Start_Date_dropdown').val();
setClassType(s);
$("#datecontrol").hide();
}
else if(c=='4 Days Course'){
$("#disclaimer").html("(DISCLAIMER: Please note that if you pay $50 or $300 then *BALANCE of payment to be paid by email transfer to info@ambdriving.com prior to in car instructor being assigned)");
$("#session_dates").show();
var s = $('#Start_Date_dropdown').val();
setClassType(s);
$("#datecontrol").hide();
}
else if(c=='Digital Driving Course'){
$("#disclaimer").html("(DISCLAIMER: Please note that if you pay $50 or $300 then *BALANCE of payment to be paid by email transfer to info@ambdriving.com prior to in car instructor being assigned)");
$("#session_dates").hide();
var todayTime = new Date();
var month = todayTime.getMonth()+1;
var day = todayTime.getDate();
var year = todayTime.getFullYear();
$("#Start_Date").val(year+'-'+(month<10?'0'+month :month)+'-'+(day<10?'0'+day:day));
$("#Start_Date").attr("readonly", true);
$("#datecontrol").show();
setClassType('0');
}
else
{
$("#session_dates").hide();
$("#datecontrol").show();
}
if((c=='Digital Driving Course' || c=='4 Days Course') && ($('#in_class_type').val() == "E")){
$("#Course_Charges").hide();
setPriceDropdown();
$("#Course_Charges_option").show();
}
else
{
$("#Course_Charges_option").hide();
$("#Course_Charges").show();
}
});
$('#citylocation').change(function () {
var c = $(this).val();
if(c == 6 || c == 8 || c == 7 || c == 11){
$("#full_course option[value='Full Course']").remove();
}
else{
$("#full_course option[value='Full Course']").remove();
//$("#full_course").append(new Option('5 Day Evening Course', 'Full Course'));
}
setClassType2();
calculate_price();
});
$('#full_course').change(function () {
var p = $(this).val();
if(p=='4 Days Course'){
$('#spryselect7').show();
}
else if (p== 'Digital Driving Course')
{
$("#spryselect7 option[value='R']").remove();
setClassType('0');
$('#spryselect7').show();
}
else{
$('#spryselect7').hide();
}
});
$('#Start_Date_dropdown').change(function () {
var s = $(this).val();
setClassType(s);
calculate_price();
});
$('#in_class_type').change(function () {
var s = $(this).val();
calculate_price();
});
function setClassType(s)
{
var in_class_type = $('#in_class_type');
var loc = $('#citylocation').val();
var p = $('#full_course').val();
var web = location_weblearning[loc];
var cls = location_classroom[loc];
var html = "";
if(p == 'Digital Driving Course')
{
if(web == 1){
html = html + '';
}
}
else
{
var regular = courses_session_dates_regular[s];
var online = courses_session_dates_online[s];
var html = "";
if(cls == 1 && regular==1 && p != 'Digital Driving Course' ){
html = html + '';
}
if(web == 1 && online==1){
html = html + '';
}
}
in_class_type.html(html);
}
function setClassType2()
{
var p = $('#full_course').val();
if(p == '4 Days Course')
{
var s = $('#Start_Date_dropdown').val();
setClassType(s);
}
else
{
setClassType(0);
}
}