PageSourceSearch

https://www.orgill.com/Scripts/main.js?dt=03272026

js orgill.com collected 2026-10-02 10:02:02 UTC 13,508 bytes, 359 lines download raw bytes

1function NoneQuoteOnly(evt) {
2    if ((event.keyCode == 34 || event.keyCode == 39)) {
3        event.returnValue = false;
4    }
5}
6
7function EnterNumberOnly(evt) {
8    if ((event.keyCode < 48 || event.keyCode > 57)) {
9        event.returnValue = false;
10    }
11}
12
13function ClickOnEnter(buttonName, e) {
14//    var key;
15//    if (window.event)
16//        key = window.event.keyCode;     //IE
17//    else
18//        key = e.which;     //firefox
19
20    var key = e.keyCode ? e.keyCode : e.which;
21    if (key == 13) {
22        e.preventDefault();
23        var btn = document.getElementById(buttonName);
24        if (btn != null) { //If we find the button click it
25            btn.click();
26            event.keyCode = 0
27            return true;
28        }
29    }
30}
31
32function ClickPagination(buttonName, e) {
33    var key = e.keyCode ? e.keyCode : e.which;
34    if ((key < 48 || key > 57) && key != 13) {
35        return false;
36    }
37    else {
38        if (key == 13) {
39            e.preventDefault();
40            var btn = document.getElementById(buttonName);
41            if (btn != null) { //If we find the button click it
42                btn.click();
43                event.keyCode = 0
44                return true;
45            }
46        }
47    }
48}
49
50function PrintDivWBS(divID) {
51    var divToPrint = document.getElementById(divID);
52    var popupWin = window.open('', '', 'width=600,height=400,resizable=1,scrollbars=1');
53    popupWin.document.open();
54    popupWin.document.write('<html><head><link rel="stylesheet" type="text/css" href="/content/themes/main.css" /><link rel="stylesheet" type="text/css" href="/content/themes/printContent.css" /></head><body onload="window.print()"><table cellspacing="0" cellpadding="5" width="100%" style="height: 100%" border="0" bgcolor="#FFFFFF"><tr><td valign="top">' + divToPrint.innerHTML + '</td></tr></table></body></html>');
55    popupWin.document.close();
56}
57
58function PrintDiv(divID) {
59    var divToPrint = document.getElementById(divID);
60    var popupWin = window.open('', '', 'width=600,height=400,resizable=1,scrollbars=1');
61    popupWin.document.open();
62    popupWin.document.write('<html><head><link rel="stylesheet" type="text/css" href="/content/themes/bootstrap/css/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="/content/themes/main.css" /><link rel="stylesheet" type="text/css" href="/content/themes/printContent.css" /></head><body onload="window.print()"><table cellspacing="0" cellpadding="5" width="100%" style="height: 100%" border="0" bgcolor="#FFFFFF"><tr><td valign="top">' + divToPrint.innerHTML + '</td></tr></table></body></html>');
63    popupWin.document.close();
64
65    //    var divToPrint = document.getElementById(divID);
66    //    newWin = window.open("");
67    //    newWin.document.write('<html><head><link rel="stylesheet" type="text/css" href="/content/themes/bootstrap/css/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="/content/themes/main.css" /><link rel="stylesheet" type="text/css" href="/content/themes/printContent.css" /></head><body>' + divToPrint.outerHTML + '</body></html>');
68    //    newWin.print();
69    //    newWin.close();
70}
71
72function PrintFapDiv(divID) {
73    var divToPrint = document.getElementById(divID);
74    var popupWin = window.open('', '', 'width=600,height=400,resizable=1,scrollbars=1');
75    popupWin.document.open();
76    popupWin.document.write('<html><head> <link rel="stylesheet" type="text/css" href="/content/themes/bootstrap/css/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="/content/themes/main.css" /><link rel="stylesheet" type="text/css" href="/content/themes/fap.css" /><link rel="stylesheet" type="text/css" href="/content/themes/printContent.css" /></head><body onload="window.print()"><table cellspacing="0" cellpadding="5" width="1000px" style="height: 100%" border="0" bgcolor="#FFFFFF"><tr><td valign=top>' + divToPrint.innerHTML + '</td></tr></table></html>');
77    popupWin.document.close();
78}
79
80
81function printDivContent(divID) {
82    var contents = $("#" + divID).html();
83    var frame1 = $('<iframe />');
84    frame1[0].name = "frame1";
85    $("body").append(frame1);
86    var frameDoc = frame1[0].contentWindow ? frame1[0].contentWindow : frame1[0].contentDocument.document ? frame1[0].contentDocument.document : frame1[0].contentDocument;
87    frameDoc.document.open();
88    frameDoc.document.write('<html><head><title></title>');
89    frameDoc.document.write('<link rel="stylesheet" href="/content/themes/bootstrap/css/bootstrap.min.css" type="text/css" />');
90    frameDoc.document.write('<link rel="stylesheet" href="/content/themes/main.css" type="text/css" />');
91    frameDoc.document.write('</head><body>');
92    frameDoc.document.write(contents);
93    frameDoc.document.write('</body></html>');
94    frameDoc.document.close();
95    setTimeout(function () {
96        window.frames["frame1"].focus();
97        window.frames["frame1"].print();
98        frame1.remove();
99    }, 500);
100}
101
102function printCart(divName) {
103    var printContents = document.getElementById(divName).innerHTML;
104    var originalContents = document.body.innerHTML;
105
106    document.body.innerHTML = printContents;
107
108    window.print();
109
110    document.body.innerHTML = originalContents;
111}
112
113function ShowAlertMessage(message) {
114    alert(message);
115}
116
117function RedirectToPage(Url) {
118    window.location.href = Url;
119}
120
121function ToggleHideDiv(bodyDiv, glyphHeader) {
122    var _bodyDiv = document.getElementById(bodyDiv);
123    if (_bodyDiv.style.display == 'none') {
124        $("#" + bodyDiv).show(1000);
125        document.getElementById(glyphHeader).className = 'glyphicon glyphicon-menu-up';
126    }
127    else {
128        $("#" + bodyDiv).hide(1000);
129        document.getElementById(glyphHeader).className = 'glyphicon glyphicon-menu-down';
130    }
131}
132function ToggleShowDiv(bodyDiv, glyphHeader) {
133    var _bodyDiv = document.getElementById(bodyDiv);
134    if (_bodyDiv.style.display == 'block') {
135        $("#" + bodyDiv).hide(1000);
136        document.getElementById(glyphHeader).className = 'glyphicon glyphicon-menu-down';
137    }
138    else {
139        $("#" + bodyDiv).show(1000);
140        document.getElementById(glyphHeader).className = 'glyphicon glyphicon-menu-up';
141    }
142}
143
144function ShowOnlyToggleDiv(bodyDiv, glyphHeader) {
145    $("#" + bodyDiv).show(1000);
146    document.getElementById(glyphHeader).className = 'glyphicon glyphicon-menu-up';
147}
148function HideOnlyToggleDiv(bodyDiv, glyphHeader) {
149    $("#" + bodyDiv).hide(1000);
150    document.getElementById(glyphHeader).className = 'glyphicon glyphicon-menu-down';
151}
152
153function ToggleHideDivNew(bodyDiv, glyphIcon) {
154    var _bodyDiv = document.getElementById(bodyDiv);
155    if (_bodyDiv.style.display == 'none') {
156        $("#" + bodyDiv).show(1000);
157        document.getElementById(glyphIcon).className = 'icon-chevron-up';
158    }
159    else {
160        $("#" + bodyDiv).hide(1000);
161        document.getElementById(glyphIcon).className = 'icon-chevron-down';
162    }
163}
164
165
166function getQueryStrings() {
167    var assoc = {};
168    var decode = function (s) { return decodeURIComponent(s.replace(/\+/g, " ")); };
169    var queryString = location.search.substring(1);
170    var keyValues = queryString.split('&');
171
172    for (var i in keyValues) {
173        var key = keyValues[i].split('=');
174        if (key.length > 1) {
175            assoc[decode(key[0])] = decode(key[1]);
176        }
177    }
178
179    return assoc;
180}
181
182function ShowMobileListing() {
183    var width = $(window).width();
184    var qs = getQueryStrings();
185
186    var deptId = qs["deptid"];
187    var qoption = qs["QOption"];
188    var special = qs["spl"];
189
190    var queryString = '';
191    if (deptId != undefined) {
192        queryString = queryString + '&deptid=' + deptId;
193    }
194    if (qoption != undefined) {
195        queryString = queryString + '&QOption=' + qoption;
196    }
197    if (special != undefined) {
198        queryString = queryString + '&spl=' + special;
199    }
200
201    if (width < 768) {
202        window.location = '/index.aspx?tab=3' + queryString;
203    }
204}
205function ShowPromoMobileListing() {
206    var width = $(window).width();
207    var qs = getQueryStrings();
208
209    var prgno = qs["prgno"];
210
211    var queryString = '';
212    if (prgno != undefined) {
213        queryString = queryString + '&prgno=' + prgno;
214    }
215
216    if (width < 768) {
217        window.location = '/index.aspx?tab=41' + queryString;
218    }
219}
220
221function CheckOnlyOneRepeaterRadio(repeaterDivID, selectedControlID) {
222    var controlDiv = document.getElementById(repeaterDivID);
223    if (controlDiv != null) {
224        var Inputs = controlDiv.getElementsByTagName("input");
225        for (i = 0; i < Inputs.length; i++) {
226            if (Inputs[i].type == 'radio') {
227                if (Inputs[i].id != selectedControlID.id)
228                    document.getElementById(Inputs[i].id).checked = false;
229            }
230        }
231    }
232}
233
234function ScrollTop() {
235    $('html, body').animate({ scrollTop: 0 }, 'fast');
236}
237
238function SetActiveDetailTab(TabID) {
239    $.ajax({
240        type: "POST",
241        url: "/component/services.aspx/SetDetailActivetab",
242        data: "{'TabID':'" + TabID + "'}",
243        contentType: "application/json; charset=utf-8",
244        dataType: "json",
245        success: function (msg) {
246
247        },
248        error: function (req, status, err) {
249            console.log('something went wrong', status, err);
250        }
251    });
252}
253
254function SetGridMobileColumnNames(gridID) {
255    var cols = '';
256    var table = document.getElementById(gridID);
257
258    if (table != null) {
259        var headers = table.getElementsByTagName('th');
260        var row = table.getElementsByTagName("tr");
261        var rowColumn = table.getElementsByTagName("td");
262        
263        var headerIndex = 0;
264        for (var b = 0; b < rowColumn.length; b++) {
265            if (rowColumn[b].parentNode.className != "ls-grid-pagination") {
266                rowColumn[b].setAttribute('data-title', headers[headerIndex].innerText);
267            }
268
269            headerIndex++;
270            if (headers.length == headerIndex) {
271                headerIndex = 0;
272            }
273        }
274    }
275}
276
277function SetTwoGridMobileColumnNames(gridID) {
278    var cols = '';
279    var table = document.getElementById(gridID);
280
281    if (table != null) {
282        //For inner grid.
283        var headers = table.getElementsByTagName('th');
284        var rowColumn = table.getElementsByTagName("td");
285
286        var headerIndex = 0;
287        for (var b = 0; b < rowColumn.length; b++) {
288            rowColumn[b].setAttribute('data-title', headers[headerIndex].innerText);
289
290            headerIndex++;
291            if (headers.length == headerIndex) {
292                headerIndex = 0;
293            }
294        }
295
296        var Inputs = table.getElementsByTagName("table");
297        for (i = 0; i < Inputs.length; i++) {
298            var headers = Inputs[i].getElementsByTagName('th');
299            var rowColumn = Inputs[i].getElementsByTagName("td");
300
301            var headerIndex = 0;
302            for (var b = 0; b < rowColumn.length; b++) {
303                rowColumn[b].setAttribute('data-title', headers[headerIndex].innerText);
304
305                headerIndex++;
306                if (headers.length == headerIndex) {
307                    headerIndex = 0;
308                }
309            }
310        }
311    }
312}
313
314
315function SetORGGridMobileColumnNames(gridID) {
316    var cols = '';
317    var table = document.getElementById(gridID);
318
319    if (table != null) {
320        var headers = table.getElementsByTagName('th');
321        var row = table.getElementsByTagName("tr");
322        var rowColumn = table.getElementsByTagName("td");
323
324        var headerIndex = 0;
325        for (var b = 0; b < rowColumn.length; b++) {
326            if (rowColumn[b].parentNode.className != "org-grid-pagination") {
327                rowColumn[b].setAttribute('data-title', headers[headerIndex].innerText);
328            }
329
330            headerIndex++;
331            if (headers.length == headerIndex) {
332                headerIndex = 0;
333            }
334        }
335    }
336}
337
338function PrintDivV8(divID) {
339    var divToPrint = document.getElementById(divID);
340    var popupWin = window.open('', '', 'width=600,height=400,resizable=1,scrollbars=1');
341    popupWin.document.open();
342    popupWin.document.write('<html><head><link rel="stylesheet" type="text/css" href="/content/themes/bootstrap/css/bootstrap.min.css" /><link rel="stylesheet" type="text/css" href="/content/themes/mainV9.css" /><link rel="stylesheet" type="text/css" href="/content/themes/printContent.css" /></head><body onload="window.print()"><table cellspacing="0" cellpadding="5" width="100%" style="height: 100%" border="0" bgcolor="#FFFFFF"><tr><td valign="top">' + divToPrint.innerHTML + '</td></tr></table></body></html>');
343    popupWin.document.close();
344}
345
346function ShowPageLoader() {
347    document.getElementById('cartLoaderPopup').style.display = 'block';
348}
349function HidePageLoader() {
350    document.getElementById('cartLoaderPopup').style.display = 'none';
351}
352
353function EscapeKeysInSearch(searchBoxId, searchBoxValue) {
354    var withoutScriptVal = RemoveScriptTags(searchBoxValue);
355    //var replacedText = withoutScriptVal.replace(/[&<>"']/g, "");
356    var replacedText = withoutScriptVal.replace(/[<>"']/g, "");
357
358    document.getElementById(searchBoxId).value = replacedText;
359}

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.