<?
function panel_check_personal($options=array())
{
    ?>
    <div id="panel_filter" class="one_row">
        <form id="sky-form" class="sky-form">
            <fieldset style="padding-right: 20px;">
                <div class="row" id="person_info">
                    <section class="col col-6">
                        <label class="label">Введите номер пропуска</label>
                        <label class="input">
                            <input autofocus type="text" name="propusk" id="propusk"  placeholder="" lang="LAT" case="UPPER" value="" data-required="">
                        </label>
                    </section>
                    <section class="col col-6 buttons">
<!--                        <button onclick="javascript:$j('input#propusk')[0].focus();" class="v2 button" cmd="aspmo_rml/get_lamp_info">Проверить</button>-->
                        <input onclick="javascript:$j('input#propusk')[0].focus();" type="submit" class="v2 button" cmd="aspmo_rml/get_lamp_info" value="Проверить">
                    </section>
                </div>
            </fieldset>
        </form>
        <div id="info_panel">
            <?
            if ($options['error']) {
                include_once('panel_pass_error.php') ;
                panel_pass_error($options['error']);
            }
            ?>
        </div>
    </div>
    <script type="text/javascript">
        $j('input#propusk')[0].focus() ;

        $j('input#propusk').on('keyup',function() {
            RFHIDtimeout = Date.now();
            // console.log(RFHIDtimeout);
        });

        //$j('input#propusk').on('keyup',function()
        //{   if ($j(this).val().length==<?//echo $GLOBALS['LS_pass_for_lamp_lenght']?>//)
        //    { send_ajax_request({cmd:"aspmo_rml/get_lamp_info",propusk:$j(this).val()}) ;
        //        $j('input#propusk').val('') ;
        //        $j('input#propusk').focus() ;
        //    }
        //});
        $j(document).ready(function()
        {
            $j("body").stopTime('set_focus');
            $j('body').everyTime(1000,'set_focus',function(){$j('#propusk').focus();})

            $j("body").stopTime('check_pass_number');
            $j('body').everyTime(100,'check_pass_number',function(){
                if (RFHIDtimeout && (Date.now() - RFHIDtimeout)>300) {
                    send_ajax_request({cmd:"aspmo_rml/get_lamp_info",propusk:$j('input#propusk').val()}) ;
                   $j('input#propusk').val('') ;
                   $j('input#propusk').focus() ;
                    RFHIDtimeout = false;
                }
            })
        });
    </script>
    <?
}

?>