<?php
 wp_enqueue_style('datetimepicker');   
 wp_enqueue_script('datetimepicker'); 
 wp_enqueue_script('moment-min');   
 $woocommerce_loop = jws_get_global_woocommerce_loop(); 
 $product = jws_get_global_product();
 $columns1 = 'jws-search-av-item col-xl-12';
 $columns2 = 'jws-search-av-item col-xl-6 col-12';
 $columns3 = 'jws-search-av-item col-xl-4 col-12';  
 global $jws_option;   

?>
<form action="<?php echo esc_url( wc_get_checkout_url()); ?>" class="cart form-extras" method="post" enctype='multipart/form-data' data-product_id='<?php echo get_the_ID() ?>'>
      <div class="jws-adsearch-filter" id="product-<?php the_ID();?>"<?php post_class(); ?>>
		<?php
         
    		if ( post_password_required() ) {
    			echo ''.get_the_password_form();
    			return;
    		}
		?>

        <div class="car-big-card">


				<?php   echo woocommerce_template_single_price();
				        echo '<span class="day">'.esc_html( jws_get_current_type( get_the_ID() ) ).'</span>';
                ?>

         
             <div class="raiting-detail">

                <span class="average"><?php  echo esc_html($product->get_average_rating());  ?><i class="jws-icon-star-full"></i></span>
                <span class="review-count">(<?php echo ''.$product->get_review_count(); ?>)</span>
             </div>
        </div>

        <h3 class="block-title alt"><?php esc_html_e( 'Your Itinerary', 'idealauto' ) ?></h3>

        
	   <div class="row">
		<?php $eable_car_seless = get_post_meta( get_the_ID(), '_jws_disable_rent', 1 );

		if ( !$eable_car_seless ):
			?>
          
                <div class="<?php echo esc_attr($columns1); ?>">
                 
                     
                                <label for="formSearchUpLocation3"><?php esc_html_e( 'Picking Up Location', 'idealauto' ) ?> </label>
                                <select  class="drolocation formSearchUpLocation2"  id="formSearchUpLocation3" name="dropin_location">
                                <option value="none" > <?php esc_html_e( 'Pick-up Location', 'idealauto' ); ?> </option>
                                <?php
                                        $selected = ''; 
        						        if ( function_exists( 'jws_get_date_s_return' ) ) {
        								      $selected = jws_get_date_s_return( 'dropin_location' );
        							    }
        								// get Picking Up Location
        								$pick_up_location = get_post_meta( get_the_ID(), '_rental_dropin_locations2', true );
        
        								$locaton_arr = array();
        								$locaton_str = '';
        								if ( $pick_up_location ) {
        									foreach ( $pick_up_location as $key => $location ) {
        									   $active = $selected == $location
                                    				? 'selected '
                                    				: '';
        										$locaton_arr[] = "'" . $location . "'";
                                                echo '<option '.$active.'value="' . $location . '">' .
        												     $location . '</option>';
        									}
        							
        								}
								?>
                                
                                </select>
							     <i class="jws-icon-icon_pin"></i>
								<?php unset( $locaton_arr, $locaton_str, $pick_up_location ); ?>
                           
              </div> 
              
              <?php 
               $checked = '';
               if ( function_exists( 'jws_get_date_s' ) ) {
                  $up = jws_get_date_s_return( 'dropin_location' );  
			      $off = jws_get_date_s_return( 'dropoff_location' );
                  if($up != $off) {
                    $checked = 'checked="checked"'; 
                  } 
		       }
            
              ?>
 
                <div class="<?php echo 'return-change '.$columns1; ?>">
                    <label>
                    <input  class="return-two-location" type="checkbox" <?php echo esc_attr($checked); ?>/>
                    <?php echo esc_html__('Return to a different location','idealauto'); ?></label>
                </div>
                
                <script>
                    jQuery(document).ready(function ($) {
                       $change_return = $('.return-two-location');
                      var isChecked = $('.return-two-location').is(":checked");
                       $change_return.on('change',function(){
                          isChecked = $(this).is(":checked");
                          var one_value = $('.formSearchUpLocation2').val();

                            if($(this).is(":checked")) {
                                $('.location-off').slideDown(); 
                            }else {
                                $('.location-off').slideUp();
                                $('.formSearchOffLocation2').select2('destroy').val(one_value).select2(); 
                            }
                        });
                         
                         $('.formSearchUpLocation2').on('change',function(){
                          var one_value = $(this).val();  
                            if(!isChecked) {
                                console.log(isChecked);
                               $('.formSearchOffLocation2').select2('destroy').val(one_value).select2();  
                            }
                        }); 
                        
                        
                        if(isChecked) {
                               $('.location-off').slideDown();  
                        }
                        
                        
                        
                        
                        
                    });
                </script>
      
             <div class="<?php echo 'location-off '.esc_attr($columns1); ?>">
                                <label for="formSearchOffLocation3"><?php esc_html_e( 'Dropping Off Location', 'idealauto' ) ?></label>

                                <select name="dropoff_location" " class="drolocation formSearchOffLocation2" id="formSearchOffLocation3" placeholder="<?php esc_html_e( 'Airport or Anywhere', 'idealauto' ); ?>"  name="dropoff_location">
                                       	<option value="none" > <?php esc_html_e( 'Drop off Location', 'idealauto' ); ?> </option>
                                        <?php
                                                $selected = ''; 
                						        if ( function_exists( 'jws_get_date_s_return' ) ) {
                								      $selected = jws_get_date_s_return( 'dropoff_location' );
                							    }
                                          
        							
                								$pick_up_location = get_post_meta( get_the_ID(), '_rental_dropoff_locations2', true );
                
                								$locaton_arr = array();
                								$locaton_str = '';
                								if ( $pick_up_location ) {
                									foreach ( $pick_up_location as $key => $location ) {
                									    $active = $selected == $location
                                        				? 'selected '
                                        				: '';
                										$locaton_arr[] = "'" . $location . "'";
                                                        echo '<option '.$active.'value="' . $location . '">' .
                												     $location . '</option>';
                									}
                							
                								}
        								?>
                               </select>        
						      <i class="jws-icon-icon_pin"></i>
								<?php unset( $locaton_arr, $locaton_str, $pick_up_location ); ?>
                  
                </div>

	
                 <?php 
                        $dFormat = get_option('date_format');
                        $tFormat = 'H:i';
                        $dFormat = (preg_match_all("/[d].[m].[yY]/", $dFormat)) ? 'm/d/Y' : $dFormat;
                        $dateTimeFormat = $dFormat . " " . $tFormat;
               
                        $time_now = strtotime(date($dateTimeFormat));
                  
                ?>
                 <div class="<?php echo esc_attr($columns1); ?>">
      
                                    <label
                                            for="formSearchUpDate3"><?php esc_html_e( 'Picking Up Date', 'idealauto' ) ?></label>
                                    <input autocomplete="off" name="dropin_date" type="text" class="form-control jws-date-timepicker-start"
                                           id="formSearchUpDate3"
                                           placeholder="<?php esc_html_e( 'dd/mm/yyyy', 'idealauto' ); ?>"
                                           value="<?php
									       if ( function_exists( 'jws_get_date_s' ) && strtotime(jws_get_date_s_return( 'dropin_date')) >= $time_now ) {
										       jws_get_date_s( 'dropin_date' );
									       }
									       ?>"
                                    >
                                    <i class="jws-icon-calendar2"></i>
                  
                    </div>  
            
                    <div class="<?php echo esc_attr($columns1); ?>">     
                                    <label
                                            for="formSearchOffDate3"><?php esc_html_e( 'Dropping Off Date', 'idealauto' ) ?></label>
                                    <input autocomplete="off" name="dropoff_date" type="text" class="form-control jws-date-timepicker-end"
                                           id="formSearchOffDate3"
                                           placeholder="<?php esc_html_e( 'dd/mm/yyyy', 'idealauto' ); ?>"
                                           value="<?php
									       if ( function_exists( 'jws_get_date_s' ) && strtotime(jws_get_date_s_return( 'dropin_date')) >= $time_now) {
										       jws_get_date_s( 'dropoff_date' );
									       }
									       ?>"
                                    >
                                   <i class="jws-icon-calendar2"></i>

				    </div>  
                   <?php 
                     
                        $check_date = function_exists('jws_check_date_available_calenda') ? jws_check_date_available_calenda(get_the_ID(),$up,$off,'') : '';
               
                   ?>
                 <script>
                jQuery(document).ready(function ($) {
                        var jwsStartVal = $('.jws-date-timepicker-start').val();
                        var jwsEndVal = $('.jws-date-timepicker-end').val();
            
                        /*Timepicker*/
                        var jwsToday = new Date();
                        var jwsTomorrow = new Date(+new Date() + 86400000);
                        var jwsStartDate = false;
                        var jwsEndDate = false;
                        var startDate = (jwsStartVal != '') ? jwsStartVal : false;
                        var endDate = (jwsEndVal != '') ? jwsEndVal : false;
                        var dateTimeFormat = '<?php echo esc_js($dateTimeFormat); ?>';
                        var dateTimeFormatHide = 'YYYY/MM/DD HH:mm'; 
                        var disabledDates = <?php echo esc_js($check_date); ?>;  
               
                        $('.jws-date-timepicker-start').datetimepicker({
                        formatTime: 'H:i',
                        formatDate: '<?php echo esc_js($dFormat); ?>',
                        format: dateTimeFormat,
                        dayOfWeekStart: <?php echo get_option('start_of_week');?>,
                        defaultDate: jwsToday,
                        defaultSelect: false,
                        closeOnDateSelect: false,
                        timeHeightInTimePicker: 40,
                        validateOnBlur: false,
                        fixed: false,
                        disabledDates: disabledDates,
                        onShow: function( ct ) {
                            $('body').addClass('jws_background_overlay jws-lock');
        
                            var jwsEndDate = $('.jws-date-timepicker-end').val() ? moment($('.jws-date-timepicker-end').val()).format(dateTimeFormatHide) : false;
        
                            if(jwsEndDate) {
                                jwsEndDate = jwsEndDate.split(' ');
                                jwsEndDate = new Date(jwsEndDate[0]);
                            }
        
                            this.setOptions({
                                minDate: new Date(),
                                maxDate: jwsEndDate
                            });
        
                            $(".xdsoft_time_variant").css('margin-top', '-600px');
                        },
                        onSelectDate: function() {
                            $('.jws-date-timepicker-start').datetimepicker('close');
        
                            $('.xdsoft_time').removeClass('xdsoft_current');
                        },
                        onClose: function( ct,$i ) {
                            startDate = ct;
        
                           
                            $('body').removeClass('jws_background_overlay jws-lock');
        
                        },
                        onGenerate: function () {
                            if($('.jws-date-timepicker-start').val() == '') {
                                $('.xdsoft_time').removeClass('xdsoft_current');
                            }
                        }
                    });

                    $('.jws-date-timepicker-end').datetimepicker({
                        formatTime: 'H:i',
                        formatDate: '<?php echo esc_js($dFormat); ?>',
                        format:dateTimeFormat,
                        dayOfWeekStart: <?php echo get_option('start_of_week');?>,
                        defaultDate: jwsTomorrow,
                        defaultSelect: false,
                        closeOnDateSelect: false,
                        timeHeightInTimePicker: 40,
                        validateOnBlur: false,
                        disabledDates: disabledDates,
                        fixed: false,
              
                        onShow:function( ct ){
                            $('body').addClass('jws_background_overlay jws-lock');
        
                            var jwsStartDate = $('.jws-date-timepicker-start').val() ? moment(startDate).add(1, 'day').format(dateTimeFormatHide) : false;
        
                            if(jwsStartDate) {
                                jwsStartDate = jwsStartDate.split(' ');
                                jwsStartDate = new Date(jwsStartDate[0]);
                            } else {
                                jwsStartDate = new Date();
                            }
        
                            //if($('.jws-date-timepicker-end').val()) jwsStartDate = new Date($('.jws-date-timepicker-end').val().split(' ')[0]);
        
                            this.setOptions({
                                minDate: jwsStartDate
                            })
                        },
                        onSelectDate: function() {
                            $('.xdsoft_time').removeClass('xdsoft_current');
                            $('.jws-date-timepicker-end').datetimepicker('close');
                        },
                        onClose: function( ct, $i ) {
                            endDate = ct;
        
                            if(ct < new Date()) {
                                $('.jws-date-timepicker-end').datetimepicker('reset');
                            }
        
                            $('.jws-date-timepicker-end').attr('data-dt-hide', moment(ct).format('M/D/YYYY HH:mm'));
        
                         
                            var s = moment(startDate);
                            var e = moment(ct);
        
                            if(e.diff(s) < 0) {
                                s = s.add('days', 1);
        
                                $('.jws-date-timepicker-end').val('');
                                $('.jws-date-timepicker-end').attr('data-dt-hide', '');
        
                                s = s.format(dateTimeFormatHide);
                                s = s.split(' ');
                                s = new Date(s[0]);
        
                                this.setOptions({
                                    minDate: s,
                                    defaultDate: s
                                })
        
                                $('.jws-date-timepicker-end').datetimepicker(reset);
                            }
        
                            $('body').removeClass('jws_background_overlay jws-lock');
                        },
                        onGenerate: function () {
                            if($('.jws-date-timepicker-end').val() == '') {
                                $('.xdsoft_time').removeClass('xdsoft_current');
                            }
                        }
                    });
                    });
                 </script>
                <?php
                   $age_cat = (isset($jws_option['select_rent_age']) && !empty($jws_option['select_rent_age'])) ? $jws_option['select_rent_age'] : '';  
                   if(!empty($age_cat)) :  
				?> 
                <div class="<?php echo ''.$columns2; ?>">
					<label for="formSearchAge"><?php esc_html_e( 'Driver&rsquo;s Age', 'idealauto' ); ?></label>

					<select name="product_age" type="text" class="form-control formSearchAge" id="formSearchAge"  placeholder="<?php echo esc_html( 'Driver&rsquo;s Age', 'idealauto' ); ?>" >
                       			<?php
						$cats = get_terms( 'pa_'.$age_cat, array( 'hide_empty' => '1' ) );

						$selected = ''; 
				        if ( function_exists( 'jws_get_date_s_return' ) ) {
						      $selected = jws_get_date_s_return('product_age');
                              
					    }
                   
						foreach ( $cats as $cat ) {
							if ( ! isset( $cat->name ) ) {
								continue;
							}
							?>
							<option
								value='<?php echo (int) $cat->slug ?>'
								<?php
								if ( !empty($selected) ) {

									if ( (int) $cat->slug == $selected ) {
										echo 'selected="selected"';
									}
								}

								?>

							><?php echo esc_html( $cat->name ); ?></option>
						<?php } ?>
                    </select>
                    <i title="<?php echo esc_attr__('The minimum age to rent for all vehicles is 30. Renters aged 25 or older may rent the car categories Mini, Economy, Compact, Intermediate and Standard as well as Vans. No additional surcharges apply. Renters aged 19 years or older who have held a full driving licence for at least one year, can access a vehicle through Enterprise Car Club.','idealauto'); ?>" class="jws-icon-icon_info_alt"></i>  
				</div>
                <script>
                    jQuery(document).ready(function ($) {
                        $('.formSearchAge').select2({
                            placeholder: $('.formSearchAge').attr("placeholder"),
                            
                        });
                    });
                </script>
                <?php endif; ?>
                <div class="<?php echo ''.$columns2; ?>">
                    <?php 
                        $selected = ''; 
				        if ( function_exists( 'jws_get_date_s_return' ) ) {
						      $selected = jws_get_date_s_return( 'coupon_code' );
					    }  		

                    ?>
					 <label><?php esc_html_e( 'Promo Code', 'idealauto' ); ?></label>
                     <input autocomplete="off" class="" name="coupon_code" type="text" value="<?php  if ( is_numeric( $selected ) && (int) $selected > 0 ) {  echo ''.$selected;  } else {  echo ''.$selected; }  ?>" />
                     <i title="<?php echo esc_attr__('Use this field to enter a code for coupon or other special rate.','idealauto'); ?>" class="jws-icon-icon_info_alt"></i>   
				</div>

                 
		<?php endif; ?>
        </div>
        
       <?php  
             $arr_resources = ( get_post_meta( get_the_ID(), '_rental_resources', true ) );


			if ( !empty( $arr_resources ) ):
				foreach ( $arr_resources as $item ) {
					$type = '';

					// for translation
					if ( $item["duration_type"] == 'days' ) {
						$type = esc_html__( 'Days', 'idealauto' );
					}
					if ( $item["duration_type"] == 'hours' ) {
						$type = esc_html__( 'Hours', 'idealauto' );
					}
					if ( $item["duration_type"] == 'total' ) {
						$type = esc_html__( 'Total', 'idealauto' );
					}
					if ( $item["duration_type"] == 'Included' ) {
						$type = esc_html__( 'Free', 'idealauto' );
					}
                


					$val = jws_get_formatted_price_extras($item["cost"]) . " " . ' / ' . $type;
					$checked = false;
					$disable = false;


					if ( $item["cost"] == '0' || empty( $item["cost"] ) ) {
						$val = esc_html__( 'Free', 'idealauto' );
						$checked = true;

					}
             
					if ( $item["duration_type"] == 'total' ) {

						$val = jws_get_formatted_price_extras($item["cost"]) . " " . ' / ' . $type;
						$checked = false;
					}

					if ( $item["duration_type"] == 'Included' ) {
						$val = $type;
						$checked = true;
						$disable = true;

					}
					if ( $item["duration_type"] == 'fixed_change' ) {
						$val = jws_get_formatted_price_extras($item["cost"]) . " " . ' / ' . $type;;

						$checked = true;
						$disable = true;

					}


					$arr_extras[] = array(
						'value' => $val,
						'name' => esc_html( $item["item_name"] ),
						'price' => esc_attr( $item["cost"] ),
						'checked' => $checked,
						'disable' => $disable

					);

				}
			endif;

		?>

        <div class="extra-option-list">
            <?php
            
                   
						if ( !empty( $arr_resources ) ):
                        
                            echo '<label>'.esc_html__('Extra Options','idealauto').'</label>';
							$i = 0;
							while ( $i < 6 ) {
                                if(isset($arr_extras[$i])) {
                                 
    								?>
                                    <div class="checkbox checkbox-danger">
                                        <input name="checkbox_extras[<?php echo esc_attr( $i ); ?>]"
                                               data-price="<?php echo @esc_attr( $arr_extras[$i]['price'] ); ?>"
                                               id="checkboxl<?php echo esc_attr( $i ); ?>"
                                               type="checkbox"
    										<?php if ( $arr_extras[$i]['checked'] == true ) {
    											echo 'checked="" value="on"' ;
    										} ?>
    
    										<?php if ( $arr_extras[$i]['disable'] == true ) { ?>
                                                disabled="disabled"
    										<?php } ?>
                                        >
    
    									<?php if ( $arr_extras[$i]['disable'] == true ) { ?>
    
                                            <input type="hidden" name="checkbox_extras[<?php echo esc_attr( $i ); ?>]" value="on" />
    									<?php } ?>
                                        <label
                                                for="checkboxl<?php echo esc_attr( $i ); ?>"><?php echo @esc_attr( $arr_extras[$i]['name'] ); ?>
                                            <span
                                                    class="pull-right">
                                                <?php echo @esc_attr( $arr_extras[$i]['value'] );  ?> </span></label>
                                    </div>
    								<?php
    								$i ++;
                                    
                                } 
							}
						endif;

						?>

						<?php
						if ( !empty( $arr_resources ) ): ?>  <div class="more_extra"> <?php
							while ( $i < count( $arr_extras ) ) { 

								?>
                               
                                <div class="checkbox checkbox-danger">
                                    <input name="checkbox_extras[<?php echo esc_attr( $i ); ?>]"
                                           data-price="<?php echo @esc_attr( $arr_extras[$i]['price'] ); ?>"
                                           id="checkboxl<?php echo esc_attr( $i ); ?>"
                                           type="checkbox"
										<?php if ( $arr_extras[$i]['checked'] == true ) {
											echo 'checked="" value="on"' ;
										} ?>
										<?php if ( $arr_extras[$i]['disable'] == true ) { ?>
                                            disabled="disabled"
										<?php } ?>

                                    >


                                    <label
                                            for="checkboxl<?php echo esc_attr( $i ); ?>"><?php echo @esc_attr( $arr_extras[$i]['name'] ); ?>
                                        <span class="pull-right">    <?php  echo @esc_attr( $arr_extras[$i]['value'] ); ?> </span></label>


									<?php if ( $arr_extras[$i]['disable'] == true ) { ?>

                                        <input type="hidden" name="checkbox_extras[<?php echo esc_attr( $i ); ?>]" value="on" />
									<?php } ?>
                                </div>
                                
								<?php
								$i ++;

							}
                            ?>
                             </div>
                             <?php
                             if(count( $arr_extras ) > 6) {
                                 echo '<a class="more_extra_btn" href="#">'.esc_html__('More Options','idealauto').'<i class="jws-icon-arrow_carrot-down"></i></a>';
                             }
						endif;
						?>
                
        </div>


		<?php $product = jws_get_global_product();
         if ( !$product->is_in_stock() ) : 


		else : 

			/*switch ( $product->product_type ) {
				case "variable" :
					$link  = get_permalink( $product->get_id());
					$label = apply_filters( 'variable_add_to_cart_text', esc_html__( 'Select options', 'idealauto' ) );
					break;
				case "grouped" :
					$link  = get_permalink( $product->get_id() );
					$label = apply_filters( 'grouped_add_to_cart_text', esc_html__( 'View options', 'idealauto' ) );
					break;
				case "external" :
					$link  = get_permalink( $product->get_id() );
					$label = apply_filters( 'external_add_to_cart_text', esc_html__( 'Read More', 'idealauto' ) );
					break;
				default :
					$link  = esc_url( $product->add_to_cart_url() );
					$label = apply_filters( 'add_to_cart_text', esc_html__( 'Add to cart', 'idealauto' ) );
					break;
			}*/


			$link = esc_url( $product->add_to_cart_url() );
			$label = apply_filters( 'add_to_cart_text', esc_html__( 'Add to cart', 'idealauto' ) );


			if ( $product->is_type( 'jws_rental' ) ) {


				?>


          
                <input type="hidden" name="add-to-cart"
                       value="<?php echo esc_attr( get_the_ID() ); ?>">

                <input type="hidden" name="custom_data_4" value="<?php echo esc_attr( '1' ); ?>">
                <input type="hidden" name="custom_data_5" value="<?php echo esc_attr( '2' ); ?>">

				<?php

			} else {

				printf( '<a href="%s" rel="nofollow" data-product_id="%s" class="button add_to_cart_button product_type_%s">%s</a>', $link, $product->get_id(), '', $label );

			}
			?>

		<?php endif; ?>


        <div class="overflowed reservation-now">

            <a href="#" id="request_car_btn" class="btn-theme open-modal" data-type="request" data-car_id="<?php echo get_the_ID(); ?>" data-target="#request-form">
                  <span><?php esc_html_e( 'Request for booking', 'idealauto' ); ?>  </span>
            </a>
            <div class="car-form-popup" id="request-form">
                    <div class="modal-overlay"></div>
                    <div class="car-form-popup-inner">
                
                    </div>
                </div>
            <span class="btn-or"><?php esc_html_e( 'OR', 'idealauto' ); ?>  </span>
            <button id="reservation_car_btn" type="submit" class="btn-theme">
				<?php

				if ( $eable_car_seless ) {
					esc_html_e( 'buy now', 'idealauto' );
				} else {
					esc_html_e( 'Reservation Now', 'idealauto' );
				}
				?>
            </button>

        </div>
        <div class="cal-price-total"></div>
    </div>
    <!-- #product-<?php the_ID(); ?> -->
    <script>
        jQuery(document).ready(function ($) {

             /*Set cookie with order data*/
            $('.main-product.rent form.cart').on('submit', function (e) {
               $('.drolocation,.jws-date-timepicker-start,.jws-date-timepicker-end').removeClass('jws_error');

                var jws_pickup_location = $('.formSearchUpLocation2').val();
                var jws_drop_location = $('.formSearchOffLocation2').val();
                var start_date = $('.jws-date-timepicker-start').val();
                var end_date = $('.jws-date-timepicker-end').val();

                var error = false;
                if (jws_pickup_location == 'none') {
                    $('.formSearchUpLocation2').addClass('jws_error');
                    error = true;
                }

                if (jws_drop_location == 'none') {
                    $('.formSearchOffLocation2').addClass('jws_error');
                    error = true;
                }
                
                if (start_date == '') {
                    $('.jws-date-timepicker-start').addClass('jws_error');
                    error = true;
                }
                
                
                if (end_date == '') {
                    $('.jws-date-timepicker-end').addClass('jws_error');
                    error = true;
                }

                if (error) { 
                    e.preventDefault();
                     $('html, body').animate({
                        scrollTop: $('.jws-adsearch-filter').offset().top - 150
                    }, 100);
                }
            });

            
        });
   </script>
</form>