PageSourceSearch

https://www.qth.spb.ru/modules/coppermine/scripts.js

js qth.spb.ru collected 2026-10-09 21:33:48 UTC 6,470 bytes, 225 lines download raw bytes

1function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {
2// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
3// version 3.0.4
4// var bg = "/images/image.jpg"; added by goldentroll.com
5	if (bgcolor=="") {
6		bgcolor="#FFFFFF";
7	}
8	var adj=10
9	var w = screen.width;
10	var h = screen.height;
11	var byFactor=1;
12	var bg = "";
13	if(w<740){
14	  var lift=0.90;
15	}
16	if(w>=740 & w<835){
17	  var lift=0.91;
18	}
19	if(w>=835){
20	  var lift=0.93;
21	}
22	if (imageWidth>w){	
23	  byFactor = w / imageWidth;			
24	  imageWidth = w;
25	  imageHeight = imageHeight * byFactor;
26	}
27	if (imageHeight>h-adj){
28	  byFactor = h / imageHeight;
29	  imageWidth = (imageWidth * byFactor);
30	  imageHeight = h; 
31	}
32	var scrWidth = w-adj;
33	var scrHeight = (h*lift)-adj;
34	if (imageHeight>scrHeight){
35  	  imageHeight=imageHeight*lift;
36	  imageWidth=imageWidth*lift;
37	}
38	var posLeft=0;
39	var posTop=0;
40	if (hugger == "hug image"){
41	  if (hugMargin == ""){
42	    hugMargin = 0;
43	  }
44	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
45	  if (scrHeightTemp < scrHeight) {
46		scrHeight = scrHeightTemp;
47	  } 
48	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
49	  if (scrWidthTemp < scrWidth) {
50		scrWidth = scrWidthTemp;
51	  }
52	  if (scrHeight<100){scrHeight=100;}
53	  if (scrWidth<100){scrWidth=100;}
54	  posTop =  ((h-(scrHeight/lift)-adj)/2);
55	  posLeft = ((w-(scrWidth)-adj)/2);
56 	}
57	if (imageHeight> (h*lift)-adj || imageWidth> w-adj){
58		imageHeight=imageHeight-adj;
59		imageWidth=imageWidth-adj;
60	}
61	posTop = parseInt(posTop);
62	posLeft = parseInt(posLeft);		
63	scrWidth = parseInt(scrWidth); 
64	scrHeight = parseInt(scrHeight);
65	var agt=navigator.userAgent.toLowerCase();
66	if (agt.indexOf("opera") != -1){
67	  var args= new Array();
68	  args[0]='parent';
69	  args[1]=imageName;
70	  var i ; document.MM_returnValue = false;
71	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
72	} else {
73	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
74	newWindow.document.open();
75	newWindow.document.write('<html>' + '<META HTTP-EQUIV\="imagetoolbar" CONTENT\="no"><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' background='+bg+' onBlur="self.close()" onClick="self.close()"');  
76	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+'><tr><td>');
77	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Click screen to close">'); 
78	newWindow.document.write('</td></tr></table></body></html>');
79	newWindow.document.close();
80	newWindow.focus();
81	document.MM_returnValue = false;
82	}
83}
84//FrameBuster
85     if (self != top) top.location.replace(self.location);
86
87function WindowTools(rsz,axs,amount,offset,loop,diag,xwin,maxwin,gf,mwx,mwy)
88{	// Neonix Window Tools ver 1.4.0 - www.neonix.net/nwt.mv
89	if (gf == '1'){
90		self.focus();
91	}
92	if (rsz.length != '1'){
93		var rszArray = rsz.split('X');
94		self.resizeTo(rszArray[1],rszArray[0]);
95	}
96	if (maxwin == '1'){
97		self.moveTo(0,0);
98		self.resizeTo(screen.availWidth,screen.availHeight);
99	}
100	if (mwx && mwy){
101		window.moveTo(mwx,mwy);
102	}
103	if (axs == '0'){
104		for (i=0;i<loop;i++){
105			window.resizeBy('0',amount);
106			window.moveBy('0',offset);	 
107		}
108	}
109	else if (axs == '1'){
110		for (i=0;i<loop;i++){
111			window.resizeBy(amount,'0');
112			window.moveBy(offset,'0');	 
113		}
114	}
115	else if (axs == '2'){
116		if (diag == '1' && offset.indexOf('-') == '0'){
117			var v = offset; var h = - offset;
118		}
119		else if (diag == '1' && offset.indexOf('-') == '-1'){
120			var v = offset; var h = - offset;
121		}
122		else {
123			var v = offset; var h = offset;
124		}
125		for (i=0;i<loop;i++){
126			window.resizeBy(amount,amount);
127			window.moveBy(v,h);
128		}		  
129	}
130    if (xwin == '1'){
131		window.close();
132	}
133}
134
135function MM_openBrWindow(theURL,winName,features) { //v2.0
136  window.open(theURL,winName,features);
137}
138
139function writeCookie(name, data, noDays){
140  var cookieStr = name + "="+ data
141  if (writeCookie.arguments.length > 2){
142    cookieStr += "; expires=" + getCookieExpireDate(noDays)
143    }
144  document.cookie = cookieStr
145}
146
147function readCookie(cookieName){
148   var searchName = cookieName + "="
149   var cookies = document.cookie
150   var start = cookies.indexOf(cookieName)
151   if (start == -1){ // cookie not found
152     return ""
153     }
154   start += searchName.length //start of the cookie data
155   var end = cookies.indexOf(";", start)
156   if (end == -1){
157     end = cookies.length
158     }
159   return cookies.substring(start, end)
160}
161
162function blocking(nr, cookie, vis_state)
163{
164	if (document.layers)
165	{
166		current = (document.layers[nr].display == 'none') ? vis_state : 'none';
167		if (cookie != '')
168			writeCookie(nr, current);
169		document.layers[nr].display = current;
170	}
171	else if (document.all)
172	{
173		current = (document.all[nr].style.display == 'none') ? vis_state : 'none';
174		if (cookie != '')
175			writeCookie(nr, current);
176		document.all[nr].style.display = current;
177	}
178	else if (document.getElementById)
179	{
180		display = (document.getElementById(nr).style.display == 'none') ? vis_state : 'none';
181		if (cookie != '')
182			writeCookie(nr, display);
183		document.getElementById(nr).style.display = display;
184	}
185}
186
187
188function adjust_popup()
189{
190	var w, h, fixedW, fixedH, diffW, diffH;
191	
192	if (document.all) {
193		fixedW = document.body.clientWidth;
194		fixedH = document.body.clientHeight;
195		window.resizeTo(fixedW, fixedH);
196		diffW = fixedW - document.body.clientWidth;
197		diffH = fixedH - document.body.clientHeight;
198	} else {
199		fixedW = window.innerWidth;
200		fixedH = window.innerHeight;
201		window.resizeTo(fixedW, fixedH);
202		diffW = fixedW - window.innerWidth;
203		diffH = fixedH - window.innerHeight;
204	}
205	w = fixedW + diffW;
206	h = fixedH + diffH;
207	if (h >= screen.availHeight) w += 16;
208	if (w >= screen.availWidth)  h += 16;
209	w = Math.min(w,screen.availWidth);
210	h = Math.min(h,screen.availHeight);
211	window.resizeTo(w,h);
212	window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
213}
214function addBookmark(title,url) {
215	if (window.sidebar) {
216		alert('This feature works for Internet Explorer only use Control+D to bookmark the next page');
217		return true;
218	} else if( document.all ) {	
219		window.external.AddFavorite( url, title);
220		return false;
221	} else if( window.opera && window.print ) {
222		alert('This feature works for Internet Explorer only use Control+T to bookmark the next page');
223		return true;
224	}
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.