<%@ page language="C#" autoeventwireup="true" inherits="Pages_OnlineAdmission_AdmissionInquiryForm, App_Web_2mke2en0" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/solid.css" integrity="sha384-wnAC7ln+XN0UKdcPvJvtqIH3jOjs9pnKnq9qX68ImXvOGz2JuFoEiCjT8jyZQX2z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/fontawesome.css" integrity="sha384-HbmWTHay9psM8qyzEKPc8odH4DsOuzdejtnr+OFtDmOcIVnhgReQ4GZBH7uwcjf6" crossorigin="anonymous">
    <link href="../../App_Themes/admission/css/bootstrap.css" rel="stylesheet" />
    <link href="../../App_Themes/admission/css/style.css" rel="stylesheet" />
    <link href="../../App_Themes/admission/css/jquery-ui.css" rel="stylesheet" />
    <link href="http://fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i" rel="stylesheet">
    <style>
        .bg-white span {
            display: inline-block;
            max-width: 100%;
            margin-bottom: 5px;
            font-weight: 600;
            color: #252422;
            font-size: 15px;
            letter-spacing: 0.4px;
            height: 11px;
        }

        .text-red {
            color: red !important;
        }


        * {
            box-sizing: border-box;
        }


        /*the container must be positioned relative:*/
        .autocomplete {
            position: relative;
            display: inline-block;
        }

        .autocomplete-items {
            position: absolute;
            border: 1px solid #d4d4d4;
            border-bottom: none;
            border-top: none;
            z-index: 99;
            /*position the autocomplete items to be the same width as the container:*/
            top: 100%;
            left: 0;
            right: 0;
            color: #000000;
        }

            .autocomplete-items div {
                padding: 10px;
                cursor: pointer;
                background-color: #fff;
                border-bottom: 1px solid #d4d4d4;
            }

                /*when hovering an item:*/
                .autocomplete-items div:hover {
                    background-color: #e9e9e9;
                }

        /*when navigating through the items using the arrow keys:*/
        .autocomplete-active {
            background-color: DodgerBlue !important;
            color: #000000;
        }

        .form-group {
            display: flex;
            flex-wrap: wrap;
            width: 100%;
        }

        .padd-0 {
            width: 100%;
        }

        @media (max-width:767px) {
            .topic-header {
                padding: 10px 31px;
            }
        }
    </style>
</head>
<body style="background-image: url(../../App_Themes/admission/images/inquiry-bg.jpg); background-position: center; background-repeat: no-repeat; background-size: cover;">
    <div class="w3l-main">
        <div class="row">
            <div class="col-lg-12">
                <div class="page-header">
                    <h3>
                        <asp:Label ID="schoolnameLabel" runat="server" Text=""></asp:Label>
                    </h3>
                    <h4 class="pTop6">Admission  Inquiry Form</h4>
                </div>
            </div>
        </div>
        <form id="form1" runat="server" class="w3l-from container">
            <div class="col-lg-12 padd-0 mt1">
                <div class="alert alert-success" runat="server" id="successmessage" visible="false">
                    <strong><i class="fas fa-thumbs-up"></i>&nbsp;&nbsp;&nbsp;Your data has been successfully saved!
                        <asp:Label runat="server" ID="FormNoLabel" Style="float: right"></asp:Label>
                    </strong>
                </div>
                <%--Changes for Mantis Id: 0032010 By Hemali--%>
                <div class="alert alert-success" runat="server" id="OTPMsgDiv" visible="false">
                    <strong><i class="fas fa-thumbs-up"></i>
                        <asp:Label runat="server" ID="OTPmsgLabel" Text=""></asp:Label>
                    </strong>
                </div>
            </div>
            <div class="col-lg-12 padd-0 mt1">
                <div runat="server" id="failuremessage" visible="false">
                    <div class="alert alert-danger">
                        <i class="fas fa-times"></i>&nbsp;&nbsp;&nbsp;<strong>Error! Please check all the inputs.</strong>
                    </div>
                </div>
            </div>
            <div class="col-lg-12 padd-0 mt1">
                <div runat="server" id="failuremessagediv" visible="false">
                    <div class="alert alert-danger">
                        <strong>
                            <asp:Label runat="server" ID="FailureMessageLabel"></asp:Label>
                        </strong>
                    </div>
                </div>
            </div>
            <%--<div class="col-lg-12 padd-0 mt1">
                <div class="alert alert-danger">
                    &nbsp;&nbsp;&nbsp;If any query, Please contact us on 7499916359.
                </div>
            </div>--%>
            <div class="col-lg-12 padd-0 mt1">
                <div class="alert alert-danger">
                    <i class="fas fa-asterisk"></i>&nbsp;&nbsp;&nbsp;Required Field
                </div>
            </div>
            <div class="col-lg-12 padd-0 mt1" id="DefaultAdmissionInquiryRemarkDiv" runat="server" visible="false">
                <div class="alert alert-info">
                    <h6>
                        <asp:Label ID="DefaultAdmissionInquiryRemarkLabel" runat="server" Text=""></asp:Label>

                    </h6>
                </div>
            </div>

            <div class="col-lg-12 padd-0 mt1" id="AdmissionInquiryRemarkdiv" runat="server" visible="false">
                <div class="alert alert-info">
                    <h6>
                        <asp:Label ID="AdmissionInquiryRemarkLabel" runat="server" Text=""></asp:Label>

                    </h6>
                </div>
            </div>
            <div class="form-group">
                <div class="col-lg-12 padd-0">
                    <div class="topic-header ">
                        <h5>
                            <span id="SchoolInformationHeaderLabel" runat="server" text="School Information (in which applicant seeks admission)"><i class="fas fa-school bg-bgreen"></i>&nbsp;School Information (in which applicant seeks admission)</span>
                        </h5>
                    </div>


                    <div class="col-md-4">
                        <div class="bg-white">
                            <label for="InputName" id="SchoolLabel" runat="server" class="mandatory">School Name</label>
                            <div class="input-group">
                                <asp:DropDownList ID="OrgDropDownList" CssClass="form-control" runat="server" AutoPostBack="true" OnSelectedIndexChanged="OrgDropDownList_OnSelectedIndexChanged">
                                </asp:DropDownList>
                                <div id="orgnull" class="null-message" style="display: none">Select School</div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="bg-white">
                            <label for="InputName" class="mandatory">Batch</label>
                            <div class="input-group">
                                <asp:DropDownList ID="BatchDropDownList" runat="server" CssClass="form-control" AutoPostBack="true" OnSelectedIndexChanged="BatchDropDownList_SelectedIndexChanged">
                                </asp:DropDownList>
                                <div id="batchnull" class="null-message" style="display: none">Select Batch</div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="bg-white">
                            <label for="InputName" class="mandatory">Standard </label>
                            <div class="input-group">
                                <asp:DropDownList ID="StandardDropDownList" CssClass="form-control" runat="server" AutoPostBack="true" OnSelectedIndexChanged="StandardDropDownList_SelectedIndexChanged">
                                </asp:DropDownList>
                                <div id="standardnull" class="null-message" style="display: none">Select Standard</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div id="AdmissionInquiryFormFieldsDiv" runat="server" visible="false">
                <div class="form-group">
                    <div class="col-lg-12 padd-0">
                        <div class="topic-header ">
                            <h5>
                                <span id="StudentInfromationLabel" runat="server" text="Student Information"><i class="fas fa-user-graduate bg-yellow"></i>&nbsp;Student Details</span>
                            </h5>
                        </div>


                        <div class="col-md-4">
                            <div class="bg-white">
                                <label for="InputName" class="mandatory">First Name</label>
                                <div class="input-group">
                                    <asp:TextBox ID="FirstNameTextBox" CssClass="form-control" runat="server" placeholder="First Name"></asp:TextBox>
                                    <div id="fnamenull" class="null-message" style="display: none">First Name is required</div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="MiddleNameDiv" runat="server" visible="true">
                            <div class="bg-white">
                                <%--<label for="InputName">Middle Name</label>--%>
                                <asp:Label ID="MiddleNameLabel" runat="server" Text="Middle Name" Visible="true"></asp:Label>
                                <asp:Label ID="MiddleNameLabelM" runat="server" Class="mandatory" Visible="false" Text="Middle Name"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="MiddleNameTextBox" CssClass="form-control" runat="server" placeholder="Middle Name"></asp:TextBox>

                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="SurnameDiv" runat="server" visible="false">
                            <div class="bg-white">
                                <asp:Label ID="SurnameLabel" runat="server" Text="Last Name" Visible="true"></asp:Label>
                                <asp:Label ID="SurnameLabelM" runat="server" Class="mandatory" Visible="false" Text="Last Name"></asp:Label>
                                <%--<label for="InputName" class="mandatory">Last Name</label>--%>
                                <div class="input-group">
                                    <asp:TextBox ID="LastNameTextBox" CssClass="form-control" runat="server" placeholder="Last Name"></asp:TextBox>
                                    <div id="lnamenull" class="null-message" style="display: none">Last Name is required</div>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="GenderDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName" class="mandatory">Gender</label>--%>
                                <asp:Label ID="GenderLabel" runat="server" Text="Gender" Visible="false"></asp:Label>
                                <asp:Label ID="GenderLabelM" runat="server" Class="mandatory" Text="Gender" Visible="true"></asp:Label>
                                <div class="input-group">
                                    <asp:DropDownList ID="GenderDropDownList" CssClass="form-control" runat="server" onchange="DropDownCheck(this)">
                                    </asp:DropDownList>
                                    <div id="gendernull" class="null-message" style="display: none">Select Gender</div>
                                </div>
                            </div>
                        </div>
                        <%--   <div class="col-md-4" id="DateOfBirthDiv" runat="server">
                        <div class="bg-white">
                            <label for="InputName" class="mandatory">Birth Date</label>
                             <asp:Label ID="DateOfBirthLabel" runat="server" Text="Date Of Birth" Visible="True"></asp:Label>
                            <asp:Label ID="DateOfBirthLabelM" runat="server" Class="mandatory" Text="Date Of Birth" Visible="true"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" AutoPostBack="true" ID="BirthDateTextBox" CssClass="form-control" placeholder="dd/mm/yyyy" onkeyup="FormatIt(this);" OnTextChanged="BirthDateTextBox_TextChanged" />
                                <div id="dobdnull" class="null-message" style="display: none">DOB is required</div>
                            </div>
                        </div>
                        </div>--%>
                        <div class="col-md-4" id="DateOfBirthDiv" runat="server">
                            <div class="bg-white">
                                <asp:Label ID="DateOfBirthLabel" runat="server" Text="Date Of Birth" Visible="True"></asp:Label>
                                <asp:Label ID="DateOfBirthLabelM" runat="server" Class="mandatory" Text="Date Of Birth" Visible="true"></asp:Label>
                                <%--<label for="InputName">Birth Date</label>--%>
                                <div class="input-group">
                                    <asp:TextBox runat="server" CssClass="form-control" ID="BirthDateTextBox" placeholder="dd/mm/yyyy"
                                        OnTextChanged="BirthDateTextBox_TextChanged" onkeyup="FormatIt(this);" AutoPostBack="true" />
                                    <div id="dobdnull" class="null-message" style="display: none">DOB is required</div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" runat="server" id="AgeDiv">
                            <div class="bg-white">
                                <%--<label for="InputName" class="mandatory">Birth Date</label>--%>
                                <%-- <asp:Label ID="DateOfBirthLabel" runat="server" Text="Date Of Birth" Visible="True"></asp:Label>--%>
                                <asp:Label ID="AgeLabel" runat="server" Text="Age" Visible="true"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox runat="server" ID="AgeTextBox" CssClass="form-control" placeholder="Age" Enabled="false" />

                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="MinorityStatusDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName" class="mandatory">Birth Date</label>--%>
                                <%-- <asp:Label ID="DateOfBirthLabel" runat="server" Text="Date Of Birth" Visible="True"></asp:Label>--%>
                                <asp:Label ID="MinorityStatusLabel" runat="server" Text="Minority Status" Visible="true"></asp:Label>
                                <asp:Label ID="MinorityStatusLabelM" runat="server" Class="mandatory" Text="Minority Status" Visible="false"></asp:Label>
                                <div class="input-group">

                                    <asp:DropDownList ID="MinorityStatusDropDownList" CssClass="form-control" runat="server">
                                        <asp:ListItem Text="- Select -" Value="-1"></asp:ListItem>
                                        <asp:ListItem Text="Yes" Value="1" Selected="True"></asp:ListItem>
                                        <asp:ListItem Text="No" Value="2"></asp:ListItem>
                                    </asp:DropDownList>
                                    <div id="minoritystatusnull" class="null-message" style="display: none">Select</div>
                                </div>
                            </div>
                        </div>


                        <div class="col-md-4" id="LiveWithDiv" runat="server">
                            <div class="bg-white">

                                <asp:Label ID="LiveWithLabel" runat="server" Text="Live With" Visible="true"></asp:Label>
                                <asp:Label ID="LiveWithLabelM" runat="server" Class="mandatory" Text="Live With" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:DropDownList ID="LiveWithDropDownList" CssClass="form-control" runat="server" onchange="DropDownCheck(this)">
                                    </asp:DropDownList>
                                    <div id="livewithnull" class="null-message" style="display: none">Select</div>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="castcategorydiv" runat="server">
                            <div class="bg-white">
                                <asp:Label ID="CastCategoryLabel" runat="server" Text="Caste Category" Visible="true"></asp:Label>
                                <asp:Label ID="CastCategoryLabelM" runat="server" Class="mandatory" Text="Caste Category" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:DropDownList ID="CastCategoryDropDownList" CssClass="form-control" runat="server" onchange="DropDownCheck(this)">
                                    </asp:DropDownList>
                                    <div id="castcategorynull" class="null-message" style="display: none">Select Caste Category</div>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="AadhaarNumberDiv" runat="server">
                            <div class="bg-white">

                                <asp:Label ID="AadhaarNumberLabel" runat="server" Text="Aadhaar Number" Visible="true"></asp:Label>
                                <asp:Label ID="AadhaarNumberLabelM" runat="server" Class="mandatory" Text="Aadhaar Number" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox runat="server" ID="AadhaarNumberTextBox" CssClass="form-control" placeholder="Aadhaar Number" AutoCompleteType="HomeZipCode"
                                        Enabled="true" MaxLength="20" onkeypress="return isNumberKey(event)" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" />
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="BloodGroupDiv" runat="server">
                            <div class="bg-white">
                                <asp:Label ID="BloodGroupLabel" runat="server" Text="Blood Group" Visible="true"></asp:Label>
                                <asp:Label ID="BloodGroupLabelM" runat="server" Class="mandatory" Text="Blood Group" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:DropDownList ID="BloodGroupDropDownList" CssClass="form-control" runat="server" onchange="DropDownCheck(this)">
                                    </asp:DropDownList>
                                    <div id="bloodgroupnull" class="null-message" style="display: none">Select</div>
                                </div>
                            </div>
                        </div>


                    </div>
                </div>

                <div id="ParentsDetailsDiv" class="form-group" runat="server">
                    <div class="col-lg-12 padd-0">
                        <div class="topic-header ">
                            <h5>
                                <span id="ParentsDetailsLabel" runat="server" text="Parents Details"><i class="fas fa-user-graduate bg-yellow"></i>&nbsp;Parents Details</span>
                            </h5>
                        </div>
                    </div>

                    <div class="col-md-4" id="FatherNameDiv" runat="server">
                        <div class="bg-white">

                            <asp:Label ID="FatherNameLabel" runat="server" Text="Father Name" Visible="true"></asp:Label>
                            <asp:Label ID="FatherNameLabelM" runat="server" Class="mandatory" Text="Father Name" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="FatherNameTextBox" CssClass="form-control" placeholder="Father Name" Enabled="true" />

                            </div>
                        </div>
                    </div>

                    <div class="col-md-4" runat="server" id="FatherOccupationDiv">
                        <div class="bg-white">

                            <asp:Label ID="FatherOccupationLabel" runat="server" Text="Father Occupation" Visible="true"></asp:Label>
                            <asp:Label ID="FatherOccupationLabelM" runat="server" Class="mandatory" Text="Father Occupation" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="FatherOccupationTextBox" CssClass="form-control" placeholder="Father Occupation" Enabled="true" />

                            </div>
                        </div>
                    </div>

                    <div class="col-md-4" runat="server" id="FatherIncomeDiv">
                        <div class="bg-white">
                            <asp:Label ID="FatherIncomeLabel" runat="server" Text="Father Annual Income" Visible="true"></asp:Label>
                            <asp:Label ID="FatherIncomeLabelM" runat="server" SkinID="mandatoryLabel" Class="mandatory" Text="Father Annual Income" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="FatherIncomeTextBox" CssClass="form-control" onkeypress="return isNumberKey(event)" placeholder="Father Annual Income"
                                    Enabled="true" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" />
                            </div>
                        </div>
                    </div>

                    <div class="col-md-4" runat="server" id="FatherContactNoDiv">
                        <div class="bg-white">

                            <asp:Label ID="FatherContactNoLabel" runat="server" Text="Father Contact No" Visible="true"></asp:Label>
                            <asp:Label ID="FatherContactNoLabelM" runat="server" Class="mandatory" Text="Father Contact No" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="FatherContactNoTextBox" CssClass="form-control" placeholder="Father Contact No" onkeypress="return isNumberKey(event)"
                                    Enabled="true" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" />
                            </div>
                        </div>
                    </div>


                    <div class="col-md-4" runat="server" id="FatherMailDiv">
                        <div class="bg-white">

                            <asp:Label ID="FatherMailLabel" runat="server" Text="Father Mail" Visible="true"></asp:Label>
                            <asp:Label ID="FatherMailLabelM" runat="server" Class="mandatory" Text="Father Mail" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="FatherMailTextBox" CssClass="form-control" placeholder="Father Mail" Enabled="true" />

                            </div>
                        </div>
                    </div>


                    <div class="col-md-4" runat="server" id="FatherQualificationDiv">
                        <div class="bg-white">

                            <asp:Label ID="FatherQualificationLabel" runat="server" Text="Father Qualification" Visible="true"></asp:Label>
                            <asp:Label ID="FatherQualificationLabelM" runat="server" Text="Father Qualification " Class="mandatory" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="FatherQualificationTextBox" CssClass="form-control" placeholder="Father Qualification" Enabled="true" />

                            </div>
                        </div>
                    </div>


                    <div class="col-md-4" id="MotherNameDiv" runat="server">
                        <div class="bg-white">
                            <asp:Label ID="MotherNameLabel" runat="server" Text="Mother Name" Visible="true"></asp:Label>
                            <asp:Label ID="MotherNameLabelM" runat="server" Class="mandatory" Visible="false" Text="Mother Name"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox ID="MotherNameTextBox" CssClass="form-control" runat="server" placeholder="Mother Name"></asp:TextBox>

                            </div>
                        </div>
                    </div>

                    <div class="col-md-4" runat="server" id="MotherOccupationDiv">
                        <div class="bg-white">

                            <asp:Label ID="MotherOccupationLabel" runat="server" Text="Mother Occupation" Visible="true"></asp:Label>
                            <asp:Label ID="MotherOccupationLabelM" runat="server" Class="mandatory" Text="Mother Occupation" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="MotherOccupationTextBox" CssClass="form-control" placeholder="Mother Occupation" Enabled="true" />

                            </div>
                        </div>
                    </div>


                    <div class="col-md-4" runat="server" id="MotherIncomeDiv">
                        <div class="bg-white">

                            <asp:Label ID="MotherIncomeLabel" runat="server" Text="Mother Annual Income" Visible="true"></asp:Label>
                            <asp:Label ID="MotherIncomeLabelM" runat="server" Class="mandatory" Text="Mother Annual Income" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="MotherIncomeTextBox" CssClass="form-control" onkeypress="return isNumberKey(event)" placeholder="Mother Annual Income"
                                    Enabled="true" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" />
                            </div>
                        </div>
                    </div>


                    <div class="col-md-4" runat="server" id="MotherContactNoDiv">
                        <div class="bg-white">

                            <asp:Label ID="MotherContactNoLabel" runat="server" Text="Mother Contact No" Visible="true"></asp:Label>
                            <asp:Label ID="MotherContactNoLabelM" runat="server" Class="mandatory" Text="Mother Contact No" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="MotherContactNoTextBox" CssClass="form-control" placeholder="Mother Contact No" onkeypress="return isNumberKey(event)"
                                    Enabled="true" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" />
                            </div>
                        </div>
                    </div>

                    <div class="col-md-4" runat="server" id="MotherMailDiv">
                        <div class="bg-white">

                            <asp:Label ID="MotherMailLabel" runat="server" Text="Mother Mail" Visible="true"></asp:Label>
                            <asp:Label ID="MotherMailLabelM" runat="server" Class="mandatory" Text="Mother Mail" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="MotherMailTextBox" CssClass="form-control" placeholder="Mother Mail" Enabled="true" />

                            </div>
                        </div>
                    </div>


                    <div class="col-md-4" runat="server" id="MotherQualificationDiv">
                        <div class="bg-white">

                            <asp:Label ID="MotherQualificationLabel" runat="server" Text="Mother Qualification" Visible="true"></asp:Label>
                            <asp:Label ID="MotherQualificationLabelM" runat="server" Class="mandatory" Text="Mother Qualification" Visible="false"></asp:Label>
                            <div class="input-group">
                                <asp:TextBox runat="server" ID="MotherQualificationTextBox" CssClass="form-control" placeholder="Mother Qualification" Enabled="true" />

                            </div>
                        </div>
                    </div>


                </div>

                <div class="form-group" id="ACDiv" runat="server" visible="true">
                    <div class="col-lg-12 padd-0">
                        <div class="topic-header ">
                            <h5>
                                <span id="AddressHeaderLabel" runat="server"><i class="fas fa-info-circle bg-pink"></i>&nbsp;&nbsp;Address & Contact Information</span>
                            </h5>
                        </div>


                        <div class="col-md-4" id="StreetOneDiv" runat="server">
                            <div class="bg-white">
                                <%-- <label for="InputName">Street One</label>--%>
                                <asp:Label ID="StreetOneLabel" runat="server" Text="Street One" Visible="true"></asp:Label>
                                <asp:Label ID="StreetOneLabelM" runat="server" Class="mandatory" Text="Street One" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="StreetOneTextBox" CssClass="form-control" runat="server" placeholder="Street One"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="StreetTwoDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Street Two</label>--%>
                                <asp:Label ID="StreetTwoLabel" runat="server" Text="Street Two" Visible="true"></asp:Label>
                                <asp:Label ID="StreetTwoLabelM" runat="server" Class="mandatory" Text="Street Two" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="StreetTwoTextBox" CssClass="form-control" runat="server" placeholder="Street Two"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="StreetThreeDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Street Three</label>--%>
                                <asp:Label ID="StreetThreeLabel" runat="server" Text="Street Three" Visible="true"></asp:Label>
                                <asp:Label ID="StreetThreeLabelM" runat="server" Class="mandatory" Text="Street Three" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="StreetThreeTextBox" CssClass="form-control" runat="server" placeholder="Street Three"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="CityDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">City</label>--%>
                                <asp:Label ID="CityLabel" runat="server" Text="City" Visible="true"></asp:Label>
                                <asp:Label ID="CityLabelM" runat="server" Class="mandatory" Text="City" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="CityTextBox" runat="server" CssClass="form-control" placeholder="City" onkeyup="Search(this);" autocomplete="off"></asp:TextBox>
                                    <%--<asp:HiddenField ID="CityTextBoxTemp" runat="server" />--%>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="StateDiv" runat="server">
                            <div class="bg-white">
                                <%-- <label for="InputName">State</label>--%>
                                <asp:Label ID="StateLabel" runat="server" Text="State" Visible="true"></asp:Label>
                                <asp:Label ID="StateLabelM" runat="server" Class="mandatory" Text="State" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="StateTextBox" CssClass="form-control" runat="server" placeholder="State" onkeyup="Search(this);" autocomplete="off"
                                        AutoPostBack="true"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="CountryDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Country</label>--%>
                                <asp:Label ID="CountryLabel" runat="server" Text="Country" Visible="true"></asp:Label>
                                <asp:Label ID="CountryLabelM" runat="server" Class="mandatory" Text="Country" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="CountryTextBox" CssClass="form-control" runat="server" placeholder="Country" onkeyup="Search(this);"
                                        autocomplete="off" AutoPostBack="true"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="ZipCodeDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Zip Code</label>--%>
                                <asp:Label ID="ZipCodeLabel" runat="server" Text="Zip Code" Visible="true"></asp:Label>
                                <asp:Label ID="ZipCodeLabelM" runat="server" Class="mandatory" Text="Zip Code" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="ZipCodeTextBox" runat="server" AutoPostBack="true" CssClass="form-control" autocomplete="off" placeholder="Zip Code"
                                        onkeypress="return isNumberKey(event)" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')"></asp:TextBox>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="WhatsAppContactDiv" runat="server" visible="true">
                            <div class="bg-white">
                                <%--  <label for="InputName" class="mandatory">Parent Mobile No.</label>--%>
                                <%--<asp:Label ID="ContactNoLabel" runat="server" Text="Parent Mobile No." Visible ="true"></asp:Label>--%>
                                <asp:Label ID="WhatsAppContactLabel" runat="server" Text="WhatsApp Contact"></asp:Label>
                                <asp:Label ID="WhatsAppContactLabelM" runat="server" Class="mandatory" SkinID="MandatoryLabel" Text="WhatsApp Contact No." Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="WhatsAppContactTextBox" CssClass="form-control" runat="server" onkeypress="return isNumberKey(event)" MaxLength="10"
                                        placeholder="WhatsApp Contact No." onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')"></asp:TextBox>
                                    <%--<div id="whatsapp" class="null-message" style="display: none">Valid Mobile no. is required</div>--%>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="ParentContactNoDiv" runat="server" visible="true">
                            <div class="bg-white">
                                <%--  <label for="InputName" class="mandatory">Parent Mobile No.</label>--%>
                                <%--<asp:Label ID="ContactNoLabel" runat="server" Text="Parent Mobile No." Visible ="true"></asp:Label>--%>
                                <asp:Label ID="ContactNoLabelM" runat="server" Class="mandatory" Text="Parent Mobile No" Visible="true"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="MobileNoTextBox" CssClass="form-control" runat="server" onkeypress="return isNumberKey(event)" placeholder="Parent Mobile No."
                                        onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')"></asp:TextBox>
                                    <div id="mobilenull" class="null-message" style="display: none">Valid Mobile no. is required</div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="ParentEmailDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Parent Contact Email</label>--%>
                                <asp:Label ID="ContactEmailLabel" runat="server" Text="Parent Email" Visible="true"></asp:Label>
                                <asp:Label ID="ContactEmailLabelM" runat="server" Class="mandatory" Text="Parent Email" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="EmailTextBox" CssClass="form-control" runat="server" placeholder="Parent Email"></asp:TextBox>
                                    <div id="emailnull" class="null-message" style="display: none">Email Id is not valid</div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="AlternateContactNoDiv" runat="server">
                            <div class="bg-white">

                                <asp:Label ID="AlternateContactNoLabel" runat="server" Text="Alternate Contact No" Visible="true"></asp:Label>
                                <asp:Label ID="AlternateContactNoLabelM" runat="server" Class="mandatory" Text="Alternate Contact No" Visible="false"></asp:Label>

                                <div class="input-group">
                                    <asp:TextBox ID="AlternateContactNoTextBox" CssClass="form-control" Placeholder="Alternate Contact No" onkeypress="return isNumberKey(event)"
                                        runat="server" MaxLength="12" SkinID="CustomWidthTextbox" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="AlternateEmailDiv" runat="server">
                            <div class="bg-white">
                                <asp:Label ID="AlternateEmailLabel" runat="server" Text="Alternate Email" Visible="true"></asp:Label>
                                <asp:Label ID="AlternateEmailLabelM" runat="server" Class="mandatory" Text="Alternate Email" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="AlternateContactEmailTextBox" CssClass="form-control" Placeholder="Alternate Contact Email"
                                        runat="server" MaxLength="200" SkinID="CustomWidthTextbox" onblur="return checkEmail(this);"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group" id="OtherDiv" runat="server">
                    <div class="col-lg-12 padd-0">
                        <div class="topic-header ">
                            <h5>
                                <span id="InquiryReferenceHeaderLabel" runat="server"><i class="fas fa-user-edit bg-blue"></i>&nbsp;Other Details</span>
                            </h5>
                        </div>




                        <div class="col-md-4" id="RemarkDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Remark</label>--%>
                                <asp:Label ID="RemarkLabel" runat="server" Text="Remark" Visible="true"></asp:Label>
                                <asp:Label ID="RemarkLabelM" runat="server" Class="mandatory" Text="Remark" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="RemarkTextBox" CssClass="form-control" runat="server" placeholder="Remark"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4" id="InquiryReferenceDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Inquiry Reference</label>--%>
                                <asp:Label ID="InquiryReferenceLabel" runat="server" Text="Inquiry Reference" Visible="true"></asp:Label>
                                <asp:Label ID="InquiryReferenceLabelM" runat="server" Class="mandatory" Text="Inquiry Reference" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:DropDownList ID="InquiryReferenceDropDownList" CssClass="form-control" runat="server">
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="InquiryReferenceRemarkDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Remark</label>--%>
                                <asp:Label ID="InquiryReferenceRemarkLabel" runat="server" Text="Inquiry Reference Remark" Visible="true"></asp:Label>
                                <asp:Label ID="InquiryReferenceRemarkLabelM" runat="server" Class="mandatory" Text="Inquiry Reference Remark" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="InquiryReferenceRemarkTextBox" CssClass="form-control" runat="server" placeholder="InquiryReferenceRemark"></asp:TextBox>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="MeritMarksDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Inquiry Reference</label>--%>
                                <asp:Label ID="MeritMarksLabel" runat="server" Text="Merit Marks" Visible="true"></asp:Label>
                                <asp:Label ID="MeritMarksLabelM" runat="server" Class="mandatory" Text="Merit Marks" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="MeritMarksTextBox" TextMode="Number" CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                        runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)"
                                        onKeypress="javascript:return MaskDecimal(event,10,2)" SkinID="CustomWidthTextbox"></asp:TextBox>
                                </div>
                            </div>
                        </div>

                        <%--<div class="outerBox11 pTop10 col-md-3"  id="HostelDiv" runat="server">
                                    <div class="controlLabelWidth">
                                        <asp:CheckBox ID="IsHostelRequiredCheckBox" runat="server" Text="Hostel Required" />
                                    </div>
                                </div>--%>
                        <%--<div class="outerBox11 pTop10 col-md-3" id="TransportDiv" runat="server">
                                    <div class="controlLabelWidth">
                                        <asp:CheckBox ID="IsTransportRequiredCheckBox" runat="server" Text="Transport Required" />
                                    </div>
                                </div>--%>
                    </div>
                </div>

                <div class="form-group" id="PastAcademicRecorddiv" runat="server">
                    <div class="col-lg-12 padd-0">
                        <div class="topic-header ">
                            <h5>
                                <span id="PastAcademicRecord" runat="server"><i class="fas fa-user-edit bg-blue"></i>&nbsp;Past Academic Record (If Any)</span>
                            </h5>
                        </div>

                        <%--   <div class="col-md-4" runat="server">
                            <div class="bg-white">

                                <asp:Label ID="PreviousSchoolNameLabel" runat="server" Text="Previous School Name" Visible="true"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox runat="server" ID="PreviousSchoolNameTextBox" CssClass="form-control" placeholder="Previous School Name" Enabled="true" />

                                </div>
                            </div>
                        </div>--%>

                        <div class="col-md-4" id="PreviousSchoolDiv" runat="server">
                            <div class="bg-white">

                                <asp:Label ID="PreviousSchoolLabel" runat="server" Text="Previous School" Visible="true"></asp:Label>
                                <asp:Label ID="PreviousSchoolLabelM" runat="server" Class="mandatory" Text="Previous School Name" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="PreviousSchoolTextBox" CssClass="form-control" runat="server" placeholder="Previous School Name"></asp:TextBox>
                                </div>
                            </div>
                        </div>

                        <%--                        <div class="col-md-4" runat="server">
                            <div class="bg-white">

                                <asp:Label ID="Grade_PercentageLabel" runat="server" Text="Grade/Percentage" Visible="true"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox runat="server" ID="Grade_PercentageTextBox" Class="mandatory" CssClass="form-control" placeholder="Grade/Percentage" Enabled="true" />

                                </div>
                            </div>
                        </div>--%>

                        <div class="col-md-4" runat="server" id="StreamDiv">
                            <div class="bg-white">

                                <asp:Label ID="StreamLabel" runat="server" Text="Stream" Visible="true"></asp:Label>
                                <asp:Label ID="StreamLabelM" runat="server" Text="Stream" Class="mandatory" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox runat="server" ID="StreamTextBox" CssClass="form-control" placeholder="Stream" Enabled="true" />

                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" id="MeritGradeDiv" runat="server">
                            <div class="bg-white">
                                <%--<label for="InputName">Inquiry Reference</label>--%>
                                <asp:Label ID="MeritGradeLabel" runat="server" Text="Merit Grade" Visible="true"></asp:Label>
                                <asp:Label ID="MeritGradeLabelM" runat="server" Class="mandatory" Text="Merit Grade" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="MeritGradeTextBox" CssClass="form-control" runat="server" placeholder="Merit Grade"></asp:TextBox>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-4" runat="server" id="BoardDiv">
                            <div class="bg-white">

                                <asp:Label ID="Board_UniversityLabel" runat="server" Text="Board" Visible="true"></asp:Label>
                                <asp:Label ID="Board_UniversityLabelM" runat="server" Class="mandatory" Text="Board" Visible="false"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox runat="server" ID="Board_UniversityTextBox" CssClass="form-control" placeholder="Board" Enabled="true" />

                                </div>
                            </div>
                        </div>

                    </div>
                </div>

                <div class="form-group" id="AdmissionInquiryFormDiv" visible="false" runat="server">
                    <div class="col-lg-12 padd-0">
                        <div class="topic-header">
                            <h5>
                                <span id="DynamicAdmissionInquiryFromFiledHeaderLabel" runat="server" text=""><i class="fas fa-info-circle bg-dpurp"></i>&nbsp;More Details</span>
                            </h5>
                        </div>
                        <div class="col-lg-12 bg-white">
                            <div class="table-responsive padd-5">
                                <asp:GridView runat="server" ID="AdmissionInquiryCriteriaFormGridView" AutoGenerateColumns="False"
                                    EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="AdmissionInquiryCriteriaFormGridView_RowDataBound"
                                    AllowPaging="false" DataKeyNames="Id,FieldTypeId,FieldList,IsFieldMandatory" ShowHeader="true"
                                    CssClass="table table-striped table-bordered table-hover more">
                                    <Columns>
                                        <asp:BoundField DataField="FieldGroup" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                        <asp:BoundField DataField="FieldRemark" ItemStyle-Width="40%" HeaderStyle-HorizontalAlign="Left" />
                                        <asp:TemplateField HeaderText="Mandatory" ItemStyle-Width="5%" SortExpression="IsFieldMandatory"
                                            HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                            <ItemTemplate>
                                                <asp:Label ID="IsFieldMandatoryLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsFieldMandatory").ToString().ToUpper()=="TRUE"?"*":"" %>' class="text-red font-23"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ItemStyle-Width="40%" HeaderText="" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="FieldTypeDropDownList" runat="server" Visible="false" CssClass="form-control"></asp:DropDownList>
                                                <asp:TextBox ID="FieldTypeTextBox" runat="server" Visible="false" CssClass="form-control" TextMode="MultiLine" Height="50px"></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerSettings Visible="False" />
                                </asp:GridView>

                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-md-12" runat="server" id="IAgreeDiv" visible="false">
                    <div class="bg-white">
                        <label class="material-checkbox" aria-multiline="false">
                            <asp:CheckBox ID="IAgreeCheckBox" runat="server" />
                            <asp:Label ID="IAgreelabel" class="" runat="server" Style="white-space: pre-wrap"></asp:Label>
                        </label>
                    </div>
                </div>

                <div class="form-group" id="OTPDiv" runat="server" visible="true">
                    <div class="col-lg-12 padd-0">
                        <div class="topic-header ">
                            <h5>
                                <span id="Span1" runat="server"><i class="fas fa-info-circle bg-dpurp"></i>&nbsp;Verify OTP</span>
                            </h5>
                        </div>
                        <div class="col-md-4">
                            <div class="bg-white">
                                <asp:Label ID="OTPLabel" runat="server" Text="Enter OTP" Visible="true"></asp:Label>
                                <div class="input-group">
                                    <asp:TextBox ID="OTPTextBox" CssClass="form-control" runat="server" placeholder="OTP" onkeypress="return isNumberKey(event)" Enabled="false"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <asp:Button ID="OTPButton" runat="server" CssClass="btn green fas" Text="Send OTP" OnClick="OTPButton_Click" />
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 text-center">
                    <asp:Button ID="SaveButton" runat="server" Text="Submit" OnClick="SaveButton_Click" CssClass="btn green fas" OnClientClick="return EnableDisableSavebutton()" />
                </div>
            </div>
        </form>
    </div>
</body>
</html>
<script src='<%# ResolveUrl("~/App_Themes/BlackTheme/plugins/jQueryUI/jquery-ui.min.js")%>' type="text/javascript"></script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>


<%--<script src="../../../../JavaScript/jquery-2.0.3.min.js"></script> comment for Mantis Id : 0028397--%>
<script src="../../../../JavaScript/rjs/app/Validations.js"></script>
<script type="text/javascript" src="../../../../JavaScript/mustache.js"></script>
<%--<script type="text/javascript" src="../../../../JavaScript/jquery-3.1.1.js"></script> comment for Mantis Id : 0028397--%>
<script type="text/javascript" src="../../../../JavaScript/AutoSelectDropDown.js"></script>
<link href="../../../../App_Themes/AutoSelectDropDown.css" rel="stylesheet" />

<%--<script data-main="../../JavaScript/rjs/encrypt/admission-inquiry-form-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
<%--<script data-main='<%=ResolveUrl("~/JavaScript/rjs/admission-inquiry-form")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>--%>
<script type="text/javascript">

    $(function () {
        var currentYear = (new Date).getFullYear();
        $("#BirthDateTextBox").datepicker({
            dateFormat: 'dd/mm/yy',
            changeYear: true,
            changeMonth: true,
            yearRange: "1950:currentYear"
        }).val();
    });
    function FormatIt(obj) {
        if (obj.value.length == 2)
            obj.value = obj.value + "/";
        if (obj.value.length == 5)
            obj.value = obj.value + "/";
    }
    function isNumberKey(evt) {
        var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57)) {
            return false;
        }
        else {
            var mobile = document.getElementById("MobileNoTextBox").value;
            var DOB = document.getElementById("BirthDateTextBox").value;
            if (mobile != "") {
                document.getElementById("mobilenull").style.display = 'none';
            }
            if (DOB != "") {
                document.getElementById("dobdnull").style.display = 'none';
            }
        }
    }
    function fnValidateDecimal(evt) {
        var re = /^[-+]?[0-9]+\.[0-9]+$/;
        if (evt.match(re)) {
            return true;
        }
        else {
            return false;
        }


    }

    function getConfirmation() {
        var a = document.getElementById("IAgreeCheckBox");
        if ($("#IAgreeDiv").is(':visible')) {
            if (a.checked == false) {
                alert("Please make sure that you accept the Terms and Conditions");
                a.focus();
                return false;
            } else {
                $("#SaveButton").prop("disabled", true);
                return window.confirm("Do you really want to save the admission inquiry form? Once confirmed it cannot be edited!");
            }
        } else {
            $("#SaveButton").prop("disabled", true);
            return window.confirm("Do you really want to save the admission inquiry form? Once confirmed it cannot be edited!");
        }
    }

    function EnableDisableSavebutton() {
        var confirmed = getConfirmation();
        if (!confirmed) {
            // If confirmation is canceled, re-enable the SaveButton
            $("#SaveButton").prop("disabled", false);
            return false; // prevent postback
        }
        __doPostBack('<%= SaveButton.UniqueID %>', '');
        return true; // allow postback
    }

    function middlenamechange(obj) {
        var middlename = document.getElementById(obj.id).value;
        document.getElementById("MiddleNameTextBox").value = middlename;
        document.getElementById("FatherNameTextBox").value = middlename;

    }


    // city / state / country

    var StudentDatas;

    //city
    $(document).ready(function () {
        var inp = document.getElementById("CityTextBox");
        $.ajax({
            type: "POST",
            url: "/Pages/OnlineAdmission/AdmissionInquiryForm.aspx/GetCityData",
            data: '{"CityName":"' + '' + '"}',
            contentType: "application/json;charset=utf-8",
            dataType: "json",
            success: function (citydata) {
                var StudentDatas = $.parseJSON(citydata.d);
                var cities = [];

                $.each(StudentDatas, function (i, item) {
                    cities.push(item.Title);
                });

                autocomplete(inp, cities);
            }
        });

        //State
        var inpS = document.getElementById("StateTextBox");
        $.ajax({
            type: "POST",
            url: "/Pages/OnlineAdmission/AdmissionInquiryForm.aspx/GetStateData",
            data: '{"StateName":"' + '' + '"}',
            contentType: "application/json;charset=utf-8",
            dataType: "json",
            success: function (statedata) {
                var StudentDatas = $.parseJSON(statedata.d);
                var state = [];

                $.each(StudentDatas, function (i, item) {
                    state.push(item.Title);
                });

                autocomplete(inpS, state);
            }
        });

        //country
        var inpC = document.getElementById("CountryTextBox");
        $.ajax({
            type: "POST",
            url: "/Pages/OnlineAdmission/AdmissionInquiryForm.aspx/GetCountryData",
            data: '{"CountryName":"' + '' + '"}',
            contentType: "application/json;charset=utf-8",
            dataType: "json",
            success: function (countrydata) {
                var StudentDatas = $.parseJSON(countrydata.d);
                var countries = [];

                $.each(StudentDatas, function (i, item) {
                    countries.push(item.Title);
                });

                autocomplete(inpC, countries);
            }
        });

    });

</script>

<script>
    function autocomplete(inp, arr) {

        /*the autocomplete function takes two arguments,
        the text field element and an array of possible autocompleted values:*/
        var currentFocus;
        /*execute a function when someone writes in the text field:*/
        inp.addEventListener("input", function (e) {
            var a, b, i, val = this.value;
            /*close any already open lists of autocompleted values*/
            closeAllLists();
            if (!val) { return false; }
            currentFocus = -1;
            /*create a DIV element that will contain the items (values):*/
            a = document.createElement("DIV");
            a.setAttribute("id", this.id + "autocomplete-list");
            a.setAttribute("class", "autocomplete-items");
            /*append the DIV element as a child of the autocomplete container:*/
            this.parentNode.appendChild(a);
            /*for each item in the array...*/
            for (i = 0; i < arr.length; i++) {
                /*check if the item starts with the same letters as the text field value:*/
                if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
                    /*create a DIV element for each matching element:*/
                    b = document.createElement("DIV");
                    /*make the matching letters bold:*/
                    b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
                    b.innerHTML += arr[i].substr(val.length);
                    /*insert a input field that will hold the current array item's value:*/
                    b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
                    /*execute a function when someone clicks on the item value (DIV element):*/
                    b.addEventListener("click", function (e) {
                        /*insert the value for the autocomplete text field:*/
                        inp.value = this.getElementsByTagName("input")[0].value;

                        $.ajax({
                            type: "POST",
                            url: "/Pages/OnlineAdmission/AdmissionInquiryForm.aspx/BindData",
                            data: '{"Type":"' + inp.getAttribute("name") + '", "Name":"' + this.getElementsByTagName("input")[0].value + '"}',
                            contentType: "application/json;charset=utf-8",
                            dataType: "json",
                            success: function (citydata) {
                                var StudentDatas = $.parseJSON(citydata.d);

                                if (StudentDatas.length > 0) {
                                    if (inp.getAttribute("name") == "CityTextBox") {
                                        document.getElementById("StateTextBox").value = StudentDatas[0].StateName;
                                        document.getElementById("CountryTextBox").value = StudentDatas[0].CountryName;
                                        document.getElementById("ZipCodeTextBox").value = StudentDatas[0].ZipCode;
                                    }

                                    else if (inp.getAttribute("name") == "StateTextBox") {
                                        document.getElementById("CountryTextBox").value = StudentDatas[0].CountryName;
                                    }
                                }
                            }
                        });


                        /*close the list of autocompleted values,
                        (or any other open lists of autocompleted values:*/
                        closeAllLists();
                    });
                    a.appendChild(b);
                }
            }
        });
        /*execute a function presses a key on the keyboard:*/
        inp.addEventListener("keydown", function (e) {
            var x = document.getElementById(this.id + "autocomplete-list");
            if (x) x = x.getElementsByTagName("div");
            if (e.keyCode == 40) {
                /*If the arrow DOWN key is pressed,
                increase the currentFocus variable:*/
                currentFocus++;
                /*and and make the current item more visible:*/
                addActive(x);
            } else if (e.keyCode == 38) { //up
                /*If the arrow UP key is pressed,
                decrease the currentFocus variable:*/
                currentFocus--;
                /*and and make the current item more visible:*/
                addActive(x);
            } else if (e.keyCode == 13) {
                /*If the ENTER key is pressed, prevent the form from being submitted,*/
                e.preventDefault();
                if (currentFocus > -1) {
                    /*and simulate a click on the "active" item:*/
                    if (x) x[currentFocus].click();
                }
            }
        });
        function addActive(x) {
            /*a function to classify an item as "active":*/
            if (!x) return false;
            /*start by removing the "active" class on all items:*/
            removeActive(x);
            if (currentFocus >= x.length) currentFocus = 0;
            if (currentFocus < 0) currentFocus = (x.length - 1);
            /*add class "autocomplete-active":*/
            x[currentFocus].classList.add("autocomplete-active");
        }
        function removeActive(x) {
            /*a function to remove the "active" class from all autocomplete items:*/
            for (var i = 0; i < x.length; i++) {
                x[i].classList.remove("autocomplete-active");
            }
        }
        function closeAllLists(elmnt) {
            /*close all autocomplete lists in the document,
            except the one passed as an argument:*/
            var x = document.getElementsByClassName("autocomplete-items");
            for (var i = 0; i < x.length; i++) {
                if (elmnt != x[i] && elmnt != inp) {
                    x[i].parentNode.removeChild(x[i]);
                }
            }
        }
        /*execute a function when someone clicks in the document:*/
        document.addEventListener("click", function (e) {
            closeAllLists(e.target);
        });
    }
</script>
