﻿function nullvali() { if (document.getElementById("ctl00_TicketStatus_TicketNo").value == "") { if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Opera") == -1) { document.getElementById("ctl00_TicketStatus_ErrorMessage").innerText = "Please Enter Valid Ticket Number" } if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Safari") != -1) { document.getElementById("ctl00_TicketStatus_ErrorMessage").textContent = "Please Enter Valid Ticket Number" } document.getElementById("ctl00_TicketStatus_TicketNo").focus(); return false } else { if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Opera") == -1) { document.getElementById("ctl00_TicketStatus_ErrorMessage").innerText = "" } if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Safari") != -1) { document.getElementById("ctl00_TicketStatus_ErrorMessage").textContent = "" } return true } } function emailValidationUserControl(a, b) { var c = new RegExp(/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/); var d = c.test(document.getElementById(a).value); if (d == false) { if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Opera") == -1) { document.getElementById(b).innerText = "Invalid Login Id" } if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Safari") != -1) { document.getElementById(b).textContent = "Invalid Login Id" } document.getElementById(a).focus() } return d } function loginValidation() { if (document.getElementById("ctl00_Login1_emailId").value == "" || document.getElementById("ctl00_Login1_emailId").value == "UserName") { if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Opera") == -1) { document.getElementById("ctl00_Login1_errorMessage").innerText = "Enter your Login Id" } if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Safari") != -1) { document.getElementById("ctl00_Login1_errorMessage").textContent = "Enter your Login Id" } document.getElementById("ctl00_Login1_emailId").focus(); return false } else { var a = emailValidationUserControl("ctl00_Login1_emailId", "ctl00_Login1_errorMessage"); if (a == false) { return a } else { if (document.getElementById("ctl00_Login1_Password").value == "") { if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Opera") == -1) { document.getElementById("ctl00_Login1_errorMessage").innerText = "Enter your Password" } if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Safari") != -1) { document.getElementById("ctl00_Login1_errorMessage").textContent = "Enter your Password" } document.getElementById("ctl00_Login1_Password").focus(); return false } else { if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Opera") == -1) { document.getElementById("ctl00_Login1_errorMessage").innerText = "" } if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Safari") != -1) { document.getElementById("ctl00_Login1_errorMessage").textContent = "" } } } } return true }
function busbookingvalidation(bookingLimitation, currentDate) {
    if (isDate(document.getElementById("ctl00_BusBooking1_Date").value, "ctl00_BusBooking1_ErrorMsg", "-") == false) {
        document.getElementById("ctl00_BusBooking1_Date").focus()
        return false;
    } var today = new Date(); var current = currentDate.split(','); var today1 = current[0] + "/" + current[1] + "/" + current[2]; var today = Date.parse(today1); var pickUp = document.getElementById("ctl00_BusBooking1_Date").value; var pickUp1 = pickUp.split('-'); var pickUp1 = pickUp1[2] + "/" + pickUp1[1] + "/" + pickUp1[0]; var pickUpDate = Date.parse(pickUp1); if (pickUpDate < today) { document.getElementById("ctl00_BusBooking1_ErrorMsg").innerHTML = "Please select a date that is today or later"; document.getElementById("ctl00_BusBooking1_Date").focus(); return false; } if (document.getElementById("ctl00_BusBooking1_From")[document.getElementById("ctl00_BusBooking1_From").selectedIndex].text == "Starting Place") { document.getElementById("ctl00_BusBooking1_ErrorMsg").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>Please Select the From Place<SPAN width='100%'></SPAN></DIV>"; document.getElementById("ctl00_BusBooking1_From").focus(); return false } if (document.getElementById("ctl00_BusBooking1_To")[document.getElementById("ctl00_BusBooking1_To").selectedIndex].text == "Destination Place") { document.getElementById("ctl00_BusBooking1_ErrorMsg").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>Please Select the Destination Place<SPAN width='100%'></SPAN></DIV>"; document.getElementById("ctl00_BusBooking1_To").focus(); return false } if (document.getElementById("ctl00_BusBooking1_From")[document.getElementById("ctl00_BusBooking1_From").selectedIndex].text == document.getElementById("ctl00_BusBooking1_To")[document.getElementById("ctl00_BusBooking1_To").selectedIndex].text)
    { document.getElementById("ctl00_BusBooking1_ErrorMsg").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>Please select different drop-off place</DIV>"; document.getElementById("ctl00_BusBooking1_To").focus(); return false; } if (document.getElementById("ctl00_BusBooking1_NoofSeats").value != "" && bookingLimitation != 0) { if (parseInt(document.getElementById("ctl00_BusBooking1_NoofSeats").value) > parseInt(bookingLimitation)) { document.getElementById("ctl00_BusBooking1_ErrorMsg").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>Only " + bookingLimitation + " seats can be booked at a time.<SPAN width='100%'></SPAN></DIV>"; document.getElementById("ctl00_BusBooking1_NoofSeats").focus(); return false; } } document.getElementById("ctl00_BusBooking1_HiddenNoofSeat").value = 1; document.getElementById("ctl00_BusBooking1_ErrorMsg").innerHTML = "";
    if ((document.getElementById("ctl00_BusBooking1_From")[document.getElementById("ctl00_BusBooking1_From").selectedIndex].text.toLowerCase() == "chennai") && (document.getElementById("ctl00_BusBooking1_To")[document.getElementById("ctl00_BusBooking1_To").selectedIndex].text.toLowerCase() == "thirupathi (pilgrimage tour)"))
    { alert('This Package includes: \t\t\t\n\t* Up and Down bus ticket \n\t* Break Fast, Lunch and \n\t* Free Darshanam') }
    if ((document.getElementById("ctl00_BusBooking1_From")[document.getElementById("ctl00_BusBooking1_From").selectedIndex].text.toLowerCase() == "chennai") && (document.getElementById("ctl00_BusBooking1_To")[document.getElementById("ctl00_BusBooking1_To").selectedIndex].text.toLowerCase() == "hyderabad"))
    { alert(' Dear Customer, We are happy to announce the introduction of \n Volvo’s-B7R to our fleet, which will offer special features to give \n a comfortable and safe travel to our esteemed passenger. Shortly \n between Chennai-Ongole-Hyderabad. \n Book Online: www.parveentravels.com ') }
    if ((document.getElementById("ctl00_BusBooking1_From")[document.getElementById("ctl00_BusBooking1_From").selectedIndex].text.toLowerCase() == "hyderabad") && (document.getElementById("ctl00_BusBooking1_To")[document.getElementById("ctl00_BusBooking1_To").selectedIndex].text.toLowerCase() == "chennai"))
    { alert(' Dear Customer, We are happy to announce the introduction of \n Volvo’s-B7R to our fleet, which will offer special features to give \n a comfortable and safe travel to our esteemed passenger. Shortly \n between Chennai-Ongole-Hyderabad. \n Book Online: www.parveentravels.com ') }
    if ((document.getElementById("ctl00_BusBooking1_From")[document.getElementById("ctl00_BusBooking1_From").selectedIndex].text.toLowerCase() == "coimbatore") && (document.getElementById("ctl00_BusBooking1_To")[document.getElementById("ctl00_BusBooking1_To").selectedIndex].text.toLowerCase() == "thirupathi (pilgrimage tour)"))
    { alert('This Package includes: \t\t\t\n\t* Up and Down bus ticket \n\t* Break Fast, Lunch \n\t* Spl.Darshan Ticket and \n\t* Moderate Accommodation with freshup facilities') }
    if ((document.getElementById("ctl00_BusBooking1_From")[document.getElementById("ctl00_BusBooking1_From").selectedIndex].text.toLowerCase() == "trichy"))
    { alert('Departure/arrival time is tentative. Kindly confirm the departure/arrival time \nof your selected bus from our Trichy office staffs') }
    return true;
}
function CarBookingValidation(currentDate) {
    if (document.getElementById("ctl00_CarBooking1_localStation").checked == false && document.getElementById("ctl00_CarBooking1_outStation").checked == false) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select the station"; document.getElementById("ctl00_CarBooking1_localStation").focus(); return false } if (document.getElementById("ctl00_CarBooking1_dlPackage").selectedIndex == 0) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select the package"; document.getElementById("ctl00_CarBooking1_dlPackage").focus(); return false } if (document.getElementById("ctl00_CarBooking1_dlFlit").selectedIndex == 0) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select the Fleet"; document.getElementById("ctl00_CarBooking1_dlFlit").focus(); return false } if (document.getElementById("ctl00_CarBooking1_dlPickUPCity").selectedIndex == 0) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select pick-up city"; document.getElementById("ctl00_CarBooking1_dlPickUPCity").focus(); return false } if (document.getElementById("ctl00_CarBooking1_pickUpDate").value == "") { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select Pick-Up Date"; document.getElementById("ctl00_CarBooking1_pickUpDate").focus(); return false }
    if (isDate(document.getElementById("ctl00_CarBooking1_pickUpDate").value, "ctl00_CarBooking1_errorMessage", "-") == false) {
        document.getElementById("ctl00_CarBooking1_pickUpDate").focus()
        return false;
    }
    if (document.getElementById("ctl00_CarBooking1_dlPickUpHour").selectedIndex == 0) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select Pick-Up Hour"; document.getElementById("ctl00_CarBooking1_dlPickUpHour").focus(); return false } if (document.getElementById("ctl00_CarBooking1_dlPickUpMinute").selectedIndex == 0) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select Pick-Up Minute"; document.getElementById("ctl00_CarBooking1_dlPickUpMinute").focus(); return false } var pickUp = document.getElementById("ctl00_CarBooking1_pickUpDate").value; var pickUp1 = pickUp.split('-'); var pickUpDay; if (document.getElementById("ctl00_CarBooking1_dlPickUpMeridian")[document.getElementById("ctl00_CarBooking1_dlPickUpMeridian").selectedIndex].text == "PM" && parseInt(document.getElementById("ctl00_CarBooking1_dlPickUpHour")[document.getElementById("ctl00_CarBooking1_dlPickUpHour").selectedIndex].text) < 12) { pickUpDay = 12 + parseInt(document.getElementById("ctl00_CarBooking1_dlPickUpHour")[document.getElementById("ctl00_CarBooking1_dlPickUpHour").selectedIndex].text); } else { pickUpDay = document.getElementById("ctl00_CarBooking1_dlPickUpHour")[document.getElementById("ctl00_CarBooking1_dlPickUpHour").selectedIndex].text; } var pickUpDate = new Date(pickUp1[2], pickUp1[1], pickUp1[0], pickUpDay, document.getElementById("ctl00_CarBooking1_dlPickUpMinute")[document.getElementById("ctl00_CarBooking1_dlPickUpMinute").selectedIndex].text, "00"); var current = currentDate.split(','); var currentDate1 = new Date(current[0], current[1], current[2], current[3], current[4], current[5]); if (pickUpDate <= currentDate1) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select a pick-up Date that is later than today"; document.getElementById("ctl00_CarBooking1_pickUpDate").focus(); return false; } if (document.getElementById("ctl00_CarBooking1_outStation").checked == true) {
        if (document.getElementById("ctl00_CarBooking1_dropOffDate").value == "") { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select Drop-Off Date"; document.getElementById("ctl00_CarBooking1_dropOffCalender").focus(); return false }
        if (isDate(document.getElementById("ctl00_CarBooking1_dropOffDate").value, "ctl00_CarBooking1_errorMessage", "-") == false) {
            document.getElementById("ctl00_CarBooking1_dropOffDate").focus()
            return false;
        } if (document.getElementById("ctl00_CarBooking1_dlDropOffHour").selectedIndex == 0) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select Drop-Off Hour"; document.getElementById("ctl00_CarBooking1_dlDropOffHour").focus(); return false } if (document.getElementById("ctl00_CarBooking1_dlDropOffMinute").selectedIndex == 0) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please select Drop-Off Minute"; document.getElementById("ctl00_CarBooking1_dlDropOffMinute").focus(); return false } var dropOff = document.getElementById("ctl00_CarBooking1_dropOffDate").value; var dropOff1 = dropOff.split('-'); var dropOffDay; if (document.getElementById("ctl00_CarBooking1_dlDropOffMeridian")[document.getElementById("ctl00_CarBooking1_dlDropOffMeridian").selectedIndex].text == "PM" && parseInt(document.getElementById("ctl00_CarBooking1_dlDropOffHour")[document.getElementById("ctl00_CarBooking1_dlDropOffHour").selectedIndex].text) < 12) { dropOffDay = 12 + parseInt(document.getElementById("ctl00_CarBooking1_dlDropOffHour")[document.getElementById("ctl00_CarBooking1_dlDropOffHour").selectedIndex].text); } else { dropOffDay = document.getElementById("ctl00_CarBooking1_dlDropOffHour")[document.getElementById("ctl00_CarBooking1_dlDropOffHour").selectedIndex].text; } var dropOffDate = new Date(dropOff1[2], dropOff1[1], dropOff1[0], dropOffDay, document.getElementById("ctl00_CarBooking1_dlDropOffMinute")[document.getElementById("ctl00_CarBooking1_dlDropOffMinute").selectedIndex].text, "00"); if (dropOffDate <= pickUpDate) { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "drop - off date should be greater than pick - up date"; document.getElementById("ctl00_CarBooking1_dropOffDate").focus(); return false }
    } if (document.getElementById("ctl00_CarBooking1_adultCount").value == "" || document.getElementById("ctl00_CarBooking1_adultCount").value == "0") { document.getElementById("ctl00_CarBooking1_errorMessage").innerHTML = "Please enter number of adults"; document.getElementById("ctl00_CarBooking1_adultCount").focus(); return false; } document.getElementById("ctl00_CarBooking1_hfBooking").value = 'book1'; return true;
}
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); 
