PageSourceSearch

https://www.nmcourts.com/scripts/Main.js

js nmcourts.com collected 2026-10-03 17:46:44 UTC 3,652 bytes, 119 lines download raw bytes

1function ReloadPage() {
2    location.reload(true);
3}
4
5function HideModal(ctrl) {
6    $find(ctrl).hide();
7}
8
9function ShowModal(ctrl) {
10    $find(ctrl).show();
11}
12
13function ShowAdmin(hoveritem, id, adminId) {
14    var hp = document.getElementById(adminId + "_admin" + id.toString().substring(id.toString().lastIndexOf("_") + 1, id.toString().length));
15    var regionPanel = document.getElementById(id);        
16    regionPanel.style.background = "#808080";
17    hp.style.visibility = "Visible";
18    hp.style.zIndex = 9000;
19}
20
21function HideAdmin(id, adminId) {
22    var hp = document.getElementById(adminId + "_admin" + id.toString().substring(id.toString().lastIndexOf("_") + 1, id.toString().length));
23    var regionPanel = document.getElementById(id);
24    regionPanel.style.background = "Transparent";
25    hp.style.visibility = "Hidden";
26}
27
28//Get the left coordinate of the container
29function findXLeft(obj) {
30    var x = 0;
31    while (obj) {
32        x += obj.offsetLeft
33        obj = obj.offsetParent;
34    }
35
36    return x;
37}
38
39//Get the top coordinate of the container
40function findXTop(obj) {
41    var x = 0;
42    while (obj) {
43        x += obj.offsetTop
44        obj = obj.offsetParent;
45    }
46
47    return x;
48}
49
50//Resizes an iframe based on it's content (local urls only)
51function resizeFrame(ctrl) {
52    
53    $(ctrl.contentWindow.document).ready(function ()
54    {
55        var s;
56        s = 100;
57        ctrl.style.height = s;
58        var doc = $(ctrl.contentWindow.document);
59        
60        s = doc.height() + "px";
61        ctrl.style.height = s;
62    });
63}
64
65function DisableScrolling() {
66    document.body.style.overflow = "hidden";
67}
68
69//Hides the modal div when editor is put into full screen mode so it appears on top of the page instead of behind the modal background
70function EditorClientCommandExecuting(editor, args) {
71    var commandName = args.get_commandName();
72    if (commandName == "ToggleScreenMode") {
73        if (!editor.isFullScreen()) {
74            editor.get_element().style.position = "relative";
75            editor.get_element().style.zindex = "999999999";
76            for (var i = 0; i < getElementsByClassName("ModalBackground").length; i++) {
77                getElementsByClassName("ModalBackground")[i].style.display = "none";
78            }
79            fullscreen = true;
80
81            //alert(editor.get_element().style.zindex);
82        }
83        else {
84            editor.get_element().style.position = "static";
85            editor.get_element().style.zindex = "9999";
86            for (var i = 0; i < getElementsByClassName("ModalBackground").length; i++) {
87                getElementsByClassName("ModalBackground")[i].style.display = "";
88            }
89            //alert(editor.get_element().style.width);
90        }
91    }
92}
93
94//Helper for EditorClientCommandExecuting to find and hide divs with modal background class
95function getElementsByClassName(classname, node) {
96    if (!node) node = document.getElementsByTagName("body")[0];
97    var a = [];
98    var re = new RegExp('\b' + classname + '\b');
99    var els = node.getElementsByTagName("*");
100
101    for (var i = 0, j = els.length; i < j; i++) {
102        if (els[i].className.indexOf("ModalBackground") > -1) {
103            a.push(els[i]);
104        }
105        
106    }
107    return a;
108}
109
110//Enables tab to enter the editor area immediately instead of tabbing through all the button options first
111function EditorClientLoad(editor, args) {
112    var buttonsHolder = $get(editor.get_id() + "Top");
113    var buttons = buttonsHolder.getElementsByTagName("A");
114    for (var i = 0; i < buttons.length; i++) {
115        var a = buttons[i];
116        a.tabIndex = -1;
117        a.tabStop = false;
118    }
119}

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.