PageSourceSearch

https://football-state.com/JScripts/funcs.js

js football-state.com collected 2026-10-02 14:20:21 UTC 10,755 bytes, 350 lines download raw bytes

1
2$(document).on("pagecreate", function () {
3
4    var p = window.location.href;
5    var m = p;
6    var i = p.lastIndexOf("/") + 1;
7    p = p.substring(i);
8    if (p.indexOf(".aspx") > 0)
9        p = p.replace(".aspx", "");
10    if (m.indexOf("FBAdmin") > 0) {
11        p = "FBAdmin" + p;
12    }
13    if (p.indexOf("?") > 0 && p.indexOf("?InfoNumber") < 0 && p.indexOf("subcategory")<0) {
14        p = p.substring(0, p.indexOf("?"));
15    }
16    var pid = "";
17    var urlid = "";
18    $("a[data-url]").each(function () {
19        var url = $(this).data('url');
20        if (url.indexOf(".aspx") > 0)
21            url = url.replace(".aspx", "");
22        if (url == p) {
23            pid = $(this).data('id');
24            urlid = url;
25        }
26    });
27    setTimeout(function () {
28        $('.ui-collapsible-content').addClass('ui-collapsible-content-collapsed');
29        $('#parent_' + pid).removeClass('ui-collapsible-content-collapsed');
30        $("#" + urlid).addClass("active-li").addClass("blueIcon");
31    }, 0);
32
33    $(".main-item").on("collapsibleexpand", function (event, ui) {
34        var id = $(this).data("id");
35        collapseOpen(id);
36
37        $("#defaultpanel").on("panelopen", function (event, ui) {
38            //setting overflow : hidden and binding "touchmove" with event which returns false
39            $('body').css("overflow", "hidden").on("touchmove", stopScroll);
40        });
41
42        $("#defaultpanel").on("panelclose", function (event, ui) {
43            //remove the overflow: hidden property. Also, remove the "touchmove" event. 
44            $('body').css("overflow", "auto").off("touchmove");
45        });
46
47        function stopScroll() {
48            return false;
49        }
50    });
51
52    $(document).on('click', '.opt-btn', function () {
53        $('#options').panel('close');
54    });
55
56
57});
58
59
60function collapseOpen(id) {
61    $(".main-item-div").each(function (i) {
62        if ($(this).hasClass('ui-collapsible-content-collapsed') == false && $(this).data("id") != id) {
63            $(this).addClass('ui-collapsible-content-collapsed');
64        }
65    })
66}
67
68
69
70$(document).on("focusout", ".input_reg_em", function (event) {
71    var em = $(".input_reg_em").val();
72    if (isValidEmailAddress(em)) {
73        $("#emerr").hide().fadeOut('fast');
74    } else {
75        $("#emerr").show().fadeIn('fast');
76    }
77});
78
79$(document).on("focusout", ".input_reg_p1", function (event) {
80    checkReg();
81});
82
83$(document).on("focusout", ".input_reg_p2", function (event) {
84    checkRegP2();
85});
86
87
88
89function validateReg() {
90    var isvalid = false;
91    var em = $(".input_reg_em").val();
92    var nm = $(".input_reg_nm").val();
93    var p1 = $(".p1").val();
94    var p2 = $(".p2").val();
95    if (nm.length < 3) {
96        $("#nmerr").show().fadeIn('fast');
97    } else if (!isValidEmailAddress(em)) {
98        $("#nmerr").hide();
99        $("#emerr").show().fadeIn('fast');
100    } else {
101        $("#nmerr").hide();
102        $("#emerr").hide();
103        if (p1.length < 6) {
104            $("#shortpass").addClass("red_blink").addClass("blink_me");
105            $("#shortpass").show();
106            $(".p1").focus();
107        } else if (p1 != p2) {
108            $("#shortpass").removeClass("red_blink").removeClass("blink_me");
109            $("#shortpass").hide();
110            $("#mismatch").show().fadeIn('fast');
111            $(".p1").focus();
112        } else if (p1.indexOf(" ") > -1) {
113            $("#shortpass").removeClass("red_blink").removeClass("blink_me");
114            $("#shortpass").hide();
115            $("#mismatch").hide()
116            $("#nospace").show().fadeIn('fast');
117            $(".p1").focus();
118        } else {
119            $("#shortpass").removeClass("red_blink").removeClass("blink_me");
120            $("#shortpass").hide();
121            $(".validerr").hide();
122            isvalid = true;
123        }
124    }
125    return isvalid;
126}
127
128function checkReg() {
129    var p1 = $(".p1").val();
130    if (p1.length < 6) {
131        $("#shortpass").addClass("red_blink").addClass("blink_me");
132        $("#shortpass").show();
133    } else if (p1.indexOf(" ") > -1) {
134        $("#shortpass").removeClass("red_blink").removeClass("blink_me");
135        $("#shortpass").hide();
136        $("#nospace").show().fadeIn('fast');
137    } else {
138        $("#shortpass").removeClass("red_blink").removeClass("blink_me");
139        $("#shortpass").hide();
140        $("#nospace").hide();
141    }
142}
143
144function checkRegP2() {
145    var p1 = $(".p1").val();
146    var p2 = $(".p2").val();
147    if (p1.length < 6) {
148        $("#shortpass").addClass("red_blink").addClass("blink_me");
149        $("#shortpass").show();
150        $(".p1").focus();
151    } else if (p1 != p2) {
152        $("#shortpass").removeClass("red_blink").removeClass("blink_me");
153        $("#shortpass").hide();
154        $("#mismatch").show().fadeIn('fast');
155        $(".p1").focus();
156    } else if (p1.indexOf(" ") > -1) {
157        $("#shortpass").removeClass("red_blink").removeClass("blink_me");
158        $("#shortpass").hide();
159        $("#mismatch").hide();
160        $("#nospace").show().fadeIn('fast');
161        $(".p1").focus();
162    } else {
163        $("#shortpass").removeClass("red_blink").removeClass("blink_me");
164        $("#shortpass").hide();
165        $("#mismatch").hide();
166        $("#nospace").hide();
167    }
168}
169
170function isValidEmailAddress(emailAddress) {
171    var pattern = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
172    return pattern.test(emailAddress);
173}
174
175
176function increase_by_one(field) {
177    nr = parseInt(document.getElementById(field).value);
178    document.getElementById(field).value = nr + 1;
179}
180
181function decrease_by_one(field) {
182    nr = parseInt(document.getElementById(field).value);
183    if (nr > 0) {
184        if ((nr - 1) > 0) {
185            document.getElementById(field).value = nr - 1;
186        }
187    }
188}
189
190$(document).on('click', '.regorlog', function () {
191    if ($(".show_log").is(':visible')) {
192        $(".show_log").hide();
193        $(".show_reg").show();
194    } else {
195        $(".show_log").show();
196        $(".show_reg").hide();
197    }
198});
199
200function openRegErr() {
201    $('#popRegOrLog').popup();
202    $(".show_log").hide();
203    $(".show_reg").show();
204    setTimeout(function () {
205        $('#popRegOrLog').popup('open', {
206            theme: "a",
207            positionTo: "window",
208            transition: "pop"
209        });
210    }, 500);
211}
212
213
214function setDates(langid) {
215    if ($('#startdate').val() == "") {
216        var today = new Date();
217        var dd = today.getDate();
218        var mm = today.getMonth() + 1; //January is 0!
219        var mm1 = mm + 1;
220        var yyyy = today.getFullYear();
221        var y1 = yyyy + 1;
222        if (dd < 10) {
223            dd = '0' + dd
224        }
225        if (mm < 10) {
226            mm = '0' + mm
227        }
228        var today;
229        var yfmtoday;
230        var mfmtoday;
231        if (langid == "he-IL") {
232            today = dd + '/' + mm + '/' + yyyy;
233            mfmtoday = dd + '/' + mm1 + '/' + yyyy
234            yfmtoday = dd + '/' + mm + '/' + y1;
235        } else {
236            today = mm + '/' + dd + '/' + yyyy;
237            mfmtoday = mm1 + '/' + dd + '/' + yyyy;
238            yfmtoday = mm + '/' + dd + '/' + y1;
239        }
240        $('#startdate').val(today);
241        $('#enddate').val(mfmtoday);
242        $('#startdateDelAll').val(today);
243        $('#enddateDelAll').val(yfmtoday);
244    }
245}
246
247function ShowHideLayer(boxID) {
248    /* Obtain reference for the selected boxID layer and its button */
249    var box = document.getElementById("box" + boxID);
250
251    /* If the selected box is currently invisible, show it */
252    if (box.style.display == "none" || box.style.display == "") {
253        box.style.display = "block";
254    }
255        /* otherwise hide it */
256    else {
257        box.style.display = "none";
258    }
259}
260
261function showLoader() {
262    var interval = setInterval(function () {
263        $.mobile.loading('show');
264        clearInterval(interval);
265    }, 1);
266}
267
268function hideLoader() {
269    var interval = setInterval(function () {
270        $.mobile.loading('hide');
271        clearInterval(interval);
272    }, 1);
273}
274
275function showTimer() {
276    window.setTimeout(function () {
277        $.mobile.loading('show');
278    }, 1);
279    window.setTimeout(function () {
280        if ($(".ui-icon-loading").is(":visible")) {
281            $.mobile.loading('show');
282        }
283    }, 7000);
284};
285
286function blink(elem, times, speed) {
287    if (times > 0 || times < 0) {
288        if ($(elem).hasClass("blink"))
289            $(elem).removeClass("blink");
290        else
291            $(elem).addClass("blink");
292    }
293
294    clearTimeout(function () {
295        blink(elem, times, speed);
296    });
297
298    if (times > 0 || times < 0) {
299        setTimeout(function () {
300            blink(elem, times, speed);
301        }, speed);
302        times -= .5;
303    }
304}
305
306function imgErrorBlank(image) {
307    image.onerror = "";
308    image.src = "images/blank.gif";
309    return true;
310}
311
312function closewin(id) {
313    setTimeout(function () {
314        $("#" + id).popup("close");
315    }, 2000)
316}
317
318function setupIFrame(sum, supplier, npay, curid, orderid, payeru, payert, payern, pdata, lng, tmode, ligid, setdepo, site) {
319
320    var curtzid = curid; //1=ILS, 2=USD
321    if (curtzid == "3")
322        curtzid = "978";//euro
323    if (curtzid == "4")
324        curtzid = "826";//pound
325    var ctype = "&cred_type=1";
326    if (npay > 1) {
327        var sm = parseFloat(sum);
328        var pp = npay - 1;
329        var ep = sm / (pp + 1);
330        ep = Math.round(ep * 100) / 100
331        var fp = ep;
332        if ((ep * (pp + 1)) != sm) {
333            fp = sm - ((pp) * ep);
334        }
335        ctype = "&cred_type=8";
336        ctype += "&fpay=" + fp;
337        ctype += "&spay=" + e;
338        ctype += "&npay=" + pp;
339    }
340    var btntxt = "";
341    if (tmode.indexOf("V") > 0) {
342        btntxt = "&buttonLabel=" + setdepo;
343    }
344    var urls = "&success_url_address=https://www.football-state.com/PaymentDone&fail_url_address=https://www.football-state.com/PaymentFailed";
345    var prms = "&orderid=" + orderid + "&ptype=TUR_Charge&uid=" + payeru + "&clubid=" + payert + "&site="+ site +
346        "&eventid=" + ligid + "&contact=" + payern + "&pdesc=" + pdata + "&DCdisable=" + orderid + payeru + payert;
347    var ifsrc = "https://direct.tranzila.com/" + supplier + "/newiframe.php?sum=" + sum + "&nologo=1&lang=" + lng +
348        "&u71=1&currency=" + curtzid + ctype + "&tranmode=" + tmode + urls + prms + btntxt;
349    return ifsrc;
350}

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.