<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true"
    CodeFile="DigitalSignature.aspx.cs" Inherits="DigitalSignature" Title="e Gen Service" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script src="../Javascript/scriptvalidation.js" type="text/javascript"></script>

    <script type="text/javascript" language="javascript">

//        function Validation() 
//        {
//            var a = document.getElementById('TextBox1').value;

//            var regex1 = /^[A-Z]{5}\d{4}[A-Z]{1}$/; //this is the pattern of regular expersion
//            if (regex1.test(a) == false) {
//                alert('Please enter valid pan number');
//                return false;
//            }
//        } 
        function validate(input, e)//OnClientClick="return validate(this,event)"
        {
            if (document.getElementById('ctl00_ContentPlaceHolder1_ddlTimeDuration').value == "Select") {
                alert("Please Select DSC Period!");

                document.getElementById('ctl00_ContentPlaceHolder1_ddlTimeDuration').focus();
                return false;
            }

           else  if (document.getElementById('ctl00_ContentPlaceHolder1_ddlSelectPerson').value == "Select") {
                alert("Please Select Person!");
                document.getElementById('ctl00_ContentPlaceHolder1_ddlSelectPerson').focus();
                return false;
            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_ddlInitial').value == "Select") {
                alert("Please Select Initial!");
                document.getElementById('ctl00_ContentPlaceHolder1_ddlInitial').focus();
                return false;
            }

            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtFullName').value == "") {

                alert("Please Enter Full Name !");

                document.getElementById('ctl00_ContentPlaceHolder1_txtFullName').focus();

                return false;

            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtAddress').value == "") {
                alert("Please enter Address");
                document.getElementById('ctl00_ContentPlaceHolder1_txtAddress').focus();
                return false;
            }

            else if (document.getElementById('ctl00_ContentPlaceHolder1_ddlState').value == "Select") {
                alert("Please Select State!");
                document.getElementById('ctl00_ContentPlaceHolder1_ddlState').focus();
                return false;
            }

            else if (document.getElementById('ctl00_ContentPlaceHolder1_ddlCity').value == "Select") {
                alert("Please Select City!");
                document.getElementById('ctl00_ContentPlaceHolder1_ddlCity').focus();
                return false;
            }

            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtPinCode').value == "") {
                alert("Please enter Pin No");
                document.getElementById('ctl00_ContentPlaceHolder1_txtPinCode').focus();
                return false;
            }

            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo1').value == "") {
                alert("Please enter STD Code");
                document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo1').focus();
                return false;
            }


            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo1').value.length < 4) {
                alert("STD No should not be less than 4 digits");
                document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo1').focus();
                return false;
            }

            if (document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo2').value == "") {
                alert("Please Enter Phone No !");
                document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo2').focus();
                return false;
            }

            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo2').value.length < 6) {
                alert("Phone No should not be less than 6 digits");
                document.getElementById('ctl00_ContentPlaceHolder1_txtPhoneNo2').focus();
                return false;
            }
            //            else if ((document.getElementById('ctl00_ContentPlaceHolder1_TextBox4').value) / 1000000000 < 1) {
            //                alert("First Digit of Phone No could not be 0 !!!");
            //                document.getElementById('ctl00_ContentPlaceHolder1_TextBox4').focus();
            //                return false;
            //            }


            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtMobileNo2').value == "") {

                alert("Please Enter Mobile No !");

                document.getElementById('ctl00_ContentPlaceHolder1_txtMobileNo2').focus();

                return false;
            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtMobileNo2').value.length < 10) {
                alert("Mobile No should not be less than 10 digits");
                document.getElementById('ctl00_ContentPlaceHolder1_txtMobileNo2').focus();
                return false;
            }
            else if ((document.getElementById('ctl00_ContentPlaceHolder1_txtMobileNo2').value) / 1000000000 < 1) {
                alert("First Digit of Mobile No could not be 0 !!!");
                document.getElementById('ctl00_ContentPlaceHolder1_txtMobileNo2').focus();
                return false;
            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtDOB').value == "") {

                alert("Please Enter Date !");

                document.getElementById('ctl00_ContentPlaceHolder1_txtDOB').focus();

                return false;

            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtDOB2').value == "") {

                alert("Please Enter Month !");

                document.getElementById('ctl00_ContentPlaceHolder1_txtDOB2').focus();

                return false;

            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtDOB3').value == "") {

                alert("Please Enter Year !");

                document.getElementById('ctl00_ContentPlaceHolder1_txtDOB3').focus();

                return false;

            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtEMailID').value == "") {
                alert("Please Enter Email id !");

                document.getElementById('ctl00_ContentPlaceHolder1_txtEMailID').focus();

                return false;

            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtEMailID').value != "") {

                var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;

                var address = document.getElementById('ctl00_ContentPlaceHolder1_txtEMailID').value;
                if (reg.test(address) == false)
                {
                    alert('Please enter valid Email id');
                    document.getElementById('ctl00_ContentPlaceHolder1_txtEMailID').focus();
                    return false;
                }
            }
            if (document.getElementById('ctl00_ContentPlaceHolder1_txtPanNo').value == "") 
            {
                alert("Please Enter Pan No. !");
                document.getElementById('ctl00_ContentPlaceHolder1_txtPanNo').focus();
                return false;
            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txtPanNo').value != "")
            {
                var a = document.getElementById('ctl00_ContentPlaceHolder1_txtPanNo').value;
                var regex1 = /^[A-Z]{5}\d{4}[A-Z]{1}$/; //this is the pattern of regular expersion
                if (regex1.test(a) == false) {
                    alert('Please enter valid pan number');
                    return false;
                }
            }
           
            if (document.getElementById('ctl00_ContentPlaceHolder1_ddlResidencePF').value == "Select") {
                alert("Please Select Residence Froof!");

                document.getElementById('ctl00_ContentPlaceHolder1_ddlResidencePF').focus();
                return false;
            }
            else if (document.getElementById('ctl00_ContentPlaceHolder1_txt_ResidenceNO').value == "") {
                alert("Please Enter Residence Proof Number!");

                document.getElementById('ctl00_ContentPlaceHolder1_txt_ResidenceNO').focus();
                return false;
            }
            document.getElementById('ctl00_ContentPlaceHolder1_hiddenselectedstatevalue').value = document.getElementById('ctl00_ContentPlaceHolder1_ddlstate').value;
            document.getElementById('ctl00_ContentPlaceHolder1_hiddenselectedcityvalue').value = document.getElementById('ctl00_ContentPlaceHolder1_ddlcity').value;
            

        }
    </script>

  <div id="middle">  
     <div id="DigitalSignatureDiv" runat="server">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                        
                        <tr>
                            <td colspan="4" class="hdr">
                                <a href="PanCard.aspx">PAN Card</a> <span style="padding-right: 32px;">&nbsp;</span>
                                <a href="DigitalSignature.aspx" class="active">Digital Signature</a> <span style="padding-left: 32px;">
                                    &nbsp;</span><a href="MoneyTransfer.aspx">Money Transfer</a>
                            </td>
                        </tr>
                        <tr>
                            <td style="height:30px; text-align: center;" colspan="4">
                                <asp:Label ID="lblsucess" runat="server"></asp:Label>
                            </td>
                        </tr>
                        
                        <tr>
                            <td width="15%"></td>
                            <td width="32%">DSC Period</td>
                            <td width="3%"><strong>:</strong></td>
                            <td width="50%"><asp:DropDownList ID="ddlTimeDuration" runat="server" Width="185px">
                                <asp:ListItem>Select</asp:ListItem>
                                <asp:ListItem>One Year</asp:ListItem>
                                <asp:ListItem>Two Year</asp:ListItem>
                                </asp:DropDownList>
                                </td>
                        </tr>
                        
                        <tr>
                            <td width="15%">
                            </td>
                            <td width="32%">
                                Select Person
                            </td>
                            <td width="3%">
                                <strong>:</strong>
                            </td>
                            <td width="50%">
                                <asp:DropDownList ID="ddlSelectPerson" runat="server" Width="185px">
                                    <asp:ListItem>Select</asp:ListItem>
                                    <asp:ListItem Value="0">Director</asp:ListItem>
                                    <asp:ListItem Value="1">CS</asp:ListItem>
                                    <asp:ListItem Value="2">CA</asp:ListItem>
                                    <asp:ListItem Value="3">CWA</asp:ListItem>
                                    <asp:ListItem Value="4">Financial institutions</asp:ListItem>
                                    <asp:ListItem Value="5">Partner</asp:ListItem>
                                    <asp:ListItem Value="6">Other</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                Initial
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlInitial" runat="server" Width="185px">
                                    <asp:ListItem>Select</asp:ListItem>
                                    <asp:ListItem Value="0">Mr.</asp:ListItem>
                                    <asp:ListItem Value="1">Mrs.</asp:ListItem>
                                    <asp:ListItem Value="2">Ms.</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                Full Name
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtFullName" runat="server" Width="180px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                Address
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Width="180px" Height="50px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                State
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlState" runat="server" Width="185px" AutoPostBack="True"
                                    OnSelectedIndexChanged="ddlState_SelectedIndexChanged">
                                    <asp:ListItem>Select</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                City
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlCity" runat="server" Width="185px">
                                    <asp:ListItem>Select</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                PIN Code
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPinCode" runat="server" Width="180px" MaxLength="6" onkeypress="return digitonly(this,event)"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                Phone No.
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPhoneNo1" runat="server" Width="50px" onkeypress="return digitonly(this,event)"
                                    MaxLength="4"></asp:TextBox>
                                <asp:TextBox ID="txtPhoneNo2" runat="server" Width="120px" onkeypress="return digitonly(this,event)"
                                    MaxLength="8"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                Mobile No.
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMobileNo1" runat="server" Width="50px" Text="+91"></asp:TextBox>
                                <asp:TextBox ID="txtMobileNo2" runat="server" Width="120px" MaxLength="10" onkeypress="return digitonly(this,event)"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                Date of Birth
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtDOB" runat="server" Width="40px" MaxLength="2" onkeypress="return digitonly(this,event)" ToolTip="Enter Date"></asp:TextBox>
                                <asp:TextBox ID="txtDOB2" runat="server" Width="40px" MaxLength="2" onkeypress="return digitonly(this,event)" ToolTip="Enter Month"></asp:TextBox>
                                <asp:TextBox ID="txtDOB3" runat="server" Width="82px" MaxLength="4" onkeypress="return digitonly(this,event)" ToolTip="Enter Year"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                E-Mail ID
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtEMailID" runat="server" Width="180px" OnClientClick="return reset1()"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                Pan No.
                            </td>
                            <td>
                                <strong>:</strong>
                            </td>
                            <td>
                                <asp:TextBox ID="txtPanNo" runat="server" Width="180px" MaxLength="10" onkeyup="ConvertToCaps(this)" ></asp:TextBox>
                                
                             </td>
                        </tr>
                        
                        
                        <tr>
                            <td></td>
                            <td>Residence Proof</td>
                            <td><strong>:</strong></td>
                            <td><asp:DropDownList ID="ddlResidencePF" runat="server" Width="185px">
                                           <asp:ListItem >Select</asp:ListItem>
                                           <asp:ListItem >Latest Electricity Bill NO.</asp:ListItem>
                                           <asp:ListItem>Latest Telephone Bill No.</asp:ListItem>
                                           <asp:ListItem>Passport No.</asp:ListItem>
                                           <asp:ListItem>Driving License/RC NO.</asp:ListItem>
                                           <asp:ListItem>Water Bill NO.</asp:ListItem>
                                           <asp:ListItem>Gas Connection NO.</asp:ListItem>
                                           <asp:ListItem>Voter ID NO.</asp:ListItem>
                                           <asp:ListItem>Latest Bank Account NO</asp:ListItem>
                                           </asp:DropDownList>
                             </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>Residence Proof Number</td>
                            <td><strong>:</strong></td>
                            <td><asp:TextBox ID="txt_ResidenceNO" runat="server" ToolTip="Please Enter Number" MaxLength="30" Width="180px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td colspan="3">
                            </td>
                            <td style="padding: 0 0 0 70px;">
                                <asp:Button ID="btnSubmit" runat="server" Text="Submit" class="button" OnClick="btnSubmit_Click"
                                    OnClientClick="return validate(this,event)" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" style="height: 30px">
                            </td>
                      </tr>
                  </table>
             </div>
 </div> 
        <div id="right" style="background: none">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="cdr">
                        <strong>Digital Signature instruction</strong>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 10px 0 30px 5px; font-size: 15px">
                        Comming Soon
                    </td>
                </tr>
            </table>
        </div>

</asp:Content>
