PageSourceSearch

http://intotext.com/p7vscroller/p7vscscripts.js

js intotext.com collected 2026-10-05 20:01:15 UTC 16,404 bytes, 828 lines download raw bytes

1
2/* 
3
4  ================================================
5  PVII Scroll Magic scripts
6  Copyright (c) 2007 Project Seven Development
7  www.projectseven.com
8  Version:  1.0.4 - script build: 1-22
9  ================================================
10  
11 */
12
13var p7VSCi=false,p7VSCctl=[],p7vscobj,p7vscofY,p7vscuA=navigator.userAgent.toLowerCase();
14function P7_setVSC(){
15	var h;
16	if(!document.getElementById){
17		return;
18	}
19	h='\n<st'+'yle type="text/css">\n';
20	h+='.p7VSC_scrollbox {overflow:hidden;}\n';
21	h+='.p7VSC_scrolling {position:absolute;}\n';
22	h+='.p7VSCdragchannel, .p7VSCtoolbar{display: block !important;}\n';
23	h+='</s'+'tyle>';
24	document.write(h);
25}
26function P7_VSCaddLoad(){
27	if(!document.getElementById){
28		return;
29	}
30	if(window.addEventListener){
31		window.addEventListener("load",P7_initVSC,false);
32	}
33	else if(window.attachEvent){
34		window.attachEvent("onload",P7_initVSC);
35	}
36	else if(typeof window.onload=='function'){
37		var p7vloadit=onload;
38		window.onload=function(){
39			p7vloadit();
40			P7_initVSC();
41		};
42	}
43	else{
44		window.onload=P7_initVSC;
45	}
46	p7VSCi=true;
47}
48P7_setVSC();
49function P7_opVSC(){
50	var h='',hh,b,cn;
51	if(!document.getElementById){
52		return;
53	}
54	p7VSCctl[p7VSCctl.length]=arguments;
55	hh=arguments[6];
56	b=arguments[0];
57	cn=b.replace("b","cn");
58	h='\n<st'+'yle type="text/css">\n';
59	h+='#'+b+'{height:'+hh+'px;}\n';
60	h+='#'+cn+'{height:'+hh+'px;}\n';
61	h+='</s'+'tyle>';
62	document.write(h);
63	if(!p7VSCi){
64		P7_VSCaddLoad();
65	}
66}
67function P7_initVSC(){
68	var i,j,tB,d,sD,t,oh,dB,pp,dD,h,sf;
69	for(i=0;i<p7VSCctl.length;i++){
70		tB=document.getElementById(p7VSCctl[i][0]);
71		if(tB){
72			tB.p7opt=p7VSCctl[i];
73			tB.p7acdv='';
74			tB.p7dragbar=false;
75			tB.p7resume='no';
76			tB.p7status='none';
77			tB.p7box=tB.id;
78			d=tB.id.replace('b','d')+'_c'+tB.p7opt[8];
79			sD=document.getElementById(d);
80			if(sD){
81				t=tB.p7opt[9];
82				sD.style.top=t+'px';
83				tB.p7acdv=d;
84				if(t<tB.offsetHeight*-1){
85					tB.p7dir='down';
86				}
87				else{
88					tB.p7dir='up';
89				}
90				oh=tB.p7opt[6];
91				d=tB.id.replace("b","dc");
92				dB=document.getElementById(d);
93				if(dB){
94					pp=dB.parentNode.childNodes;
95					for(j=0;j<pp.length;j++){
96						if(pp[j].nodeName=='DIV'&&pp[j]!=dB){
97							h=pp[j].offsetHeight;
98							if(!h||h===0){
99								if(p7vscuA.indexOf("applewebkit")>-1){
100									sf=P7_fixSafDB(tB);
101								}
102								h=parseInt(P7_getPropValue(pp[j].getElementsByTagName("A")[0],'height','height'),10);
103							}
104							h=(h>0)?h:0;
105							oh-=h;
106						}
107					}
108					dB.style.height=oh+"px";
109					if(sf){
110						sf.style.display="none";
111					}
112				}
113				if(tB.p7opt[7]==1){
114					tB.onmouseover=function(){
115						if(this.p7status=='moving'){
116							this.p7resume='yes';
117						}
118						P7_VSCpause(this,1);
119					};
120					tB.onmouseout=function(){
121						if(this.p7resume=='yes'){
122							P7_VSCplay(this,1);
123						}
124					};
125				}
126				dD=getBoxChild(tB.id,"a",true);
127				if(dD){
128					dD.p7status='show';
129					dD.onclick=function(){
130						return P7_VSCshowall(this);
131					};
132				}
133				dD=getBoxChild(tB.id,"db",true);
134				dD=getBoxChild(tB.id,"dc",true);
135				if(dD){
136					dDa=dD.getElementsByTagName("A")[0];
137					tB.p7dragbar=d;
138					tB.p7dragbar=d;
139					if(tB.p7opt[14]===1){
140						dDa.removeAttribute("href");
141					}
142					else{
143						dDa.onmousedown=P7_VSCeng;
144						dDa.onkeydown=P7_VSCkey;
145						dDa.onkeyup=P7_VSCkeyup;
146						dD.onmousedown=P7_VSCeng;
147					}
148					P7VSCsetDrag(tB);
149				}
150				dD=getBoxChild(tB.id,"du",true);
151				if(dD){
152					dD.onmousedown=function(){
153						P7_VSCmoveUp(this);
154					};
155					dD.onmouseup=function(){
156						P7_VSCpause(this);
157					};
158					dD.onkeydown=P7_VSCkey;
159					dD.onkeyup=P7_VSCkeyup;
160				}
161				dD=getBoxChild(tB.id,"dd",true);
162				if(dD){
163					dD.onmousedown=function(){
164						P7_VSCmoveDown(this);
165					};
166					dD.onmouseup=function(){
167						P7_VSCpause(this);
168					};
169					dD.onkeydown=P7_VSCkey;
170					dD.onkeyup=P7_VSCkeyup;
171				}
172				dD=getBoxChild(tB.id,"bu",true);
173				if(dD){
174					dD.onmousedown=function(){
175						P7_VSCmoveUp(this);
176					};
177					dD.onkeydown=P7_VSCkey;
178					if(tB.p7opt[3]<3){
179						dD.onmouseup=function(){
180							P7_VSCpause(this);
181						};
182						dD.onkeyup=P7_VSCkeyup;
183					}
184				}
185				dD=getBoxChild(tB.id,"bd",true);
186				if(dD){
187					dD.onmousedown=function(){
188						P7_VSCmoveDown(this);
189					};
190					dD.onkeydown=P7_VSCkey;
191					if(tB.p7opt[3]<3){
192						dD.onmouseup=function(){
193							P7_VSCpause(this);
194						};
195						dD.onkeyup=P7_VSCkeyup;
196					}
197				}
198				dD=getBoxChild(tB.id,"bpp",true);
199				if(dD){
200					dD.onmousedown=function(){
201						P7_VSCpp(this);
202					};
203					dD.onkeydown=P7_VSCppkey;
204				}
205				tB.accum=0;
206				tB.autostarting=false;
207				tB.p7vscMode='manual';
208				if(tB.p7opt[10]==1){
209					tB.p7vscMode='auto';
210					tB.p7status='moving';
211					tB.p7VSCtimer=setTimeout("P7_VSCplay('"+tB.id+"')",tB.p7opt[11]);
212				}
213			}
214		}
215	}
216	P7_VSCaddEvts();
217}
218function getBoxChild(bx,rp,fl){
219	var d,ret;
220	d=bx.replace("b",rp);
221	ret=document.getElementById(d);
222	if(ret&&fl){
223		ret.p7box=bx;
224	}
225	return ret;
226}
227function P7_VSCaddEvts(){
228	if(window.addEventListener){
229		document.addEventListener("mousemove",P7_VSCdrg,false);
230		document.addEventListener("mouseup",P7_VSCrel,false);
231		document.addEventListener("DOMMouseScroll",P7_VSCwheel,false);
232		if(window.opera || p7vscuA.indexOf("applewebkit")>-1){
233			document.addEventListener("mousewheel",P7_VSCwheel,false);
234		}
235	}
236	else if(window.attachEvent){
237		document.attachEvent("onmousemove",P7_VSCdrg);
238		document.attachEvent("onmouseup",P7_VSCrel);
239		document.attachEvent("onmousewheel",P7_VSCwheel);
240	}
241	else{
242		document.onmousemove=P7_VSCdrg;
243		document.onmouseup=P7_VSCrel;
244	}
245}
246function P7_VSCshowall(a){
247	var b,tB,tD,tC,tT,mv;
248	b=a.p7box;
249	tB=document.getElementById(b);
250	tD=document.getElementById(tB.p7acdv);
251	tC=getBoxChild(tB.id,"cn");
252	tT=getBoxChild(tB.id,"tb");
253	mv=tB.p7status;
254	if(a.p7status=="show"){
255		P7_VSCpause(b);
256		tB.p7restore=mv;
257		a.p7status="restore";
258		a.innerHTML="Restore Scroller";
259		a.setAttribute("title","Restore Scroller");
260		tB.style.height="auto";
261		tD.style.position="static";
262		if(tC){
263			tC.style.visibility="hidden";
264		}
265		if(tT){
266			tT.style.visibility="hidden";
267		}
268	}
269	else{
270		a.p7status="show";
271		a.innerHTML="Show All";
272		a.setAttribute("title","Show All Scroller Content");
273		tB.style.height=tB.p7opt[6]+"px";
274		tD.style.position="absolute";
275		if(tC){
276			tC.style.visibility="visible";
277		}
278		if(tT){
279			tT.style.visibility="visible";
280		}
281		if(tB.p7restore=='moving'){
282			P7_VSCplay(tB);
283		}
284	}
285	return false;
286}
287function P7_VSCplay(b,ov){
288	var tB,tS,t,ct,bh,sh,dy;
289	if(typeof(b)=='object'){
290		b=b.p7box;
291	}
292	tB=document.getElementById(b);
293	tB.p7vscMode='auto';
294	P7_VSCpause(b,ov);
295	tS=document.getElementById(tB.p7acdv);
296	bh=tB.offsetHeight;
297	sh=tS.offsetHeight;
298	t=bh-sh;
299	dy=tB.p7opt[2];
300	if(t>=0){
301		return;
302	}
303	ct=parseInt(tS.style.top,10);
304	if(ct==t){
305		if(tB.p7opt[3]===0 || tB.p7opt[3]==3){
306			ct=0;
307			P7_VSCmoveTo(tB.p7box,ct);
308			dy=(tB.p7opt[3]==3)?tB.p7opt[13]:1000;
309		}
310	}
311	t=(tB.p7dir=='up')?t:0;
312	if(tB.p7opt[3]==2){
313		t=t-bh;
314		if(ct<t){
315			ct=bh;
316		}
317		else if(ct>bh){
318			ct=bh;
319		}
320		tS.style.top=ct+"px";
321		tB.p7dir='up';
322	}
323	if(tB.p7opt[3]>2){
324		var m=true;
325		var x=tB.p7opt[12];
326		while (m){
327			if(ct>x){
328				m=false;
329				if(tB.p7dir=='up'){
330					tB.accum=(x+tB.p7opt[12])-ct;
331				}
332				else{
333					tB.accum=ct - x;
334				}
335			}
336			if(x<=(tB.offsetHeight-tS.offsetHeight)){
337				m=false;
338			}
339			x-=tB.p7opt[12];
340		}
341	}
342	P7_VSCspp(b,'play');
343	if(tB.p7VSCtimer){
344		clearTimeout(tB.p7VSCtimer);
345	}
346	tB.p7VSCtimer=setTimeout("P7_VSCscroll('"+tB.id+"',"+ct+","+t+","+false+")",dy);
347}
348function P7_VSCpp(b){
349	var a,cl;
350	if(typeof(b)=='object'){
351		b=b.p7box;
352	}
353	a=getBoxChild(b,"bpp");
354	cl=a.className;
355	if(a.className=='pause'){
356		a.className='play';
357		P7_VSCpause(b);
358	}
359	else{
360		a.className='pause';
361		P7_VSCplay(b);
362	}
363}
364function P7_VSCspp(b,m){
365	var a=getBoxChild(b,"bpp");
366	if(a&&a.className&&a.className==m){
367		a.className=(m=='play')?'pause':'play';
368	}
369}
370function P7_VSCpause(b,ov){
371	if(typeof(b)=='object'){
372		b=b.p7box;
373	}
374	var dB=document.getElementById(b);
375	if(dB.p7VSCtimer){
376		clearTimeout(dB.p7VSCtimer);
377		dB.p7status='stopped';
378	}
379	if(ov!=1){
380		dB.p7resume='no';
381	}
382	P7_VSCspp(b,'pause');
383}
384function P7_VSCctrl(op,b,y){
385	if(op=='pause'){
386		P7_VSCpause(b);
387	}
388	else if(op=='play'){
389		P7_VSCplay(b);
390	}
391	else if(op=='scrollUp'){
392		P7_VSCmoveUp(b);
393	}
394	else if(op=='scrollDown'){
395		P7_VSCmoveDown(b);
396	}
397	else if(op=='panelUp'){
398		P7_VSCmoveBy(b,'up');
399	}
400	else if(op=='panelDown'){
401		P7_VSCmoveBy(b,'down');
402	}
403	else if(y&&op=='moveBy'){
404		P7_VSCmoveBy(b,y);
405	}
406	else if(y&&op=='goTo'){
407		P7_VSCmoveTo(b,y);
408	}
409	else if(op=='goToElement'){
410		P7_VSCmovetoId(b);
411	}
412}
413function P7_VSCmovetoId(d){
414	var tB,tS,ct,tD,pp,tt,y=0,m=false,bx;
415	pp=document.getElementById(d);
416	while(pp){
417		y+=pp.offsetTop;
418		if(pp.className&&pp.className=='p7VSC_scrolling'){
419			m=true;
420			break;
421		}
422		pp=pp.offsetParent;
423	}
424	if(m){
425		tB=pp.parentNode;
426		tS=document.getElementById(tB.p7acdv);
427		ct=parseInt(tS.style.top,10);
428		tt=ct-y;
429		P7_VSCmoveTo(tB.id,tt);
430	}
431}
432function P7_VSCwheel(evt){
433	var g,m=false,r=true,delta=0,s,tS;
434	evt=(evt)?evt:event;
435	g=(evt.target)?evt.target:evt.srcElement;
436	while(g){
437		if(g.id&&g.id.indexOf("p7VSCb_")>-1){
438			m=true;
439			break;
440		}
441		g=g.parentNode;
442	}
443	if(m){
444		tS=document.getElementById(g.p7acdv);
445		if(tS.offsetHeight>g.offsetHeight){
446			r=false;
447			if(evt.wheelDelta){
448				delta=evt.wheelDelta/120;
449				if(window.opera&&parseFloat(navigator.appVersion)<9.20){
450					delta=delta*-1;
451				}
452			}
453			else if(evt.detail){
454				delta= -evt.detail/3;
455			}
456			s=delta*16;
457			P7_VSCmoveBy(g.id,s);
458			if(evt.preventDefault){
459				evt.preventDefault();
460			}
461		}
462	}
463	return r;
464}
465function P7_VSCmoveBy(b,y){
466	var tS,t,tB,rr;
467	tB=document.getElementById(b);
468	if(tB.p7status!="stopped"){
469		P7_VSCpause(b);
470	}
471	tS=document.getElementById(tB.p7acdv);
472	rr=tB.offsetHeight-tS.offsetHeight;
473	if(rr>=0){
474		return;
475	}
476	if(y=='down'){
477		y=tB.offsetHeight*-1;
478	}
479	if(y=='up'){
480		y=tB.offsetHeight;
481	}
482	if(rr<0){
483		t=parseInt(tS.style.top,10);
484		t+=y;
485		t=(t<=rr)?rr:t;
486		t=(t>=0)?0:t;
487		tS.style.top=t+"px";
488		if(tB.p7dragbar){
489			P7VSCsetDrag(tB);
490		}
491	}
492}
493function P7_VSCmoveTo(b,y){
494	var tB,tS,rr,t;
495	P7_VSCpause(b);
496	tB=document.getElementById(b);
497	tS=document.getElementById(tB.p7acdv);
498	rr=tB.offsetHeight-tS.offsetHeight;
499	if(rr>=0){
500		return;
501	}
502	if(y=='start'){
503		y=0;
504	}
505	else if(y=='end'){
506		y=rr;
507	}
508	if(rr<0){
509		t=parseInt(tS.style.top,10);
510		y=(y<=rr)?rr:y;
511		y=(y>=0)?0:y;
512		tS.style.top=y+"px";
513		if(tB.p7dragbar){
514			P7VSCsetDrag(tB);
515		}
516	}
517}
518function P7_VSCmoveUp(b){
519	var tS,t,tB,fl=1,a;
520	if(typeof(b)=='object'){
521		a=b;
522		b=b.p7box;
523	}
524	P7_VSCpause(b);
525	tB=document.getElementById(b);
526	tS=document.getElementById(tB.p7acdv);
527	if(tS.offsetHeight<=tB.offsetHeight){
528		return;
529	}
530	if(tB.p7opt[3]>2){
531		if(a&&a.id&&a.id.indexOf("p7VSCbu_")>-1){
532			fl=2;
533		}
534	}
535	P7_VSCscroll(tB.id,parseInt(tS.style.top,10),0,fl);
536}
537function P7_VSCmoveDown(b){
538	var tS,t,tB,fl=1,a;
539	P7_VSCpause(b);
540	if(typeof(b)=='object'){
541		a=b;
542		b=b.p7box;
543	}
544	tB=document.getElementById(b);
545	tS=document.getElementById(tB.p7acdv);
546	t=tB.offsetHeight-tS.offsetHeight;
547	if(t>=0){
548		return;
549	}
550	if(tB.p7opt[3]>2){
551		if(a&&a.id&&a.id.indexOf("p7VSCbd_")>-1){
552			fl=2;
553		}
554	}
555	P7_VSCscroll(tB.id,parseInt(tS.style.top,10),t,fl);
556}
557function P7_VSCscroll(b,ct,tt,dd){
558	var fr,dy,dB,dD,nt,dr,r,m=true,op;
559	if(!dd){
560		dd=false;
561	}
562	dB=document.getElementById(b);
563	dD=document.getElementById(dB.p7acdv);
564	dB.p7status='moving';
565	op=dB.p7opt[3];
566	r=dB.offsetHeight-dD.offsetHeight;
567	if(r>=0){
568		return;
569	}
570	if(!dd){
571		fr=dB.p7opt[1];
572		dy=dB.p7opt[2];
573	}
574	else{
575		fr=dB.p7opt[4];
576		dy=dB.p7opt[5];
577	}
578	if(tt!==0){
579		if(op>2&&dd!==1){
580			dB.accum+=fr;
581			if(dB.accum>=dB.p7opt[12]){
582				fr-=dB.accum-dB.p7opt[12];
583				dB.accum=0;
584				m=false;
585			}
586		}
587		ct-=fr;
588		if(ct<=tt){
589			ct=tt;
590			m=false;
591		}
592	}
593	else{
594		if(dd!=1&&op>2){
595			dB.accum+=fr;
596			if(dB.accum>=dB.p7opt[12]){
597				fr-=dB.accum-dB.p7opt[12];
598				dB.accum=0;
599				m=false;
600			}
601		}
602		ct+=fr;
603		if(ct>=tt){
604			ct=tt;
605			m=false;
606		}
607	}
608	dD.style.top=ct+"px";
609	if(dB.p7dragbar){
610		P7VSCsetDrag(dB);
611	}
612	if(!m&&dd!==1){
613		if(op>2){
614			dB.accum=0;
615			dy=dB.p7opt[13];
616			if(dd!==2){
617				if(ct!==0&&ct!=r){
618					m=true;
619				}
620			}
621			if(op==4 && (ct===0||ct==r)){
622				op=1;
623			}
624		}
625		if(op==1){
626			tt=(ct===0)?r:0;
627			dB.p7dir=(tt===0)?'down':'up';
628			if(dd!==2){
629				m=true;
630			}
631		}
632		else if(op==2){
633			ct=dB.offsetHeight;
634			dB.p7dir='up';
635			m=true;
636		}
637	}
638	if(m){
639		dB.p7VSCtimer=setTimeout("P7_VSCscroll('"+b+"',"+ct+","+tt+","+dd+")",dy);
640	}
641	else{
642		dB.p7status='stopped';
643		P7_VSCpause(dB.p7box);
644	}
645}
646function P7_VSCkey(evt){
647	var tg,m=true;
648	evt=(evt)?evt:event;
649	tg=(evt.target)?evt.target:evt.srcElement;
650	if(tg&&tg.p7box){
651		if(evt.keyCode==38){
652			P7_VSCmoveUp(tg.p7box);
653			m=false;
654		}
655		else if(evt.keyCode==40){
656			P7_VSCmoveDown(tg.p7box);
657			m=false;
658		}
659		else if(evt.keyCode==33||evt.keyCode==37||(evt.keyCode==32&&evt.shiftKey)){
660			P7_VSCmoveBy(tg.p7box,'up');
661			m=false;
662		}
663		else if(evt.keyCode==34||evt.keyCode==39||evt.keyCode==32){
664			P7_VSCmoveBy(tg.p7box,'down');
665			m=false;
666		}
667		else if(evt.keyCode==36){
668			P7_VSCmoveTo(tg.p7box,'start');
669			m=false;
670		}
671		else if(evt.keyCode==35){
672			P7_VSCmoveTo(tg.p7box,'end');
673			m=false;
674		}
675		if(!m){
676			if(evt.preventDefault){
677				evt.preventDefault();
678			}
679		}
680	}
681	return m;
682}
683function P7_VSCkeyup(evt){
684	evt=(evt)?evt:event;
685	tg=(evt.target)?evt.target:evt.srcElement;
686	if(tg&&tg.p7box){
687		if(evt.keyCode!=9&&evt.keyCode!=16){
688			P7_VSCpause(tg.p7box);
689		}
690	}
691}
692function P7_VSCppkey(evt){
693	var tg;
694	evt=(evt)?evt:event;
695	tg=(evt.target)?evt.target:evt.srcElement;
696	if(tg&&tg.p7box){
697		if(evt.keyCode==13){
698			P7_VSCpp(tg.p7box);
699		}
700	}
701}
702function P7_VSCeng(evt){
703	var tg,y,tD,g,ot=0,pp,yy,oh,m=true,dr;
704	evt=(evt)?evt:event;
705	p7vscobj=null;
706	tg=(evt.target)?evt.target:evt.srcElement;
707	g=tg.parentNode;
708	if(evt.clientY){
709		if(tg&&tg.id&&tg.id.indexOf('p7VSCdc_')>-1){
710			g=document.getElementById(tg.id.replace("dc","db"));
711			P7_VSCpause(g.p7box);
712			oh=tg.offsetHeight;
713			pp=tg;
714			while(pp){
715				ot+=pp.offsetTop;
716				pp=pp.offsetParent;
717			}
718			y=(evt.clientY+document.documentElement.scrollTop+document.body.scrollTop)-ot;
719			dr='down';
720			if(y<=g.offsetTop){
721				dr='up';
722			}
723			P7_VSCmoveBy(g.p7box,dr);
724			m=false;
725		}
726		else if(g&&g.id&&g.id.indexOf('p7VSCdb_')>-1){
727			p7vscobj=g;
728			P7_VSCpause(g.p7box);
729			y=(p7vscobj.offsetTop)?p7vscobj.offsetTop:0;
730			p7vscofY=evt.clientY-y;
731			m=false;
732		}
733	}
734	return m;
735}
736function P7_VSCdrg(evt){
737	evt=(evt)?evt:event;
738	var m=true;
739	if(p7vscobj){
740		if(evt.clientY){
741			P7_VSCshift(p7vscobj,(evt.clientY-p7vscofY));
742		}
743		evt.cancelBubble=true;
744		m=false;
745	}
746	return m;
747}
748function P7_VSCrel(){
749	if(p7vscobj){
750		p7vscobj=null;
751	}
752}
753function P7_VSCshift(obj,y){
754	var tC,d,b,bT,s,sT,bh,sh,p,yy,r,rr;
755	d=obj.id.replace("db","dc");
756	tC=document.getElementById(d);
757	b=obj.id.replace("db","b");
758	bT=document.getElementById(b);
759	r=tC.offsetHeight-obj.offsetHeight;
760	y=(y<=0)?0:y;
761	y=(y>=r)?r:y;
762	s=bT.p7acdv;
763	sT=document.getElementById(s);
764	rr=bT.offsetHeight-sT.offsetHeight;
765	if(rr>=0){
766		y=0;
767		rr=0;
768	}
769	p=y/r;
770	yy=parseInt(rr*p,10);
771	obj.style.top=y+"px";
772	sT.style.top=yy+"px";
773}
774function P7VSCsetDrag(sB){
775	var dC,s,dB,y,rr,r,p,sD;
776	if(sB.p7dragbar){
777		dC=document.getElementById(sB.p7dragbar);
778		s=dC.id.replace("dc","db");
779		dB=document.getElementById(s);
780		sD=document.getElementById(sB.p7acdv);
781		y=parseInt(sD.style.top,10);
782		rr=sB.offsetHeight-sD.offsetHeight;
783		r=dC.offsetHeight-dB.offsetHeight;
784		p=y/rr;
785		yy=parseInt(r*p,10);
786		yy=(yy<=0)?0:yy;
787		yy=(yy>=r)?r:yy;
788		if(!isNaN(yy)){
789			dB.style.top=yy+"px";
790		}
791	}
792}
793function P7_getPropValue(ob,prop,prop2){
794	var h,v=null;
795	if(ob){
796		if(ob.currentStyle){
797			v=eval('ob.currentStyle.'+prop);
798		}
799		else if(document.defaultView.getComputedStyle(ob,"")){
800			v=document.defaultView.getComputedStyle(ob,"").getPropertyValue(prop2);
801		}
802		else{
803			v=eval("ob.style."+prop);
804		}
805	}
806	return v;
807}
808function P7_fixSafDB(bx){
809	var s,d,pm=false;
810	s=bx.id.replace("b","");
811	pp=document.getElementById(s);
812	pp=pp.parentNode;
813	while(pp){
814		d=P7_getPropValue(pp,'display','display');
815		if(!d || d=='none'){
816			if(!pp.id || pp.id.indexOf("p7VSC")==-1){
817				pm=pp;
818				pp.style.display="block";
819				break;
820			}
821		}
822		if(pp.nodeName=='BODY'){
823			break;
824		}
825		pp=pp.parentNode;
826	}
827	return pm;
828}

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.