@{
    /**/

    ViewBag.Title = "Apply Now";
    // Layout = "~/Views/Shared/_ApplicationLayout.cshtml";

    Crypt cr = new Crypt();

    Random r = new Random();
    string randomq = r.Next(100000, 999999).ToString();
    Layout = null;
}
@using upes_admission.Gutils;


<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!--Style-->
    <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,700,800,900" rel="stylesheet">
    <link href="../css/component.css" rel="stylesheet" />
    <link href="../css/main.css" rel="stylesheet" />
    <link href="../css/ApplicationTemplate.css" rel="stylesheet" />
    <!--Custom Css-->
    <title>UPES | Application Form</title>

    <style>
        .se-pre-con {
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            z-index: 9999;
            background: #fff url(../img/application/loader.gif) center no-repeat;
        }

        .disbla {
            cursor: not-allowed;
        }
.ApplicationTitle
{
padding-bottom:2px!important;
}
    </style>
    <script>
        function myFunction() {
            //  alert("Page is loaded");

            $(".se-pre-con").fadeOut("slow");
			SetProspectID();
        }
    </script>
<!-- GTM - Head Part -->
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5QTLTJ');
</script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-21981520-1"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag() { dataLayer.push(arguments); }
        gtag('js', new Date());

        gtag('config', 'AW-964693448');
        gtag('config', 'UA-21981520-1');
    </script>
    <!-- Remarketing Event Snippet -->
    <script>
        gtag('event', 'page_view', {
            'send_to': 'AW-964693448',
            'items': [{
                'id': 'replace with value',
                'location_id': 'replace with value',
                'google_business_vertical': 'education'
            }]
        });
    </script>

    <!-- Facebook Pixel Code -->
    <script>
        !function (f, b, e, v, n, t, s) {
            if (f.fbq) return; n = f.fbq = function () {
                n.callMethod ?
                n.callMethod.apply(n, arguments) : n.queue.push(arguments)
            };
            if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0';
            n.queue = []; t = b.createElement(e); t.async = !0;
            t.src = v; s = b.getElementsByTagName(e)[0];
            s.parentNode.insertBefore(t, s)
        }(window, document, 'script',
            'https://connect.facebook.net/en_US/fbevents.js');
        fbq('init', '667790006758005');
        fbq('track', 'PageView');
    </script>
    <noscript>
        <img height="1" width="1" style="display:none"
             src="https://www.facebook.com/tr?id=667790006758005&ev=PageView&noscript=1" />
    </noscript>
    <!-- End Facebook Pixel Code -->
<!-- Bing Code -->
	<script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"25050676"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script>
</head>

<body onload="myFunction();">

<!-- GTM Body Part -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5QTLTJ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <div class="se-pre-con"></div>


    <header class="position-relative">
        <section class="HeaderPanel HeaderBanner">
            <div class="plr70">
                <div class="headerInner">
                    <a href="/">
                        <img src="../img/application/upes logo.png" class="img-fluid" alt="Logo" />
                    </a>
                </div>
            </div>
        </section>

    </header>
    <main role="main" class="ApplicationTemplate">
        <section class="FormTemplate formBlkStyle">
            <div class="FormPosition">
                <div class="TitlePanel text-center">
				
                    <h1 class="fontExBold ApplicationTitle">APPLICATION FORM 2019</h1>
                    <p class="App_Text fontMedium">
                        Take your first step towards a specialised career.
                    </p>
					<p style="font-style:italic;margin-top:6px;" class="App_Text fontMedium">
					
					Last date to Apply: UPES-EAT (B.Tech) | ULSAT (LL.B)| UPES PAT (B. Pharma) – 10<sup>th</sup> May'19
					
					</p>
                </div>
                <!--Form Panel-->
                <div class="FormPanel">
                    <div class="formDetailStrip">

                        <ul class="StripStyle">
                            <li class="active one">
                                <div class="StepImg">
                                    <img src="../img/application/personal-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Personal <span class="d-block">Details</span> </p>
                            </li>
                            <li class="two">
                                <div class="StepImg">
                                    <img src="../img/application/academic-0.png" class="img-fluid Icon-noactive" />
                                    <img src="../img/application/academic-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Academic  <span class="d-block"> History </span></p>
                            </li>
                            <li class="three">
                                <div class="StepImg">
                                    <img src="../img/application/payment-0.png" class="img-fluid Icon-noactive" />
                                    <img src="../img/application/payment-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Payment</p>
                            </li>
                            <li class="four">
                                <div class="StepImg">
                                    <img src="../img/application/complete-0.png" class="img-fluid Icon-noactive" />
                                    <img src="../img/application/complete-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Complete <span>Application</span></p>
                            </li>
                        </ul>
                    </div>

                    <!--PanelOne-->



                    <div class="FormPanelInner" id="FormPanelOne">


                        <p class="fontMedium form-text">Your Details</p>


                        <div class="form-group">
						<input style="opacity: 0;position: absolute;">
<input type="password" style="opacity: 0;position: absolute;">
                            <input type="text" class="form-control FormStyle" autocomplete="off" id="txtfirstname" placeholder="First Name*" />

                            @*@Html.TextBoxFor(model => model.firstname, new { @class = "form-control", placeholder = "First Name*" })
                                @Html.ValidationMessageFor(model => model.firstname)*@
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control FormStyle" autocomplete="off"  placeholder="Middle Name" id="middlename" />
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control FormStyle" autocomplete="off"  placeholder="Last Name*" id="lastname" />
                        </div>
                        <div class="row FormRow no-gutters ">
                            <div class="col-sm-6 form-group">
                                <p class="form-text fontMedium">
                                    Date of Birth*
                                </p>
                                <div id="datepicker" class="input-group date" data-date-format="yy-mm-dd">
                                    <input class="form-control FormStyle" readonly placeholder="yyyy/mm/dd" id="datebind" />

                                    <span class="input-group-addon datepickicon"></span>
                                </div>
                            </div>
                            <!--nat-->
                            <div class="FormRadioOptions">
                                <p class="form-text fontMedium">Nationality?</p>
                                <div class="row radioInner">
                                    <label>
                                        <input type="radio" id="radnantionindian" value="indian" class="Radiostyle" name="nation" onclick="checknation('indian');" /><span>Indian Resident </span>
                                    </label>
                                    <label class="noPadding">
                                        <input type="radio" id="radnantionnri" value="nri" class="Radiostyle" name="nation" onclick="checknation('nri')" /><span>NRI/International Students</span>
                                    </label>
                                </div>



                                <select class="FormStyle" id="country">

                                    <option value="0">select country</option>
                                </select>

                                <div id="divindian">

                                    <select class="FormStyle" id="state">

                                        <option value="0">select state</option>
                                    </select>


                                    <select class="FormStyle" id="city">
                                        <option value="0">Select City</option>
                                    </select>

                                    <div class="form-group" id="divindianphone">
                                        <input type="text" class="form-control FormStyle" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" placeholder="Mobile Number*" id="phone" />


                                    </div>
                                </div>

                                <div id="divnri" style="display:none">

                                    <div class="col-sm-6 form-group">
                                        @*<p class="form-text fontMedium">
                                                City
                                            </p>*@
                                        <input placeholder="City" type="text" class="form-control FormStyle" id="nricity" />
                                    </div>

                                    <div class="form-group" id="divnriphone">
                                        <input type="text" class="form-control FormStyle" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" placeholder="Mobile Number*" id="nriphone" />


                                    </div>
                                </div>

                                @*<input type="hidden" value="indian" id="hdntype" />*@
                                @*<input type="hidden" value="@Convert.ToString( Session["typeofnation"])" id="hdntype" name="typeofnation" />*@
                                <div class="form-group">
                                    <input type="text" class="form-control FormStyle" placeholder="Email ID*" id="email" />
                                </div>
                            </div>

                            <div class="FormRadioOptions">
                                <p class="form-text fontMedium">What would you like to study at UPES?</p>
                                <div class="row radioInner">
                                    <label>
                                        <input type="radio" id="radug" value="UG" class="Radiostyle" name="radstudy" checked onclick="bindcdata('UG');" /><span>Undergraduate (UG)</span>
                                    </label>
                                    <label class="noPadding">
                                        <input type="radio" id="radpg" value="PG" class="Radiostyle" name="radstudy" onclick="bindcdata('PG');" /><span>Postgraduate (PG)</span>
                                    </label>







                                </div>
                                <select class="FormStyle selectpickers" id="cource"></select>
                                <p class="form-MediumText fontMedium">You can choose specialisations of your choice in later step.</p>
                            </div>


                            <p class="form-text fontMedium">How did you know about UPES?</p>


                            <select class="FormStyle selectpickers" id="source"></select>
                            <select class="FormStyle selectpickers" style="display:none;" id="coachingcentre"></select>
                            <input type="text" class="form-control FormStyle" style="display:none;" placeholder="Enter the Coaching Institute's Name" id="othercoachingcentre" />
                            <div class="FormRadioOptions" id="divindianexam" style="display:none">
                                <p class="fontMedium form-text">Your Mode of Application</p>
                                <div class="row radioInner RadioList no-gutters">
                                    <div class="col-6 RadioListStyle">
                                        <label class="noPadding">
                                            <input type="radio" value="exam" onclick="onappclick(1)" class="Radiostyle" name="radapplicationmade" checked /><span>Through UPES Entrance Exam</span>
                                        </label>
                                    </div>
                                    <div class="col-6 RadioListStyle" id="divpgmadeofexam" style="display:none">
                                        <label class="noPadding">
                                            <input type="radio" value="pgnonexam" onclick="onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through Non Exam</span>
                                        </label>
                                    </div>

                                    <div id="divugmadeofexam" class="col-md-12 nonexam_third">
                                        <div class="col-6 RadioListStyle ne sd_22 sd_20 sd_19 sd_23 sd_12 sd_18 sd_6 sd_17 sd_15">


                                            <label class="noPadding">
                                                <input type="radio" value="non_exam_ug" onclick="onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through Non Exam</span>
                                            </label>
                                        </div>
                                        <div class="col-6 RadioListStyle ne sd_2">
                                            <label class="noPadding">
                                                <input type="radio" value="non_exam_jee" onclick="onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through IIT JEE Scores</span>
                                            </label>
                                        </div>

                                        <div class="col-6 RadioListStyle ne sd_8">
                                            <label class="noPadding">
                                                <input type="radio" value="non_exam_uceed" onclick="onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through UCEED/JEE mains Scores</span>
                                            </label>
                                        </div>

                                        @*<div class="col-6 RadioListStyle">
                                                <label class="noPadding">
                                                    <input type="radio" value="non_exam_jee" onclick="onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>JEE mains</span>
                                                </label>
                                            </div>*@

                                        <div class="col-6 RadioListStyle ne sd_16">
                                            <label class="noPadding">
                                                <input type="radio" value="non_exam_clat" onclick="onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through CLAT Scores</span>
                                            </label>
                                        </div>

                                        <div class="col-6 RadioListStyle ne sd_3">
                                            <label class="noPadding">
                                                <input type="radio" value="non_exam_clat_lsat" onclick="onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through CLAT/LSAT Scores</span>
                                            </label>
                                        </div>


                                        <div class="col-6 RadioListStyle bm">
                                            <label class="noPadding">
                                                <input type="radio" value="non_exam_board_merit" onclick="onappclick(2)" class="Radiostyle bm" name="radapplicationmade" /><span>Through Board Merit</span>
                                            </label>
                                        </div>

                                    </div>


                                </div>
                                <div class="form-group" id="divappmade" style="display:none">
                                    <input type="text" id="jeescore" class="form-control FormStyle" placeholder="Enter Score" />
                                </div>
                            </div>
                        </div>

                        <div class="form-group" id="divotp" style="display:none">

                            <button type="button" class="btn btn-primary BtnStyle ForOTP" id="btnotp" onclick="getotp()">send otp</button>

                            <div id="innerotp" style="display:none">
                                @*<input type="text" class="form-control FormStyle" placeholder="OTP" id="otp" value="@Convert.ToString(Session["userotp"])" />*@
                                <input type="text" class="form-control FormStyle" placeholder="OTP" id="otp" value="" />
                                <p id="responseotp"></p>
                                <label id="otpmsg" style="color:green"></label>
                                @*<button type="button" class="btn btn-primary BtnStyle ForOTP" onclick="onverifyotp();">verify</button>*@
                                @*<button type="button" class="btn btn-primary BtnStyle ForOTP" id="resendotp" onclick="resendotp();">Resend OTP</button>*@
                            </div>

                        </div>

                        <p class="otpvalidation" style="color:red; margin-bottom:0px;display:none" id="otpcheckp">Please verify your mobile number with OTP</p>
                        <div class="clearfix"></div>
                        <div class="FormButtonStyle">
                            <div class="text-right">
                                <button id="btnNextFS" class="btn btn-primary BtnStyle updateOne" type="button" onclick="gotoFormPanelTwo()">Next</button>

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

                    @using (Html.BeginForm("Apply", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
                    {

                    <div class="FormPanelInner" id="FormPanelOneback" style="display:none;">
                        <input id="hdnfname_sfb" type="hidden" value="@Convert.ToString(Session["sfb_firstname"])" />
                        <input id="hdnmname_sfb" type="hidden" value="@Convert.ToString(Session["sfb_middlename"])" />
                        <input id="hdnlname_sfb" type="hidden" value="@Convert.ToString(Session["sfb_lastname"])" />
                        <input id="hdnmobile_sfb" type="hidden" value="@Convert.ToString(Session["phone"])" />
                        <input id="hdnemail_sfb" type="hidden" value="@Convert.ToString(Session["email"])" />
                        <input id="hdncourseid_sfb" type="hidden" value="@Convert.ToString(Session["courseid"])" />
                        <input id="hdncoursename_sfb" type="hidden" value="@Convert.ToString(Session["sfb_coursename"])" />
                        <input id="hdntypenat_sfb" type="hidden" value="@Convert.ToString(Session["typeofnation"])" />
                        <input id="hdnstateid_sfb" type="hidden" value="@Convert.ToString(Session["sfb_state"])" />
                        <input id="hdncityidbind_sfb" type="hidden" value="@Convert.ToString(Session["sfb_city"])" />
                        <input id="hdncityid_sfb" type="hidden" value="@Convert.ToString(Session["sfb_city"])" />
                        <input id="hdncountryid_sfb" type="hidden" value="@Convert.ToString(Session["sfb_country"])" />
                        <input id="hdnnricity_sfb" type="hidden" value="@Convert.ToString(Session["sfb_nricity"])" />
                        <input id="hdndob_sfb" type="hidden" value="@Convert.ToString(Session["sfb_dob"])" />
                        <input id="hdnappmode_sfb" type="hidden" value="@Convert.ToString(Session["sfb_appmode"])" />
                        <input id="hdnjeescore_sfb" type="hidden" value="@Convert.ToString(Session["sfb_jeescore"])" />
                        <input id="hdnappno" type="hidden" value="@Convert.ToString(Session["appno"])" />
                        <input type="hidden" value="@Convert.ToString(Session["typeofnation"])" id="hdntype" name="typeofnation" />
                        <input type="hidden" name="ProspectID" id="ProspectID" value="NA" runat="server" />
                        <input type="hidden" id="hdnLSStatus" runat="server" />
                        <input type="hidden" id="hdnLSID" runat="server" />
                        <p class="fontMedium form-text">Your Details</p>


                        <div class="form-group">

                            <p class="form-text fontMedium">
                                First Name
                            </p>

                            <label class="lbl" id="lblFname">@Convert.ToString(Session["sfb_firstname"])</label>


                        </div>

                        <div class="form-group">

                            <p class="form-text fontMedium">
                                Middle Name
                            </p>

                            <label class="lbl" id="lblMname">@Convert.ToString(Session["sfb_middlename"])</label>


                        </div>
                        <div class="form-group">

                            <p class="form-text fontMedium">
                                Last Name
                            </p>

                            <label class="lbl" id="lblLname">@Convert.ToString(Session["sfb_lastname"])</label>


                        </div>
                        <div class="form-group">
                            <p class="form-text fontMedium">
                                Mobile Number
                            </p>
                            <label class="lbl" id="lblMobile">@Convert.ToString(Session["phone"])</label>
                        </div>
                        <div class="form-group">
                            <p class="form-text fontMedium">
                                Email ID
                            </p>
                            <label class="lbl" id="lblEmail">@Convert.ToString(Session["email"])</label>
                        </div>

                        <div class="row FormRow no-gutters ">
                            <div class="col-sm-6 form-group">
                                <p class="form-text fontMedium">
                                    Date of Birth
                                </p>
                                <label class="lbl" id="lblDOB">@Convert.ToString(Session["sfb_dob"])</label>
                            </div>
                            <!--nat-->
                            <div class="FormRadioOptions">
                                <p class="form-text fontMedium">Nationality?</p>
                                <div class="row radioInner">
                                    <label>
                                        <input type="radio" id="sfb_radnantionindian" value="indian" class="Radiostyle" name="nation"  onclick="sfb_checknation('indian');" /><span>Indian Resident </span>
                                    </label>
                                    <label class="noPadding">
                                        <input type="radio" id="sfb_radnantionnri" value="nri" class="Radiostyle" name="nation" onclick="sfb_checknation('nri')" /><span>NRI/International Students</span>
                                    </label>
                                </div>



                                <select class="FormStyle" id="sfb_country">

                                    <option value="0">select country</option>
                                </select>

                                <div id="sfb_divindian">

                                    <select class="FormStyle" id="sfb_state">

                                        <option value="0">select state</option>
                                    </select>


                                    <select class="FormStyle" id="sfb_city">
                                        <option value="0">Select City</option>
                                    </select>


                                </div>

                                <div id="sfb_divnri" style="display:none">

                                    <div class="form-group">
                                        <input placeholder="City" type="text" class="form-control FormStyle" id="sfb_nricity" />
                                    </div>


                                </div>
                            </div>


                        </div>

                        <div class="form-group">
                            <p class="form-text fontMedium">

                                Selected Program
                            </p>
                            <label class="lbl" id="lblCourse">@Convert.ToString(Session["sfb_coursename"])</label>
                        </div>

                        <p class="form-MediumText fontMedium">You can choose specialisations of your choice in later step.</p>



                        <p class="form-text fontMedium">How did you know about UPES?</p>


                        <select class="FormStyle selectpickers" id="sfb_source"></select>
                        <select class="FormStyle selectpickers" style="display:none;" id="sfb_coachingcentre"></select>

                        <input type="text" class="form-control FormStyle" style="display:none;" placeholder="Enter the Coaching Institute's Name" id="sfb_othercoachingcentre" />
                        <div class="FormRadioOptions" id="sfb_divindianexam" style="display:none">
                            <p class="fontMedium form-text">Your Mode of Application</p>
                            <div class="row radioInner RadioList no-gutters">
                                <div class="col-6 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" value="exam" onclick="sfb_onappclick(1)" class="Radiostyle" name="radapplicationmade" /><span>Through UPES Entrance Exam</span>
                                    </label>
                                </div>
                                <div class="col-6 RadioListStyle" id="sfb_divpgmadeofexam" style="display:none">
                                    <label class="noPadding">
                                        <input type="radio" value="pgnonexam" onclick="sfb_onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through Non Exam</span>
                                    </label>
                                </div>

                                <div id="sfb_divugmadeofexam" class="col-md-12 nonexam_third">
                                    <div class="col-6 RadioListStyle ne sd_22 sd_20 sd_19 sd_23 sd_12 sd_18 sd_6 sd_17 sd_15">


                                        <label class="noPadding">
                                            <input type="radio" value="non_exam_ug" onclick="sfb_onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through Non Exam</span>
                                        </label>
                                    </div>
                                    <div class="col-6 RadioListStyle ne sd_2">
                                        <label class="noPadding">
                                            <input type="radio" value="non_exam_jee" onclick="sfb_onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through IIT JEE Scores</span>
                                        </label>
                                    </div>

                                    <div class="col-6 RadioListStyle ne sd_8">
                                        <label class="noPadding">
                                            <input type="radio" value="non_exam_uceed" onclick="sfb_onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through UCEED/JEE mains Scores</span>
                                        </label>
                                    </div>



                                    <div class="col-6 RadioListStyle ne sd_16">
                                        <label class="noPadding">
                                            <input type="radio" value="non_exam_clat" onclick="sfb_onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through CLAT Scores</span>
                                        </label>
                                    </div>

                                    <div class="col-6 RadioListStyle ne sd_3">
                                        <label class="noPadding">
                                            <input type="radio" value="non_exam_clat_lsat" onclick="sfb_onappclick(2)" class="Radiostyle" name="radapplicationmade" /><span>Through CLAT/LSAT Scores</span>
                                        </label>
                                    </div>


                                    <div class="col-6 RadioListStyle bm">
                                        <label class="noPadding">
                                            <input type="radio" value="non_exam_board_merit" onclick="sfb_onappclick(2)" class="Radiostyle bm" name="radapplicationmade" /><span>Through Board Merit</span>
                                        </label>
                                    </div>

                                </div>


                            </div>
                            <div class="form-group" id="sfb_divappmade" style="display:none">
                                <input type="text" id="sfb_jeescore" class="form-control FormStyle" placeholder="Enter Score" />
                            </div>
                        </div>





                        <div class="clearfix"></div>
                        <div class="FormButtonStyle">
                            <div class="text-right">
                                <button class="btn btn-primary BtnStyle updateOne" type="button" onclick="gotoFormPanelTwofromSFB()">Next</button>

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

                    }
                    <!--PanelTwo-->
                    <div class="FormPanelInner" id="FormPanelTwo" style="display:none">


                        <div id="divindian2page">

                            <div class="FormRadioOptions">
                                <p class="fontMedium form-text">10th class Details * </p>
                                <div class="row radioInner">
                                    <label>
                                        <input type="radio" class="Radiostyle" value="Percentage" name="tenthmarktype" checked onclick="checkperten('per')" /><span>Percentage</span>
                                    </label>
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" value="CGPA" name="tenthmarktype" onclick="checkperten('cgpa')" /><span>CGPA</span>
                                    </label>
                                </div>
                                <div class="ClassDetails row mlr">
                                    <div class="col-6 plr7">
                                        <select class="FormStyle" id="tenthyearofpassing"></select>
                                    </div>
                                    <div class="col-6 plr7" id="divtenper">
                                        <input type="text" onkeypress="return isNumberKey(event)" id="tenthper" class="form-control FormStyle" maxlength="5" placeholder="Marks in Percentage *" />
                                    </div>
                                    <div class="col-6 plr7" id="divtencgpa" style="display:none">
                                        <input type="text" onkeypress="return isNumberKey(event)" id="tenthcgpa" class="form-control FormStyle" maxlength="5" placeholder="Marks in CGPA *" />
                                    </div>

                                </div>
                            </div>
                            <div class="FormRadioOptions">
                                <p class="fontMedium form-text">12th class Details *</p>
                                <p class="form-MediumText fontMedium">Are you appearing for exams this academic year?</p>
                                <div class="row radioInner">
                                    <label>
                                        <input type="radio" id="radtwyes" value="Yes" class="Radiostyle" name="radtwappear" onclick="bindyear('yes');" /><span>Yes</span>
                                    </label>
                                    <label class="noPadding">
                                        <input type="radio" id="radtwno" value="No" class="Radiostyle" name="radtwappear" checked onclick="bindyear('no');" /><span>No</span>
                                    </label>
                                </div>
                                <div class="ClassDetails row mlr">
                                    <div class="col-6 plr7">
                                        <select class="FormStyle" id="twyearofpassing">
                                            <option value="0">Year of Passing *</option>
                                            @*<option>2019</option>*@

                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="FormRadioOptions">

                                <div id="dvtw">
                                    <p class="fontMedium form-text">Marks *</p>
                                    @*<p class="form-MediumText fontMedium">Are you appearing for exams this academic year?</p>*@

                                    <div class="ClassDetails row mlr">
                                        <div class="col-6 plr7 ">
                                            <input type="text" onkeypress="return isNumberKey(event)" id=twper class="form-control FormStyle" maxlength="5" placeholder="Marks in Percentage *" />
                                        </div>
                                        <div class="col-6 plr7 ">
                                            <input type="text" onkeypress="return isNumberKey(event)" id=twpcm class="form-control FormStyle" maxlength="5" placeholder="PCM/PCB Percentage" />
                                        </div>
                                    </div>
                                </div>

                            </div>


                            <div class="mt30">
                                <input type="text" id="twsclclg" class="form-control FormStyle" placeholder="Name of School/College *" />
                            </div>

                        </div>
                        <div id="divnri2page" style="display:none">
                            <div class="mt30">
                                <input type="text" id="hiedcationunri" class="form-control FormStyle" placeholder="Highest Educational Qualification *" />
                            </div>

                            <select class="FormStyle" id="nricountry">

                                <option value="0">select country</option>
                            </select>

                            <div class="mt30">
                                <input type="text" id="nriclgname" class="form-control FormStyle" placeholder="Name of School/College *" />
                            </div>

                        </div>
                        <div id="divpg" style="display:none">
                            <br />
                            <p class="form-text fontMedium">Graduation Details *</p>
                            <p class="form-MediumText fontMedium">Are you appearing for exams this academic year?</p>
                            <div class="row radioInner">
                                <label>
                                    <input type="radio" value="yes" id="radugyes" class="Radiostyle" name="radpgapp" checked onclick="pgappearing('yes');" /><span>Yes</span>
                                </label>
                                <label class="noPadding">
                                    <input type="radio" value="no" id="radugno" class="Radiostyle" name="radpgapp" onclick="pgappearing('nopg');" /><span>No</span>
                                </label>
                            </div>


                            <select class="FormStyle selectpickers" id="pgyearofappearing">
                                <option value="0">Year of Passing *</option>
                            </select>


                            <div class="form-group" id="divpgper" style="display:none">
                                <input type="text" class="form-control FormStyle" onkeypress="return isNumberKey(event)" maxlength="5" placeholder="Graduation Percentage (%)(XX.XX) *" id="pgpercentage" />
                            </div>


                        </div>
                        <div class="FormButtonStyle row no-gutters">
                            <div class="text-left col-6">
                                <button class="btn btn-primary BtnStyle BtnStyleforBack" onclick="backtoFormPanelOneSFB();">Back</button>
                            </div>
                            <div class="text-left col-6">
                                <button class="btn btn-primary BtnStyle updateTwo" onclick="gotoFormPanelThree()">Next</button>
                            </div>
                        </div>
                    </div>
                    <!--PanelThree-->
                    @using (Html.BeginForm("Payment", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
                    {
                        <div class="FormPanelInner" id="FormPanelThree" style="display:none">
                            <div class="Fees">
                                <p class="fontMedium form-text">Application Form Fees</p>

                                <span id="spncurrencyicon" class="fontBold feeText">&#8377; </span> <span id="spncurrency" class="fontBold feeText"></span>
                            </div>

                            <div class="FormButtonStyle row no-gutters">
                                <div class="text-left col-6">
                                    <button type="button" class="btn btn-primary BtnStyle BtnStyleforBack revertUptwo" onclick="backtoFormPanelTwo()">Back</button>
                                </div>
                                <div class="text-right col-6">
                                    <button type="submit" class="btn btn-primary BtnStyle updateThree" onclick="gotoFormPanelFour()">Next</button>
                                </div>
                            </div>
                        </div>
                    }

                    @using (Html.BeginForm("Apply", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
                    {
                        <input type="hidden" name="hdnstudentid" value="@Convert.ToString( ViewBag.student_id)" />
                        <input type="hidden" id="hdnotp" value="" />
                        <!--Panel Four-->
                        <div class="FormPanelInner noborder" id="FormPanelFour" style="display:none">
                            <div class="PaymentSuccessful">
                                <h2 class="fontBold paymentText">
                                    <img src="../img/application/tick.png" class="img-fluid" alt="icon" />
                                    <span>Payment Successful</span>
                                </h2>
                            </div>
                            <div class="confirmationPanel">
                                <p class="fontMedium ">
                                    Confirmation has been sent to you Email ID
                                    <a href="javascript:void(0);">@Convert.ToString(Session["email"])</a>
                                </p>
                                <p class="fontMedium ">
                                    and Phone Number
                                    <a href="javascript:void(0);">@Convert.ToString(Session["phone"])</a>
                                </p>
                                <div class="RememberPanel">
                                    <p class="form-MediumText">Things to Remember</p>
                                    <ul>
                                        <li>Refer the site for more information on important examination dates & course related information</li>
                                        <li>Get in in touch with us to change any details in your application form</li>
                                    </ul>
                                </div>
                            </div>
                            <div class="Pref_Spl CategoryPanel">
                                <p class="fontMedium form-text">Preferred Specialisations * (You can select upto 3)</p>
                                <div class="SplList">
                                    <div class="FormRadioOptions Scroll">
                                        <div id="divbindheckbox" class="SplRadiostyle SplRadiostyleOne">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--Photo and Decalaration-->
                            <div class="Pref_Spl CategoryPanel">
                                <p class="fontMedium form-text">Your Photo and Declaration *</p>
                                <div class="drag_dropPanel">
                                    <div class="form-group">
                                        <!--drapDropStyle-->
                                        <label class="sr-only" for="inputFile">File Upload</label>
                                        <div id="inputFile">
                                            <input type="file" class="form-control-file" onchange="ValidateSize(this)"
                                                   data-title="upload files" id="filephoto" name="filephoto" accept="image/jpeg,image/jpg,image/png">
                                            @*<p class="selectFiles">Select files</p>*@
                                            <h5>
                                                @*[We only support JPG and PNG images no larger than 50 KB]*@
                                            </h5>
                                        </div>
                                    </div>
                                </div>

                                @if (TempData["uploadphoto"] != null && (bool)TempData["uploadphoto"])
                                {
                                    <p style="color:red">Please upload image below 50 KB</p>
                                }
                                @if (TempData["uploadphotosize"] != null && (bool)TempData["uploadphotosize"])
                                {
                                    <p style="color:red">Please upload image below 50 KB</p>
                                }

                                <div id="examcity" style="display:none;">
                                    <p class="fontMedium form-text">Select Exam City *</p>
                                    <p class="fontMedium form-text">Preference 1 *</p>

                                    <select class="FormStyle selectpickers" id="examcity1" name="examcity1"></select>

                                    <p class="fontMedium form-text">Preference 2 *</p>
                                    <select class="FormStyle selectpickers" id="examcity2" name="examcity2"></select>
                                </div>
                                @*<div class="row radioInner declartionText">
                <label>
                    <input type="radio" id="declare" class="Radiostyle" name="dec1" /><span>
                        I have read and understood the eligibility criteria and thereby confirm that I fulfill the criteria.
                    </span>
                </label>
            </div>*@
                            </div>

                            <div id="divpage4indian">
                                <div class="FormRadioOptions CategoryPanel">
                                    <p class="fontMedium form-text">Category *</p>
                                    <div class="row radioInner RadioList no-gutters">
                                        <div class="col-4 RadioListStyle">
                                            <label class="noPadding">
                                                <input type="radio" class="Radiostyle" name="caste" checked value="1" /><span>General</span>
                                            </label>
                                        </div>
                                        <div class="col-4 RadioListStyle">
                                            <label class="noPadding">
                                                <input type="radio" class="Radiostyle" name="caste" value="5" /><span>Differently Abled</span>
                                            </label>
                                        </div>
                                        <div class="col-4 RadioListStyle">
                                            <label class="noPadding">
                                                <input type="radio" class="Radiostyle" name="caste" value="3" /><span>OBC</span>
                                            </label>
                                        </div>
                                        <div class="col-4 RadioListStyle">
                                            <label class="noPadding">
                                                <input type="radio" class="Radiostyle" name="caste" value="2" /><span>SC</span>
                                            </label>
                                        </div>
                                        <div class="col-4 RadioListStyle">
                                            <label class="noPadding">
                                                <input type="radio" class="Radiostyle" name="caste" value="4" /><span>ST</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="FormRadioOptions CategoryPanel">
                                    <p class="form-text fontMedium">Are you a Domicile of Uttarakhand? *</p>
                                    <div class="row radioInner RadioList no-gutters">
                                        <div class="col-4 RadioListStyle">
                                            <label class="noPadding">
                                                <input type="radio" value="Yes" class="Radiostyle" name="domicile" /><span>Yes</span>
                                            </label>
                                        </div>
                                        <div class="col-4 RadioListStyle">
                                            <label class="noPadding">
                                                <input type="radio" value="No" class="Radiostyle" name="domicile" checked /><span>No</span>
                                            </label>
                                        </div>
                                    </div>
                                    <p class="form-text fontMedium">Enter your Address *</p>
                                    <div class="form-group  ">
                                        <input type="text" id="address1" name="address1" maxlength="50" class="form-control FormStyle" placeholder="House No * " />
                                    </div>
                                    <div class="form-group">
                                        <input type="text" id="address2" name="address2" maxlength="50" class="form-control FormStyle" placeholder="C/O *" />
                                    </div>
                                    <div class="form-group">
                                        <input type="text" id="address3" name="address3" maxlength="50" class="form-control FormStyle" placeholder="Address *" />
                                    </div>
                                    <div class="form-group col-6 noPadding">
                                        <input type="text" name="pincode" id="pincode" maxlength="6" class="form-control FormStyle" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')" placeholder="Pincode " onkeypress="return isNumber(event);" />
                                    </div>


                                    <p class="fontMedium form-text">State</p>
                                    <label>@Convert.ToString(Session["statelabel"])</label>


                                    <div class="form-group col-6 noPadding">


                                        <p class="fontMedium form-text">City</p>
                                        <label>@Convert.ToString(Session["citylabel"])</label>


                                    </div>
                                </div>

                            </div>
                            <div id="divpage4nri" style="display:none;">

                                <div class="form-group">
                                    <input type="text" id="nriaddress" class="form-control FormStyle" placeholder="Address *" name="nriaddress" />
                                </div>

                            </div>
                            <div class="row radioInner declartionText">
                                <label>
                                    <input type="radio" id="declare" class="Radiostyle" name="dec1" /><span>

                                        I declare that the information provided by me on this application form is true and correct to the best of my knowledge and belief. I have also read the <a style="text-decoration:underline;color:inherit;" target="_blank" href="/home/termsandconditions">terms & conditions </a>and understood the eligibility criteria and thereby confirm that I fulfill the criteria.
                                    </span>
                                </label>
                            </div>

                            <input type="hidden" id="hdncid" name="cid" />
                            <input type="hidden" value="@Convert.ToString(Session["typeofnation"])" id="hdntype" name="typeofnation" />
                            <input type="hidden" id="hdncourseid" value="@Convert.ToInt32(Session["courseid"])" />
                            <input type="hidden" id="hdnexammode" value="@Convert.ToString(Session["examcat"])" />
                            <input type="hidden" id="hdnexammodeapp" value="@Convert.ToString(Session["appcat"])" />
                            <input type="hidden" id="hdnstudytype" value="@Convert.ToString(Session["studytype"])" />
                            <input type="hidden" id="hdnfeepayment" value="@Convert.ToString(Session["feepayment"])" />
                            <input type="hidden" id="hdnpaymentdate" value="@Convert.ToString(Session["paymentdate"])" />
                            <input type="hidden" id="hdnamount" value="@Convert.ToString(Session["amount"])" />
                            <input type="hidden" id="hdnvalidImage" value="" />  
                            <div class="FormButtonStyle row no-gutters">

                                <div class="text-right col-6">
                                    <button type="submit" class="btn btn-primary BtnStyle" onclick="return gotoThankyou()">Finish</button>
                                </div>
                            </div>
                        </div>

                    }
                </div>

            </div>
        </section>
    </main>
    <!--Helpline Chat-->
    <div class="helplineChatPanel ">
        <div class="plr70">
            <div class="helplineChatInner fontBold ">
                <a id="helplineCrop" href="tel:+91 18001028737">
                    <img src="../img/application/helpline.png" class="img-fluid" alt="helpline" />
                    <span>Helpline</span>
                </a>
                <div class="Number">
                    <a href="tel:+9118001028737">
                        +91 18001028737
                    </a>
                </div>
                <a href="javascript:void(0);" onclick="openChat();">
                    <img src="../img/application/chat.png" class="img-fluid" alt="helpline" />
                    <span>Chat</span>
                </a>
            </div>
        </div>
    </div>

    <!--Footer-->
    <footer>
        <section class="FooterPanel">
            <div class="foot_Btm foot_Btm_Height">
                <div class="plr70">
                    <div class="footBtmRow foot_Btm_Height row align-items-center no-gutters">
                        <div class="col-sm-6 copyRights">
                            <h5 style="display:inline;" class="text-uppercase fontBold">
                                &copy; @DateTime.Now.Year UPES. All Rights Reserved.
                            </h5>
                            <span> <a style="color:#000;text-decoration:underline;" class="text-uppercase fontBold" target="_blank" href="/home/termsandconditions">Terms and Conditions</a></span>
                        </div>
                        <div class="col-sm-6 SocialIcon d-flex justify-content-end align-items-center">
                            <p class="text-uppercase fontBold">Follow Us On:</p>
                            <div class="social_icon_menus">
                                <a href="https://www.facebook.com/UniversityofPetroleumandEnergyStudies" target="_blank">
                                    <img src="../img/application/facebook-black.png" class="img-fluid" />
                                </a>
                                <a href="https://twitter.com/UPESDehradun" target="_blank">
                                    <img src="../img/application/twitter-black.png" class="img-fluid" />
                                </a>
                                <a href="https://www.instagram.com/upes_dehradun/" target="_blank">
                                    <img src="../img/application/insta-black.png" class="img-fluid" />
                                </a>
                                <a href="https://www.youtube.com/user/UPESUniversity/featured" target="_blank">
                                    <img src="../img/application/youtube-black.png" class="img-fluid" />
                                </a>
                                <a href="https://www.linkedin.com/school/university-of-petroleum-and-energy-studies/" target="_blank">
                                    <img src="../img/application/linkedin-black.png" class="img-fluid" />
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </footer>




    <script type="text/javascript" src="../scripts/component.js?qr=@DateTime.Now.Ticks"></script>
    <script type="text/javascript" src="../scripts/loader-min.js?qr=@DateTime.Now.Ticks"></script>
    <script type="text/javascript" src="../scripts/upes-appliaction.js?qr=@DateTime.Now.Ticks"></script>


    <script>
        $(document).ready(function () {
            var d = new Date();
            var year = d.getFullYear() - 16;
            d.setFullYear(year);
            $('#datebind').datepicker({
                changeYear: true,
                changeMonth: true,
                yearRange: '1970:2003',
                defaultDate: "2003-10-01",
                dateFormat: 'yy-mm-dd'
            });
            $('.datepickicon').click(function () {
                $('#datepicker input').datepicker('show');
            });
        });

    </script>

    <script defer type="text/javascript">

        function readUrl(input) {
            if (input.files && input.files[0]) {
                let reader = new FileReader();
                reader.onload = (e) => {
                    let imgData = e.target.result;
                    let imgName = input.files[0].name;
                    input.setAttribute("data-title", imgName);
                    console.log(e.target.result);
                }
                reader.readAsDataURL(input.files[0]);
            }

        }
    </script>
    @if (Session["stage"] != null)
    {
        <input type="hidden" id="hdnstage" value="@Convert.ToInt32(Session["stage"])" />
    }
    else
    {
        <input type="hidden" id="hdnstage" value="0" />
    }



    <script type="text/javascript">

        // bind caoaching centre

        $("#source").change(function () {

            $("#coachingcentre").hide();
            $("#othercoachingcentre").val('');
                $("#othercoachingcentre").hide();
            var selSource = $("#source").val();
            if (selSource == "3") {
                $("#coachingcentre").show();

            }
            else {

                $("#coachingcentre").hide();
              $("#othercoachingcentre").val('');
                $("#othercoachingcentre").hide();
                $('#coachingcentre [value=0]').attr('selected', 'true');
            }

        });
        // bind other coaching center
        $("#coachingcentre").change(function () {
            $("#othercoachingcentre").val('');
            $("#othercoachingcentre").hide();
            var selCoachingIns = $("#coachingcentre").val();
            if (selCoachingIns == "others") {
                $("#othercoachingcentre").show();

            }
            else {
                $("#othercoachingcentre").val('');
                $("#othercoachingcentre").hide();


            }

        });


        // bind exam city

        function bindExamCity() {


            @*var sessionexamode = "sessionvalue"+@Session["examcat"].ToString();*@
            var examode = $("input[name='radapplicationmade']:checked").val();
            var typeofnat = $("#hdntype").val();
            var examtype = $("#hdnexammodeapp").val();

            //console.log("mmsess:" + sessionexamode);
            if (examtype == "1" && typeofnat != "nri") {

                $("#examcity").show();
                //console.log("mmhere:" + examtype);
            }
            else if (examtype == "" || examtype == undefined) {
                if (examode == "exam" && typeofnat != "nri") {

                    $("#examcity").show();

                }

            }

            else if (examtype == "Exam" && typeofnat != "nri") {
                $("#examcity").show();
            }



            else {
                //console.log("mmhere2:" + examtype);
                $("#examcity").hide();
            }
            var serviceURL = '/Home/bindexamcity';
            $.ajax({
                url: serviceURL,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        //console.log(data);
                        $("#examcity1").html(data);
                        $("#examcity2").html(data);
                    }
                    else {

                        console.log("err:examcity");
                    }
                    //  alert(data);
                    console.log("err:examcity2");
                }
            });


        }

          //bind coaching institute
        function bindcoaching() {
            var serviceURL = '/Home/bindcoaching';
            $.ajax({
                url: serviceURL,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {


                        $("#coachingcentre").html(data);

                    }
                    else {
                        console.log("err:coachingcentre");
                    }
                    //  alert(data);
                    console.log("err:coachingcentre2");
                }

            });
        }




        $(document).ready(function () {
		SetProspectID();
            pushtoLS3();
			
            callcurrency('inr');
            var hdnexammode = $("#hdnexammode").val();
            bindExamCity();

            var selCourseid = $("#hdncourseid").val();

            if ((selCourseid == 5) || (selCourseid == 4) || (selCourseid == 23) || (selCourseid == 7) || (selCourseid == 1) || (selCourseid == 14)) {
                $("#radpg").trigger('click');
                bindcdata('PG');

            }

            else {
                bindcdata('UG');
            }
            loadcountry('indian');
            var c_id = $("#hdncourseid").val();
            var c_id_new =@Convert.ToInt32(Session["courseid"]);
            bindcheckbox(c_id_new);
            bindcoaching();
            bindExamCity();

            var studytype =@Convert.ToInt32(Session["studytype"]);


            if (studytype == 1) {
                bindcdata('UG');
                document.getElementById('radug').checked = true;
            }
            else if (studytype == 2) {
                bindcdata('PG');
                document.getElementById('radpg').checked = true;
            }

            var updatestage =@Convert.ToInt32(Session["stage"]);
            var typenat = $("#hdntype").val();
            var typenat_sfb = $("#hdntypenat_sfb").val();

            if (typenat == "init") {
                $("#radnantionindian").trigger('click');
            }

            else if (typenat == "nri") {
                $("#radnantionnri").trigger('click');
            }

            else
            {
                $("#radnantionindian").trigger('click');
            }
            checknation(typenat);

            // alert(updatestage);

            if (updatestage == 1) {
               // alert(stage);
                $('#FormPanelTwo').show();
                $('#FormPanelOne').hide();
                $('.StripStyle li').addClass('active-border');
                $('.StripStyle li').addClass('active');
                $('.StripStyle li').addClass('noacive');
                $('.StripStyle li:nth-child(3)').removeClass('active');
                $('.StripStyle li:last-child').removeClass('active');
                $('.StripStyle li:nth-child(2)').removeClass('active-border');
                $('.StripStyle li:nth-child(3)').removeClass('active-border');
                $('.StripStyle li:last-child').removeClass('active-border');

                if (typenat == "nri") {

                  //  alert(typenat);

                    $('#divindian2page').hide();
                    $('#divnri2page').show();

                }
                else if (typenat == "indian") {
                 //  alert(typenat);
                    $('#divindian2page').show();
                    $('#divnri2page').hide();
                }


                //old
            }

            else if (updatestage == 2) {

                $('#FormPanelTwo').hide();
                $('#FormPanelOne').hide();
                $('#FormPanelThree').show();
                $('#FormPanelFour').hide();
                $('.StripStyle li').addClass('active-border');
                $('.StripStyle li').addClass('active');
                $('.StripStyle li:last-child').removeClass('active');
                $('.StripStyle li:nth-child(3)').removeClass('active-border');
                $('.StripStyle li:last-child').removeClass('active-border');


                if (typenat == "nri") {

                    //  alert(typenat);

                    $('#divindian2page').hide();
                    $('#divnri2page').show();

                }
                else if (typenat == "indian") {
                    //  alert(typenat);
                    $('#divindian2page').show();
                    $('#divnri2page').hide();
                }


            }

            else if (updatestage == 3) {


                $('#FormPanelFour').show();
                $('#FormPanelThree').hide();
                $('#FormPanelTwo').hide();
                $('#FormPanelOne').hide();
                $('.StripStyle li').addClass('active');
                $('.StripStyle li').addClass('active-border');



                if (typenat == "nri") {

                   // alert(typenat);

                    $('#divpage4indian').hide();
                    $('#divpage4nri').show();

                }
                else if (typenat == "indian") {
                   // alert(typenat);
                    $('#divpage4indian').show();
                    $('#divpage4nri').hide();
                }

               // divpage4indian

               // divpage4nri
            }

            else  if(updatestage == 4) {



                window.location.href = "/Thankyou";
            }



        });


        $(document).ready(function () {
            //bind bindenquirysource
            var serviceURL = '/Home/bindenquirysource';
            $.ajax({
                url: serviceURL,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {


                        $("#source").html(data);

                    }
                    else {
                        console.log("Error:bindenquirysource")
                    }
                    console.log("Error:bindenquirysource2")

                }
            });



            var serviceURLstate = '/Home/bindstate';
            $.ajax({
                url: serviceURLstate,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        // $("#pstate").html(data);
                        $("#state").html(data);

                    }
                    else {
                        console.log("Error:bindstate")
                    }
                    console.log("Error:bindstate2")

                }
            });

            //indian state 1 first page
            $("#state").change(function () {

                var stateid = $("#state").val();
                var serviceURLcity = '/Home/bindcity';
                $.ajax({
                    url: serviceURLcity,
                    type: "GET",
                    dataType: "HTML",
                    data: {
                        stateid: stateid
                    },
                    async: false,
                    success: function (data) {
                        //  alert(data);

                        if (data != "") {

                            $("#city").html(data);

                        }
                        else {
                            console.log("Error:bindcity")
                        }
                        console.log("Error:bindcity2")

                    }
                });

            });

            //bind year 12th

            bindyear('no');
            //bind year 10th
            bindyear10th();
        });

        function staging() {
         var updatestage =@Convert.ToInt32(Session["stage"]);
           var typenat = $("#hdntype").val();
            // alert(updatestage);

            if (updatestage == 1) {
                // alert(stage);
                $('#FormPanelTwo').show();
                $('#FormPanelOne').hide();
                $('.StripStyle li').addClass('active-border');
                $('.StripStyle li').addClass('active');
                $('.StripStyle li:nth-child(3)').removeClass('active');
                $('.StripStyle li:last-child').removeClass('active');
                $('.StripStyle li:nth-child(2)').removeClass('active-border');
                $('.StripStyle li:nth-child(3)').removeClass('active-border');
                $('.StripStyle li:last-child').removeClass('active-border');

                if (typenat == "nri") {

                    //  alert(typenat);

                    $('#divindian2page').hide();
                    $('#divnri2page').show();

                }
                else if (typenat == "indian") {
                    //  alert(typenat);
                    $('#divindian2page').show();
                    $('#divnri2page').hide();
                }


                //old
            }

            else if (updatestage == 2) {

                $('#FormPanelTwo').hide();
                $('#FormPanelOne').hide();
                $('#FormPanelThree').show();
                $('#FormPanelFour').hide();
                $('.StripStyle li').addClass('active-border');
                $('.StripStyle li').addClass('active');
                $('.StripStyle li:last-child').removeClass('active');
                $('.StripStyle li:nth-child(3)').removeClass('active-border');
                $('.StripStyle li:last-child').removeClass('active-border');


                if (typenat == "nri") {

                    //  alert(typenat);

                    $('#divindian2page').hide();
                    $('#divnri2page').show();

                }
                else if (typenat == "indian") {
                    //  alert(typenat);
                    $('#divindian2page').show();
                    $('#divnri2page').hide();
                }


            }

            else if (updatestage == 3) {


                $('#FormPanelFour').show();
                $('#FormPanelThree').hide();
                $('#FormPanelTwo').hide();
                $('#FormPanelOne').hide();
                $('.StripStyle li').addClass('active');
                $('.StripStyle li').addClass('active-border');



                if (typenat == "nri") {

                    // alert(typenat);

                    $('#divpage4indian').hide();
                    $('#divpage4nri').show();

                }
                else if (typenat == "indian") {
                    // alert(typenat);
                    $('#divpage4indian').show();
                    $('#divpage4nri').hide();
                }

                // divpage4indian

                // divpage4nri
            }

            else if (updatestage == 4) {



                window.location.href = "/Thankyou";
            }
        }


        // Twelve year

        $("#tenthyearofpassing").change(function () {
            var ugpg = $("#hdnstudytype").val();
            var seltenyear = $("#tenthyearofpassing").val();

            if (seltenyear == "2017" && ugpg == "UG") {
                $("#radtwyes").trigger('click');
              //  bindyear('yes');


                $("#radtwno").attr('disabled', 'disabled');
                $("#radtwno").addClass('disbla');
            }

            else if (seltenyear != "2017" && ugpg == "UG") {
                $("#radtwno").trigger('click');
               // bindyear('yes');
                $('#radtwno').prop("disabled", false);
                $("#radtwno").trigger('click');
                $("#radtwno").removeClass('disbla');

            }
            else {
                bindyear('no');
            }

        });

        // UG Year
        $("#twyearofpassing").change(function () {
            var ugpg = $("#hdnstudytype").val();
            var seltwyear = $("#twyearofpassing").val();
            if (ugpg == "PG" && seltwyear == "2016") {

                $("#radugyes").trigger('click');
                $("#radugno").attr('disabled', 'disabled');
                $("#radugno").addClass('disbla');
                //pgappearing('yes');
            }
            else if (ugpg == "PG" && seltwyear != "2016") {
                //alert("ss");
                event.preventDefault();
                $('#radugno').prop("disabled", false);
               $("#radugno").trigger('click');
                $("#radugno").removeClass('disbla');

                //pgappearing('nopg');


            }
        });
        function bindyear10th() {

            var ugpg = $("#hdnstudytype").val();

            var minyear = "2017";
            if (ugpg == "PG") {
                minyear = "2014";
                $("#radtwyes").attr('disabled','disabled');
                $("#radtwyes").addClass('disbla');
            }

            else {

                !$("#radtwyes").attr('disabled');
                $("#radtwyes").removeClass('disbla');
            }
            console.log("APP"+typeofapp);
            var typeofapp = "tenth";
            var serviceURLyear10th = '/Home/bindyearnew';
            $.ajax({
                url: serviceURLyear10th,
                type: "GET",
                dataType: "HTML",
                data: {
                    type: typeofapp,
                    minyear: minyear
                },
                async: false,
                success: function (data) {
                     // alert(data);

                    if (data != "") {

                        $("#tenthyearofpassing").html(data);
                        //bindyear('no');
                    }
                    else {
                        console.log("Error:bindyearnew")
                    }
                    console.log("Error:bindyearnew2")

                }
            });
        }


        function bindyear(typeofapp) {
            var ugpg = $("#hdnstudytype").val();
            if (typeofapp == 'yes') {

                $("#dvtw").hide();
                $("#twper").val("");

            }
            if (typeofapp == 'no') {

                $("#dvtw").show();
                $("#twper").val("");
            }

            var seltenyear = $("#tenthyearofpassing").val();
            seltenyear = parseInt((seltenyear));
            if (seltenyear == 0) {
                if (ugpg == "UG") {
                    seltenyear = 2017;
                }
                else {

                    seltenyear = 2014;
                }
            }
            seltenyear = seltenyear + 2;
            var minyear = seltenyear;
            console.log(seltenyear);
            console.log(minyear);
            if (typeofapp == "no" && ugpg == "UG") {

                typeofapp = "noapplyingug";
            }

            else if (typeofapp == "no" && ugpg == "PG") {
                typeofapp = "noapplyingpg";
            }

            console.log(typeofapp)
            var serviceURLyear = '/Home/bindyearnew';
            $.ajax({
                url: serviceURLyear,
                type: "GET",
                dataType: "HTML",
                data: {
                    type: typeofapp,
                    minyear : minyear
                },
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {
                        console.log(data);
                        $("#twyearofpassing").html('');
                        $("#twyearofpassing").html(data);
                        console.log(data);
                        pgappearing('yes')

                        //console.log(minyear);
                    }
                    else {
                        //alert("Error");
                        console.log("Error bindyearnew");
                    }
                    //  alert(data);

                }
            });
        }
        function pgappearingnew(val, minyear) {
            var typenat = $("#hdntype").val();

            var ugupg = $("#hdnstudytype").val();

            console.log(typenat);
            console.log(ugupg);

            if (typenat == "nri" && ugupg == "PG") {
                minyear = 2000;
            }
            var serviceURLyear = '/Home/bindyearnew';
            $.ajax({
                url: serviceURLyear,
                type: "GET",
                dataType: "HTML",
                data: {
                    type: val,
                    minyear: minyear
                },
                async: false,
                success: function (data) {
                    if (data != "") {
                        if (val == "yes") {

                            $("#divpgper").hide();

                            $("#pgpercentage").val('');
                        }
                        else if (val == "nopg") {
                            $("#divpgper").show();
                        }
                        //console.log(data);
                        $("#pgyearofappearing").html('');
                        $("#pgyearofappearing").html(data);

                    }
                    else {
                        // alert("Error");
                    }
                    //  alert(data);

                }
            });
        }

        function pgappearing(val) {
            var seltwyear = $("#twyearofpassing").val();
            seltwyear = parseInt((seltwyear));
            if (seltwyear == 0) {
                seltwyear = 2015;
            }
            seltwyear = seltwyear + 3;
            var minyear = seltwyear;
            console.log(val);
            console.log(minyear);
            pgappearingnew(val, minyear);

        }

        function bindcdata(type) {
            $("#hdnstudytype").val(type);
            bindyear10th();
            var serviceURLcourse = '/Home/bindcourse';
            $.ajax({
                url: serviceURLcourse,
                type: "GET",
                dataType: "HTML",
                data: {
                    type: type
                },
                async: false,
                success: function (data) {
                    //  alert(data);
                    if (data != "") {
                        $("#cource").html(data);
                        if (type == "PG") {
                            $("#radtwyes").attr('disabled');
                            $("#divpg").show();
                            $("#divpgmadeofexam").show();
                            $("#divugmadeofexam").hide();


                        }

                        else if (type == "UG") {
                            $("#radtwyes").attr('enabled');
                            $("#divappmade").hide();
                            $("#jeescore").val('');
                            $("#divpg").hide();
                            $("#divpgmadeofexam").hide();
                            $("#divugmadeofexam").show();
                        }
                    }
                    else {
                      //  alert("Error");
                    }
                    //  alert(data);

                }
            });

        }


        function checknation(val) {

            var serviceURLcountry = '/Home/bindnricountry';
            if (val == "indian") {
                loadcountry(val);
                $("#divindianphone").show();
                $("#divindian").show();
                $("#divnri").hide();
                $("#hdntype").val('indian');

                $("#divnriphone").hide();
                $("#nriphone").val('');

                $("#divindianexam").hide();
                callcurrency('inr');

            }

            else if (val == "nri") {

              //  alert("ddd");
                $("#divnriphone").show();
                $("#divindianphone").hide();
                $("#divindian").hide();
                $("#divnri").show();
                $("#hdntype").val('nri');
                $("#state").val('0');
                $("#city").val('0');
                $("#divotp").hide();
                $("#divindianexam").hide();

                $("#jeescore").val('');
                $("#otpcheckp").hide();

                loadcountry(val);
                bindnricountrystudy();
                callcurrency('usd');
                $("#hdnexammode").val("0");
            }
        }

        function bindnricountrystudy() {
            var serviceURLcountry = '/Home/bindnricountrystudy';
            $.ajax({
                url: serviceURLcountry,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {



                            $("#nricountry").html(data);

                        }


                    else {
                      //  alert("Error");
                        console.log("Error in bindnricountrystudy");
                    }
                    //  alert(data);

                }
            });


        }

        function loadcountry(val) {
            bindnricountrystudy();
            var serviceURLcountry = '/Home/bindnricountry';
            $.ajax({
                url: serviceURLcountry,
                type: "GET",
                dataType: "HTML",
                data: {
                    type: val
                },
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        $("#country").html(data);



                    }
                    else {
                     //  alert("Error");
                    }
                    //  alert(data);

                }
            });


        }
        function checkMobileExists(mobile) {
            var serviceURLcheckmobile = '/Home/checkdataexistsmobile';
            var retval = "no";
            $.ajax({

                url: serviceURLcheckmobile,
                type: "GET",
                dataType: "HTML",

                data: {
                    strval: mobile
                },

                async: false,
                success: function (data) {

                     

                    if (data != "0") {

                        retval = "yes";
                    }

                    //  alert(data);

                }
            });
            return retval;
        }

        function checkEmailExists(emailid)
        {
            var serviceURLcheckemail = '/Home/checkdataexistsemail';
            var retval = "no";
            $.ajax({

                url: serviceURLcheckemail,
                type: "GET",
                dataType: "HTML",

                data: {
                    strval: emailid
                },

                async: false,
                success: function (data) {

                      //alert(data);

                    if (data != "0") {

                        retval = "yes" ;

                    }

                    //  alert(data);

                }
            });
            return retval;
        }
        $('#email').on('change', function () {
            var email = this.value;
            if ((checkEmailExists(email) == "yes")) {
                $(".validation").remove();
                $('#email').focus();
                $('#email').after("<p class='validation' style='color:red;margin-bottom:0px;'>Email ID already exists!</p>");
                return false;

            }

            else {

                $(".validation").remove();
            }
        });


        $('#nriphone').on('change', function () {
            var mobile = this.value;
            if ((checkMobileExists(mobile) == "yes")) {

                $(".validation").remove();
                $('#nriphone').focus();
                $('#nriphone').after("<p class='validation' style='color:red;margin-bottom:0px;'>Mobile number already exists!</p>");
                return false;
            }
        });

        $('#phone').on('change', function () {

            var mobile = this.value;
            var mobileValidate = /^[6-9]\d{9}$/;
            if (!(mobileValidate.test(mobile))) {
                $(".validation").remove();
                $('#phone').focus();
                $('#phone').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Enter  Valid Phone number</p>");
                return false;
            }

            if ((checkMobileExists(mobile) == "yes")) {

                $(".validation").remove();
                $('#phone').focus();
                $('#phone').after("<p class='validation' style='color:red;margin-bottom:0px;'>Mobile number already exists!</p>");
                return false;

            }
            else {
                $(".validation").remove();
                $("#divotp").show();
            }


        });

        $('#otp').on('change', function () {
            var hdnotp = $("#hdnotp").val();
            var cuotp = $("#otp").val();
            if (cuotp == "") {
                $(".validation").remove();
                $('#otp').focus();
                $('#otp').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Enter otp</p>");
                return false;
            }
            if (hdnotp != cuotp) {
                $(".validation").remove();
                $('#otp').focus();
                $('#otp').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Enter correct otp</p>");
                return false;
            }
            $(".validation").remove();
            $('#otp').focus();
            $('#otp').after("<p class='validation' style='color:green;margin-bottom:0px;'>OTP verified</p>");
            $("#responseotp").html('');
        });

        function getotp() {
            var mobile = $("#phone").val();
            var otpfirl = $("#otp").val();

            $("#otpcheckp").hide();




            var mobileValidate = /^[6-9]\d{9}$/;
            if (!(mobileValidate.test(mobile))) {


                $(".validation").remove();
                $('#phone').focus();
                $('#phone').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Enter  Valid Phone number</p>");
                return false;
            }

            else {
                $(".validation").remove();


                genotp(mobile);

                $("#innerotp").show();

                $("#btnotp").text("Resend OTP");


            }





        }




        function genotp(phone) {
            var serviceURLotp = '/Home/generateotp';

            $.ajax({

                url: serviceURLotp,
                type: "POST",
                dataType: "json",

                data: {
                    phone: phone
                },

                async: false,
                success: function (data) {

                  //  alert(data);

                    if (data != "") {
                        data = data.split("###");





                        if (data[0] == "otp not send") {

                            $("#responseotp").show();
                            $("#responseotp").html(data[0]);

                            $("#hdnotp").val('');


                        }
                        else if (data[0] == "Enter OTP sent to your mobile number") {

                            $("#responseotp").show();
                            $("#responseotp").html(data[0]);
                            $("#hdnotp").val(data[1]);
                        }



                    }
                    else {
                       // $("#otp").val('');
                        $("#responseotp").html('');
                    }
                    //  alert(data);

                }
            });
        }



        function ValidateDOB() {

            var study = $("input[name='radstudy']:checked").val();
            var dob = $("#datebind").val();
            var dt = new Date(dob);
            var dob_year = dt.getFullYear();
            var dob_month = dt.getMonth();
            var dob_date = dt.getDate();

            if (study == "UG") {
                //console.log("imin");
                if (dob_year < 1997) {
                    console.log("iminf");
                    $(".validation").remove();
                    $("#datebind").focus();
                    $('#datepicker').before("<p class='validation' style='color:red;margin-bottom:0px;'>Only Candidates whose DOB falls on or after October 1, 1997 are eligible</p>");
                    return false;
                }

                else if ((dob_year == 1997) && (dob_month < 9)) {
                    console.log("iminf");
                    $(".validation").remove();
                    $("#datebind").focus();
                    $('#datepicker').before("<p class='validation' style='color:red;margin-bottom:0px;'>Only Candidates whose DOB falls on or after October 1, 1997 are eligible</p>");
                    return false;
                }


            }

            else if (study == "PG") {
                //console.log("sssPGsss");
                if (dob_year > 1999) {
                    console.log("sss1999PGsss");
                    $(".validation").remove();
                    $("#datebind").focus();
                    $('#datepicker').before("<p class='validation' style='color:red;margin-bottom:0px;'>Only Candidates whose DOB falls on or before October 1, 1999 are eligible.");
                    return false;
                }

                else if ((dob_year == 1999) && (dob_month > 9)) {
                    //console.log("sss1999s##PGsss");
                    $(".validation").remove();
                    $("#datebind").focus();
                    $('#datepicker').before("<p class='validation' style='color:red;margin-bottom:0px;'>Only Candidates whose DOB falls on or before October 1, 1999 are eligible.</p>");
                    return false;
                }
                else if ((dob_year == 1999) && (dob_month == 9) && (dob_date != 1)  ) {
                    //console.log("sss1999s##PGsss");
                    $(".validation").remove();
                    $("#datebind").focus();
                    $('#datepicker').before("<p class='validation' style='color:red;margin-bottom:0px;'>Only Candidates whose DOB falls on or before October 1, 1999 are eligible.</p>");
                    return false;
                }

            }



        }

        $("#cource").change(function () {

            ValidateDOB();


            var typent = $("#hdntype").val();

            if (typent == "indian") {

                $("#divindianexam").show();


            }
            else if (typent == "nri") {
                $("#divindianexam").hide();
            }


            $(".ne").hide();
            var c_id = $("#cource").val();

            if (c_id != "0") {

                bindcheckbox(c_id);
            }

            var selected_course = $("#cource :selected").text();

            var study = $("input[name='radstudy']:checked").val();

            if (c_id == "2" || c_id == "16") {

                $("#twpcm").attr("placeholder", "PCM/PCB Percentage *");
            }

            else
            {

                $("#twpcm").attr("placeholder", "PCM/PCB Percentage");
            }

            if (study == "UG") {



                $(".ne").hide();
                $(".bm").hide();
                $(".sd_" + this.value).show();
                var selid = this.value;
                if (selid == "8" || selid == "3" || selid == "20" ) {
                    $(".bm").show();

                }


            }
            else if (study = "PG") {

               // alert(study + selected_course);
            }

        });


        function onappclick(val) {

            //alert(val);
            $("#hdnexammode").val(val);
            if (val == 1) {
                $("#divappmade").hide();
                $("#jeescore").val('');

            }
            else if (val == 2) {

                var examode = $("input[name='radapplicationmade']:checked").val();

                $("#hdnexammode").val(examode);

                if (examode == "pgnonexam") {
                    // alert(examode);
                    $("#divappmade").hide();
                    $("#jeescore").val('');

                }

                else if (examode == "non_exam_ug")
                {
                    //alert('www');
                    $("#divappmade").hide();
                    $("#jeescore").val('');
                }
                else if (examode == "non_exam_board_merit") {
                    //alert('www');
                    $("#divappmade").hide();
                    $("#jeescore").val('');

                }

                else {
                    $("#divappmade").show();
                    $("#jeescore").val('');
                }

            }

        }

        function bindcheckbox(c_id) {

            var serviceURLcheckbox = '/Home/bindprogram';

            $.ajax({

                url: serviceURLcheckbox,
                type: "GET",
                dataType: "HTML",

                data: {
                    c_id: c_id
                },

                async: false,
                success: function (data) {

                    //  alert(data);

                    if (data != "") {

                        $("#divbindheckbox").html(data);

                        var limit = 3;
                        $('input.single-checkbox').click(function () {
                            if ($(this).siblings(':checked').length >= limit) {
                                this.checked = false;

                            }
                        });


                       // checkpgm();

                    }
                    else {
                        $("#divbindheckbox").html('');
                    }
                    //  alert(data);

                }
            });


        }
        function checkpgm() {

            var textappend = "";
            var i, chks = document.getElementsByName('chk[]');


            for (i = 0; i < chks.length; i++) {



                if (chks[i].checked) {

                   // console.log(chks[i].value);
                    textappend += textappend + ",";

                    return true;
                }

                else {
                    alert('No item selected');
                    //console.log(chks[i].value);
                    return false;
                }
            }







        }
        //limit checkbox
        function checkperten(val) {
          //  alert(val);

            if (val == "per") {

                $("#divtenper").show();
                $("#divtencgpa").hide();



                $("#tenthcgpa").val('');





            }
            else if (val = "cgpa") {


                $("#divtenper").hide();
                $("#divtencgpa").show();

                $("#tenthper").val('');
            }



        }

        function callcurrency(currency) {

            // alert(currency);

            var serviceURLcountry = '/Home/checkpaymentamount';
            $.ajax({
                url: serviceURLcountry,
                type: "GET",
                dataType: "HTML",
                data: {
                    currency: currency
                },
                async: false,
                success: function (data) {
                    //alert(data);

                    if (data != "") {

                        $("#spncurrency").html(data);
                    }

                    //  alert(data);

                }
            });

        }
        function openChat() {
            window.open("http://ameyo.delhi.upes.ac.in:8888/ameyochatjs/defaultChat/chatOfflinePage.html", "popupWindow", "width=600, height=720, scrollbars=yes");
        }


        function bindSFB() {
            $("#FormPanelOneback").show();
            $("#FormPanelTwo").hide();
            $(".two").removeClass("active");
            var inlblFname = $("#hdnfname_sfb").val();
            var inlblMname = $("#hdnmname_sfb").val();
            var inlblLname = $("#hdnlname_sfb").val();
            var inlblDOB = $("#hdndob_sfb").val();
            var inlblMobile = $("#hdnmobile_sfb").val();
            var inlblEmail = $("#hdnemail_sfb").val();
            var inlblCourseName = $("#hdncoursename_sfb").val();
            var inlblCourse = $("#hdncourseid_sfb").val();
            var inlblCountry = $("#hdncountryid_sfb").val();
            var inlblState = $("#hdnstateid_sfb").val();
            var inlblCity = $("#hdncityid_sfb").val();
            var inlblnricity = $("#hdnnricity_sfb").val();
            var inlblappmode = $("#hdnappmode_sfb").val();
            var inlblJeescore = $("#hdnjeescore_sfb").val();
            var inlblsource = $("#hdnsource_sfb").val();
            var inlblcoaching = $("#hdncoaching_sfb").val();
            var inlblothercoaching = $("#hdnothercoaching_sfb").val();
            $("#lblFname").text(inlblFname);
            $("#lblMname").text(inlblMname);
            $("#lblLname").text(inlblLname);
            $("#lblDOB").text(inlblDOB);
            $("#lblMobile").text(inlblMobile);
            $("#lblEmail").text(inlblEmail);
            $("#lblCourse").text(inlblCourseName);
            var study = $("input[name='radstudy']:checked").val();
            var typenat = $("#hdntypenat_sfb").val();


            sfb_bindcdata(study);
            sfb_loadcountry(typenat);
            sfb_bindstate();
            sfb_bindsourse();
            if (inlblJeescore !="") {
                $("#sfb_jeescore").val();
            }

            if (typenat == "indian") {

                $("#sfb_radnantionindian").trigger('click');


            }
            else if (typenat == "init") {

                $("#sfb_radnantionindian").trigger('click');

            }

            else {

                $("#sfb_radnantionnri").trigger('click');
                $('#sfb_nricity').val(inlblnricity);
              
            }




            if (typenat == "indian") {

                $("#sfb_divindianexam").show();
                $('input[name="radapplicationmade"][value="' + inlblappmode + '"]').trigger('click');
                $('input[name="radapplicationmade"][value="' + inlblappmode + '"]').attr('checked', true);
                $("#hdntype").val("indian");


            }
            else if (typenat == "nri") {
                $("#sfb_divindianexam").hide();
                $("#hdntype").val("nri");
            }


            $(".ne").hide();
            var c_id = inlblCourse;
            if (study == "UG") {

                $(".ne").hide();
                $(".bm").hide();
                console.log(".sd_" + inlblCourse+"");
                $(".sd_" + inlblCourse).show();
                var selid = inlblCourse;

                if (selid == "8" || selid == "3" || selid == "20") {
                    $(".bm").show();

                }
            }
            else if (study = "PG") {

                // alert(study + selected_course);
            }
            $("#sfb_country option[value='" + inlblCountry + "']").attr("selected", true);
            $("#sfb_state option[value='" + inlblState + "']").trigger("selected", true);
            $("#sfb_city option[value='" + inlblCity + "']").trigger("selected", true);
            $("#sfb_source option[value='" + inlblsource + "']").trigger("selected", true);
            $("#sfb_coachingcentre option[value='" + inlblcoaching + "']").trigger("selected", true);
            $("#sfb_othercoachingcentre").val(inlblothercoaching);
            $("#sfb_nricity").val(inlblnricity);
            $("#sfb_jeescore").val(inlblJeescore);
            //$("#sfb_city option[value='" + inlblCity + "']").trigger('select');
            //$("#sfb_source option[value='" + inlblCity + "']").trigger('select');

        }

        function sfb_onappclick(val) {

                //alert(val);
                $("#hdnexammode").val(val);
                if (val == 1) {
                    $("#sfb_divappmade").hide();
                    $("#sfb_jeescore").val('');

                }
                else if (val == 2) {

                    var examode = $("input[name='radapplicationmade']:checked").val();

                    $("#hdnexammode").val(examode);

                    if (examode == "pgnonexam") {
                        // alert(examode);
                        $("#sfb_divappmade").hide();
                        $("#sfb_jeescore").val('');

                    }

                    else if (examode == "non_exam_ug") {
                        //alert('www');
                        $("#sfb_divappmade").hide();
                        $("#sfb_jeescore").val('');
                    }
                    else if (examode == "non_exam_board_merit") {
                        //alert('www');
                        $("#sfb_divappmade").hide();
                        $("#sfb_jeescore").val('');

                    }

                    else {
                        $("#sfb_divappmade").show();
                        $("#sfb_jeescore").val('');
                    }

                }

            }
        function sfb_bindcdata(type) {
            $("#hdnstudytype").val(type);

            if (type == "PG") {

                $("#sfb_divpg").show();
                $("#sfb_divpgmadeofexam").show();
                $("#sfb_divugmadeofexam").hide();


            }

            else if (type == "UG") {

                $("#sfb_divappmade").hide();
                $("#sfb_jeescore").val('');
                $("#sfb_divpg").hide();
                $("#sfb_divpgmadeofexam").hide();
                $("#sfb_divugmadeofexam").show();
            }

        }
        function sfb_bindnricountrystudy() {

            var serviceURLcountry = '/Home/bindnricountrystudy';
            $.ajax({
                url: serviceURLcountry,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        $("#sfb_nricountry").html(data);

                    }


                    else {
                        //  alert("Error");
                        console.log("Error in bindnricountrystudy");
                    }
                    //  alert(data);

                }
            });



        }
        function sfb_loadcountry(val) {
            sfb_bindnricountrystudy();
            var serviceURLcountry = '/Home/bindnricountry';
            $.ajax({
                url: serviceURLcountry,
                type: "GET",
                dataType: "HTML",
                data: {
                    type: val
                },
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        $("#sfb_country").html(data);



                    }
                    else {
                        //alert("Error");
                    }
                    //  alert(data);

                }
            });

        }
        function sfb_bindstate() {
            var inlblState = $("#hdnstateid_sfb").val();
            var inlblCity = $("#hdncityid_sfb").val();
            var serviceURLstate = '/Home/bindstate';
            $.ajax({
                url: serviceURLstate,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        // $("#pstate").html(data);
                        $("#sfb_state").html(data);

                    }
                    else {
                        console.log("Error:bindstate")
                    }
                    console.log("Error:bindstate2")

                }
            });

            //$("#sfb_state").val(inlblState);
            $("#sfb_state option[value='" + inlblState + "']").attr("selected", true);
            //alert("inn:"+inlblState);
            if (inlblState != "0") {

                sfb_bindcity(inlblState);

            }


        }
        function sfb_bindcity(stateselected) {

            var inlblState = $("#hdnstateid_sfb").val();
            var inlblCity = $("#hdncityid_sfb").val();
            var stateid = $("#sfb_state").val();
            //alert(inlblCity);
            var serviceURLcity = '/Home/bindcity';
            $.ajax({
                url: serviceURLcity,
                type: "GET",
                dataType: "HTML",
                data: {
                    stateid: stateid
                },
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        $("#sfb_city").html(data);

                    }
                    else {
                        console.log("Error:bindcity")
                    }
                    console.log("Error:bindcity2")

                }
            });
            //$("#sfb_city").val(inlblCity);

            $("#sfb_city option[value='" + inlblCity + "']").trigger('select');
        }
            //indian state 1 first page
        $("#sfb_state").change(function () {
            var inlblState = $("#hdnstateid_sfb").val();
            var inlblCity = $("#hdncityid_sfb").val();
            var stateid = $("#sfb_state").val();
                var serviceURLcity = '/Home/bindcity';
                $.ajax({
                    url: serviceURLcity,
                    type: "GET",
                    dataType: "HTML",
                    data: {
                        stateid: stateid
                    },
                    async: false,
                    success: function (data) {
                        //  alert(data);

                        if (data != "") {

                            $("#sfb_city").html(data);

                        }
                        else {
                            console.log("Error:bindcity")
                        }
                        console.log("Error:bindcity2")

                    }
                });
            $("#sfb_city").val(inlblCity);

           // $("#sfb_city option[value='" + inlblCity + "']").trigger('select');
            });
        function sfb_checknation(val) {

            var serviceURLcountry = '/Home/bindnricountry';
            $("#sfb_nricity").val('');
                if (val == "indian") {
                    sfb_loadcountry(val);

                    $("#sfb_divindian").show();
                    $("#sfb_divnri").hide();
                    $("#hdntype").val('indian');
                    $("#hdntypenat_sfb").val('indian');
                    $("#sfb_divindianexam").hide();
                    callcurrency('inr');

                }

                else if (val == "nri") {

                    //  alert("ddd");


                    $("#sfb_divindian").hide();
                    $("#sfb_divnri").show();
                    $("#hdntype").val('nri');
                    $("#hdntypenat_sfb").val('nri');
                    $("#sfb_state").val('0');
                    $("#sfb_city").val('0');
                    $("#sfb_divindianexam").hide();
                    $("#sfb_jeescore").val('');
                    sfb_loadcountry(val);
                    sfb_bindnricountrystudy();
                    callcurrency('usd');
                    $("#hdnexammode").val("0");

                }
            }
        function sfb_bindsourse() {
            var selCourse = $("#sfb_source").val();
            var serviceURL = '/Home/bindenquirysource';
            $.ajax({
                url: serviceURL,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {


                        $("#sfb_source").html(data);

                    }
                    else {
                        console.log("Error:bindenquirysource")
                    }
                    console.log("Error:bindenquirysource2")

                }
            });
            $("#sfb_source option[value='" + selCourse + "']").attr("selected", true);
        }
            // bind caoaching centre
            $("#sfb_source").change(function () {

                $("#sfb_coachingcentre").hide();
                $("#sfb_coachingcentre").val('0');
                $("#sfb_othercoachingcentre").val('');
                $("#sfb_othercoachingcentre").hide();
                var selSource = $("#sfb_source").val();
                if (selSource == "3") {
                    sfb_bindcoaching();
                    $("#sfb_coachingcentre").show();

                }
                else {

                    $("#sfb_coachingcentre").hide();
                    $("#sfb_othercoachingcentre").val('');
                    $("#sfb_othercoachingcentre").hide();
                    $('#sfb_coachingcentre [value=0]').attr('selected', 'true');
                }

            });
            // bind other coaching center


            $("#sfb_coachingcentre").change(function () {
                $("#sfb_othercoachingcentre").val('');
                $("#sfb_othercoachingcentre").hide();
                var selCoachingIns = $("#sfb_coachingcentre").val();
                if (selCoachingIns == "others") {
                    $("#sfb_othercoachingcentre").show();

                }
                else {
                    $("#sfb_othercoachingcentre").val('');
                    $("#sfb_othercoachingcentre").hide();


                }

        });
        function sfb_bindcoaching() {
            var selcaoching = $("#sfb_coachingcentre").val();
            var serviceURL = '/Home/bindcoaching';
            $.ajax({
                url: serviceURL,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {


                        $("#sfb_coachingcentre").html(data);

                    }
                    else {
                        console.log("err:coachingcentre");
                    }
                    //  alert(data);
                    console.log("err:coachingcentre2");
                }


            });
            $("#sfb_coachingcentre option[value='" + selcaoching + "']").attr("selected", true);
            if (selcaoching == "") {
                if (selCoachingIns == "others") {
                    $("#sfb_othercoachingcentre").show();
                    //$("#sfb_othercoachingcentre").val();

                }
            }
        }
        function backtoFormPanelOneSFB() {
            bindSFB();
        }

        function gotoFormPanelTwofromSFB() {
            //alert("ff");
            var sfb_typeofnat = $("#hdntypenat_sfb").val();
            var sfb_country = $("#sfb_country").val();
            var sfb_state = $("#sfb_state").val();
            var sfb_city = $("#sfb_city").val();
            var sfb_nricity = $("#sfb_nricity").val();
            var sfb_source = $("#sfb_source").val();
            var sfb_sourcetext = $("#source :selected").text();
            var sfb_coachingcentre = $("#sfb_coachingcentre").val();
            var sfb_othercoachingcentre = $("#sfb_othercoachingcentre").val();
            var sfb_othercoachingcentre_wo = $("#sfb_othercoachingcentre").val().replace(/ /g, '').length;
            var radapplicationmade = $("input[name='radapplicationmade']:checked").val();
            var hdnappmode_sfb = $("#hdnexammode").val();
            var hdnjeescore_sfb = $("#hdnjeescore_sfb").val();
            var alphabetsOnly = /^[a-zA-Z ]*$/;


            if (sfb_typeofnat == "indian") {
                //  alert(typeofnation);
                if (sfb_country == "0") {
                    $(".validation").remove();
                    $("#sfb_country").focus();
                    $("#sfb_country").after("<p class='validation' style='color:red;margin-bottom:0px;'>Please select Country</p>");
                    return false;
                }


                if (sfb_state == "0") {
                    $(".validation").remove();
                    $("#sfb_state").focus();
                    $("#sfb_state").after("<p class='validation' style='color:red;margin-bottom:0px;'>Please select state</p>");
                    return false;
                }

                if (sfb_city == "0") {
                    $(".validation").remove();
                    $("#sfb_city").focus();
                    $("#sfb_city").after("<p class='validation' style='color:red;margin-bottom:0px;'>Please select city</p>");
                    return false;
                }

            }
            else if (sfb_typeofnat == "nri") {

                if (sfb_country == "0") {
                    $(".validation").remove();
                    $("#sfb_country").focus();
                    $("#sfb_country").after("<p class='validation' style='color:red;margin-bottom:0px;'>Please select Country</p>");
                    return false;
                }
                if (sfb_nricity != "") {

                    if (!(alphabetsOnly.test((sfb_nricity)))) {
                        $(".validation").remove();
                        $("#sfb_nricity").focus();
                        $("#sfb_nricity").after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Enter Valid City Name</p>");
                        return false;
                    }
                }

            }
            if (sfb_source == "0") {

                $(".validation").remove();
                $('#sfb_source').focus();
                $('#sfb_source').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Select Source</p>");
                return false;
            }
            if (sfb_source == "3") {

                if (sfb_coachingcentre == "0") {

                    $(".validation").remove();
                    $('#sfb_coachingcentre').focus();
                    $('#sfb_coachingcentre').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Select the Coaching Institute's Name</p>");
                    return false;
                }

                if (sfb_coachingcentre == "others") {

                    if (sfb_othercoachingcentre.length == 0) {
                        $(".validation").remove();
                        $('#sfb_othercoachingcentre').focus();
                        $('#sfb_othercoachingcentre').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Enter the Coaching Institute's Name</p>");
                        return false;
                    }

                    if (sfb_othercoachingcentre_wo == 0) {
                        $(".validation").remove();
                        $('#sfb_othercoachingcentre').focus();
                        $('#sfb_othercoachingcentre').after("<p class='validation' style='color:red;margin-bottom:0px;'>Please Enter the Coaching Institute's Name</p>");
                        return false;
                    }
                }
            }

            $(".validation").remove();
            //console.log("sfb_typeofnat:" + sfb_typeofnat);
            //console.log("sfb_country:" + sfb_country);
            //console.log("sfb_state:" + sfb_state);
            //console.log("sfb_city:" + sfb_city);
            //console.log("sfb_nricity:" + sfb_nricity);
            //console.log("sfb_source:" + sfb_source);
            //console.log("sfb_coachingcentre:" + sfb_coachingcentre);
            //console.log("sfb_othercoachingcentre:" + sfb_othercoachingcentre);
            //console.log("hdnappmode_sfb:" + radapplicationmade);
            //console.log("hdnjeescore_sfb:" + hdnjeescore_sfb);

            var serviceURL = '/Home/updatestage1';
            //alert(serviceURL);
            $.ajax({
                url: serviceURL,
                type: "POST",
                dataType: "json",
                data: {
                    sfb_typeofnat: sfb_typeofnat,
                    sfb_country: sfb_country,
                    sfb_state: sfb_state,
                    sfb_city: sfb_city,
                    sfb_nricity: sfb_nricity,
                    sfb_sourcetext: sfb_sourcetext,
                    sfb_coachingcentre: '',
                    sfb_othercoachingcentre: sfb_othercoachingcentre,
                    radapplicationmade: radapplicationmade,
                    hdnjeescore_sfb: hdnjeescore_sfb
                },

                // state: state, indiancity: indiancity, nricity: nricity
                async: false,

                // string typeofnation, string country, string state, string indiancity, string nricity
                success: function (data) {
                    //alert(data);
                    if (data == "true") {

                        $('#FormPanelTwo').show();
                        $("#FormPanelOneback").hide();
                        $(".two").addClass("active");

                        if (sfb_typeofnat == "indian") {
                            $("#divindian2page").show();
                            $("#divnri2page").hide();
                        }
                        else if (sfb_typeofnat == "nri") {
                            $("#divindian2page").hide();
                            $("#divnri2page").show();

                        }
                    }
                    else {
                        console.log("Error" + data)
                    }
                }
            });

        }



    </script>

  


<script type="text/javascript" src="https://web-in21.mxradon.com/t/Tracker.js"></script>

<script type="text/javascript">

      pidTracker('35022');

</script>
<script type="text/javascript">
function SetProspectID() {
          if (typeof (MXCProspectId) != "undefined") { 
           jQuery('input[name="ProspectID"]').attr('value',
                 MXCProspectId);
            } 
			
         }
//window.onload = SetProspectID();
		</script>
</body>

</html>