PageSourceSearch

https://www.stbenilduscollege.com/Inc/Scripts/Script1.js?d=639265707183603918

js stbenilduscollege.com collected 2026-10-02 19:45:27 UTC 5,444 bytes, 200 lines download raw bytes

1$(document).ready(function () {
2    $(window).scroll(function () {
3        if ($(document).scrollTop() > 120) {
4            $('.TopBar2').addClass('Stuck');
5        }
6        else {
7            $('.TopBar2').removeClass('Stuck');
8        }
9    });
10});
11
12$(document).ready(function () {
13    function setHeight() {
14        windowHeight = $(window).innerHeight();
15        windowHeight = windowHeight - 293;
16        $('#BodyWrapper').css('min-height', windowHeight);
17    };
18    setHeight();
19
20    $(window).resize(function () {
21        setHeight();
22    });
23});
24
25function emptyTextReplace(temp) {
26    if (document.getElementById(temp).value == "") {
27        document.getElementById(temp).value = " Search ";
28    }
29}
30
31function emptyText(temp) {
32    document.getElementById(temp).value = "";
33}
34
35function noPostDefault(temp) {
36    try {
37        if (document.getElementById(temp).value == " Search ") {
38            return false;
39        } else {
40            return true;
41        }
42    }
43    catch (err) {
44        return false;
45    }
46}
47
48$(document).keyup(function (e) {
49    if (e.keyCode == 27) { closeError(); }   // esc
50});
51
52function closeError() {
53    $('.ErrorPanel').css({ 'display': 'none' });
54
55    closeModalPopUp('popErrorSummary');
56    closeModalPopUp('popLookup');
57}
58
59function showModalPopUp(modalID) {
60    var modalPopupBehavior = $find(modalID);
61    modalPopupBehavior.show();
62    return true
63}
64
65function closeModalPopUp(modalID) {
66    var modalPopupBehavior = $find(modalID);
67    modalPopupBehavior.hide();
68    return true
69}
70
71function forceClick(e, elemId) {
72    var elem = document.getElementById(elemId);
73    var evt = (e) ? e : window.event;
74    var intKey = (evt.which) ? evt.which : evt.keyCode;
75
76    if (intKey == 13) {
77        elem.click();
78        return false;
79    }
80    return true;
81}
82
83function validatePage(valGroup) {
84    var modalPopupBehavior = $find('popErrorSummary');
85
86    if (Page_ClientValidate(valGroup) == false) {
87        modalPopupBehavior.show();
88        return false;
89    } else {
90        modalPopupBehavior.hide();
91        return true;
92    }
93}
94
95function toggleNav() {
96    if ($('.MenuPanel').hasClass('mobile')) {
97        $('.MenuPanel').removeClass('mobile');
98        $(".MenuPanel .MainMenu").hide('400');
99    } else {
100        $('.MenuPanel').addClass('mobile');
101        $(".MenuPanel .MainMenu").show('400');
102    }
103}
104
105$(document).ready(function () {
106    // open nav with main "nav" button
107
108    var el = document.getElementById('nav-open-btn');
109    if (el.addEventListener) {
110        el.addEventListener('click', toggleNav, false);
111    } else {
112        el.attachEvent("onclick", toggleNav);
113    }
114    adaptMenu();
115});
116
117//Footer replace text
118$(document).ready(function () {
119    var InputName = $('#txtName');
120    var defaultNameVal = InputName.val();
121
122    InputName.focus(function () {
123        if (InputName.val() == defaultNameVal) InputName.val("");
124    }).blur(function () {
125        if (InputName.val().length == 0) InputName.val(defaultNameVal);
126    });
127
128    var InputEmail = $('#txtEmail');
129    var defaultEmailVal = InputEmail.val();
130
131    InputEmail.focus(function () {
132        if (InputEmail.val() == defaultEmailVal) InputEmail.val("");
133    }).blur(function () {
134        if (InputEmail.val().length == 0) InputEmail.val(defaultEmailVal);
135    });
136
137    var InputPhone = $('#txtPhoneNo');
138    var defaultPhoneVal = InputPhone.val();
139
140    InputPhone.focus(function () {
141        if (InputPhone.val() == defaultPhoneVal) InputPhone.val("");
142    }).blur(function () {
143        if (InputPhone.val().length == 0) InputPhone.val(defaultPhoneVal);
144    });
145
146    var InputMsg = $('#txtMessage');
147    var defaultMsgVal = InputMsg.text();
148    InputMsg.focus(function () {
149        if (InputMsg.text() == defaultMsgVal) InputMsg.text("");
150    }).blur(function () {
151        if (InputMsg.text().length == 0) InputMsg.text(defaultMsgVal);
152    });
153});
154
155$(window).resize(function () { adaptMenu(); });
156
157$(document).ready(function () {
158    $('ul.level1 li.has-popup').click(function (e) {
159        var elem = $(this).attr('aria-haspopup');
160        elem = elem.replace(':submenu:', '\\:submenu\\:');
161        //$('#' + elem).toggle();
162
163        if ($('#' + elem).is(":visible")) {
164            $('#' + elem).hide(200);
165        } else {
166            $('#' + elem).show(200);
167        }
168
169    });
170});
171
172
173/* COOKIES DIRECTIVE SCRIPT */
174$(document).ready(function () {
175    checkCookie('_acceptCookie18');
176});
177
178function checkCookie(c_name) {
179    var msg = getCookie(c_name);
180    if (msg != null && msg != "") { $('#policyBar').hide(); }
181    else { $('#policyBar').show(); }
182}
183
184function getCookie(c_name) {
185    var i, x, y, ARRcookies = document.cookie.split(";");
186    for (i = 0; i < ARRcookies.length; i++) {
187        x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
188        y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
189        x = x.replace(/^\s+|\s+$/g, "");
190        if (x == c_name) { return unescape(y); }
191    }
192}
193
194function setCookie(c_name, value, exdays) {
195    var exdate = new Date();
196    exdate.setDate(exdate.getDate() + exdays);
197    var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
198    var c_path = "; path=/";
199    document.cookie = c_name + "=" + c_value + c_path;
200}

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.