PageSourceSearch

https://www.dpmz.sk/js/cestovny.js?1483989582

js dpmz.sk collected 2026-10-02 19:09:56 UTC 2,055 bytes, 92 lines download raw bytes

1var __top;
2
3$(function() {
4	var showTimetable = function(url) {
5		if (url == "podla_zastavok")
6			return;
7		
8		var iframe = $("<iframe border='0' frameborder='0' src='/cestovny-poriadok2/" + url + "' />");
9		iframe.load(function() {
10			__top = $(document).scrollTop();
11			OverZob(true);
12			
13			iframe[0].style.height = iframe[0].contentWindow.document.body.scrollHeight + 'px';
14			$(iframe[0].contentWindow.document.getElementById("close")).click(function() {
15				OverZob(false);
16			});
17		});
18		
19		$("#spojDiv").html("").append(iframe);
20	}
21
22	if (window.location.hash)
23		showTimetable(window.location.hash.replace(/#/, ""));
24	
25	$("#spod > div").removeAttr("onclick");
26	$(".t_spoj a, .tNaj a, #spod > div").click(function() {
27		var h;
28		if (this.tagName == "DIV")
29			h = "?" + this.id;
30		else {
31			h = ("" + this.href);
32			h = h.substr(h.indexOf("?"));
33		}
34		
35		if ((pos = h.indexOf("#")) > -1)
36			h = h.substr(pos + 1);
37		
38		showTimetable(h);
39		return false;
40	});
41	
42	$("#spojOver").click(function() {
43		OverZob(false);
44	});
45	
46	$(window).keydown(function(e) {
47		if (e.keyCode == 27)
48			OverZob(false);
49		
50	});
51});
52
53function OverZob(zob) {
54	var d = $("#spojDiv").stop(true, false);
55	var o = $("#spojOver").stop(true, false);
56	
57	if (zob) {
58		if (d.css("display") == "none")
59			d.css({ display : "block", opacity : 0 });
60			
61		if (o.css("display") == "none")
62			o.css({ display : "block", opacity : 0 });
63			
64		d.animate({ opacity : 1 }, 200);
65		o.animate({ opacity : .6 }, 200);
66		
67	} else
68		$([d[0],o[0]]).animate({ opacity : 0 }, 200, function() { $(this).css({ display : "none" }) });
69	
70	setTimeout(function() {
71		$(window).triggerHandler("resize");
72	}, 0);
73}
74
75function OverRes() {
76	var w = $(window).width(), h = $(window).height();
77	var d = $("#spojDiv");
78	
79	var l = (w - d.width()) / 2, t;
80
81	if (d.height() > h) {
82		t = __top;
83	} else {
84		t = (h - d.height()) / 2;
85		t += $(document).scrollTop();
86	}
87	
88	d.css({ left : (l < 0 ? 0 : l), top : (t < 0 ? 0 : t) });
89}
90
91$(window).scroll(function() { OverRes(); });
92$(window).resize(function() { OverRes(); });

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.