PageSourceSearch

https://24tort.ru/js/page_utils.js?v2

js 24tort.ru collected 2026-10-08 21:58:17 UTC 31,957 bytes, 779 lines download raw bytes

1if (!this.page_utils) {
2    this.page_utils = {};
3}
4
5(function ()
6{
7    if (typeof page_utils.scheckEmail !== 'function') {
8        page_utils.scheckEmail = function(email) {
9            var Re, Buff;
10            var _email = $.trim(email);
11            Re = new RegExp('[ ]', 'ig');
12            Buff = _email.replace(Re, ''); ;
13            Re = new RegExp('[А-Яа-яЁё]', 'ig');
14            Buff = Buff.replace(Re, "$");
15            Re = new RegExp("^([A-Za-z0-9][A-Za-z0-9\-_]*)(\.[A-Za-z0-9\-_]*)*@([A-Za-z0-9][A-Za-z0-9\-_]*)\.[A-Za-z0-9\-_]+(\.[A-Za-z0-9\-_]*)*$", "i");
16            if (Buff !== _email || Buff.replace(Re, '#') != '#') {
17                _email = "";
18        //        page_utils.showMsg('Неверный адрес электронной почты');
19            }
20            return _email;
21        }
22    }
23
24
25    if ( typeof page_utils.checkPhone !== 'function') {    
26        page_utils.checkPhone = function(phone) {
27            var Re, Buff;
28            var _phone = $.trim(phone);
29/*
30            Re = new RegExp('^\\s*(?:\\+\\d{1,2}|\\d)?\\s*(?:\\(\\s*\\d{3,5}\\s*\\)\\s*|\\-?\\d{3,5}(?:\\-|\\s)?)?\\d{1,10}(?:\\-|\\s)?\\d{1,10}(?:\\-|\\s)?\\d{1,10}\\s*$', 'ig');
31            if( _phone.replace( Re, '#') == '#' ) {
32                _phone = '';
33            }
34*/
35            Re = new RegExp("[\\(\\)\\+\\- ]", "ig");
36            _Buff = _phone.replace(Re, '');
37            Re = new RegExp("[0-9]{1,50}", "ig");
38            _Buff = _Buff.replace(Re, '#');
39            if ( _Buff.replace(Re, '#') != '#') {
40                _phone = '';
41            }
42            return _phone;
43        }
44    }
45
46    if (typeof page_utils.showClock !== 'function') {
47        page_utils.showClock = function () 
48        {
49            if (document.getElementById("clock_div"))
50            {
51                document.body.removeChild(document.getElementById("clock_div"));
52            }
53            var d=document.createElement("div");
54            var sch = window.innerHeight ? window.innerHeight : document.documentElement.offsetHeight; 
55            var scw = window.innerWidth ? window.innerWidth : document.documentElement.offsetWidth; 
56	        var left = (scw/2) - 30;
57            var top = (sch/2) - 30;
58            d.id="clock_div";
59            d.className = "wait";
60            d.style.left=left + "px";
61            d.style.top=top + "px";
62            document.body.appendChild(d);
63        }
64    }
65
66    if (typeof page_utils.hideClock !== 'function') {
67        page_utils.hideClock = function (){
68            var cld;
69            if (cld = document.getElementById("clock_div")) {
70                document.body.removeChild(cld);
71            }
72        }
73    }
74
75    if (typeof page_utils.showClockPay !== 'function') {
76        page_utils.showClockPay = function () {
77            if (document.getElementById("clock_divpay")) {
78                document.body.removeChild(document.getElementById("clock_divpay"));
79            }
80            var d = document.createElement("div");
81            var sch = window.innerHeight ? window.innerHeight : document.documentElement.offsetHeight;
82            var scw = window.innerWidth ? window.innerWidth : document.documentElement.offsetWidth;
83            var left = (scw / 2) - 30;
84            var top = (sch / 2) - 30;
85            d.id = "clock_divpay";
86            d.className = "waitpay";
87            //d.style.left = left + "px";
88            //d.style.top = top + "px";
89            var time_r = document.getElementById("time_r");
90            time_r.appendChild(d);
91        }
92    }
93
94    if (typeof page_utils.hideClockPay !== 'function') {
95        page_utils.hideClockPay = function () {
96            var cld;
97            if (cld = document.getElementById("clock_divpay")) {
98                var time_r = document.getElementById("time_r");
99                time_r.removeChild(cld);
100            }
101        }
102    }
103
104    if (typeof page_utils.showMsg !== 'function') {
105        page_utils.showMsg = function (msg, okFn) {          
106            $.fancybox.open('<div class="fancy_dialog">' + msg + '</div>', {
107                'padding': '5px',
108                'opacity': true,
109                'autoDimensions': true,
110                'transitionIn': 'elastic',
111                'transitionOut': 'elastic',
112                'speedIn': 100,
113                'speedOut': 50,
114                'overlayShow': false,
115                'modal': false,
116                'afterClose': (typeof okFn == 'function' ? okFn : function () { void (0); })
117            });        
118        }
119    }
120
121    if (typeof page_utils.showConfirm  !== 'function') {
122        page_utils.showConfirm = function (msg, yesFn, noFn) {
123
124            if (typeof yesFn == 'function')
125                page_utils.fancy_confirm_yes = function () {
126                    yesFn();
127                    $.fancybox.close();
128                }
129            else 
130                page_utils.fancy_confirm_yes = function () { $.fancybox.close(); }
131
132            if (typeof noFn == 'function')
133                page_utils.fancy_confirm_no = function () { noFn(); $.fancybox.close(); }
134            else
135                page_utils.fancy_confirm_no = function () { $.fancybox.close(); }
136            $.fancybox.open('<div class="fancy_dialog"><div>' + msg + '</div><div class="fancybuttons"><span class="btn_yes" onclick="page_utils.fancy_confirm_yes()">Да</span><span class="btn_no"  onclick="page_utils.fancy_confirm_no()">Нет</span></div></div>', {
137                'padding': '5px',
138                'opacity': true,
139                'autoDimensions': true,
140                'transitionIn': 'elastic',
141                'transitionOut': 'elastic',
142                'speedIn': 100,
143                'speedOut': 50,
144                'overlayShow': false,
145                'modal': false
146            });
147        }
148    }
149
150    if (typeof page_utils.showFancyMsg !== 'function') {
151        page_utils.showFancyMsg = function (msg, onClose, onComplete, style) {
152
153            var sHtm = '<div class="fancybox" '+ style+'>' + msg + '</div>';
154            $.fancybox.open(sHtm, {
155                'padding': 5,
156                //'opacity':true,
157                'autoDimensions': true,
158                'transitionIn': 'elastic',
159                'transitionOut': 'elastic',
160                'speedIn': 100,
161                'speedOut': 100,
162                'modal': false,
163                'autoSize': true,
164                'afterShow': function (instance, current) {
165                    $('.fancybox-bg').css('opacity', '0.1');
166                    if (typeof onComplete === 'function') { onComplete(); } //: function () { void (0); }), //function(){window.setTimeout('$.fancybox.close();', 2000)},
167                },
168                'afterClose': (typeof onClose === 'function' ? onClose : function () { void (0); })
169            });
170        }
171    }
172
173    /************************************/
174    if (typeof page_utils.getObj !== 'function') {
175        page_utils.getObj = function(id)
176        {
177            return $((id.indexOf('#')!=0?'#':'')+id).get(0);
178        }
179    }
180
181    if (typeof page_utils.stopEvent !== 'function') {
182        page_utils.stopEvent = function(e)
183        {
184            if (window.event)
185            {
186                e = window.event;
187            }
188            if (e.stopPropagation)
189            {
190                e.stopPropagation();
191            }
192            else
193            {
194                e.cancelBubble = true;
195            }
196        }
197    }
198
199    if (typeof page_utils.createIFrame !== 'function') {
200        page_utils.createIFrame = function(name, url, w, h) {
201            var ifrm = document.createElement('iframe');
202            ifrm.id = name;
203            ifrm.name = name;
204            ifrm.width = (typeof w ==='undefined' ? '821px' : w);
205            ifrm.height = (typeof h ==='undefined' ?'408px' : h);
206            ifrm.style.width = (typeof(w)=='undefined' ? '821px' : w);
207            ifrm.style.height = (typeof(h)=='undefined' ?'408px' : h);
208            //ifrm.style.borderWidth = (typeof(h)=='undefined' ?'408px' : h);
209            ifrm.src = url;
210            return ifrm;
211        }
212    }
213
214    /************************************/
215    if (typeof page_utils.normalWordEnd !== 'function') {
216        page_utils.normalWordEnd = function(number, word, one, two, five)
217        {
218            var sNumber = number+"";
219            var result = word;
220
221            var sLastnum = sNumber.length > 0 ? sNumber.substr(sNumber.length - 1, 1) : "";
222            var sNumber2 = sNumber.length > 1 ? sNumber.substr(sNumber.length - 2, 1) : "";
223
224            switch (sLastnum)
225            {
226                case "1":
227                    {
228                        if (sNumber2 == "1")
229                        {
230                            result += five;
231                        }
232                        else
233                        {
234                            result += one;
235                        }
236                        break;
237                    }
238                case "2":
239                case "3":
240                case "4":
241                    {
242                        if (sNumber2 == "1")
243                        {
244                            result += five;
245                        }
246                        else
247                        {
248                            result += two;
249                        }
250                        break;
251                    }
252                default:
253                    result += five;
254                    break;
255            }
256            return result;
257        }
258    }
259
260    if (typeof page_utils.getNavigator !== 'function') {
261        page_utils.getNavigator = function(iRowCnt, iPageSize, iItemsCnt, iPageNo, sCssStyle, sCssClass, sGoTo, sSeletGoTo)
262        {
263            var sHTML = "";
264            var re = new RegExp('\{PPP\}', 'g');
265            if (iRowCnt > iPageSize && iPageSize > 0)
266            {
267                sHTML += "<table><tr>";
268                var PageCnt = Math.floor(iRowCnt / iPageSize);
269                if (iRowCnt % iPageSize > 0) PageCnt++;
270                if (PageCnt <= iItemsCnt)
271                {
272                    for (var p=0;p<PageCnt; p++)
273                    {
274                        if (p+1 != iPageNo)
275                        {
276                            sHtm += '<td>[<a href="#" onclick="' + (sGoTo.replace(re, p)) + '">'+ p + '</a>]</td>';
277                        }
278                        else
279                        {
280                            sHtm += '<td>['+ p + '-я страница"]</td>';
281                        }
282                    }
283                }
284                else
285                {
286                    var PrevItems = Math.floor(iItemsCnt / 2);
287                    var PostItems = iItemsCnt - PrevItems-((iItemsCnt % 2 > 0 ? 1 : 0));
288 
289                    var StartPage = (iPageNo - PrevItems) <= 0 ? 1 : iPageNo - PrevItems;
290                    var StopPage = (iPageNo + PostItems < PageCnt) ? iPageNo + PostItems : PageCnt;
291                    if (StartPage + PostItems >= PageCnt)
292                    {
293                        StartPage = (iItemsCnt < PageCnt) ? PageCnt - iItemsCnt : 1;
294                        StopPage = PageCnt;
295                    }
296                    else if (StopPage < iItemsCnt && iItemsCnt < PageCnt)
297                    {
298                        StopPage = iItemsCnt;
299                    }
300                    if (StartPage > 1)
301                    {
302                        sHTML += "&nbsp;";
303
304                        sHTML += "<td";
305                        if (sCssStyle != "")
306                        {
307                            sHTML += " style=\"" + sCssStyle + "\"";
308                        }
309                        if (sCssClass != "")
310                        {
311                            sHTML += " class=\"" + sCssClass + "\"";
312                        }
313                        sHTML += ">";
314                        sHTML += "<a href=\"#\"";
315                        sHTML += " onclick=\"javascript:" + (sGoTo.replace(re, (StartPage - 1))) + ";\"";
316                        sHTML += " title=\"предидущая страница\">";
317                        sHTML += "&lt;&lt;</a>";
318                        sHTML += "</td>";
319                    }
320                    for (var i = StartPage; i <= StopPage; i++)
321                    {
322                        sHTML += "&nbsp;";
323                        sHTML += "<td";
324                        if (sCssStyle != "")
325                        {
326                            sHTML += " style=\"" + sCssStyle + "\"";
327                        }
328                        if (sCssClass != "")
329                        {
330                            sHTML += " class=\"" + sCssClass + "\"";
331                        }
332                        sHTML += ">[";
333                        if (i != iPageNo)
334                        {
335                            sHTML += "<a href=\"#\"";
336                            sHTML += " onclick=\"javascript:" + (sGoTo.replace(re, i)) + ";\"";
337                            sHTML += " title=\"" + i + "-я страница \">" + i + "</a>";
338                        }
339                        else
340                        {
341                            sHTML += i + "-я страница";
342                        }
343                        sHTML += "]";
344                        sHTML += "</td>";
345                    }
346                    if (StopPage < PageCnt)
347                    {
348                        sHTML += "&nbsp;";
349                        sHTML += "<td ";
350                        if (sCssStyle != "")
351                        {
352                            sHTML += " style=\"" + sCssStyle + "\"";
353                        }
354                        if (sCssClass != "")
355                        {
356                            sHTML += " class=\"" + sCssClass + "\"";
357                        }
358                        sHTML += "><a href=\"#\"";
359                        sHTML += " onclick=\"javascript:" + (sGoTo.replace(re, (StopPage + 1))) + ";\"";
360                        sHTML += " title=\"следующая страница\">&gt;&gt;</a>";
361                        sHTML += "</td>";
362                    }
363                    sHTML += "&nbsp;";
364                    sHTML += "<td ";
365                    if (sCssStyle != "")
366                    {
367                        sHTML += " style=\"" + sCssStyle + "\"";
368                    }
369                    if (sCssClass != "")
370                    {
371                        sHTML += " class=\"" + sCssClass + "\"";
372                    }
373                    sHTML += ">(&nbsp;Всего:&nbsp;<a href=\"#\" onclick=\"javascript:" + (sSeletGoTo.replace(re, PageCnt)) + ";\">";
374                    sHTML += PageCnt + "&nbsp;" + this.normalWordEnd(PageCnt, "страниц", "а", "ы", "") + "</a>)";
375                    sHTML += "</td>";
376                }
377                sHTML += "</tr></table>";
378            }
379            return (sHTML);
380        }
381    }
382
383    if (typeof page_utils.createDialog !== 'function') {
384        page_utils.createDialog = function(nm, htm, w, h, t, on_open, on_close) {
385            if ( nm == '' ) return;
386            if (typeof on_open !== 'function' ) on_open = function(){void(0);}
387            if (typeof on_close !== 'function') on_close = function() { void(0) };
388            if (typeof t === 'undefined') t = '';
389
390            var _cont = nm + '_content', _dlg_nm = nm +'_dialog';
391
392            if ($('#' + _dlg_nm ).get().length === 0) {
393                var d=document.createElement("div");
394                d.id = _dlg_nm;
395//                document.body.appendChild(d);
396                $('body').append(d);
397                var dc = document.createElement("div");
398                dc.id = _cont;
399//                d.appendChild(dc);
400                $(d).append(dc);
401//                $('#' + _dlg_nm).append(dc);
402            }
403
404            $('#' + _cont).empty();
405            $('#' + _cont).html(htm);
406
407            $('#' + _dlg_nm).dialog({
408                autoOpen: false,
409                modal: false,
410                minWidth: 250,
411                height: 'auto',
412                resizable: false,
413                draggable: true,
414                closeOnEscape: true,
415                showButtonPanel : false,
416                buttons: [],
417                width: w, 
418                height: h, 
419                title: t,
420                close: on_close,
421                open:on_open
422            });
423            $('#' + _dlg_nm).dialog('open');
424        }
425    }
426
427//    if (typeof page_utils.removeDialog !== 'function') {
428//        page_utils.removeDialog = function(dil) {
429//            var _cont = 'dcontent', _dlg_nm = 'ui_dialog';
430//            if (typeof dil != 'undefined' && dil != '') {
431//                _cont = dil + '_content';
432//                _dlg_nm = dil +'_dialog';
433//            }
434//            if ($('#' + _dlg_nm).get().length > 0 ) {
435//                $('#' + _cont).empty();
436//                $('#' + _dlg_nm).dialog('close');
437//                //document.body.removeChild(document.getElementById(_dlg_nm)); 
438////                $('body').remove($('#' + _dlg_nm))
439//            }
440//        }
441//    }
442
443//    if (typeof page_utils.closeDialog !== 'function') {
444//        page_utils.closeDialog = function(dil) {
445//            var _cont = 'dcontent', _dlg_nm = 'ui_dialog';
446//            if (typeof dil != 'undefined' && dil != '') {
447//                _cont = dil + '_content';
448//                _dlg_nm = dil +'_dialog';
449//            }
450//            if ($('#' + _dlg_nm).get().length > 0 ) {
451//                $('#' + _cont).empty();
452//                $('#' + _dlg_nm).dialog('close');
453//            }
454//        }
455//    }
456
457//    if (typeof page_utils.openDialog !== 'function') {
458//        page_utils.openDialog = function(htm, w, h, t, on_close) {
459//            if (typeof t === 'undefined') t = '';
460//            if (typeof on_close !== 'function') on_close = function() { void(0) };
461//            $('#dcontent').empty();
462//            $('#dcontent').html(htm);
463//            $('#ui_dialog').dialog({ 'width': w, 'height': h, 'title': t
464//                , close: on_close 
465////                , open: function() {$(".ui-dialog-title").html(t)}
466//            });
467////            if (typeof on_close === 'function') {
468////                $('#ui_dialog').dialog({ close: on_close });
469////            }
470//            $('#ui_dialog').dialog('open');
471//        }
472//    }
473
474//    if (typeof page_utils.setDialogTitle !== 'function') {
475//        page_utils.setDialogTitle = function(t) {
476//            $('#ui_dialog').dialog( 'option', 'title', t );
477//        }
478//    }
479
480//    if (typeof page_utils.getDialogTitle !== 'function') {
481//        page_utils.getDialogTitle = function() {
482//            return $('#ui_dialog').dialog( 'option', 'title' );
483//        }
484//    }
485
486/*
487    if (typeof page_utils.showImgLoader !== 'function') {
488        page_utils.showImgLoader = function() {
489	        var ImgAttr = self.showModalDialog('ImageLoader.htm', '', 'status:no;dialogWidth:550px;dialogHeight:360px;help:no;resizable:yes;scroll:yes')
490	        if (typeof ImgAttr === 'object') {
491	            return ImgAttr;
492	        }
493	        return undefined;
494	    }
495    }
496*/
497    //if (typeof page_utils.showIFrame !== 'function') {
498    //    page_utils.showIFrame = function(url, nm, t, w, h, on_close) {
499    //        if (typeof t === 'undefined') t = '&nbsp;';
500    //        $('#dcontent').empty();
501    //        var f = this.createIFrame(nm, url, w-30, h-70)
502    //        $('#dcontent').append(f);
503    //        $('#ui_dialog').dialog({ 'width': w, 'height': h, 'title': t });
504    //        if (typeof on_close === 'function') {
505    //            $('#ui_dialog').dialog({ close: on_close });
506    //        }
507    //        $('#ui_dialog').dialog('open');
508	   // }
509    //}
510
511    //if (typeof page_utils.showImgLoader !== 'function') {
512    //    page_utils.showImgLoader = function(url, w, h, on_close) {
513    //        if (typeof t === 'undefined') t = '&nbsp;';
514    //        $('#dcontent').empty();
515    //        var f=this.createIFrame('img_loader', url, w, h, on_close)
516    //        $('#dcontent').append(f);
517    //        $('#ui_dialog').dialog({ 'width': (w+30), 'height': (h+70), 'title': t });
518    //        if (typeof on_close === 'function') {
519    //            $('#ui_dialog').dialog({ close: on_close });
520    //        }
521    //        $('#ui_dialog').dialog('open');
522    //        /*
523	   //     if (typeof ImgAttr === 'object') {
524	   //         return ImgAttr;
525	   //     }
526	   //     return undefined; */
527	   // }
528    //}
529
530    var _editors=[];
531
532    if (typeof page_utils.initTextEdit !== 'function') {
533        page_utils.initTextEdit = function(area, content, w, h) {
534            _editors[area] = $('#'+area).css({ 'height': h, 'width': w }).htmlbox({
535	            toolbars: [["separator", "cut", "copy", "paste",
536		                "separator", "undo", "redo",
537		                "separator", "bold", "italic", "underline", "strike", "sup", "sub",
538		                "separator", "justify", "left", "center", "right",
539		                "separator", "ol", "ul", "indent", "outdent",
540		                "separator", "link", "unlink", "image", "hr",
541                        "separator", "removeformat", "striptags", "code"],
542		               ["separator", "formats", "fontsize", "fontfamily",
543		                "separator", "fontcolor", "highlight"]],
544	            about: false,
545                idir: "./js/HtmlEdit/img/",
546	            skin: "default",
547	            img_loader: this.showImgLoader
548	        });
549            try {
550	            _editors[area].set_text(content);
551            }
552            catch(ee) {
553                alert(ee);
554            }
555        }
556    }
557
558    if (typeof page_utils.putEditedText !== 'function') {
559        page_utils.putEditedText = function(area, content) {
560            try {
561	            _editors[area].set_text(content);
562            }
563            catch(ee) {
564                alert(ee);
565            }
566        }
567    }
568        
569    if (typeof page_utils.getEditedText !== 'function') {
570        page_utils.getEditedText = function(area) {
571            return _editors[area].get_html();
572        }
573    }
574
575    if (typeof page_utils.initDateSelector !== 'function') {
576        page_utils.initDateSelector = function(area, dflt, minDate, maxDate,  on_select) {
577            if (typeof dflt === 'undefined' ) dflt = new Date();
578            $('#'+area).datepicker(
579                {
580                    buttonImageOnly: true,
581                    buttonImage: 'http://jqueryui.com/resources/demos/datepicker/images/calendar.gif',
582                    dateFormat: 'dd.mm.yy',
583                    dayNamesMin: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
584                    monthNames: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
585                    //showOn: 'both',
586                    //defaultDate: dflt,
587    	            //buttonText: '',
588    	            //showButtonPanel: true,
589    	            //changeMonth: true,
590                    //changeYear: true,
591                    firstDay: 1,
592                    duration: "slow",
593                    minDate: minDate,
594                    maxDate: maxDate, //"+20d",
595
596    	            beforeShow: function (ip, IST) { void (0); },
597    	            onSelect: function (selectedDate) {
598    	                instance = $(this).data("datepicker");
599    	                date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
600                        if (typeof on_select === 'function') {
601                            on_select(date);
602                        }
603                    },
604                    beforeShowDay: function (date) {
605
606                        var _str_pic_date = jQuery.datepicker.formatDate('yy-mm-dd', date);
607                        var nodate = [];
608                        //Блокировка по дате
609                        nodate.push("2022-04-20");
610                        //for (var i = 0; i <= 30; i++) {
611                        //    if (i < 10) {
612                        //        nodate.push("2022-09-0" + i);
613
614                        //    } else {
615                        //        nodate.push("2022-09-" + i);
616                        //    }
617                        //}
618                        for (var i = 0; i <= 31; i++) {
619                            if (i < 10) {
620                                nodate.push("2022-10-0" + i);
621
622                            } else {
623                                nodate.push("2022-10-" + i);
624                            }
625                        }
626                        for (var i = 0; i <= 30; i++) {
627                            if (i < 10) {
628                                nodate.push("2022-11-0" + i);
629
630                            } else {
631                                nodate.push("2022-11-" + i);
632                            }
633                        }
634                        return [nodate.indexOf(_str_pic_date) == -1]
635                    }
636
637	        });
638        }
639    }
640
641    if (typeof page_utils.initSelector !== 'function') {
642        page_utils.initSelector = function( sel, arr, to_chosen, w, onselect ) {
643            if (typeof onselect !== 'function') onselect = function() {void(0)};
644            if ($('#'+sel).get().length > 0) {
645                var osel = $('#'+sel).get(0);
646                if (osel.tagName != 'SELECT') return;
647                for (var i=0; i<arr.length; i++) {
648                    var op = document.createElement('OPTION');
649                    op.value = arr[i].val;
650                    op.text = arr[i].text;
651                    osel.options.add(op);
652                }
653                if (typeof to_chosen === 'undefined') to_chosen = false;
654                if (to_chosen) {
655                    try {
656                        var prm = {};
657                        if (w!=='') prm = {width:w}
658                        $(osel).chosen(prm).change(onselect);
659                    }
660                    catch(ee) {alert(ee)}
661                }
662            }
663        }
664    }   
665
666    if (typeof page_utils.initTabs !== 'function') {
667        page_utils.initTabs = function(tabs, on_leafover) {
668/*
669            if ( $('#tabs').get().length === 0  ) return false;
670            if (typeof on_leafover !== 'function') on_leafover = function(tt){void(0);}
671       	    $("#tabsbox div").hide(); // Скрываем все содержание
672	        $("#tabs li:first").attr("id", "current"); // Активируем первую закладку
673            $('#' + $("#tabs li:first a").attr('title') + ' div').show(); // Выводим все по нечайности закрытые DIV
674	        $("#tabsbox div:first").fadeIn(); // Выводим содержание
675
676	        $('#tabs a').click(function (e) {
677	            e.preventDefault();
678	            $("#tabsbox div").hide(); //Скрыть все содержание
679	            $("#tabs li").attr("id", ""); //Сброс ID
680	            $(this).parent().attr("id", "current"); // Активируем закладку
681                $('#' + $(this).attr('title') + ' div').show(); // Выводим все по нечайности закрытые DIV
682	            $('#' + $(this).attr('title')).fadeIn(); // Выводим содержание текущей закладки
683                on_leafover($(this).attr('title'));
684	        });
685*/
686            if ( $('#' + tabs).get().length === 0  ) return false;
687            if (typeof on_leafover !== 'function') on_leafover = function(tt){void(0);}
688       	    $('#'+tabs+'box div').hide(); // Скрываем все содержание
689            if ($('#'+tabs+' li.tab_current').get().length === 0 ) {
690	            $('#'+tabs+' li:first').addClass( 'tab_current' ); // Активируем первую закладку
691                $('#' + $('#'+tabs+' li:first a').attr('title') + ' div').show(); // Выводим все по нечайности закрытые DIV
692	            $('#'+tabs+'box div:first').fadeIn(); // Выводим содержание
693                on_leafover($('#'+tabs+' li:first a').attr('title'));
694            }
695            else {
696	            var _tb = $('#'+tabs+' li.tab_current a').attr('title'); // какой бокс открыть
697                $('#' + _tb + ' div').show(); // Выводим все по нечайности закрытые DIV
698	            $('#' + _tb).fadeIn(); // Выводим содержание
699                on_leafover(_tb);
700            }
701
702	        $('#'+tabs+' a').click(function (e) {
703	            e.preventDefault();
704	            $('#'+tabs+'box div').hide(); //Скрыть все содержание
705	            $('#'+tabs+' li').removeClass('tab_current'); //Сброс ID
706	            $(this).parent().addClass('tab_current'); // Активируем закладку
707                $('#' + $(this).attr('title') + ' div').show(); // Выводим все по нечайности закрытые DIV
708	            $('#' + $(this).attr('title')).fadeIn(); // Выводим содержание текущей закладки
709                on_leafover($(this).attr('title'));
710	        });
711        }
712    }
713}());
714
715$(document).ready(function(){
716
717    //$.widget("ui.dialog", $.extend({}, $.ui.dialog.prototype, {
718    //    _title: function(title) {
719    //        if (!this.options.title ) {
720    //            title.html("&#160;");
721    //        } else {
722    //            title.html(this.options.title);
723    //        }
724    //    }
725    //}));
726
727    //if ($("#ui_dialog").get().length === 0){
728    //    var d=document.createElement("div");
729    //    d.id = "ui_dialog";
730    //    //$(d).css('z-index', '10000');
731    //    document.body.appendChild(d);
732    //    var dc = document.createElement("div");
733    //    dc.id = "dcontent";
734    //    d.appendChild(dc);
735    //}
736
737    //if ($("#msg_dialog").get().length === 0){
738    //    var d=document.createElement("div");
739    //    d.id = "msg_dialog";
740    //    //$(d).css('z-index', '10000');
741    //    document.body.appendChild(d);
742    //    var dc = document.createElement("div");
743    //    dc.id = "messaga";
744    //    d.appendChild(dc);
745    //}
746
747    //$("#ui_dialog").dialog({
748    //    autoOpen: false,
749    //    modal: false,
750    //    minWidth: 250,
751    //    height: 'auto',
752    //    resizable: false,
753    //    draggable: true,
754    //    closeOnEscape: true,
755    //    showButtonPanel : false,
756    //    buttons: [],
757    //    close: function () {
758    //        void (0);
759    //    }
760    //}).siblings('.ui-dialog-titlebar').remove();;
761
762    //$("#msg_dialog").dialog({
763    //    autoOpen: false,
764    //    modal: false,
765    //    minWidth: 250,
766    //    zIndex:1500,
767    //    height: 'auto',
768    //    resizable: false,
769    //    draggable: true,
770    //    closeOnEscape: true,
771    //    showButtonPanel : false,
772    //    buttons: [],
773    //    close: function () {
774    //        void (0);
775    //    }
776    //}).siblings('.ui-dialog-titlebar').remove();
777
778//    $.datepicker.setDefaults($.extend($.datepicker.regional["ru"]));
779});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.