PageSourceSearch

https://www.roadtrafficsigns.com/js/SSPlugin.js?v=2026-38

js roadtrafficsigns.com collected 2026-09-24 20:50:48 UTC 67,258 bytes, 1,656 lines download raw bytes

1var SSBSdialog = true;
2var SSdialog = null;
3var $dialog;
4var SSDialog = function () { 
5    this.ssbsdialog = true;
6    this.bootstrapjs = "/js/external/bootstrap/bootstrap.bundle.min.js";
7    this.dialogId = "div_SSBSDialog";
8    this.modalObj = "";
9    this.modalDialog = "";
10    this.modalBody = "";
11    this.modalContent = "";
12    this.modalIframe = "";
13    this.modalContentVisibility = true; // when true background color set to none to hide bootstrap modal box and show only modal-content.
14    this.divid = "";
15    this.parenddivid = "";
16    this.append = false;
17    this.reappendupdate = false;
18    this.isIframe = false;
19    this.iframeUrl = "";
20    this.isurl = true;
21    this.url = "";
22    this.isSerializeArray = false;
23    this.SerializeArray = "";
24    this.isTitle = false; //true;
25    this.isHeader = true;
26    this.isFooter = false;
27    this.footerDiv = "";
28    this.title = "";
29    this.vScroll = false;
30    this.hScroll = false;
31    this.divCalign = false;
32
33    this.autoResize = true;
34
35    this.fastIframe = false;
36    this.isHtml = false;
37    this.htmlContent = "";
38
39    this.initialWidth = "-1";
40    this.initialHeight = "-1";
41    this.width = "100%";
42    this.height = "auto";
43    this.maxWidth = "90%";
44    this.maxHeight = "90%";
45
46    //this.autoOpen = false;
47    //this.fixed = true;
48    //this.movable = true;
49    this.onClosedFun = "";
50    //this.onClosedFun2 = "";
51    //this.onCleanupFun = "";
52    this.onCompleteFun = "";
53    this.hidediv = true;
54    this.isImage = false;
55    this.imageUrl = "";
56    //this.targetObj = null;
57    this.resizeScrollCheck = false; /* check scroll height to resize dialog box */
58
59    this.divObjClone = "";
60}
61SSDialog.prototype.ShowDialog = function () {
62    try {
63        if (typeof (gFlagBootStrap4) != "undefined" && gFlagBootStrap4 == false) {
64            SSdialog.bootstrapjs = "/js/external/bootstrap/bootstrap.min.js";
65        }
66        if (typeof ($.fn.modal) != "function") {
67            var l = new Loader();
68            l.require([
69                SSdialog.bootstrapjs
70            ],
71                function () {
72                    SSdialog.ShowDialog2();
73                });
74        }
75        else {
76            this.ShowDialog2();
77        }
78    }
79    catch (err) {
80    }
81}
82SSDialog.prototype.ShowDialog2 = function () {
83    try {
84        if (this.maxWidth == "90%" && this.width) {
85            this.maxWidth = this.width;
86        }
87        if (this.maxHeight == "90%" && this.height) {
88            this.maxHeight = this.height;
89        }
90        if (this.initialWidth == "-1" && this.width) {
91            this.initialWidth = this.width;
92        }
93        if (this.initialHeight == "-1" && this.height) {
94            this.initialHeight = this.height;
95        }
96        if (this.width == "100%" && this.maxWidth != "90%") {
97            this.width = this.maxWidth;
98        }
99
100
101        if ($('#' + this.dialogId).length == 0) {
102        }
103        else {
104            $('#' + this.dialogId).remove();
105        }
106        var bsmodal = this.getBSModalHtml();
107        $(bsmodal).appendTo('body');
108        this.modalObj = $('#' + this.dialogId);
109        this.modalDialog = this.modalObj.find(".modal-dialog");
110        this.modalBody = this.modalObj.find(".modal-body");
111        this.modalContent = this.modalObj.find(".modal-content");
112
113        //this.setBSWidthHeight(this.initialWidth, this.initialHeight);
114
115        if (this.isurl && !this.isIframe) {
116            if (this.isSerializeArray) {
117                this.modalObj.modal('show');
118                this.showLoadingbar();
119                $.ajax({
120                    async: true,
121                    url: this.url,
122                    type: 'POST',
123                    data: this.SerializeArray,
124                    success: function (data) {
125                        SSdialog.hideLoadingbar();
126                        var $modalbody = SSdialog.modalObj.find('.modal-body');
127                        $modalbody.empty();
128                        $modalbody.html(data);
129                    },
130                    error: function (result) {
131                    }
132                });
133                this.modalObj.on('shown.bs.modal', function (event) {
134                    SSdialog.childModalShown();
135                    SSdialog.modalShown();
136                });
137                this.modalObj.on('hide.bs.modal', function () {
138                    SSdialog.childModalHide();
139                    SSdialog.removeBSModal();
140                    SSdialog.modalHide();
141                });
142            }
143            else {
144                this.modalObj.modal('show');
145                this.showLoadingbar();
146                $.ajax({
147                    async: true,
148                    url: this.url,
149                    type: 'GET',
150                    success: function (data) {
151                        SSdialog.hideLoadingbar();
152                        var $modalbody = SSdialog.modalObj.find('.modal-body');
153                        $modalbody.empty().hide();
154                        $("<div style='width:auto'>" + data + "</div>").appendTo($modalbody); //$modalbody.html(data);
155                        //SSdialog.fitBSModal();
156                        $modalbody.slideDown('fast');
157                        SSdialog.modalObj.modal('handleUpdate');
158                    },
159                    error: function (result) {
160                    }
161                });
162                this.modalObj.on('shown.bs.modal', function (event) {
163                    SSdialog.childModalShown();
164                    SSdialog.modalShown();
165                });
166                this.modalObj.on('hide.bs.modal', function () {
167                    SSdialog.childModalHide();
168                    SSdialog.removeBSModal();
169                    SSdialog.modalHide();
170                });
171            }
172        }
173        else if (this.isIframe) {
174            this.modalIframe = this.modalObj.find("iframe");
175            if (this.isSerializeArray) {
176                this.modalObj.modal('show');
177                this.showLoadingbar();
178                this.postToIframe(this.SerializeArray, this.iframeUrl, this.dialogId + "_iframe");
179                this.modalObj.on('shown.bs.modal', function (event) {
180                    SSdialog.childModalShown();
181                    SSdialog.modalShown();
182                });
183                this.modalObj.on('hide.bs.modal', function () {
184                    SSdialog.childModalHide();
185                    SSdialog.removeBSModal();
186                    SSdialog.modalHide();
187                });
188            }
189            else {
190                this.modalObj.modal('show');
191                this.showLoadingbar();
192                var $iframe = this.modalObj.find("iframe");
193                $iframe.attr("src", this.iframeUrl);
194                $iframe.on('load', function () {
195                    SSdialog.hideLoadingbar();
196                });
197                this.modalObj.on('shown.bs.modal', function (event) {
198                    SSdialog.childModalShown();
199                    SSdialog.modalShown();
200                });
201                this.modalObj.on('hide.bs.modal', function () {
202                    SSdialog.childModalHide();
203                    SSdialog.removeBSModal();
204                    SSdialog.modalHide();
205                });
206            }
207        }
208        else if (this.isHtml) {
209            this.modalObj.on('shown.bs.modal', function (event) {
210                SSdialog.childModalShown();
211                SSdialog.modalShown();
212            });
213            this.modalObj.on('hide.bs.modal', function () {
214                SSdialog.childModalHide();
215                SSdialog.removeBSModal();
216                SSdialog.modalHide();
217            });
218        }
219        else {
220            if (this.divid.length > 0) {
221                //this.modalObj.modal('show');                                
222                //this.modalObj.on('shown.bs.modal', function (event) {
223                //    SSdialog.childModalShown();
224                //    if ($("#" + SSdialog.divid).find("form").length > 0) {
225                //        SSdialog.appendDiv();
226                //    } else {
227                //        SSdialog.fillDivContent();
228                //    }                    
229                //});
230                this.modalObj.on("shown.bs.modal", function () {
231                    SSdialog.childModalShown();
232                    SSdialog.modalShown();
233                    if ($("#" + SSdialog.divid).find("form").length > 0 || SSdialog.append) {
234                        SSdialog.appendDiv();
235                    } else {
236                        SSdialog.fillDivContent();
237                    }
238                }).modal('show');
239                this.modalObj.on('hide.bs.modal', function () {
240                    if ($("#" + SSdialog.divid).find("form").length > 0 || SSdialog.append) {
241                        SSdialog.reAppendDiv();
242                    }
243                    SSdialog.childModalHide();
244                    SSdialog.removeBSModal();
245                    SSdialog.modalHide();
246                });
247            }
248            else {
249                this.modalObj.modal('show');
250                this.modalObj.on('shown.bs.modal', function (event) {
251                    SSdialog.childModalShown();
252                    SSdialog.modalShown();
253                });
254                this.modalObj.on('hide.bs.modal', function () {
255                    SSdialog.childModalHide();
256                    SSdialog.removeBSModal();
257                    SSdialog.modalHide();
258                });
259            }
260        }
261    }
262    catch (err) {
263    }
264}
265SSDialog.prototype.fillDivContent = function () {
266    var cls = this.getBSModalDefaultClass();
267    this.modalDialog.css("width", this.width);
268    this.modalDialog.css("height", this.height);
269    this.modalDialog.removeClass("modal-sm");
270    this.modalDialog.removeClass("modal-md");
271    this.modalDialog.removeClass("modal-lg");
272    this.modalDialog.removeClass("modal-xl");
273    this.modalDialog.addClass(cls);
274    this.modalBody.empty();
275    this.modalBody.html($("#" + this.divid)[0].outerHTML);
276    this.modalBody.find("#" + this.divid).attr("id", "ssbsdialog_" + this.divid);
277    $("#ssbsdialog_" + this.divid).show();
278    this.modalObj.modal('handleUpdate');
279}
280SSDialog.prototype.appendDiv = function () {
281    var cls = this.getBSModalDefaultClass();
282    this.modalDialog.css("width", this.width);
283    this.modalDialog.css("height", this.height);
284    this.modalDialog.removeClass("modal-sm");
285    this.modalDialog.removeClass("modal-md");
286    this.modalDialog.removeClass("modal-lg");
287    this.modalDialog.removeClass("modal-xl");
288    this.modalDialog.addClass(cls);
289    this.modalBody.empty();
290    this.modalBody.append($("#" + this.divid));
291    this.divObjClone = $("#" + this.divid).clone();
292    $("#" + this.divid).show();
293    this.modalObj.modal('handleUpdate');
294}
295SSDialog.prototype.reAppendDiv = function () {
296    if (this.append && this.parenddivid.length > 0) {
297        if (this.reappendupdate) {
298            $("#" + this.divid).appendTo($("#" + this.parenddivid));
299        }
300        else {
301            $(this.divObjClone).appendTo($("#" + this.parenddivid));
302        }
303    }
304    else {
305        $(this.divObjClone).appendTo("body");
306    }
307    $("#" + this.divid).hide();
308}
309
310
311SSDialog.prototype.postToIframe = function (data, url, target) {
312    $('body').append('<form action="' + url + '" method="post" target="' + target + '" id="postToIframe"></form>');
313    $.each(data, function (n, v) {
314        $('#postToIframe').append('<input type="hidden" name="' + v.name + '" value="' + htmlEncode(v.value) + '" />');
315    });
316    $('#postToIframe').submit().remove();
317    // Adjusting the iframe height onload event    
318}
319SSDialog.prototype.getBSModalHtml = function () {
320    var bsmodal = "";
321    var bodycls = "";
322    bsmodal = bsmodal + "<style id='ssbsstyle1'>";
323    bsmodal = bsmodal + "#div_SSBSDialog .modal-dialog{";
324    if (this.width == "100%") {
325    }
326    else if (typeof this.width != 'undefined' && this.width.toString().length > 0) {
327        //bsmodal = bsmodal + " max-width:" + this.width + 'px';
328        if (typeof (IsDesignHub) != 'undefined' && IsDesignHub) {
329            //bsmodal = bsmodal + " width:" + this.width.toString().replace('px', '') + 'px';
330        }
331        else {
332            bsmodal = bsmodal + " width:" + this.width.toString().replace('px', '') + 'px';
333        }
334    }
335    bsmodal = bsmodal + "}";
336    bsmodal = bsmodal + "#div_SSBSDialog .modal-content{";
337    if (!this.modalContentVisibility) {
338        bsmodal = bsmodal + " background-color : transparent;";
339        bsmodal = bsmodal + " border: none;";
340    }
341    bsmodal = bsmodal + "}";
342    bsmodal = bsmodal + "#div_SSBSDialog .modal-content{";
343    if (this.divCalign) {
344        bsmodal = bsmodal + " text-align: center;";
345    }
346    bsmodal = bsmodal + "}";
347    bsmodal = bsmodal + ".modal-100{max-width:100px}";
348    bsmodal = bsmodal + ".modal-200{max-width:200px}";
349    bsmodal = bsmodal + ".modal-300{max-width:300px}";
350    bsmodal = bsmodal + ".modal-400{max-width:400px}";
351    bsmodal = bsmodal + ".modal-500{max-width:500px}";
352    bsmodal = bsmodal + ".modal-600{max-width:600px}";
353    bsmodal = bsmodal + ".modal-700{max-width:700px}";
354    bsmodal = bsmodal + ".modal-800{max-width:800px}";
355    bsmodal = bsmodal + ".modal-900{max-width:900px}";
356    bsmodal = bsmodal + ".modal-1000{max-width:1000px}";
357    //bsmodal = bsmodal + ".sr-only{position:relative}";  
358    bsmodal = bsmodal + ".spinner-border { ";
359    bsmodal = bsmodal + "display: inline-block; ";
360    bsmodal = bsmodal + "width: 2rem; ";
361    bsmodal = bsmodal + "height: 2rem; ";
362    bsmodal = bsmodal + "vertical-align: text-bottom; ";
363    bsmodal = bsmodal + "border: 0.25em solid currentColor; ";
364    bsmodal = bsmodal + "border-right-color: transparent; ";
365    bsmodal = bsmodal + "border-radius: 50%; ";
366    bsmodal = bsmodal + "-webkit-animation: spinner-border .75s linear infinite; ";
367    bsmodal = bsmodal + "animation: spinner-border .75s linear infinite; ";
368    bsmodal = bsmodal + "}";
369    bsmodal = bsmodal + "</style>";
370
371    if (this.bootstrapjs.indexOf("bootstrap.min.js") > 0) {
372        bsmodal = bsmodal + "<style id='ssbsstyle2'>";
373        bsmodal = bsmodal + "#div_SSBSDialog .modal-dialog {";
374        bsmodal = bsmodal + "display: grid;";
375        bsmodal = bsmodal + "align-items: center;";
376        bsmodal = bsmodal + "height: 100%;";
377        bsmodal = bsmodal + "}";
378        bsmodal = bsmodal + "#div_SSBSDialog .modal-content {";
379        if (!this.modalContentVisibility) {
380            bsmodal = bsmodal + " border-radius: 0; ";
381            bsmodal = bsmodal + " box-shadow: none; ";
382        }
383        bsmodal = bsmodal + "}";
384        bsmodal = bsmodal + "</style>"
385
386        if (typeof (IsDesignHub) != 'undefined' && IsDesignHub) {
387            bsmodal = bsmodal + "<div class='modal fade upload_artwork_modal fade' id='" + this.dialogId + "' role='dialog'>";
388        }
389        else {
390            bsmodal = bsmodal + "<div class='modal fade' id='" + this.dialogId + "' role='dialog'>";
391        }
392        bsmodal = bsmodal + "    <div";
393        if (typeof (IsDesignHub) != 'undefined' && IsDesignHub) {
394            bsmodal = bsmodal + " class='modal-dialog modal-dialog-centered modal
394-dialog-scrollable"
395        } else {
396            bsmodal = bsmodal + " class='modal-dialog modal-dialog-centered "
397        }
398        bsmodal = bsmodal + this.getBSModalClass();
399        bsmodal = bsmodal + " '>"
400        bsmodal = bsmodal + "      <div class='modal-content'>";
401        if (this.isHeader) {
402            var headercls = "";
403            if (!this.isTitle) {
404                headercls = "header-notitle";
405                bodycls = "body-notitle";
406            }
407            bsmodal = bsmodal + "        <div id='" + this.dialogId + "_header' class='modal-header " + headercls + "'>";
408            bsmodal = bsmodal + "          <button type='button' class='close btn-close' data-dismiss='modal' data-bs-dismiss='modal'>&times;</button>";
409            if (this.isTitle) {
410                bsmodal = bsmodal + "          <h4 id='" + this.dialogId + "_title' class='modal-title'>" + this.title + "</h4>";
411            }
412            bsmodal = bsmodal + "        </div>";
413        }
414        bsmodal = bsmodal + "        <div id='" + this.dialogId + "_body' class='modal-body " + bodycls + "'>";
415        bsmodal = bsmodal + "       <div id='" + this.dialogId + "_loader' class='spinner-border' role='status' style='display:none;position:absolute;left:50%;top:50%'>";
416        bsmodal = bsmodal + "           <span class='sr-only visually-hidden'>Loading...</span>";
417        bsmodal = bsmodal + "       </div>";
418        if (this.isIframe) {
419            bsmodal = bsmodal + "<iframe id='" + this.dialogId + "_iframe' name='" + this.dialogId + "_iframe' frameborder = '0' allowfullscreen = '' scrolling = 'no' src = 'about:blank' width='100%' height='100%'></iframe>";
420        }
421        bsmodal = bsmodal + "        </div>";
422        if (this.isFooter) {
423            bsmodal = bsmodal + "        <div id='" + this.dialogId + "_footer' class='modal-footer'>";
424            //bsmodal = bsmodal + "          <button type='button' class='btn btn-default' data-dismiss='modal' data-bs-dismiss='modal'>Close</button>";
425            bsmodal = bsmodal + $("#" + this.footerDiv).html() ;
426            bsmodal = bsmodal + "        </div>";
427        }
428        bsmodal = bsmodal + "      </div>";
429        bsmodal = bsmodal + "	</div>";
430        bsmodal = bsmodal + "</div>";
431    }
432    else {
433        if (typeof (IsDesignHub) != 'undefined' && IsDesignHub) {
434            bsmodal = bsmodal + "<div class='modal fade upload_artwork_modal fade' id='" + this.dialogId + "' tabindex='-1' role='dialog' aria-labelledby='exampleModalLabel' aria-hidden='true'>";
435        }
436        else {
437            bsmodal = bsmodal + "<div class='modal fade' id='" + this.dialogId + "' tabindex='-1' role='dialog' aria-labelledby='exampleModalLabel' aria-hidden='true'>";
438        }
439        bsmodal = bsmodal + "  <div "
440        if (typeof (IsDesignHub) != 'undefined' && IsDesignHub) {
441            bsmodal = bsmodal + " class='modal-dialog modal-dialog-centered modal-dialog-scrollable "
442        } else {
443            bsmodal = bsmodal + " class='modal-dialog modal-dialog-centered "
444        }
445        bsmodal = bsmodal + this.getBSModalClass();
446        bsmodal = bsmodal + " ' "
447        bsmodal = bsmodal + " role='document'>";
448        bsmodal = bsmodal + "    <div class='modal-content'>";
449        if (this.isHeader) {
450            var headercls = "";
451            if (!this.isTitle) {
452                headercls = "header-notitle";
453                bodycls = "body-notitle";
454            }
455
456            bsmodal = bsmodal + "      <div id='" + this.dialogId + "_header' class='modal-header " + headercls + "'>";
457            if (this.isTitle) {
458                bsmodal = bsmodal + "        <h5 id='" + this.dialogId + "_title' class='modal-title' id='exampleModalLabel'>" + this.title + "</h5>";
459            }
460            bsmodal = bsmodal + "        <button type='button' class='close btn-close' data-dismiss='modal' data-bs-dismiss='modal' aria-label='Close'>";
461            if (typeof (IsDesignHub) != 'undefined' && IsDesignHub) {
462                bsmodal = bsmodal + "          <span aria-hidden='true'>&times;</span>";
463            }
464            else {
465                bsmodal = bsmodal + "          <span aria-hidden='true'>&times;</span>";
466            }            
467            bsmodal = bsmodal + "        </button>";
468            bsmodal = bsmodal + "      </div>";
469        }
470        bsmodal = bsmodal + "      <div id='" + this.dialogId + "_body' class='modal-body " + bodycls + "' style='min-height: 100px;'>";
471        bsmodal = bsmodal + "       <div id='" + this.dialogId + "_loader' class='spinner-border' role='status' style='display:none;position:absolute;left:50%;top:50%'>";
472        bsmodal = bsmodal + "           <span class='sr-only visually-hidden'>Loading...</span>";
473        bsmodal = bsmodal + "       </div>";
474        if (this.isIframe) {
475            if (this.isSerializeArray) {
476                bsmodal = bsmodal + "<iframe id='" + this.dialogId + "_iframe' name='" + this.dialogId + "_iframe' frameborder = '0' allowfullscreen = '' scrolling = 'no' src = 'about:blank' width='100%' height='100%'></iframe>";
477            } else {
478                bsmodal = bsmodal + "<iframe id='" + this.dialogId + "_iframe' name='" + this.dialogId + "_iframe' frameborder = '0' allowfullscreen = '' scrolling = 'no' src = 'about:blank' width='100%' height='" + this.height + "'></iframe>";
479            }
480        }
481        bsmodal = bsmodal + "      </div>";
482        if (this.isFooter) {
483            bsmodal = bsmodal + "      <div id='" + this.dialogId + "_footer' class='modal-footer'>";
484            //bsmodal = bsmodal + "        <button type='button' class='btn btn-secondary' data-dismiss='modal' data-bs-dismiss='modal'>Close</button>";
485            //bsmodal = bsmodal + "        <button type='button' class='btn btn-primary'>Save changes</button>";
486            bsmodal = bsmodal + $("#" + this.footerDiv).html();
487            bsmodal = bsmodal + "      </div>";
488        }
489        bsmodal = bsmodal + "    </div>";
490        bsmodal = bsmodal + "  </div>";
491        bsmodal = bsmodal + "</div>";
492    }
493
494    return bsmodal;
495}
496SSDialog.prototype.getBSModalClass = function () {
497    var clsstr = "";
498    var width = this.width.toString();
499    if (width.length > 0 && width != "100%" && width.indexOf("%") == -1) {
500        width = parseInt(width.replace("px", ""));
501        //if (width > 0 && width <= 350) {
502        //    clsstr = clsstr + " modal-sm";
503        //}
504        //else if (width > 350 && width <= 650) {
505        //    clsstr = clsstr +  " modal-md";
506        //}        
507        //else if (width > 650 && width <= 900) {
508        //    clsstr = clsstr + " modal-lg";
509        //}        
510        //else if (width > 900) {
511        //    clsstr = clsstr +  " modal-xl";
512        //}
513        if (!this.isMobileDevice()) {
514            if (width >= 0 && width <= 100) {
515                clsstr = clsstr + " modal-100";
516            } else if (width > 100 && width <= 200) {
517                clsstr = clsstr + " modal-200";
518            } else if (width > 200 && width <= 300) {
519                clsstr = clsstr + " modal-300";
520            } else if (width > 300 && width <= 400) {
521                clsstr = clsstr + " modal-400";
522            } else if (width > 400 && width <= 500) {
523                clsstr = clsstr + " modal-500";
524            } else if (width > 500 && width <= 600) {
525                clsstr = clsstr + " modal-600";
526            } else if (width > 600 && width <= 700) {
527                clsstr = clsstr + " modal-700";
528            } else if (width > 700 && width <= 800) {
529                clsstr = clsstr + " modal-800";
530            } else if (width > 800 && width <= 900) {
531                clsstr = clsstr + " modal-900";
532            } else if (width > 900 && width <= 1000) {
533                clsstr = clsstr + " modal-1000";
534            }
535        }
536    }
537    if (this.vScroll) {
538        clsstr = clsstr + " modal-dialog-scrollable";
539    }
540    return clsstr;
541}
542
543SSDialog.prototype.isMobileDevice = function () {
544    return (
545        navigator.userAgent.match(/Android/i) ||
546        navigator.userAgent.match(/BlackBerry/i) ||
547        navigator.userAgent.match(/iPhone|iPad|iPod/i) ||
548        navigator.userAgent.match(/Opera Mini/i) ||
549        navigator.userAgent.match(/IEMobile/i)
550    );
551}
552
553SSDialog.prototype.getBSModalDefaultClass = function (width) {
554    var clsstr = "";
555    if (typeof (width) == "undefined") {
556        width = this.width.toString();
557    }
558    width = width.toString();
559    if (width.length > 0) {
560        width = parseInt(width.replace("px", ""));
561        if (width > 0 && width <= 300) {
562            clsstr = "modal-sm";
563        }
564        else if (width > 300 && width <= 500) {
565            clsstr = "modal-md";
566        }
567        else if (width > 500 && width <= 800) {
568            clsstr = "modal-lg";
569        }
570        else if (width > 800) {
571            clsstr = "modal-xl";
572        }
573    }
574    clsstr = "";
575    return clsstr;
576}
577SSDialog.prototype.showLoadingbar = function () {
578    try {
579        $('#' + this.dialogId + "_loader").show();
580    }
581    catch (err) {
582    }
583}
584SSDialog.prototype.hideLoadingbar = function () {
585    try {
586        $('#' + this.dialogId + "_loader").hide();
587    }
588    catch (err) {
589    }
590}
591SSDialog.prototype.CloseDialog = function () {
592    try {
593        if (SSdialog.hidediv && SSdialog.divid.length > 0) {
594            $("#" + SSdialog.divid).hide();
595        }
596        this.modalObj.modal('hide');
597    }
598    catch (err) {
599        $("#cboxClose").trigger("click");
600    }
601}
602SSDialog.prototype.removeBSModal = function () {
603    if (this.hidediv && this.divid.length > 0) {
604        $("#" + this.divid).hide();
605    }
606    if (this.modalObj != "") {
607        this.modalObj.remove();
608    }
609    if ($("#ssbsstyle1").length > 0) {
610        $("#ssbsstyle1").remove();
611    }
612    if ($("#ssbsstyle2").length > 0) {
613        $("#ssbsstyle2").remove();
614    }
615    if (SSdialog.onClosedFun != "") {
616        SSdialog.executeFunctionByName(SSdialog.onClosedFun, window);
617    }
618}
619SSDialog.prototype.ResizeDialog = function (InnerWidth, InnerHeight, flag) {
620    this.hideLoadingbar();
621    var width = SSdialog.maxWidth.toString();
622    var height = SSdialog.maxHeight.toString();
623    if (InnerWidth) {
624        InnerWidth = InnerWidth.toString().toLowerCase().replace('px', '');
625        var tmpwidth = SSdialog.width.toString().toLowerCase().replace('px', '');
626        if (tmpwidth.indexOf("%") > 0) {
627            tmpwidth = $(window).width() * (parseInt(tmpwidth.replace("%", "")) / 100);
628        }
629        width = parseInt(InnerWidth) > parseInt(tmpwidth) ? tmpwidth : InnerWidth;
630    }
631    if (InnerHeight) {
632        InnerHeight = InnerHeight.toString().toLowerCase().replace('px', '');
633        var tmpheight = SSdialog.height.toString().toLowerCase().replace('px', '');
634        height = parseInt(InnerHeight) > parseInt(tmpheight) ? tmpheight : InnerHeight;
635    }
636    if (flag) {
637        var padding = parseInt(this.modalBody.css("padding").replace("px", ''));
638        width = parseInt(InnerWidth) + (padding * 2) + 2;
639        height = parseInt(InnerHeight) + (padding * 2) + 2;
640        height = height + $("#div_SSBSDialog .modal-header").outerHeight();
641    }
642    width = parseInt(width.toString().toLowerCase().replace('px', ''));
643    height = parseInt(height.toString().toLowerCase().replace('px', ''));
644    this.setBSWidthHeight(width, height);
645    var $iframe = $("#" + this.dialogId + "_iframe");
646    if ($iframe.length > 0) {
647        var iframewidth = $iframe[0].contentWindow.document.body.scrollWidth;
648        var iframeheight = $iframe[0].contentWindow.document.body.scrollHeight;
649        if (iframewidth != 0) { $iframe.width(iframewidth) }
650        if (iframeheight != 0) { $iframe.height(iframeheight) }
651        $("#div_SSBSDialog_iframe")[0].contentWindow.document.body.style.margin = "0px";
652    }
653    this.RepositionToCenter();
654}
655SSDialog.prototype.ResizeIframeDialog = function (InnerWidth, InnerHeight, flag) {
656    this.hideLoadingbar();
657    var $iframe = $("#" + this.dialogId + "_iframe");
658    if ($iframe.length > 0) {
659        var iframewidth = InnerWidth;
660        var iframeheight = InnerHeight;
661        if (iframewidth != 0) { $iframe.width(iframewidth) }
662        if (iframeheight != 0) { $iframe.height(iframeheight) }
663    }
664    this.RepositionToCenter();
665}
666
667SSDialog.prototype.setBSWidthHeight = function (width, height) {
668    var cls = this.getBSModalDefaultClass(width);
669    if (this.modalDialog != '') {
670        if ($(window).width() > width) {
671            this.modalDialog.css("width", width);
672            this.modalDialog.css("max-width", width);
673        }
674        this.modalDialog.removeClass("modal-sm");
675        this.modalDialog.removeClass("modal-md");
676        this.modalDialog.removeClass("modal-lg");
677        this.modalDialog.removeClass("modal-xl");
678        this.modalDialog.addClass(cls);
679    }
680}
681SSDialog.prototype.fitBSModal = function () {
682    var width = this.modalBody.width();
683    if ($(window).width() > width && !isNaN(width) && width > 0) {
684        var padding = parseInt(this.modalBody.css("padding").replace("px", ''));
685        this.modalDialog.css("max-width", (width + (padding * 2) + 2));
686    }
687}
688
689SSDialog.prototype.RemoveDialog = function () {
690    $.colorbox.remove();
691}
692SSDialog.prototype.showAjaxResponse = function (data) {
693    this.modalBody.html(data);
694}
695SSDialog.prototype.RepositionToCenter = function () {
696    var modalDialog = this.modalDialog;
697    if (this.modalDialog != '') {
698        if (typeof (obj_CustomAcquisitions) != "undefined" && obj_CustomAcquisitions.flag) {
699        }
700        else {
701            //// Applying the top margin on modal to align it vertically center
702            modalDialog.css("margin-top", Math.max(0, ($(window).height() - modalDialog.height()) / 2));
703        }
704        modalDialog.css("margin-left", Math.max(0, ($(window).width() - this.modalContent.width()) / 2));
705        //this.modalObj.modal('handleUpdate');
706    }
707}
708SSDialog.prototype.executeFunctionByName = function (functionName, context/*, args */) {
709    var args = [].slice.call(arguments).splice(2);
710    var namespaces = functionName.split(";");
711    var func = namespaces.pop();
712    for (var i = 0; i < namespaces.length; i++) {
713        context = context[namespaces[i]];
714    }
715    if (namespaces.length > 0) {
716        return context[func].apply(context, args);
717    }
718    else {
719        eval(func);
720    }
721}
722SSDialog.prototype.childModalShown = function () {
723    if ($('.modal:visible').length > 1) {
724        var zIndex = 1040 + (10 * $('.modal:visible').length);
725        this.modalObj.css('z-index', zIndex);
726        setTimeout(function () {
727            $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack');
728        }, 0);
729    }
730}
731SSDialog.prototype.childModalHide = function () {
732    if ($('.modal-stack').length > 0) {
733        var zIndex = 1040;
734        setTimeout(function () {
735            $('.modal-backdrop').css('z-index', zIndex).removeClass('modal-stack');
736        }, 0);
737    }
738}
739
740SSDialog.prototype.modalShown = function () {
741    if (typeof (obj_CustomAcquisitions) != "undefined" && obj_CustomAcquisitions.flag) {
742        ssWizardHandler.dialogBoxShown();
743        this.modalObj.find('.modal-dialog').removeClass("modal-dialog-centered");
744        this.modalObj.find('.modal-dialog').css("margin-top", "0px");
745        this.modalObj.find('.modal-dialog').css("top", obj_CustomAcquisitions.top + "px");
746    }
747}
748SSDialog.prototype.modalHide = function () {
749    if (typeof (obj_CustomAcquisitions) != "undefined" && obj_CustomAcquisitions.flag) {
750        ssWizardHandler.dialogBoxHide();
751    }
752}
753
754function OpenDialog(url, title) {
755    SSdialog = new SSDialog();
756    SSdialog.width = "1000px";
757    SSdialog.height = "700px";
758    SSdialog.url = url
759    SSdialog.title = title
760    SSdialog.ShowDialog();
761}
762
763/*--------------------------------------------------------------------------------------------*/
764// Bootstrap modal 
765var SSBSmodal = true;
766var SSBSModal = function () {
767    this.bootstrapjs = "/js/external/bootstrap/bootstrap.bundle.min.js";
768    this.modalObj = "";
769    this.draggable = false;
770    this.scroll = false;
771    this.showFun = "";
772}
773SSBSModal.prototype.OpenDialog = function ($obj) {
774    try {
775        if (typeof ($.fn.modal) != "function") {
776            var l = new Loader();
777            l.require([
778                SSBSModalObj.bootstrapjs
779            ],
780                function () {
781                    SSBSModalObj.OpenDialog2($obj);
782                });
783        }
784        else {
785            this.OpenDialog2($obj);
786        }
787    }
788    catch (err) {
789    }
790}
791SSBSModal.prototype.OpenDialog2 = function ($obj) {
792    try {
793        this.modalObj = $obj;
794
795        this.modalObj.on('shown.bs.modal', function (event) {
796            if (SSBSModalObj.showFun != "") {
797                SSBSModalObj.showFun();
798            }
799            SSBSModalObj.modalShown();
800        });
801        this.modalObj.on('hide.bs.modal', function (event) {
802            SSBSModalObj.modalHide();
803        });
804
805        this.modalObj.modal('show');
806
807        if (typeof (obj_CustomAcquisitions) != "undefined" && obj_CustomAcquisitions.flag) {
808        }
809        else {
810            if (this.draggable) {
811                this.modalObj.find('.modal-dialog').draggable({ scroll: this.scroll });
812            }
813        }
814
815    }
816    catch (err) {
817    }
818}
819
820SSBSModal.prototype.modalShown = function () {
821    if (typeof (obj_CustomAcquisitions) != "undefined" && obj_CustomAcquisitions.flag) {
822        ssWizardHandler.dialogBoxShown();
823        //this.modalObj.find('.modal-dialog').removeClass("modal-dialog-centered");
824        //this.modalObj.find('.modal-dialog').css("margin-top", "0px");
825        //this.modalObj.find('.modal-dialog').css("top", obj_CustomAcquisitions.top + "px");
826    }
827}
828SSBSModal.prototype.modalHide = function () {
829    if (typeof (obj_CustomAcquisitions) != "undefined" && obj_CustomAcquisitions.flag) {
830        ssWizardHandler.dialogBoxHide();
831    }
832}
833
834
835var SSBSModalObj = new SSBSModal();
836
837
838//var SSBSModalDialog = true;
839//(function ($) {
840//    $.fn.SSBSModalDialog = function (modelOptions) {
841//        // default settings for the plugin
842//        var modelDefaults = {
843//            bootstrapjs = "/js/external/bootstrap/bootstrap.bundle.min.js",
844//            modalObj = "",
845//            draggable = false,
846//            scroll = false,
847//            showFun = ""
848//        },
849
850//        // extending default settings
851//        modelSettings = $.extend({}, modelDefaults, modelOptions);
852
853//        $(this).each(function () {
854//            if (typeof ($.fn.modal) != "function") {
855//                var event = "click";
856//                $(this).on(event, function () {
857//                    var $tmpObj = $(this);
858//                    if (typeof ($.fn.modal) != "function") { // check again as function is bind at load time and every time it will load bootstrap.                        
859//                        loadDynScript(modelSettings.bootstrapjs, function () {
860//                            $tmpObj.off(event);
861//                            bindPopover($tmpObj, modelSettings);
862//                            $tmpObj.popover('show');
863//                        });
864//                    } else {
865//                        $tmpObj.off(event);
866//                        bindPopover($tmpObj, modelSettings);
867//                        $tmpObj.popover('show');
868//                    }
869//                });
870//            } else {
871//                bindPopover($(this), modelSettings);
872//            }
873//        });
874
875//        function bindPopover($obj, modelSettings) {
876//            $obj.popover({
877//                animation: modelSettings.animation,
878//                sanitize: modelSettings.sanitize,
879//                html: modelSettings.html,
880//                placement: modelSettings.placement,
881//                container: modelSettings.container,
882//                trigger: modelSettings.trigger,
883//                content: modelSettings.content,
884//                template: modelSettings.template,
885//                title: modelSettings.title,
886//            });
887//            if (modelSettings.autoShow) {
888//                $obj.popover('show');
889//            }
890//        }
891//    }
892//})(jQuery);
893
894
895
896
897
898
899/*-----------------------ss-overlib implementation------------------------------------------*/
900
901var SSOverlib = function () {
902    this.animation = true;
903    this.container = false;
904    this.delay = 0;
905    this.html = true;
906    this.placement = "bottom";
907    this.selector = false;
908    this.template = '<div id="ssoverlibtip" class= "tooltip overlib-tooltip" role="tooltip"> <div class="arrow popover-arrow"></div><div class="tooltip-inner"></div></div><style></style>';
909    //this.template = '<div class="popover overlib-tooltip" role="tooltip"><div class="arrow popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
910    this.title = "";
911    this.trigger = 'hover focus';
912    this.customClass = "overlib-tooltip";
913    this.boundary = "scrollParent";
914    this.sanitize = false;
915    this.tooltipcontent = "";
916
917    //this.olLoaded = 0;
918    this.pmStart = 10000000;
919    this.pmUpper = 10001000;
920    this.pmCount = this.pmStart + 1;
921    this.pmt = '';
922    this.pms = new Array();
923
924    /*--Default Configuration Variables For ToolTip CSS--*/
925    this.SS_ToolTip_MainTbl_border = "0px";
926    this.SS_ToolTip_MainTbl_cellspacing = "0px";
927    this.SS_ToolTip_MainTbl_cellpadding = "1px";
928    this.SS_ToolTip_MainTbl_bgcolor = "#993333";
929    this.SS_ToolTip_MainTbl_width = "200";
930    //this.SS_ToolTip_CaptionTbl_border = "0px";
931    //this.SS_ToolTip_CaptionTbl_cellspacing = "0px";
932    //this.SS_ToolTip_CaptionTbl_cellpadding = "2px";
933    //this.SS_ToolTip_CaptionTbl_bgcolor = "";
934    //this.SS_ToolTip_CaptionTbl_width = "100%";    
935    this.CaptionFont_Color = "#FFFFFF";
936    this.CaptionFont_Size = "1px";
937    this.CaptionFont_Face = "Verdana,Arial,Helvetica";
938    //this.CaptionFont_Text = "";    
939    this.Tooltip_CloseEvent = "onmouseover"
940    this.Tooltip_CloseFunction = "return SSToolTip_Close();"
941    this.Tooltip_CloseColor = "#FFD417"
942    this.Tooltip_CloseSize = "1px"
943    this.Tooltip_CloseFace = "Verdana,Arial,Helvetica"
944    this.Tooltip_CloseText = "Close"
945    //this.Tooltip_CloseImg = ""    
946    this.SS_ToolTip_ContentTbl_border = "0px";
947    this.SS_ToolTip_ContentTbl_cellspacing = "0px";
948    this.SS_ToolTip_ContentTbl_cellpadding = "2px";
949    this.SS_ToolTip_ContentTbl_bgcolor = "#FFFFCC";
950    this.SS_ToolTip_ContentTbl_width = "100%";
951    this.ContentFont_Color = "#000000";
952    this.ContentFont_Size = "12px";  //var ContentFont_Size = "1px";
953    this.ContentFont_Face = "Verdana,Arial,Helvetica";
954    //this.ContentFont_Text = "";    
955    //this.tooltipWidth = -1;
956    this.viewPortWidth = -1; //Window Viewport Width
957    this.viewPortHeight = -1; //Window Viewport Height
958    this.SourceEvent = -1 //Event Type ex click or mouseover
959    this.evt = -1   //Event object 
960    this.elem = -1  //Current Element
961    this.args = -1 //function arguments
962    this.cursor_x = -1 //mouse cursor x position
963    this.cursor_y = -1 //mouse cursor y position
964    this.toolTip_x = -1 //mouse cursor x position
965    this.toolTip_y = -1 //mouse cursor y position
966    this.toolTip_w = -1 //Tooltip Width
967    this.toolTip_h = -1 //Tooltip Height
968    this.$Div_ToolTip
969    this.Event_e;
970    this.Default_ToolTip = -1;
971    this.ToolTipCaption = -1;
972    this.ToolTipNew = -1;
973    this.ToolTipWidth = -1;
974    this.ToolTipIMAGE = -1;
975    this.ToolTipSTICKY = -1;
976    this.ToolTipHPosition = 2; //Horizontal Position 0--LEFT/2--RIGHT/1--CENTER to element. Default is RIGHT
977    this.ToolTipVPosition = 2; //Verticle Position TOP/BOTTOM/CENTER to element    
978    this.src_X1 = 0;
979    this.src_X2 = 0;
980    this.src_Y1 = 0;
981    this.src_Y2 = 0;
982    this.VCENTER = -1;
983    this.TOP = -1;
984    this.BOTTOM = -1;
985    this.mdImageOn = -1;
986    this.scrollbarWidth = 20;
987    this.scrollbarHeight = 20;
988    this.hideToolTipInt;
989    this.classTheme = "F1D031";
990}
991SSOverlib.prototype.overlib = function () {
992    try {
993        //console.log("overlib called::")        
994        loadcss();
995        this.parseAllParameters(this.overlib.arguments[0]); // Parse All Parameters Passed in Function
996        this.createToolTipHtml(); // get Whole ToolTip Content.
997        this.evt = window.event || arguments.callee.caller.arguments[0]; // get Event Object.        
998        this.elem = this.evt.target || this.evt.srcElement;  // get Source Element That Triggered Event. 
999        this.SourceEvent = this.evt.type // get the Event Type i.e Click,OnMouseOver etc..
1000
1001        var sourceObj = this.evt.currentTarget || this.evt.target || this.evt.srcElement;
1002        if (typeof $(sourceObj).attr("ssbstooltip") != 'undefined') {
1003            return;
1004        }
1005
1006
1007        switch (this.SourceEvent) {
1008            case "click":
1009                this.trigger = "manual";
1010                break;
1011            default:
1012            // code block
1013        }
1014        $(this.elem).tooltip({ //$(this.elem).popover({            
1015            animation: this.animation,
1016            container: this.container,
1017            delay: this.delay,
1018            html: this.html,
1019            placement: this.placement,
1020            selector: this.selector,
1021            template: this.template,
1022            title: this.tooltipcontent, //toolTipSettings.title,
1023            //content: this.tooltipcontent,
1024            trigger: this.trigger,
1025            customClass: this.customClass,
1026            boundary: this.boundary,
1027            sanitize: this.sanitize
1028        });
1029        //console.log("tooltip")
1030        $(this.elem).tooltip('show'); //$(this.elem).popover('show');  
1031        if (this.ToolTipSTICKY == -1) {
1032            $(this.elem).on("mouseout", function () {
1033                //console.log("mouseout")
1034                $(this).tooltip('dispose');
1035                $(this).off("mouseout");
1036                //console.log("mouseout off")
1037            });
1038        }
1039    }
1040    catch (err) {
1041        //console.log("Error : ")
1042    }
1043}
1044SSOverlib.prototype.parseAllParameters = function (args) {
1045    try {
1046        this.tooltipcontent = args[0];
1047        for (i = 0; i < args.length; i++) {
1048            //if (args[i] == animation) { this.animation = args[i + 1] }
1049            //if (args[i] == container) { this.container = args[i + 1] }
1050            //if (args[i] == delay) { this.delay = args[i + 1] }
1051            //if (args[i] == html) { html = args[i + 1] }
1052            //if (args[i] == placement) { this.placement = args[i + 1] }
1053            //if (args[i] == selector) { this.selector = args[i + 1] }
1054            //if (args[i] == template) { this.template = args[i + 1] }
1055            //if (args[i] == title) { this.title = args[i + 1] }
1056            //if (args[i] == trigger) { this.trigger = args[i + 1] }
1057            //if (args[i] == customClass) { this.customClass = 1 }
1058            //if (args[i] == boundary) { this.boundary = args[i + 1]}
1059            //if (args[i] == sanitize) { this.sanitize = args[i + 1] }
1060
1061            if (args[i] == TOOLTIPNEW) { this.ToolTipNew = args[i + 1] }
1062            if (args[i] == CAPTION) { this.ToolTipCaption = args[i + 1] }
1063            if (args[i] == WIDTH) { this.ToolTipWidth = args[i + 1] }
1064            if (args[i] == HEIGHT) { ToolTipHeight = args[i + 1] }
1065            if (args[i] == LEFT) { this.ToolTipHPosition = 0 } // Horizontal LEFT
1066            if (args[i] == CENTER) { this.ToolTipHPosition = 1 } // Horizontal CENTER
1067            if (args[i] == RIGHT) { this.ToolTipHPosition = 2 } // Horizontal RIGHT
1068            if (args[i] == this.TOP) { this.ToolTipVPosition = 0 } // Verticle TOP
1069            if (args[i] == this.BOTTOM) { this.ToolTipVPosition = 2 } // Verticle BOTTOM
1070            if (args[i] == this.VCENTER) { this.ToolTipVPosition = 1 } //// Verticle CENTER
1071            if (args[i] == IMAGE || this.tooltipcontent.indexOf("<img") != -1 || args[i].toString().toUpperCase() == 'IMAGE') { this.ToolTipIMAGE = 1 }
1072            if (args[i] == STICKY) { this.ToolTipSTICKY = 1 }
1073        }
1074    }
1075    catch (err) {
1076
1077    }
1078}
1079//Return ToolTip Inner Html That Will Shown to viewer 
1080SSOverlib.prototype.createToolTipHtml = function () {
1081    try {
1082        if (this.ToolTipNew != -1) {
1083            this.tooltipcontent = this.getToolTipContent_Div()
1084        }
1085        else if (this.ToolTipCaption != -1) {
1086            this.tooltipcontent = this.getToolTipContent_WithCaption()
1087        }
1088        else {
1089            this.tooltipcontent = this.getToolTipContent()
1090        }
1091    }
1092    catch (err) {
1093
1094    }
1095}
1096// Makes simple table without caption
1097SSOverlib.prototype.getToolTipContent = function () {
1098    try {
1099        if (this.ToolTipWidth != -1) {
1100            this.SS_ToolTip_MainTbl_width = this.ToolTipWidth + "px"
1101        }
1102        CONTENT_TEXT = this.tooltipcontent
1103        var txt = "";
1104
1105        txt += "<table width='" + this.SS_ToolTip_MainTbl_width + "' border='" + this.SS_ToolTip_MainTbl_border + "' cellspacing='" + this.SS_ToolTip_MainTbl_cellspacing + "' cellpadding='" + this.SS_ToolTip_MainTbl_cellpadding + "'>"
1106        txt += "<tr>"
1107        txt += "<td>"
1108        txt += "<table width='100%' border='0px' cellpadding='0px' cellspacing='0px'>"
1109        txt += "<tr>"
1110        txt += "<td valign='TOP'>"
1111        txt += CONTENT_TEXT
1112        txt += "</td>"
1113        txt += "</tr>"
1114        txt += "</table>"
1115        txt += "</td>"
1116        txt += "</tr>"
1117        txt += "</table>";
1118
1119
1120        return txt;
1121    }
1122    catch (err) {
1123
1124    }
1125}
1126SSOverlib.prototype.getToolTipContent_Div = function () {
1127    try {
1128        if (this.ToolTipWidth != -1) {
1129            this.SS_ToolTip_MainTbl_width = this.ToolTipWidth + "px"
1130        }
1131
1132        CAPTION_TEXT = this.ToolTipCaption
1133        CLOSE_BUTTONTEXT = this.Tooltip_CloseText
1134        CONTENT_TEXT = this.tooltipcontent
1135
1136        var txt = "";
1137        txt = "";
1138        txt += "<div id='Div_SSTooltip' class='sstooltipmain sstooltipmain_" + this.classTheme + "' style='width:" + this.SS_ToolTip_MainTbl_width + "px;'>"
1139        if (CAPTION_TEXT.lenght > 0 && CAPTION_TEXT != -1) {
1140            txt += "<div id='div_SSTooltipTitle' class='sstooltiptitlebar sstooltiptitlebar_" + this.classTheme + "'><div>" + CAPTION_TEXT + "</div></div>"
1141        }
1142        txt += "<div id='div_SSTooltipContent' class='sstooltipcontent sstooltipcontent_" + this.classTheme + "'>" + CONTENT_TEXT + "</div>"
1143        txt += "</div>"
1144
1145        return txt;
1146    }
1147    catch (err) {
1148
1149    }
1150}
1151// Makes simple table with caption
1152SSOverlib.prototype.getToolTipContent_WithCaption = function () {
1153    try {
1154        if (this.ToolTipWidth != -1) {
1155            this.SS_ToolTip_MainTbl_width = this.ToolTipWidth + "px"
1156        }
1157
1158        CAPTION_TEXT = this.ToolTipCaption
1159        CLOSE_BUTTONTEXT = this.Tooltip_CloseText
1160        CONTENT_TEXT = this.tooltipcontent
1161
1162        var txt = "";
1163        if (this.ToolTipSTICKY != -1) {
1164            txt += "<style>.overlib-tooltip {pointer-events: auto;}</style>"
1165        }
1166        txt += "<table id='SS_ToolTip_MainTbl' border='" + this.SS_ToolTip_MainTbl_border + "' cellspacing='" + this.SS_ToolTip_MainTbl_cellspacing + "' cellpadding='" + this.SS_ToolTip_MainTbl_cellpadding + "' width='" + this.SS_ToolTip_MainTbl_width + "' style='background-color:" + this.SS_ToolTip_MainTbl_bgcolor + " ;'>"
1167        txt += "<tbody>"
1168        txt += "<tr>"
1169        txt += "<td style='padding:1px;'>"
1170        txt += "<table id='SS_ToolTip_CaptionTbl' border='" + this.SS_ToolTip_ContentTbl_border + "' cellspacing='" + this.SS_ToolTip_ContentTbl_cellspacing + "' cellpadding='" + this.SS_ToolTip_ContentTbl_cellpadding + "' width='" + this.SS_ToolTip_ContentTbl_width + "'>"
1171        txt += "<tbody>"
1172        txt += "<tr>"
1173        txt += "<td>"
1174        txt += "<b><font color='" + this.CaptionFont_Color + "' size='" + this.CaptionFont_Size + "' face='" + this.CaptionFont_Face + "'>" + CAPTION_TEXT + "</font></b></td>"
1175        txt += "<td align='right'>"
1176        if (this.ToolTipSTICKY != -1) {
1177            txt += "<a " + this.Tooltip_CloseEvent + "='" + this.Tooltip_CloseFunction + "'" + "href='javascript:void(0);'><font color='" + this.Tooltip_CloseColor + "' size='" + this.Tooltip_CloseSize + "' face='" + this.Tooltip_CloseFace + "'>" + CLOSE_BUTTONTEXT + "</font></a>"
1178
1179        }
1180        txt += "</td>"
1181        txt += "</tr>"
1182        txt += "</tbody>"
1183        txt += "</table>"
1184        txt += "<table id='SS_ToolTip_ContentTbl' border='" + this.SS_ToolTip_ContentTbl_border + "' cellspacing='" + this.SS_ToolTip_ContentTbl_cellspacing + "' cellpadding='" + this.SS_ToolTip_ContentTbl_cellpadding + "' width='" + this.SS_ToolTip_ContentTbl_width + "' style='background-color:" + this.SS_ToolTip_ContentTbl_bgcolor + "'>"
1185        txt += "<tbody>"
1186        txt += "<tr>"
1187        txt += "<td style='padding:2px;' valign='TOP'>"
1188        txt += "<font style='font-size:" + this.ContentFont_Size + ";color:" + this.ContentFont_Color + ";font-face:" + this.ContentFont_Face + "' color='" + this.ContentFont_Color + "' size='" + this.ContentFont_Size + "' face='" + this.ContentFont_Face + "'>" + CONTENT_TEXT + "</font></td>"
1189        txt += "</tr>"
1190        txt += "</tbody>"
1191        txt += "</table>"
1192        txt += "</td>"
1193        txt += "</tr>"
1194        txt += "</tbody>"
1195        txt += "</table>"
1196        return txt;
1197    }
1198    catch (err) {
1199
1200    }
1201}
1202SSOverlib.prototype.nd1 = function () { // called from low-price
1203    try {
1204        $(this).tooltip('dispose');
1205        //this.$Div_ToolTip.hide();
1206        //this.$Div_ToolTip.remove();
1207    }
1208    catch (err) {
1209
1210    }
1211}
1212SSOverlib.prototype.nd = function () {
1213    try {
1214
1215    }
1216    catch (err) {
1217
1218    }
1219}
1220// Close ToolTip
1221SSOverlib.prototype.SSToolTip_Close = function (e) {
1222    try {
1223        {
1224            $(".overlib-tooltip").tooltip('hide');
1225            $(".overlib-tooltip").tooltip('dispose');
1226        }
1227    }
1228    catch (err) {
1229
1230    }
1231}
1232SSOverlib.prototype.registerCommands = function (cmdStr) { // called from low-price
1233    try {
1234        if (typeof cmdStr != 'string') return;
1235
1236        var pM = cmdStr.split(',');
1237        this.pms = this.pms.concat(pM);
1238
1239        for (var i = 0; i < pM.length; i++) {
1240            eval(pM[i].toUpperCase() + '=' + this.pmCount++);
1241        }
1242    }
1243    catch (err) {
1244
1245    }
1246}
1247
1248var objssoverlib = new SSOverlib();
1249function overlib() {
1250    //console.log("overlib called")    
1251    objssoverlib.overlib(overlib.arguments);
1252}
1253function nd1() { }
1254function nd() { }
1255function SSToolTip_Close(e) {
1256    objssoverlib.SSToolTip_Close(e);
1257}
1258// Registers commands and creates constants.
1259function registerCommands(cmdStr) {
1260    objssoverlib.registerCommands(cmdStr);
1261}
1262// for plugins
1263registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass,image,tooltipnew');
1264
1265
1266// Bootstrap popover implementation
1267var SSBSpopover = true;
1268(function ($) {
1269    $.fn.SSBSPopover = function (popoverOptions) {
1270        // default settings for the plugin
1271        var popoverDefaults = {
1272            bootstrapjs: "/js/external/bootstrap/bootstrap.bundle.min.js",
1273            cssclass: "",
1274            autoShow: false,
1275            animation: true,
1276            container: false,
1277            content: "",
1278            delay: 0,
1279            html: false,
1280            placement: "right",
1281            selector: false,
1282            template: '<div class="popover ssbspopover" role="tooltip"><div class="arrow popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',
1283            title: "",
1284            trigger: 'click',
1285            sanitize: false
1286        },
1287
1288            // extending default settings
1289            popoverSettings = $.extend({}, popoverDefaults, popoverOptions);
1290        if (popoverSettings.cssclass != "") {
1291            popoverSettings.template = popoverSettings.template.replace("ssbspopover", "ssbspopover " + popoverSettings.cssclass);
1292        }
1293
1294        $(this).each(function () {
1295            if (typeof ($.fn.modal) != "function") {
1296                var event = "click";
1297                $(this).on(event, function () {
1298                    var $tmpObj = $(this);
1299                    if (typeof ($.fn.modal) != "function") { // check again as function is bind at load time and every time it will load bootstrap.                        
1300                        loadDynScript(popoverSettings.bootstrapjs, function () {
1301                            $tmpObj.off(event);
1302                            bindPopover($tmpObj, popoverSettings);
1303                            $tmpObj.popover('show');
1304                        });
1305                    } else {
1306                        $tmpObj.off(event);
1307                        bindPopover($tmpObj, popoverSettings);
1308                        $tmpObj.popover('show');
1309                    }
1310                });
1311            } else {
1312                bindPopover($(this), popoverSettings);
1313            }
1314        });
1315
1316        function bindPopover($obj, popoverSettings) {
1317            $obj.popover({
1318                animation: popoverSettings.animation,
1319                sanitize: popoverSettings.sanitize,
1320                html: popoverSettings.html,
1321                placement: popoverSettings.placement,
1322                container: popoverSettings.container,
1323                trigger: popoverSettings.trigger,
1324                content: popoverSettings.content,
1325                template: popoverSettings.template,
1326                title: popoverSettings.title,
1327            });
1328            if (popoverSettings.autoShow) {
1329                $obj.popover('show');
1330            }
1331        }
1332    }
1333})(jQuery);
1334
1335// Bootstrap Tooltip Implementation As Plug-in
1336var SSBStooltip = true;
1337(function ($) {
1338    $.fn.SSBSToolTip = function (toolTipOptions) {
1339        // default settings for the plugin
1340        var toolTipDefaults = {
1341            bootstrapjs: "/js/external/bootstrap/bootstrap.bundle.min.js",
1342            animation: true,
1343            container: false,
1344            delay: 0,
1345            html: false,
1346            placement: "top",
1347            selector: false,
1348            template: '<div class= "tooltip ssbstooltip" role="tooltip" > <div class="arrow popover-arrow"></div><div class="tooltip-inner"></div></div>',
1349            title: "",
1350            trigger: 'hover focus',
1351            customClass: "ssbstooltip",
1352            boundary: "scrollParent",
1353            sanitize: false,
1354            isfunction: false,
1355            functionname: ""
1356        },
1357
1358            // extending default settings
1359            toolTipSettings = $.extend({}, toolTipDefaults, toolTipOptions);
1360        $(this).each(function () {
1361            loadcss();
1362            if (typeof ($.fn.modal) != "function") {
1363                var event = "click";
1364                if (toolTipSettings.trigger == "hover focus") {
1365                    event = "mouseover";
1366                }
1367                $(this).on(event, function () {
1368                    var tmpObj = $(this);
1369                    if (typeof ($.fn.modal) != "function") { // check again as function is bind at load time and every time it will load bootstrap.                        
1370                        loadDynScript(toolTipSettings.bootstrapjs, function () {
1371                            tmpObj.off(event);
1372                            bindTooltip(tmpObj, toolTipSettings);
1373                            tmpObj.tooltip('show');
1374                        });
1375                    } else {
1376                        tmpObj.off(event);
1377                        bindTooltip(tmpObj, toolTipSettings);
1378                        tmpObj.tooltip('show');
1379                    }
1380                });
1381            } else {
1382                bindTooltip($(this), toolTipSettings);
1383            }
1384        });
1385    }
1386    function bindTooltip($obj, toolTipSettings) {
1387        var tooltipTemplate = getTooltipTemplate($obj, toolTipSettings);
1388        $obj.tooltip({
1389            animation: toolTipSettings.animation,
1390            container: toolTipSettings.container,
1391            delay: toolTipSettings.delay,
1392            html: toolTipSettings.html,
1393            placement: toolTipSettings.placement,
1394            selector: toolTipSettings.selector,
1395            template: tooltipTemplate,
1396            title: toolTipSettings.title,
1397            trigger: toolTipSettings.trigger,
1398            customClass: toolTipSettings.customClass,
1399            boundary: toolTipSettings.boundary,
1400            sanitize: toolTipSettings.sanitize
1401        });
1402        $obj.attr("ssbstooltip", "");
1403    }
1404    function getTooltipContent(obj, fun) {
1405        var str = ""
1406        if (fun == "qtip") {
1407            var tooltiptitle = obj.attr("tooltiptitle");
1408            var title = obj.attr("title");
1409            if (tooltiptitle == "undefined" || tooltiptitle == undefined) {
1410                tooltiptitle = "";
1411            }
1412            if (title == "undefined" || title == undefined) {
1413                title = "";
1414            }
1415            str = str + "<div class='ssqtip-titlebar'><div class='titlebar'>" + tooltiptitle + "</div></div>";
1416            str = str + "<div class='ssqtip-content'>" + title + "</div>";
1417            obj.removeAttr("title");
1418        }
1419        return str;
1420    }
1421    function getTooltipTemplate(curobj, toolTipSettings) {
1422        var tooltipTemplate = toolTipSettings.template;
1423        if ($.fn.tooltip.Constructor != undefined && $.fn.tooltip.Constructor.VERSION == "3.4.1") {
1424            tooltipTemplate = '<div class="tooltip ssbstooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>';
1425        }
1426        if (toolTipSettings.customClass != "tooltip ssbstooltip") {
1427            tooltipTemplate = tooltipTemplate.replace("tooltip ssbstooltip", "tooltip " + toolTipSettings.customClass);
1428        }
1429        if (toolTipSettings.isfunction) {
1430            toolTipSettings.title = getTooltipContent(curobj, toolTipSettings.functionname);
1431        } else {
1432            tooltipTemplate = tooltipTemplate.replace("tooltip-inner", "tooltip-inner tooltip-inner1");
1433        }
1434        return tooltipTemplate;
1435    }
1436
1437})(jQuery);
1438
1439/*-------------fancybox : plugin----------------*/
1440var SSFancyBox = true;
1441(function ($) {
1442    $.fn.ssfancybox = function (options) {
1443        // default settings for the plugin
1444        var defaultOptions = {
1445            onDemand: false,
1446            fancyBoxCss: '/js/fancybox2/jquery.fancybox.css',
1447            fancyBoxJS: '/js/fancybox2/jquery.fancybox.pack.js',
1448            titlePosition: 'inside'
1449        },
1450
1451            // extending default settings
1452            SSFancyBoxSettings = $.extend({}, defaultOptions, options);
1453        if (typeof $.fancybox != 'function') {
1454            SSFancyBoxSettings.onDemand = true;
1455        }
1456        if (SSFancyBoxSettings.onDemand) {
1457            //$(window).on("load", function () {               
1458            $(this).each(function () {
1459                $(this).on("click", function (e) {
1460                    e.preventDefault();
1461                    var currobj = $(this);
1462                    if (typeof $.fancybox == "undefined") {
1463                        var l = new Loader();
1464                        l.require([
1465                            SSFancyBoxSettings.fancyBoxCss,
1466                            SSFancyBoxSettings.fancyBoxJS],
1467                            function () {
1468                                currobj.unbind("click");
1469                                currobj.fancybox({
1470                                    'titlePosition': SSFancyBoxSettings.titlePosition,
1471                                    helpers: {
1472                                        overlay: {
1473                                            locked: false
1474                                        }
1475                                    }
1476                                });
1477                                setTimeout(function () { currobj.click(); }, 250)
1478                            });
1479                    } else {
1480                        currobj.unbind("click");
1481                        $(this).fancybox({
1482                            'titlePosition': SSFancyBoxSettings.titlePosition,
1483                            helpers: {
1484                                overlay: {
1485                                    locked: false
1486                                }
1487                            }
1488                        });
1489                        setTimeout(function () { currobj.click(); }, 250)
1490                    }
1491                });
1492            });
1493            //});            
1494        }
1495        else {
1496            $(this).each(function () {
1497                $(this).fancybox({
1498                    'titlePosition': SSFancyBoxSettings.titlePosition,
1499                    helpers: {
1500                        overlay: {
1501                            locked: false
1502                        }
1503                    }
1504                });
1505            });
1506        }
1507    }
1508})(jQuery);
1509
1510/*-------------drop down with image : plugin----------------*/
1511var SSImageDropDown = true;
1512(function ($) {
1513    $.fn.sscustomdropdown = function (options) {
1514        // default settings for the plugin
1515        var defaultOptions = {
1516        },
1517            // extending default settings
1518            ssCustomDropdownSettings = $.extend({}, defaultOptions, options);
1519        $(this).each(function () {
1520            loadcss();
1521            initDropDown($(this), ssCustomDropdownSettings);
1522        });
1523    }
1524    function initDropDown($obj, ssCustomDropdownSettings) {
1525        $obj.off("click").on("click", function () {
1526            $(".sscustomddl-content").hide();
1527            var id = $(this).attr("id");
1528            id = id + "Content";
1529            $("#" + id).toggle();
1530            return false;
1531        });
1532
1533        $(".sscustomddl-content a").off("click").on("click", function () {
1534            var pId = $(this).attr("data-attr-p");
1535            var ddlelem = $("#" + pId);
1536            var ddlContentElem = $("#" + pId + "Content");
1537
1538            ddlContentElem.find("a").each(function () {
1539                $(this).removeClass("sscustomddl-active");
1540            })
1541            $(this).addClass("sscustomddl-active")
1542
1543            var imgTag = $(this).find("img");
1544            if (imgTag.length > 0) {
1545                ddlelem.find("img").attr("src", $(this).find("img").attr("src"));
1546            }
1547            $(".sscustomddl-content").hide();
1548            //$(".ddlsearchtxt").val("");
1549            //$(".ddlsearchtxt").keyup();        
1550        });
1551    }
1552
1553    $(document).on("click", function () {
1554        $(".sscustomddl-content").hide();
1555    });
1556})(jQuery);
1557
1558
1559// Bootstrap Autocomplete Implementation As Plug-in
1560//var SSBSautocomplete = true;
1561//(function ($) {
1562//    $.fn.SSBSAutoComplete = function (AutoCompleteOptions) {
1563//        // default settings for the plugin
1564//        var AutoCompleteDefaultOptions = {
1565//            autocompletejs: "",
1566//            event = "keydown",
1567//        },
1568//        // extending default settings
1569//            AutoCompleteSettings = $.extend({}, AutoCompleteDefaultOptions, AutoCompleteOptions);
1570//        $(this).each(function () {            
1571//            if (typeof ($.fn.autoComplete) != "function") {
1572//                $(this).on(AutoCompleteSettings.event, function () {
1573//                    var tmpObj = $(this);
1574//                    if (typeof ($.fn.autoComplete) != "function") { // check again as function is bind at load time and every time it will load bootstrap.                        
1575//                        loadDynScript(AutoCompleteSettings.autocompletejs, function () {
1576//                            tmpObj.off(AutoCompleteSettings.event);
1577//                            bindAutoComplete($(this), AutoCompleteSettings);
1578//                            tmpObj.autoComplete('show'); // tmpObj.keydown();
1579//                        });
1580//                    } else {
1581//                        tmpObj.off(AutoCompleteSettings.event);
1582//                        bindAutoComplete($(this), AutoCompleteSettings);
1583//                        tmpObj.autoComplete('show'); // tmpObj.keydown();
1584//                    }
1585//                });
1586//            } else {
1587//                bindAutoComplete($(this), AutoCompleteSettings);
1588//            }
1589//        });
1590//    }
1591//    function bindAutoComplete($obj, AutoCompleteSettings) {        
1592//        var AutoCompleteOptions = {
1593//            source: AutoCompleteSettings.source,
1594//            updater: function (item) {
1595//                var terms = split(this.value);
1596//                // remove the current input
1597//                terms.pop();
1598//                // add the selected item
1599//                terms.push(ui.item.value);
1600//                // add placeholder to get the comma-and-space at the end
1601//                terms.push("");
1602//                this.value = terms.join(",");
1603//                return false;
1604//            }
1605//        }
1606//        $obj.autoComplete(AutoCompleteOptions);        
1607//    }
1608//})(jQuery);
1609
1610
1611/*------------------------------------*/
1612function loadcss() {
1613    if (typeof (FlagLoadSSTooltipCss) != 'undefined') {
1614        if (!FlagLoadSSTooltipCss) {
1615            //skip-do nothing
1616        }
1617        else {
1618            loadcssfile();
1619        }
1620    }
1621    else {
1622        loadcssfile();
1623    }
1624}
1625
1626var sstooltipcssloaded = false;
1627function loadcssfile() {
1628    if (!sstooltipcssloaded) {
1629        var link = document.createElement('link');
1630        link.rel = 'stylesheet';
1631        link.type = 'text/css';
1632        link.href = '/css/sstooltip.css';
1633        document.getElementsByTagName('HEAD')[0].appendChild(link);
1634        sstooltipcssloaded = true;
1635    }
1636}
1637
1638function showHideLayers(divname) {
1639    var xobj = document.getElementById(divname);
1640    if (!xobj) return;
1641    if (xobj.style.visibility == 'visible') {
1642        xobj.style.visibility = 'hidden';
1643        xobj.style.display = 'none';
1644    }
1645    else {
1646        xobj.style.visibility = 'visible';
1647        xobj.style.display = 'block';
1648    }
1649}
1650
1651function htmlDecode(value) {
1652    return $("<textarea/>").html(value).text();
1653}
1654function htmlEncode(value) {
1655    return $('<textarea/>').text(value).html();
1656}

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.