PageSourceSearch

https://506thfightergroup.org/PluginLab/Scripts/PL_Layer.js

js 506thfightergroup.org collected 2026-10-02 14:17:16 UTC 21,444 bytes, 691 lines download raw bytes

1// Layer script v2.2.0.5
2// Copyright (C) 2002-2007 Pluginlab Limited. All rights reserved.
3// http://www.pluginlab.com
4// Registered to: rgrant
5
6function PL_Layer(idScr,url,w,h,pos,x,y,Bst,Bw,Bc,Bcmo,Bgc,Op,Acl,Rsz,Drg,SB,TB,TBpos,TBa,TBw,TBh,TBc,TBcmo,TBb,TBbc,TBbcmo,TBi,TBst,TBIc,TBIcmo,TBIb,TBIbmo,TBIn,TBInmo,TBIa,TBIp,Crot,Opm,Opd,Ops,Opb,Clm,Cld,Cls,zInd,idLayer)
7{
8	function _PLLW_setPathAdjustment(ID)
9	{
10		var sl = ''
11		var sc = document.getElementsByTagName('script')
12		for (var i=0; i<sc.length; i++) {
13			if (sc[i].innerHTML.search(ID)>-1) {sl = sc[i].src; break;}
14		}
15		_PLLW_SCRIPT_LOCATION = sl.substr(0, sl.lastIndexOf('/')+1)
16	}
17	function _PLLW_adjustPath(path)
18	{
19		if (path.charAt(0) != '*') return path
20		return _PLLW_SCRIPT_LOCATION + path.substr(1)
21	}
22	
23	if (idScr) _PLLW_setPathAdjustment(idScr)
24	var d = document
25	if (!d.PL_rszID) d.PL_rszID = ""
26	var url = _PLLW_adjustPath(url)
27
28	var ind=(new Date()).getTime()
29	var nav = navigator.userAgent
30	var L = null
31	if (idLayer) L = d.getElementById(idLayer)
32	if (!L) {
33		L = d.createElement("DIV")
34		d.body.appendChild(L)
35		L.Mac = nav.indexOf('Mac') >= 0
36		L.Saf = nav.indexOf('Safari') >= 0
37		L.IE  = d.all && !L.Mac && nav.toLowerCase().indexOf('opera') < 0
38		L.NS  = nav.toLowerCase().indexOf('netscape') >= 0
39		L.Fox = nav.toLowerCase().indexOf('firefox') >= 0
40		L.style.position = 'absolute'
41		L.style.left = '-10000px'
42		L.style.top = 0
43		L.id = idLayer ? idLayer : "_PLLW" + ind
44	}
45	var compatMode = (L.IE || L.Fox) && d.compatMode=="CSS1Compat"
46	var IECanvas = compatMode?d.documentElement:d.body
47	var db = compatMode?d:d.body
48
49	if (w < 10) w = 10
50	if (h < 10) h = 10
51	if (Ops < 1) Ops = 1
52
53	// Content rotation
54	var ContentNodes = new Array()
55	var Node
56	if ((url && url != "#") || !Crot) {
57		Node = new Object()
58		Node.iType = 0
59		Node.sUrlUrl = url
60		ContentNodes[ContentNodes.length] = Node
61	}
62	if (Crot != "") {
63		Crot = Crot.split(",")
64		for (var i=0;i<Crot.length;i+=5) {
65			Node = new Object()
66			Node.iType = parseInt(Crot[i])
67			Node.sImageUrl = _PLLW_adjustPath(Crot[i+1])
68			Node.sUrlUrl = _PLLW_adjustPath(Crot[i+2])
69			Node.sFlashFile = _PLLW_adjustPath(Crot[i+3])
70			Node.sImageFile = _PLLW_adjustPath(Crot[i+4])
71			ContentNodes[ContentNodes.length] = Node
72		}
73	}
74	if (!TB || !(TBIb || TBIn)) {	// auto rotate
75		L.iContent = GetIdx()		// L.iContent is used in GetNextContent
76		L.iContent = GetNextContent()
77	}
78	else {
79		L.iContent = 0
80	}
81	// Get iframe src
82	var strSrc = GetContentUrl(L.iContent)
83	SaveIdx(L.iContent)
84
85	// Layer
86	L.dw = 2*Bw
87	L.dh = 2*Bw
88	var Ls = L.style
89	Ls.zIndex = zInd
90	L.align = 'center'
91	L.mainMouseUp = L.mainMouseDown = L.mainSelStart = -1
92	L.openMethod = Opm
93	L.closeMethod = Clm
94	L.closeIt = closeLayer
95	if (Acl > 0) setTimeout("var d=document,o=d.getElementById('"+L.id+"');if(o)o.closeIt()",Acl*1000)
96
97	// Layer layout
98	var strBody = ""
99	+ "<TABLE cellpadding=0 cellspacing=0>"
100	var strContent = ""
101	+ "<TR><TD><DIV style="
102	+ "'border-style:" + Bst
103	+ ";border-width:" + Bw + "px"
104	+ ";border-color:" + Bc
105	+ ";background-color:" + (Bgc?Bgc:"transparent") + "'"
106	+ " onmouseover=\"this.style.borderColor='" + Bcmo + "'\""
107	+ " onmouseout=\"this.style.borderColor='" + Bc + "'\">"
108	+ "<IFRAME id='PL_LayerFrame" + ind + "' src='" + strSrc + "' style='width:100%' frameborder=0 SCROLLING='" + (SB?"yes":"no") + "'></IFRAME>"
109	+ "</DIV></TD></TR>"
110	if (TB) {
111		var strTB = "<TR><TD align='" + (TBa==0?'left':TBa==1?'right':'center') + "' valign='middle'>"
112		strTB += "<DIV id='PL_LayerTB" + ind + "' align='" + (TBIa==0?'left':TBIa==1?'right':'center') + "'>"
113		var strImg = ""
114		var strImgStl = "style='cursor:pointer;margin:" + TBIp + "px'"
115		if (TBIb) strImg += "<IMG id='PL_LayerImgIb"+ind+"' src='"+_PLLW_adjustPath(TBIb)+"' "+strImgStl+">"
116		if (TBIn) strImg += "<IMG id='PL_LayerImgIn"+ind+"' src='"+_PLLW_adjustPath(TBIn)+"' "+strImgStl+">"
117		if (TBIc) strImg += "<IMG id='PL_LayerImgIc"+ind+"' src='"+_PLLW_adjustPath(TBIc)+"' "+strImgStl+">"
118		strTB += strImg + "</DIV></TD>
118</TR>"
119
120		if (TBpos) L.innerHTML = strBody + strContent + strTB + "</TABLE>"
121		else L.innerHTML = strBody + strTB + strContent + "</TABLE>"
122		var TBdiv = d.getElementById("PL_LayerTB"+ind)
123		L.tb = TBdiv
124		L.k = TBw/w
125		var ts = TBdiv.style
126		ts.width  = TBw+(d.all&&!compatMode?Bw*2:0)+"px"
127		ts.height = TBh+"px"
128		L.dh += TBh
129
130		TBdiv.onmouseover = function() {var o=this;if(o.TBbcmo)o.style.borderColor=o.TBbcmo;if(o.TBcmo)o.style.backgroundColor=o.TBcmo}
131		TBdiv.onmouseout  = function() {var o=this;if(o.TBbc)o.style.borderColor=o.TBbc;if(o.TBc)o.style.backgroundColor=o.TBc}
132		var imgTB = d.getElementById("PL_LayerImgIb"+ind)
133		if (imgTB) {
134			imgTB.imn = imgTB.src
135			imgTB.immo = _PLLW_adjustPath(TBIbmo)
136			setRollover(imgTB)
137			imgTB.onclick = rotateBack
138		}
139		imgTB = d.getElementById("PL_LayerImgIn"+ind)
140		if (imgTB) {
141			imgTB.imn = imgTB.src
142			imgTB.immo = _PLLW_adjustPath(TBInmo)
143			setRollover(imgTB)
144			imgTB.onclick = rotateNext
145		}
146		imgTB = d.getElementById("PL_LayerImgIc"+ind)
147		if (imgTB) {
148			imgTB.imn = imgTB.src
149			imgTB.immo = _PLLW_adjustPath(TBIcmo)
150			setRollover(imgTB)
151			imgTB.onclick = function(){this.Ldiv.closeIt()}
152			imgTB.Ldiv = L
153		}
154		ts.borderWidth=0
155		if (TBb) {
156			ts.borderStyle = Bst
157			ts.borderWidth = Bw+"px"
158			ts.borderColor = TBdiv.TBbc = TBbc
159			TBdiv.TBbcmo   = TBbcmo
160			L.dh += (TBst+1)*Bw
161		} else ts.borderStyle  = "none"
162		if (TBpos) {
163			ts.borderTopStyle = 'none'
164			if (TBst) ts.borderBottomWidth = 2 * parseInt(ts.borderBottomWidth)
165		} else {
166			ts.borderBottomStyle = 'none'
167			if (TBst) ts.borderTopWidth = 2 * parseInt(ts.borderTopWidth)
168		}
169		if (TBi) {
170			ts.backgroundImage = "url("+_PLLW_adjustPath(TBi)+")"
171		} else {
172			ts.backgroundColor = TBdiv.TBc = TBc
173			TBdiv.TBcmo        = TBcmo
174		}
175	}
176	else {
177		L.innerHTML = strBody + strContent + "</TABLE>"
178	}
179
180	L.I = d.getElementById("PL_LayerFrame"+ind)
181	if(L.I)L.Is = L.I.style
182	L.w = w + L.dw
183	L.h = h + L.dh
184	d.onselectstart = function(){return false}
185
186	// Resize / Drag events
187	if (Rsz || Drg) {
188		if (!d.PL_LWs) {
189			d.PL_LWs = new Array()
190			d.mainMouseMove = db.onmousemove
191			db.onmousemove = function(evt) {
192				d.cur = "default"
193				if (d.mainMouseMove) d.mainMouseMove(evt)
194				for (var i=0;i<d.PL_LWs.length;i++)
195				if (d.PL_LWs[i].thisMouseMove(evt)) break
196				IECanvas.style.cursor = d.cur
197			}
198
199			d.mainMouseUp = db.onmouseup
200			db.onmouseup = function(evt) {
201				if (d.mainMouseUp) d.mainMouseUp(evt)
202				for (var i=0;i<d.PL_LWs.length;i++)
203				d.PL_LWs[i].on_mouseup(evt)
204				showAllIFrames(true)
205			}
206
207			d.mainMouseDown = db.onmousedown
208			db.onmousedown = function(evt) {
209				if (d.mainMouseDown) d.mainMouseDown(evt)
210				for (var i=d.PL_LWs.length-1;i>=0;i--) {
211					if (d.PL_LWs[i].on_mousedown(evt)) {
212						showAllIFrames(false)
213						break
214					}
215				}
216			}
217
218			d.mainMouseOut = db.onmouseout
219			db.onmouseout = function(evt) {
220				if (d.all) evt=event
221				if ((evt.clientX < 0) || (evt.clientY < 0))
222				if (db.onmouseup) db.onmouseup(evt)
223			}
224		}
225		L.Act = new Array("w+=dx;h+=dy","w-=dx;h-=dy;x+=dx;y+=dy","w+=dx;h-=dy;y+=dy","w-=dx;h+=dy;x+=dx","w+=dx","w-=dx;x+=dx","h-=dy;y+=dy","h+=dy")
226		L.Cur = new Array("default","se-resize","nw-resize","ne-resize","sw-resize","e-resize","w-resize","n-resize","s-resize")
227		function thisMouseMove(evt) {
228			var RetVal = false
229			if (d.PL_anim) return
230			if (d.all) evt=event
231			var dt=3
232			var cx = evt.clientX+IECanvas.scrollLeft, cy = evt.clientY+IECanvas.scrollTop, ds = d.body.style
233			L.drg = Drg && ((cy >= y) && (cy <= y+L.h)) && ((cx >= x) && (cx <= x+L.w))
234			L.rsz = 0
235			if (Rsz && (!L.resize && ((d.PL_rszID == "") || (d.PL_rszID == L.id)))) {
236				if ((cy >= y) && (cy <= y+L.h)) {
237					if ((cx > x-dt) && (cx < x+Bw+dt)) {
238						if (cy < y+Bw+dt) L.rsz = 2
239						else if (cy > y+L.h-Bw-dt) L.rsz = 4
240						else L.rsz = 6
241					} else if ((cx > x+L.w-Bw-dt) && (cx < x+L.w+dt)) {
242						if (cy < y+dt) L.rsz = 3
243						else if (cy > y+L.h-Bw-dt) L.rsz = 1
244						else L.rsz = 5
245					}
246				}
247				if ((cx >= x) && (cx <= x+L.w)) {
248					if ((cy < y+Bw+dt) && (cy > y-dt)) {
249						if (cx < x+Bw+dt) L.rsz = 2
250						else if (cx > x+L.w-Bw-dt) L.rsz = 3
251						else L.rsz = 7
252					} else if ((cy > y+L.h-Bw-dt) && (cy < y+L.h+dt)) {
253						if (cx < x+Bw+dt) L.rsz = 4
254						else if (cx > x+L.w-Bw-dt) L.rsz = 1
255						else L.rsz = 8
256					}
257				}
258				d.PL_rszID = L.rsz>0?L.id:""
259			}
260			if (!TB && Drg && L.rsz==7 ) {
261				L.drg = 1
262				L.rsz = 0
263			}
264			if (L.drag) { d.cur = "move"; RetVal = true }
265			else if (L.resize) { d.cur = L.Cur[L.resize]; RetVal = true }
266			else if (L.rsz) d.cur = L.Cur[L.rsz]
267			else if (L.drg) d.cur = "move"
268			L.on_mousemove(evt)
269			return RetVal
270		}
271		L.thisMouseMove = thisMouseMove
272		d.PL_LWs[d.PL_LWs.length] = L
273		L.iMM = d.PL_LWs.length-1
274	}
275
276	// Set size and position
277	var cw = window.innerWidth?innerWidth:IECanvas.clientWidth
278	var ch = window.innerHeight?innerHeight:IECanvas.clientHeight
279	var sl = d.all?IECanvas.scrollLeft:window.pageXOffset 
280	var st = d.all?IECanvas.scrollTop:window.pageYOffset
281	switch (pos) {
282	case 0:
283		x = (cw - L.w) * 0.5 + sl
284		y = (ch - L.h) * 0.5 + st
285		break
286	case 1:
287		x = (cw - L.w) * Math.random() + sl
288		y = (ch - L.h) * Math.random() + st
289		break
290	}
291	if (pos<2) {
292		if (x<0) x=0
293		if (y<0) y=0
294	}
295
296	// Set event handlers
297	L.resize = L.drag = 0
298	L.on_mousedown = function(evt) {
299		if (d.all) evt=event
300		if (L.rsz!=0) {
301			L.resize=L.rsz 
302			L.mx=evt.clientX
303			L.my=evt.clientY
304			return true
305		}
306		if (L.drg){
307			L.drag=1
308			L.mx=evt.clientX-L.offsetLeft
309			L.my=evt.clientY-L.offsetTop
310			return true
311		}
312		return false
313	}
314	L.on_mousemove = function(evt) {
315		if (d.all) evt=event
316		if (Rsz && L.resize) { 
317			var dx=evt.clientX-L.mx, dy=evt.clientY-L.my
318			var r = L.resize
319			if (r==2||r==3||r==7) if (dy>L.h-20) dy=L.h-20; else L.my=evt.clientY
320			if (r==1||r==4||r==8) if (dy<20-L.h) dy=20-L.h; else L.my=evt.clientY
321			if (r==2||r==4||r==6) if (dx>L.w-20) dx=L.w-20; else L.mx=evt.clientX
322			if (r==1||r==3||r==5) if (dx<20-L.w) dx=20-L.w; else L.mx=evt.clientX
323			eval(L.Act[L.resize-1])
324		}
325		if (Drg && L.drag) {
326			x=evt.clientX-L.mx
327			y=evt.clientY-L.my
328		}
329		setWHXY(1)
330	}
331	L.on_mouseup = function() {	L.resize=L.drag=0 }
332	function showAllIFrames(bShow) {
333		if (!d.PL_LWs) return
334		for (var i=0;i<d.PL_LWs.length;i++) d.PL_LWs[i].Is.visibility=bShow?"":"hidden"
335	}
336	function GetIdx() {
337		var idx,aCookie = d.cookie.split("; ")
338		for (var i=0; i < aCookie.length; i++) {
339			var aCrumb = aCookie[i].split("=")
340			if (escape(url)+"_PLLW_ContIdx" == aCrumb[0]) idx = parseInt(unescape(aCrumb[1]))
341		}
342		if (isNaN(idx)) idx = -1
343		return idx
344	}
345	function SaveIdx(idx) {	d.cookie = escape(url)+"_PLLW_ContIdx="+idx	}
346	function SetContentUrl(j) {
347		var src = GetContentUrl(j)
348		if (src) L.I.src = src
349		SaveIdx(L.iContent = j)
350	}
351	function GetContentUrl(j) {
352		if ((j < 0)||(j >= ContentNodes.length)) return ''
353		var src = ''
354		var n = ContentNodes[j]
355		switch (n.iType)
356		{
357		case 0:
358			src = n.sUrlUrl
359			break
360		case 1:
361			var bIsURL = n.sImageUrl != ""
362			src = "javascript:document.write(\"<html><body style=\\\"padding:0;margin:0;background-color:"+(Bgc?Bgc:"transparent")+"\\\"><table cellpadding=0 cellspacing=0 width=100% height=100% ><tr><td align=center valign=middle>"+(bIsURL?"<a href=\\\""+n.sImageUrl+"\\\" target=\\\"_self\\\"><img style=\\\"cursor:pointer;cursor:hand;\\\"":"<img")+" src=\\\""+n.sImageFile+"\\\" border=0>"+(bIsURL?"</a>":"")+"</td></tr></table></body></html>\");document.close()"
363			break
364		case 2:
365			src = n.sFlashFile
366			break
367		}
368		return src
369	}
370	function GetNextContent() {	return (L.iContent<ContentNodes.length-1)?L.iContent+1:0 }
371	function GetPrevContent() {	return (L.iContent>0)?L.iContent-1:ContentNodes.length-1 }
372	function setRollover(i) {
373		i.onmouseover = function(e) {this.parentNode.onmouseover();if(this.immo)this.src=this.immo;this.cancelBubbles(e)}
374		i.onmouseout = function(e) {this.src=this.imn;this.cancelBubbles(e)}
375		i.onmousemove = function(e) {this.cancelBubbles(e)}
376		i.onmousedown = function(e) {this.cancelBubbles(e);return false}
377		i.cancelBubbles = function(e) {if(d.all)e=event;e.cancelBubble=true}
378	}
379	function rotateBack() {	SetContentUrl(GetPrevContent())	}
380	function rotateNext() {	SetContentUrl(GetNextContent())	}
381	openLayer()
382	// Open/Close & Animation
383	function Zoom(dir) {
384	var wh0=10, N=30
385	Ls.dw=(w-wh0)/N; Ls.dh=(h-wh0)/N
386	L.TBw= TBw; L.Bw= Bw
387	switch(dir) {
388	case "in":
389		L.speed = Ops
390		L.JScond = "(w<"+w+")||(h<"+h+")"
391		L.JSaction = "y-=l.dh;x-=l.dw;if(w<"+w+"){w+=2*l.dw};if(h<"+h+")h+=2*l.dh;setWHXY(1)"
392		x += (w-wh0) * 0.5;  y += (h-wh0) * 0.5;  w = h = wh0
393		setWHXY(1)
394		break
395	case "out": 
396		if(!d.all && !L.Mac && L.tb)L.tb.style.display='none'
397		L.speed = Cls
398		L.JScond = "(w>2*l.dw)&&(w>2*l.dh)"
399		L.JSaction = "y+=l.dh;x+=l.dw;if(w>2*l.dw){w-=2*l.dw};if(h>2*l.dh)h-=2*l.dh;setWHXY(1)"
400		L.removeIt = removeLayer
401		break
402	}
403	L.doZoom = function() {
404		d.PL_anim = true
405		var l=this.style,i=this.I.style,t=this.tb?this.tb.style:null,k=this.k
406		if (eval(this.JScond)) {
407			eval(this.JSaction)
408			setTimeout("var o=document.getElementById('"+this.id+"');if(o)o.doZoom()",600/(1+this.speed))
409		} else {
410			if (this.removeIt) this.removeIt()
411			else if(t) t.width = (parseInt(t.width)+L.Bw*2)+"px"
412			d.PL_anim = false
413			cleanupAnim()
414			setWHXY(1)}
415		}
416		L.doZoom()
417	}
418	function prepAnim(opn) {
419	if(d.all && !L.IE) showAllIFrames(false)
420	if(opn)
421		L.speed = Ops
422	else {
423		L.speed = Cls
424		L.removeIt = removeLayer  }
425		L.b = 0
426		L.JSaction="style.clip='rect"
427	}
428	function Bounce(dir) {
429		var l = L.style, step=40
430		l.jumps = false
431		L.Ops = Ops
432		l.y = y
433		l.x = x
434		switch(dir) {
435		case 1:
436			l.top = (st+ch)+"px"
437			L.JScond = "parseInt(l.top)>l.y"
438			L.JSmove = "l.top=(parseInt(l.top)-"+step+")+'px'"
439			L.JSjump = "l.top=(l.y+n)+'px';"
440			break
441		case 0:
442			l.top = (st-h)+"px"
443			L.JScond = "parseInt(l.top)<l.y"
444			L.JSmove = "l.top=(parseInt(l.top)+"+step+")+'px'"
445			L.JSjump = "l.top=(l.y-n)+'px';"
446			break
447		case 2:
448			l.left = (sl-w)+"px"
449			L.JScond = "parseInt(l.left)<l.x"
450			L.JSmove = "l.left=(parseInt(l.left)+"+step+")+'px'"
451			L.JSjump = "l.left=(l.x-n)+'px';"
452			break
453		case 3:
454			l.left = (sl+cw)+"px"
455			L.JScond = "parseInt(l.left)>l.x"
456			L.JSmove = "l.left=(parseInt(l.left)-"+step+")+'px'"
457			L.JSjump = "l.left=(l.x+n)+'px';"
458			break
459		}
460		L.doBounce = function (n) {
461			d.PL_anim = true
462			var l = this.style
463			if ((!l.jumps)&&(eval(this.JScond))) {
464				eval(this.JSmove)
465			}
466			else {
467				l.jumps = true
468				eval(this.JSjump)
469				if (n<0) n+=3; else n-=3
470				n *= -1
471			}
472			if (n) setTimeout("var o=document.getElementById('"+this.id+"');if(o)o.doBounce("+n+")",800/(1+this.Ops))
473			else {d.PL_anim = false;setWHXY();cleanupAnim()}
474		}
475		L.doBounce(Opb*6)
476	}
477	function playAnim(dly) {
478		d.PL_anim = true
479		L.animate = function() {
480			with(this){
481				eval(JSaction)
482				if (eval(JScond)) {
483					setTimeout("var o=document.getElementById('"+this.id+"');if(o)o.animate()",dly)
484				}
485				else {
486					if (this.removeIt) this.removeIt()
487					else {
488						cleanupAnim();setWHXY()
489						if(d.all && !L.IE) showAllIFrames(true)
490					}
491					d.PL_anim=false
492				}
493			}
494		}
495		L.animate()
496	}
497	function cleanupAnim() {
498		Ls.clip = L.IE?"rect(0px auto auto 0px)":(L.Saf?"":"auto")
499		if (Op < 100) {
500			Ls.filter="alpha(opacity="+Op+")"
501			Ls.MozOpacity = Op / 100
502		} else {
503			if(Ls.filter) Ls.filter=""
504		}
505	}
506	function Fade(dir) {
507		switch(dir) {
508		case "in":
509			L.Op = 0
510			L.speed = Ops
511			L.JScond = "this.Op<="+Op
512			L.step = 5
513			break
514		case "out":
515			L.Op = Op
516			L.speed = Cls
517			L.JScond = "this.Op>0"
518			L.step = -5
519			L.removeIt = removeLayer
520			break
521		}
522		L.JSaction = "this.style.filter=\"alpha(opacity=\"+this.Op+\")\";this.style.MozOpacity=(this.Op<100)?this.Op/100:0.99; this.Op+=this.step;"
523		playAnim(500/(1+L.speed))
524	}
525	function Slide(opn,dir) {
526		prepAnim(opn)
527		switch(dir) {
528		case 1:
529			L.JScond = "b<h"
530			if (opn) L.JSaction+= "(0px auto '+b+'px 0px)';style.top = (y + h - b)+'px'"
531			else     L.JSaction+= "('+b+'px auto auto 0px)';style.top = (y - b)+'px'"
532			break
533		case 0:
534			L.JScond = "b<h"
535			if (opn) L.JSaction+= "('+(h-b)+'px auto auto 0px)';style.top = (y - h + b)+'px'"
536			else     L.JSaction+= "(0px auto '+(h-b)+'px 0px)';style.top = (y + b)+'px'"
537			break
538		case 3:
539			L.JScond = "b<w"
540			if (opn) L.JSaction+= "(0px '+b+'px auto 0px)';style.left = (x + w - b)+'px'"
541			else     L.JSaction+= "(0px auto auto '+b+'px)';style.left = (x - b)+'px'"
542			break
543		case 2:
544			L.JScond = "b<w"
545			if (opn) L.JSaction+= "(0px auto auto '+(w-b)+'px)';style.left = (x - w + b)+'px'"
546			else     L.JSaction+= "(0px '+(w-b)+'px auto 0px)';style.left = (x + b)+'px'"
547			break
548		}
549		L.JSaction += ";b += speed;"
550		playAnim(10)
551	}
552	function Roll(opn,dir) {
553		if (L.Saf) {
554			if(!opn) removeLayer()
555			return
556		}
557		prepAnim(opn)
558		switch(dir) {
559		case 2:
560			L.JScond = "b<w"
561			if (opn) L.JSaction+= "(0px '+b+'px auto 0px)'"
562			else     L.JSaction+= "(0px auto auto '+b+'px)'"
563			break
564		case 3:
565			L.JScond = "b<w"
566			if (opn) L.JSaction+= "(0px auto auto '+(w-b)+'px)'"
567			else     L.JSaction+= "(0px '+(w-b)+'px auto 0px)'"
568			break
569		case 0:
570			L.JScond = "b<h"
571			if (opn) L.JSaction+= "(0px auto '+b+'px 0px)'"
572			else     L.JSaction+= "('+b+'px auto auto 0px)'"
573			break
574		case 1:
575			L.JScond = "b<h"
576			if (opn) L.JSaction+= "('+(h-b)+'px auto auto 0px)'"
577			else     L.JSaction+= "(0px auto '+(h-b)+'px 0px)'"
578			break
579		}
580		L.JSaction = "b += speed;" + L.JSaction
581		if(L.NS) L.JSaction += ";style.top=(y+1)+'px';style.top=y+'px'"
582		playAnim(10)
583	}
584	function Stretch(opn,dir) {
585		if (L.Saf) {
586			if(!opn) removeLayer()
587			return
588		}
589		prepAnim(opn)
590		var rect,matrix
591		L.JSaction = "b+=speed;"
592		switch(dir) {
593		case 1:
594		case 0:
595			rect="0px auto '+b+'px 0px"
596			matrix="M22='+b/h+'"
597			if (opn) {L.b = 0;L.JScond = "b<h";L.JSaction+="if(b>h)b=h;"}
598			else     {L.b = h;L.JScond = "b>0";L.JSaction+="if(b<0)b=0;";L.speed = -L.speed}
599			if ((opn&&dir==1)||(!opn&&dir==0)) L.JSaction+= "style.top=(y+h-b)+'px';"
600			break
601		case 2:
602		case 3:
603			rect="0px '+b+'px auto 0px"
604			matrix="M11='+b/w+'"
605			if (opn) {L.b = 0;L.JScond = "b<w";L.JSaction+="if(b>w)b=w;"}
606			else     {L.b = w;L.JScond = "b>0";L.JSaction+="if(b<0)b=0;";L.speed = -L.speed}
607			if ((opn&&dir==3)||(!opn&&dir==2)) L.JSaction+="style.left=(x+w-b)+'px';"
608			break
609		}
610		L.JSaction+= "style.clip='rect("+rect+")';style.filter='progid:DXImageTransform.Microsoft.Matrix("+matrix+")'"
611		if(L.NS) L.JSaction += ";style.top=(y+1)+'px';style.top=y+'px'"
612		playAnim(20)
613	}
614	function MSFilter(opn,fltr) {
615		var spd = opn?Ops:Cls
616		L.style.filter = 'progid:DXImageTransform.Microsoft.'+fltr+'(duration='+7/spd+')'
617		if (L.filters) L.filters[0].apply()
618		if (!opn) {
619			L.onfilterchange = removeLayer
620			Ls.visibility = "hidden"
621		} else L.onfilterchange = function(){this.onfilterchange = ''}
622		if(L.filters) L.filters[0].play()
623		else L.onfilterchange()
624	}
625	function setWHXY(b) {
626		L.Is.width  = w+"px"; L.w = w + L.dw; Ls.width  = L.w+"px"
627		L.Is.height = h+"px"; L.h = h + L.dh; Ls.height = L.h+"px"
628		L.x = x; Ls.left = x+"px"
629		L.y = y; Ls.top  = y+"px"
630		if (b && L.tb) {
631			TBw = w*L.k
632			L.tb.style.width = TBw+(d.all&&!compatMode?Bw*2:0)+"px"
633		}
634	}
635	function CheckCompatibility(method) {
636		if (d.all && !L.IE && method == 1) return 0
637		if (ContentNodes[L.iContent].iType == 2) {
638			var sDisabled = d.all ? ",1,3," : ",1,3,4,5,6,"
639			if (sDisabled.indexOf(","+method+",") >= 0)
640			return 0 // use snap instead
641		}
642		return method
643	}
644	function openLayer() {
645		Ls.display = "none"
646		setWHXY()
647		switch(CheckCompatibility(Opm)) {
648			case 0: cleanupAnim();break
649			case 1: Fade("in");break
650			case 2: Zoom("in");break
651			case 3: MSFilter(true,"RandomDissolve");break
652			case 4: Stretch(true,Opd);break
653			case 5: Slide(true,Opd);break
654			case 6: Roll(true,Opd);break
655			case 7: Bounce(Opd);break
656		}
657		Ls.display = ""
658	}
659	function closeLayer() {
660		switch(CheckCompatibility(this.closeMethod)) {
661			case 1: Fade("out");break
662			case 2: Zoom("out");break
663			case 3: MSFilter(false,"RandomDissolve");break
664			case 4: Stretch(false,Cld);break
665			case 5: Slide(false,Cld);break
666			case 6: Roll(false,Cld);break
667			default: removeLayer(); break
668		}
669	}
670	function removeLayer() {
671		if (!L.destroyed) {
672			L.destroyed = true
673			if (Rsz) {
674				IECanvas.style.cursor="default"
675				d.PL_rszID = ""
676				for (var i=L.iMM;i<d.PL_LWs.length-1;i++) {
677					d.PL_LWs[i] = d.PL_LWs[i+1]
678					d.PL_LWs[i].iMM--
679				}
680				if (L.iMM < d.PL_LWs.length) d.PL_LWs.length--
681			}
682			if(L.I)L.I.style.display='none'
683			L.style.display='none'
684			d.body.removeChild(L)
685		}
686	}
687 }
688function PL_LayerClose(idLayer) {
689	var layer = document.getElementById(idLayer)
690	if (layer) layer.closeIt()
691}

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.