PageSourceSearch

https://prostavbu.cz/scripts/scripts.js

js prostavbu.cz collected 2026-10-09 01:46:38 UTC 6,511 bytes, 225 lines download raw bytes

1var xVersion='4.0',xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xNN4,xUA=navigator.userAgent.toLowerCase();
2if(window.opera){
3	var i=xUA.indexOf('opera');
4	if(i!=-1){
5		var v=parseInt(xUA.charAt(i+6));
6		xOp7Up=(v>=7);
7		xOp6Dn=(v<7);
8	}
9}else if(navigator.vendor!='KDE' && document.all && xUA.indexOf('msie')!=-1) {
10	xIE4Up=parseFloat(navigator.appVersion)>=4;
11	xIE4=xUA.indexOf('msie 4')!=-1;
12	xIE5=xUA.indexOf('msie 5')!=-1;
13}else if(document.layers){
14	xNN4=true;
15}
16xMac=xUA.indexOf('mac')!=-1;
17
18
19var activeFocusValue = null;
20
21function emptyBox(elem) {
22	activeFocusValue = elem.value;
23	elem.value = '';
24}
25
26function setDefaultBox(elem) {
27	if (elem.value == '') { elem.value = activeFocusValue; }
28}
29
30function new_window(url, width, height, scroll)
31{	
32	if (scroll == 0) {
33		scrollbar = 'no';
34	} else {
35		scrollbar = 'yes';
36	}
37
38	var top = (screen.availHeight-height)/2;
39	var left = (screen.availWidth-width)/2;
40
41	goatwin = window.open(url, '', "status=0,height="+height+",width="+width+",top="+top+",left="+left+",location=0,resizeable=0,fullscreen=0, scrollbars=auto",true);
42
43	return goatwin;
44}
45
46function newSaWindow(url, width, height, scroll)
47{	
48	if (scroll == 0) {
49		scrollbar = 'no';
50	} else {
51		scrollbar = 'yes';
52	}
53
54	var top = (screen.availHeight-height)/2;
55	var left = (screen.availWidth-width)/2;
56
57	goatwin = window.open(url, '', "status=0,height="+height+",width="+width+",top="+top+",left="+left+",location=0, scrollbars="+scrollbar,true);
58}
59
60function showModal (pageUrl, title, dialogWidth, dialogHeight, debug )
61{
62	var oDialogInfo = new Object();
63	oDialogInfo.Title = title;
64	oDialogInfo.Page = pageUrl;
65	oDialogInfo.Editor = window;
66
67	if (window.showModalDialog && debug != 1) {
68		win = window.showModalDialog( 'editor/dialog.html', oDialogInfo, "dialogWidth:" + dialogWidth + "px;dialogHeight:" + dialogHeight + "px;center:yes;help:no;scroll:no;status:no") ;
69	} else {
70		win = window.open(pageUrl , '','width='+dialogWidth+', height='+dialogHeight+', scrollbars=0');
71	}
72}
73
74function pr(pole) {
75	var text = '';
76	for (var key in pole) {
77		text += key + ' => ' + pole[key] + "<br>";
78	}
79	document.getElementById('jsprint').innerHTML += text;
80} 
81
82function setMyCookie(name, value, valid) {
83	var today = new Date();
84	var expire = new Date();
85
86	expire.setTime(today.getTime() + 3600000*24*valid);
87	document.cookie = name+"="+escape(value)+";expires="+expire.toGMTString()+"; path=/";
88}
89
90function readCookie(name)	{
91	var nameEQ = name + "=";
92	var ca = document.cookie.split(';');
93	for(var i=0;i < ca.length;i++)
94	{
95		var c = ca[i];
96		while (c.charAt(0)==' ') c = c.substring(1,c.length);
97		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
98	}
99	return null;
100}
101
102function redirectToUrl(url) {
103	window.location.replace(url);
104
105	return false;
106}
107
108function setStyleProperty(id, property, value) {
109	var elem = document.getElementById(id);
110	if (elem != null) {
111		var cmd = "elem.style."+property+" = '" + value + "';";
112		eval(cmd);
113	}
114}
115
116function myConfirm(text, elem) {
117	var answer = confirm(text);
118	if (answer)	{
119		window.location.replace(elem.href);
120	} else {
121		return false;
122	}
123}
124
125function nw (elem, width, height, scroll) {
126	if (elem == undefined) { return false; }
127	if (scroll == 0) {
128		scrollbar = 'no';
129	} else {
130		scrollbar = 'auto';
131	}
132
133	var url = elem.href;
134	var top = (screen.availHeight-height)/2;
135	var left = (screen.availWidth-width)/2;
136
137	goatwin = window.open(url, '', "status=0,height="+height+",width="+width+",top="+top+",left="+left+",location=0,resizeable=0,fullscreen=0, scrollbars=auto",true);
138}
139
140function myNW(myLink) {
141	var pref  = document.URL.replace(/([^\/]+)$/g, "");
142	var url = myLink.href;
143	url = url.slice(pref.length);
144	var pos = url.indexOf('http');
145	if (pos == -1) { url = 'http://' + url; }
146	window.open(url, '_blank', "",true);
147}
148
149function isString() {
150	if (typeof arguments[0] == 'string') return true;
151	if (typeof arguments[0] == 'object') {  
152		var criterion = arguments[0].constructor.toString().match(/string/i); 
153 		return (criterion != null);  
154	}
155	return false;
156}
157
158
159function showImageDetail(detailSrc) {
160	if (detailSrc.length > 0) {
161		var today = new Date();
162		var imgId = '';
163		var verId = '';
164		var imgIdArr = detailSrc.match(/\/([0-9]+)v/);
165		var verIdArr = detailSrc.match(/\/[0-9]+v([0-9]+)_/);
166		imgId = imgIdArr[1];
167		verId = verIdArr[1];
168		newSaWindow('/image.php?id='+today.getTime()+';id_image='+imgId+';id_version='+verId+';src='+detailSrc, 800, 600, 1);
169	}	
170}
171
172function showOriginalDetail(imgId, verId) {
173	newSaWindow('/image.php?id='+today.getTime()+';orig=1;id_image='+imgId+';id_version='+verId+';src='+detailSrc, 800, 600, 0);
174}
175
176function xDef(){
177	for(var i=0; i<arguments.length; ++i){
178		if(typeof(arguments[i])=='undefined') return false;
179	}
180	return true;
181}
182
183function xClientHeight()	{
184	var h=0;
185	if(xOp6Dn) { 
186		h=window.innerHeight;
187	} else if (document.compatMode == 'CSS1Compat' && !window.opera && document.documentElement && document.documentElement.clientHeight) {
188		h=document.documentElement.clientHeight;
189	} else if (document.body && document.body.clientHeight) {
190		h=document.body.clientHeight;
191	} else if (xDef(window.innerWidth,window.innerHeight,document.width)) {
192		h=window.innerHeight;
193		if(document.width>window.innerWidth) h-=16;
194	}
195
196	return h;
197}
198
199function xClientWidth(){
200	var w=0;
201	if(xOp6Dn) w=window.innerWidth;
202	else if(document.compatMode == 'CSS1Compat' && !window.opera && document.documentElement && document.documentElement.clientWidth)w=document.documentElement.clientWidth;
203	else if(document.body && document.body.clientWidth)w=document.body.clientWidth;
204	else if(xDef(window.innerWidth,window.innerHeight,document.height)) {
205		w=window.innerWidth;
206		if(document.height>window.innerHeight) w-=16;
207	}
208	return w;
209}
210
211function xScrollTop(){
212	var offset=0;
213	var w = window;
214	if(w.document.documentElement && w.document.documentElement.scrollTop) offset=w.document.documentElement.scrollTop;
215	else if(w.document.body && xDef(w.document.body.scrollTop)) offset=w.document.body.scrollTop;
216	return offset;
217}
218
219function xScrollLeft(){
220	var offset=0;
221	var w = window;
222	if(w.document.documentElement && w.document.documentElement.scrollLeft) offset=w.document.documentElement.scrollLeft;
223	else if(w.document.body && xDef(w.document.body.scrollLeft)) offset=w.document.body.scrollLeft;
224	return offset;
225}

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.