PageSourceSearch

http://abstractdynamics.org/overlib.js

js abstractdynamics.org collected 2026-10-02 06:04:21 UTC 43,544 bytes, 1,274 lines download raw bytes

1//\//////////////////////////////////////////////////////////////////////////////////
2//\  overLIB 3.51  --  This notice must remain untouched at all times.
3//\  Copyright Erik Bosrup 1998-2002. All rights reserved.
4//\
5//\  By Erik Bosrup ([email protected]).  Last modified 2002-11-01.
6//\  Portions by Dan Steinman (dansteinman.com). Additions by other people are
7//\  listed on the overLIB homepage.
8//\
9//\  Get the latest version at http://www.bosrup.com/web/overlib/
10//\
11//\  This script is published under an open source license. Please read the license
12//\  agreement online at: http://www.bosrup.com/web/overlib/license.html
13//\  If you have questions regarding the license please contact [email protected].
14//\
15//\  This script library was originally created for personal use. By request it has
16//\  later been made public. This is free software. Do not sell this as your own
17//\  work, or remove this copyright notice. For full details on copying or changing
18//\  this script please read the license agreement at the link above.
19//\
20//\  Please give credit on sites that use overLIB and submit changes of the script
21//\  so other people can use them as well. This script is free to use, don't abuse.
22//\//////////////////////////////////////////////////////////////////////////////////
23//\mini
24
25
26////////////////////////////////////////////////////////////////////////////////////
27// CONSTANTS
28// Don't touch these. :)
29////////////////////////////////////////////////////////////////////////////////////
30var INARRAY		=	1;
31var CAPARRAY		=	2;
32var STICKY		=	3;
33var BACKGROUND		=	4;
34var NOCLOSE		=	5;
35var CAPTION		=	6;
36var LEFT		=	7;
37var RIGHT		=	8;
38var CENTER		=	9;
39var OFFSETX		=	10;
40var OFFSETY		=	11;
41var FGCOLOR		=	12;
42var BGCOLOR		=	13;
43var TEXTCOLOR		=	14;
44var CAPCOLOR		=	15;
45var CLOSECOLOR		=	16;
46var WIDTH		=	17;
47var BORDER		=	18;
48var STATUS		=	19;
49var AUTOSTATUS		=	20;
50var AUTOSTATUSCAP	=	21;
51var HEIGHT		=	22;
52var CLOSETEXT		=	23;
53var SNAPX		=	24;
54var SNAPY		=	25;
55var FIXX		=	26;
56var FIXY		=	27;
57var FGBACKGROUND	=	28;
58var BGBACKGROUND	=	29;
59var PADX		=	30; // PADX2 out
60var PADY		=	31; // PADY2 out
61var FULLHTML		=	34;
62var ABOVE		=	35;
63var BELOW		=	36;
64var CAPICON		=	37;
65var TEXTFONT		=	38;
66var CAPTIONFONT		=	39;
67var CLOSEFONT		=	40;
68var TEXTSIZE		=	41;
69var CAPTIONSIZE		=	42;
70var CLOSESIZE		=	43;
71var FRAME		=	44;
72var TIMEOUT		=	45;
73var FUNCTION		=	46;
74var DELAY		=	47;
75var HAUTO		=	48;
76var VAUTO		=	49;
77var CLOSECLICK		=	50;
78var CSSOFF		=	51;
79var CSSSTYLE		=	52;
80var CSSCLASS		=	53;
81var FGCLASS		=	54;
82var BGCLASS		=	55;
83var TEXTFONTCLASS	=	56;
84var CAPTIONFONTCLASS	=	57;
85var CLOSEFONTCLASS	=	58;
86var PADUNIT		=	59;
87var HEIGHTUNIT		=	60;
88var WIDTHUNIT		=	61;
89var TEXTSIZEUNIT	=	62;
90var TEXTDECORATION	=	63;
91var TEXTSTYLE		=	64;
92var TEXTWEIGHT		=	65;
93var CAPTIONSIZEUNIT	=	66;
94var CAPTIONDECORATION	=	67;
95var CAPTIONSTYLE	=	68;
96var CAPTIONWEIGHT	=	69;
97var CLOSESIZEUNIT	=	70;
98var CLOSEDECORATION	=	71;
99var CLOSESTYLE		=	72;
100var CLOSEWEIGHT		=	73;
101
102
103////////////////////////////////////////////////////////////////////////////////////
104// DEFAULT CONFIGURATION
105// You don't have to change anything here if you don't want to. All of this can be
106// changed on your html page or through an overLIB call.
107////////////////////////////////////////////////////////////////////////////////////
108
109// Main background color (the large area)
110// Usually a bright color (white, yellow etc)
111if (typeof ol_fgcolor == 'undefined') { var ol_fgcolor = "#CCCCFF";}
112	
113// Border color and color of caption
114// Usually a dark color (black, brown etc)
115if (typeof ol_bgcolor == 'undefined') { var ol_bgcolor = "#333399";}
116	
117// Text color
118// Usually a dark color
119if (typeof ol_textcolor == 'undefined') { var ol_textcolor = "#000000";}
120	
121// Color of the caption text
122// Usually a bright color
123if (typeof ol_capcolor == 'undefined') { var ol_capcolor = "#FFFFFF";}
124	
125// Color of "Close" when using Sticky
126// Usually a semi-bright color
127if (typeof ol_closecolor == 'undefined') { var ol_closecolor = "#9999FF";}
128
129// Font face for the main text
130if (typeof ol_textfont == 'undefined') { var ol_textfont = "Verdana,Arial,Helvetica";}
131
132// Font face for the caption
133if (typeof ol_captionfont == 'undefined') { var ol_captionfont = "Verdana,Arial,Helvetica";}
134
135// Font face for the close text
136if (typeof ol_closefont == 'undefined') { var ol_closefont = "Verdana,Arial,Helvetica";}
137
138// Font size for the main text
139// When using CSS this will be very small.
140if (typeof ol_textsize == 'undefined') { var ol_textsize = "1";}
141
142// Font size for the caption
143// When using CSS this will be very small.
144if (typeof ol_captionsize == 'undefined') { var ol_captionsize = "1";}
145
146// Font size for the close text
147// When using CSS this will be very small.
148if (typeof ol_closesize == 'undefined') { var ol_closesize = "1";}
149
150// Width of the popups in pixels
151// 100-300 pixels is typical
152if (typeof ol_width == 'undefined') { var ol_width = "200";}
153
154// How thick the ol_border should be in pixels
155// 1-3 pixels is typical
156if (typeof ol_border == 'undefined') { var ol_border = "1";}
157
158// How many pixels to the right/left of the cursor to show the popup
159// Values between 3 and 12 are best
160if (typeof ol_offsetx == 'undefined') { var ol_offsetx = 10;}
161	
162// How many pixels to the below the cursor to show the popup
163// Values between 3 and 12 are best
164if (typeof ol_offsety == 'undefined') { var ol_offsety = 10;}
165
166// Default text for popups
167// Should you forget to pass something to overLIB this will be displayed.
168if (typeof ol_text == 'undefined') { var ol_text = "Default Text"; }
169
170// Default caption
171// You should leave this blank or you will have problems making non caps popups.
172if (typeof ol_cap == 'undefined') { var ol_cap = ""; }
173
174// Decides if sticky popups are default.
175// 0 for non, 1 for stickies.
176if (typeof ol_sticky == 'undefined') { var ol_sticky = 0; }
177
178// Default background image. Better left empty unless you always want one.
179if (typeof ol_background == 'undefined') { var ol_background = ""; }
180
181// Text for the closing sticky popups.
182// Normal is "Close".
183if (typeof ol_close == 'undefined') { var ol_close = "Close"; }
184
185// Default vertical alignment for popups.
186// It's best to leave RIGHT here. Other options are LEFT and CENTER.
187if (typeof ol_hpos == 'undefined') { var ol_hpos = RIGHT; }
188
189// Default status bar text when a popup is invoked.
190if (typeof ol_status == 'undefined') { var ol_status = ""; }
191
192// If the status bar automatically should load either text or caption.
193// 0=nothing, 1=text, 2=caption
194if (typeof ol_autostatus == 'undefined') { var ol_autostatus = 0; }
195
196// Default height for popup. Often best left alone.
197if (typeof ol_height == 'undefined') { var ol_height = -1; }
198
199// Horizontal grid spacing that popups will snap to.
200// 0 makes no grid, anything else will cause a snap to that grid spacing.
201if (typeof ol_snapx == 'undefined') { var ol_snapx = 0; }
202
203// Vertical grid spacing that popups will snap to.
204// 0 makes no grid, andthing else will cause a snap to that grid spacing.
205if (typeof ol_snapy == 'undefined') { var ol_snapy = 0; }
206
207// Sets the popups horizontal position to a fixed column.
208// Anything above -1 will cause fixed position.
209if (typeof ol_fixx == 'undefined') { var ol_fixx = -1; }
210
211// Sets the popups vertical position to a fixed row.
212// Anything above -1 will cause fixed position.
213if (typeof ol_fixy == 'undefined') { var ol_fixy = -1; }
214
215// Background image for the popups inside.
216if (typeof ol_fgbackground == 'undefined') { var ol_fgbackground = ""; }
217
218// Background image for the popups frame.
219if (typeof ol_bgbackground == 'undefined') { var ol_bgbackground = ""; }
220
221// How much horizontal left padding text should get by default when BACKGROUND is used.
222if (typeof ol_padxl == 'undefined') { var ol_padxl = 1; }
223
224// How much horizontal right padding text should get by default when BACKGROUND is used.
225if (typeof ol_padxr == 'undefined') { var ol_padxr = 1; }
226
227// How much vertical top padding text should get by default when BACKGROUND is used.
228if (typeof ol_padyt == 'undefined') { var ol_padyt = 1; }
229
230// How much vertical bottom padding text should get by default when BACKGROUND is used.
231if (typeof ol_padyb == 'undefined') { var ol_padyb = 1; }
232
233// If the user by default must supply all html for complete popup control.
234// Set to 1 to activate, 0 otherwise.
235if (typeof ol_fullhtml == 'undefined') { var ol_fullhtml = 0; }
236
237// Default vertical position of the popup. Default should normally be BELOW.
238// ABOVE only works when HEIGHT is defined.
239if (typeof ol_vpos == 'undefined') { var ol_vpos = BELOW; }
240
241// Default height of popup to use when placing the popup above the cursor.
242if (typeof ol_aboveheight == 'undefined') { var ol_aboveheight = 0; }
243
244// Default icon to place next to the popups caption.
245if (typeof ol_capicon == 'undefined') { var ol_capicon = ""; }
246
247// Default frame. We default to current frame if there is no frame defined.
248if (typeof ol_frame == 'undefined') { var ol_frame = self; }
249
250// Default timeout. By default there is no timeout.
251if (typeof ol_timeout == 'undefined') { var ol_timeout = 0; }
252
253// Default javascript funktion. By default there is none.
254if (typeof ol_function == 'undefined') { var ol_function = null; }
255
256// Default timeout. By default there is no timeout.
257if (typeof ol_delay == 'undefined') { var ol_delay = 0; }
258
259// If overLIB should decide the horizontal placement.
260if (typeof ol_hauto == 'undefined') { var ol_hauto = 0; }
261
262// If overLIB should decide the vertical placement.
263if (typeof ol_vauto == 'undefined') { var ol_vauto = 0; }
264
265
266
267// If the user has to click to close stickies.
268if (typeof ol_closeclick == 'undefined') { var ol_closeclick = 0; }
269
270// This variable determines if you want to use CSS or inline definitions.
271// CSSOFF=no CSS    CSSSTYLE=use CSS inline styles    CSSCLASS=use classes
272if (typeof ol_css == 'undefined') { var ol_css = CSSOFF; }
273
274// Main background class (eqv of fgcolor)
275// This is only used if CSS is set to use classes (ol_css = CSSCLASS)
276if (typeof ol_fgclass == 'undefined') { var ol_fgclass = ""; }
277
278// Frame background class (eqv of bgcolor)
279// This is only used if CSS is set to use classes (ol_css = CSSCLASS)
280if (typeof ol_bgclass == 'undefined') { var ol_bgclass = ""; }
281
282// Main font class
283// This is only used if CSS is set to use classes (ol_css = CSSCLASS)
284if (typeof ol_textfontclass == 'undefined') { var ol_textfontclass = ""; }
285
286// Caption font class
287// This is only used if CSS is set to use classes (ol_css = CSSCLASS)
288if (typeof ol_captionfontclass == 'undefined') { var ol_captionfontclass = ""; }
289
290// Close font class
291// This is only used if CSS is set to use classes (ol_css = CSSCLASS)
292if (typeof ol_closefontclass == 'undefined') { var ol_closefontclass = ""; }
293
294// Unit to be used for the text padding above
295// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
296// Options include "px", "%", "in", "cm"
297if (typeof ol_padunit == 'undefined') { var ol_padunit = "px";}
298
299// Unit to be used for height of popup
300// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
301// Options include "px", "%", "in", "cm"
302if (typeof ol_heightunit == 'undefined') { var ol_heightunit = "px";}
303
304// Unit to be used for width of popup
305// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
306// Options include "px", "%", "in", "cm"
307if (typeof ol_widthunit == 'undefined') { var ol_widthunit = "px";}
308
309// Font size unit for the main text
310// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
311if (typeof ol_textsizeunit == 'undefined') { var ol_textsizeunit = "px";}
312
313// Decoration of the main text ("none", "underline", "line-through" or "blink")
314// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
315if (typeof ol_textdecoration == 'undefined') { var ol_textdecoration = "none";}
316
317// Font style of the main text ("normal" or "italic")
318// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
319if (typeof ol_textstyle == 'undefined') { var ol_textstyle = "normal";}
320
321// Font weight of the main text ("normal", "bold", "bolder", "lighter", ect.)
322// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
323if (typeof ol_textweight == 'undefined') { var ol_textweight = "normal";}
324
325// Font size unit for the caption
326// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
327if (typeof ol_captionsizeunit == 'undefined') { var ol_captionsizeunit = "px";}
328
329// Decoration of the caption ("none", "underline", "line-through" or "blink")
330// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
331if (typeof ol_captiondecoration == 'undefined') { var ol_captiondecoration = "none";}
332
333// Font style of the caption ("normal" or "italic")
334// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
335if (typeof ol_captionstyle == 'undefined') { var ol_captionstyle = "normal";}
336
337// Font weight of the caption ("normal", "bold", "bolder", "lighter", ect.)
338// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
339if (typeof ol_captionweight == 'undefined') { var ol_captionweight = "bold";}
340
341// Font size unit for the close text
342// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
343if (typeof ol_closesizeunit == 'undefined') { var ol_closesizeunit = "px";}
344
345// Decoration of the close text ("none", "underline", "line-through" or "blink")
346// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
347if (typeof ol_closedecoration == 'undefined') { var ol_closedecoration = "none";}
348
349// Font style of the close text ("normal" or "italic")
350// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
351if (typeof ol_closestyle == 'undefined') { var ol_closestyle = "normal";}
352
353// Font weight of the close text ("normal", "bold", "bolder", "lighter", ect.)
354// Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
355if (typeof ol_closeweight == 'undefined') { var ol_closeweight = "normal";}
356
357
358
359////////////////////////////////////////////////////////////////////////////////////
360// ARRAY CONFIGURATION
361// You don't have to change anything here if you don't want to. The following
362// arrays can be filled with text and html if you don't wish to pass it from
363// your html page.
364////////////////////////////////////////////////////////////////////////////////////
365
366// Array with texts.
367if (typeof ol_texts == 'undefined') { var ol_texts = new Array("Text 0", "Text 1"); }
368
369// Array with captions.
370if (typeof ol_caps == 'undefined') { var ol_caps = new Array("Caption 0", "Caption 1"); }
371
372
373////////////////////////////////////////////////////////////////////////////////////
374// END CONFIGURATION
375// Don't change anything below this line, all configuration is above.
376////////////////////////////////////////////////////////////////////////////////////
377
378
379
380
381
382
383
384////////////////////////////////////////////////////////////////////////////////////
385// INIT
386////////////////////////////////////////////////////////////////////////////////////
387
388// Runtime variables init. Used for runtime only, don't change, not for config!
389var o3_text = "";
390var o3_cap = "";
391var o3_sticky = 0;
392var o3_background = "";
393var o3_close = "Close";
394var o3_hpos = RIGHT;
395var o3_offsetx = 2;
396var o3_offsety = 2;
397var o3_fgcolor = "";
398var o3_bgcolor = "";
399var o3_textcolor = "";
400var o3_capcolor = "";
401var o3_closecolor = "";
402var o3_width = 100;
403var o3_border = 1;
404var o3_status = "";
405var o3_autostatus = 0;
406var o3_height = -1;
407var o3_snapx = 0;
408var o3_snapy = 0;
409var o3_fixx = -1;
410var o3_fixy = -1;
411var o3_fgbackground = "";
412var o3_bgbackground = "";
413var o3_padxl = 0;
414var o3_padxr = 0;
415var o3_padyt = 0;
416var o3_padyb = 0;
417var o3_fullhtml = 0;
418var o3_vpos = BELOW;
419var o3_aboveheight = 0;
420var o3_capicon = "";
421var o3_textfont = "Verdana,Arial,Helvetica";
422var o3_captionfont = "Verdana,Arial,Helvetica";
423var o3_closefont = "Verdana,Arial,Helvetica";
424var o3_textsize = "1";
425var o3_captionsize = "1";
426var o3_closesize = "1";
427var o3_frame = self;
428var o3_timeout = 0;
429var o3_timerid = 0;
430var o3_allowmove = 0;
431var o3_function = null; 
432var o3_delay = 0;
433var o3_delayid = 0;
434var o3_hauto = 0;
435var o3_vauto = 0;
436var o3_closeclick = 0;
437
438var o3_css = CSSOFF;
439var o3_fgclass = "";
440var o3_bgclass = "";
441var o3_textfontclass = "";
442var o3_captionfontclass = "";
443var o3_closefontclass = "";
444var o3_padunit = "px";
445var o3_heightunit = "px";
446var o3_widthunit = "px";
447var o3_textsizeunit = "px";
448var o3_textdecoration = "";
449var o3_textstyle = "";
450var o3_textweight = "";
451var o3_captionsizeunit = "px";
452var o3_captiondecoration = "";
453var o3_captionstyle = "";
454var o3_captionweight = "";
455var o3_closesizeunit = "px";
456var o3_closedecoration = "";
457var o3_closestyle = "";
458var o3_closeweight = "";
459
460
461
462// Display state variables
463var o3_x = 0;
464var o3_y = 0;
465var o3_allow = 0;
466var o3_showingsticky = 0;
467var o3_removecounter = 0;
468
469// Our layer
470var over = null;
471var fnRef;
472
473// Decide browser version
474var ns4 = (navigator.appName == 'Netscape' && parseInt(navigator.appVersion) == 4);
475var ns6 = (document.getElementById)? true:false;
476var ie4 = (document.all)? true:false;
477if (ie4) var docRoot = 'document.body';
478var ie5 = false;
479if (ns4) {
480	var oW = window.innerWidth;
481	var oH = window.innerHeight;
482	window.onresize = function () {if (oW!=window.innerWidth||oH!=window.innerHeight) location.reload();}
483}
484
485
486// Microsoft Stupidity Check(tm).
487if (ie4) {
488	if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
489		if(document.compatMode && document.compatMode == 'CSS1Compat') docRoot = 'document.documentElement';
490		ie5 = true;
491	}
492	if (ns6) {
493		ns6 = false;
494	}
495}
496
497
498// Capture events, alt. diffuses the overlib function.
499if ( (ns4) || (ie4) || (ns6)) {
500	document.onmousemove = mouseMove
501	if (ns4) document.captureEvents(Event.MOUSEMOVE)
502} else {
503	overlib = no_overlib;
504	nd = no_overlib;
505	ver3fix = true;
506}
507
508
509// Fake function for 3.0 users.
510function no_overlib() {
511	return ver3fix;
512}
513
514
515
516////////////////////////////////////////////////////////////////////////////////////
517// PUBLIC FUNCTIONS
518////////////////////////////////////////////////////////////////////////////////////
519
520
521// overlib(arg0, ..., argN)
522// Loads parameters into global runtime variables.
523function overlib() {
524	
525	// Load defaults to runtime.
526	o3_text = ol_text;
527	o3_cap = ol_cap;
528	o3_sticky = ol_sticky;
529	o3_background = ol_background;
530	o3_close = ol_close;
531	o3_hpos = ol_hpos;
532	o3_offsetx = ol_offsetx;
533	o3_offsety = ol_offsety;
534	o3_fgcolor = ol_fgcolor;
535	o3_bgcolor = ol_bgcolor;
536	o3_textcolor = ol_textcolor;
537	o3_capcolor = ol_capcolor;
538	o3_closecolor = ol_closecolor;
539	o3_width = ol_width;
540	o3_border = ol_border;
541	o3_status = ol_status;
542	o3_autostatus = ol_autostatus;
543	o3_height = ol_height;
544	o3_snapx = ol_snapx;
545	o3_snapy = ol_snapy;
546	o3_fixx = ol_fixx;
547	o3_fixy = ol_fixy;
548	o3_fgbackground = ol_fgbackground;
549	o3_bgbackground = ol_bgbackground;
550	o3_padxl = ol_padxl;
551	o3_padxr = ol_padxr;
552	o3_padyt = ol_padyt;
553	o3_padyb = ol_padyb;
554	o3_fullhtml = ol_fullhtml;
555	o3_vpos = ol_vpos;
556	o3_aboveheight = ol_aboveheight;
557	o3_capicon = ol_capicon;
558	o3_textfont = ol_textfont;
559	o3_captionfont = ol_captionfont;
560	o3_closefont = ol_closefont;
561	o3_textsize = ol_textsize;
562	o3_captionsize = ol_captionsize;
563	o3_closesize = ol_closesize;
564	o3_timeout = ol_timeout;
565	o3_function = ol_function;
566	o3_delay = ol_delay;
567	o3_hauto = ol_hauto;
568	o3_vauto = ol_vauto;
569	o3_closeclick = ol_closeclick;
570	
571	o3_css = ol_css;
572	o3_fgclass = ol_fgclass;
573	o3_bgclass = ol_bgclass;
574	o3_textfontclass = ol_textfontclass;
575	o3_captionfontclass = ol_captionfontclass;
576	o3_closefontclass = ol_closefontclass;
577	o3_padunit = ol_padunit;
578	o3_heightunit = ol_heightunit;
579	o3_widthunit = ol_widthunit;
580	o3_textsizeunit = ol_textsizeunit;
581	o3_textdecoration = ol_textdecoration;
582	o3_textstyle = ol_textstyle;
583	o3_textweight = ol_textweight;
584	o3_captionsizeunit = ol_captionsizeunit;
585	o3_captiondecoration = ol_captiondecoration;
586	o3_captionstyle = ol_captionstyle;
587	o3_captionweight = ol_captionweight;
588	o3_closesizeunit = ol_closesizeunit;
589	o3_closedecoration = ol_closedecoration;
590	o3_closestyle = ol_closestyle;
591	o3_closeweight = ol_closeweight;
592	fnRef = '';
593	
594
595	// Special for frame support, over must be reset...
596	if ( (ns4) || (ie4) || (ns6) ) {
597		if (over) cClick();
598		o3_frame = ol_frame;
599		if (ns4) over = o3_frame.document.overDiv
600		if (ie4) over = o3_frame.overDiv.style
601		if (ns6) over = o3_frame.document.getElementById("overDiv");
602	}
603	
604	
605	// What the next argument is expected to be.
606	var parsemode = -1, udf, v = null;
607	
608	var ar = arguments;
609	udf = (!ar.length ? 1 : 0);
610
611	for (i = 0; i < ar.length; i++) {
612
613		if (parsemode < 0) {
614			// Arg is maintext, unless its a PARAMETER
615			if (typeof ar[i] == 'number') {
616				udf = (ar[i] == FUNCTION ? 0 : 1);
617				i--;
618			} else {
619				o3_text = ar[i];
620			}
621
622			parsemode = 0;
623		} else {
624			// Note: NS4 doesn't like switch cases with vars.
625			if (ar[i] == INARRAY) { udf = 0; o3_text = ol_texts[ar[++i]]; continue; }
626			if (ar[i] == CAPARRAY) { o3_cap = ol_caps[ar[++i]]; continue; }
627			if (ar[i] == STICKY) { o3_sticky = 1; continue; }
628			if (ar[i] == BACKGROUND) { o3_background = ar[++i]; continue; }
629			if (ar[i] == NOCLOSE) { o3_close = ""; continue; }
630			if (ar[i] == CAPTION) { o3_cap = ar[++i]; continue; }
631			if (ar[i] == CENTER || ar[i] == LEFT || ar[i] == RIGHT) { o3_hpos = ar[i]; continue; }
632			if (ar[i] == OFFSETX) { o3_offsetx = ar[++i]; continue; }
633			if (ar[i] == OFFSETY) { o3_offsety = ar[++i]; continue; }
634			if (ar[i] == FGCOLOR) { o3_fgcolor = ar[++i]; continue; }
635			if (ar[i] == BGCOLOR) { o3_bgcolor = ar[++i]; continue; }
636			if (ar[i] == TEXTCOLOR) { o3_textcolor = ar[++i]; continue; }
637			if (ar[i] == CAPCOLOR) { o3_capcolor = ar[++i]; continue; }
638			if (ar[i] == CLOSECOLOR) { o3_closecolor = ar[++i]; continue; }
639			if (ar[i] == WIDTH) { o3_width = ar[++i]; continue; }
640			if (ar[i] == BORDER) { o3_border = ar[++i]; continue; }
641			if (ar[i] == STATUS) { o3_status = ar[++i]; continue; }
642			if (ar[i] == AUTOSTATUS) { o3_autostatus = (o3_autostatus == 1) ? 0 : 1; continue; }
643			if (ar[i] == AUTOSTATUSCAP) { o3_autostatus = (o3_autostatus == 2) ? 0 : 2; continue; }
644			if (ar[i] == HEIGHT) { o3_height = ar[++i]; o3_aboveheight = ar[i]; continue; } // Same param again.
645			if (ar[i] == CLOSETEXT) { o3_close = ar[++i]; continue; }
646			if (ar[i] == SNAPX) { o3_snapx = ar[++i]; continue; }
647			if (ar[i] == SNAPY) { o3_snapy = ar[++i]; continue; }
648			if (ar[i] == FIXX) { o3_fixx = ar[++i]; continue; }
649			if (ar[i] == FIXY) { o3_fixy = ar[++i]; continue; }
650			if (ar[i] == FGBACKGROUND) { o3_fgbackground = ar[++i]; continue; }
651			if (ar[i] == BGBACKGROUND) { o3_bgbackground = ar[++i]; continue; }
652			if (ar[i] == PADX) { o3_padxl = ar[++i]; o3_padxr = ar[++i]; continue; }
653			if (ar[i] == PADY) { o3_padyt = ar[++i]; o3_padyb = ar[++i]; continue; }
654			if (ar[i] == FULLHTML) { o3_fullhtml = 1; continue; }
655			if (ar[i] == BELOW || ar[i] == ABOVE) { o3_vpos = ar[i]; continue; }
656			if (ar[i] == CAPICON) { o3_capicon = ar[++i]; continue; }
657			if (ar[i] == TEXTFONT) { o3_textfont = ar[++i]; continue; }
658			if (ar[i] == CAPTIONFONT) { o3_captionfont = ar[++i]; continue; }
659			if (ar[i] == CLOSEFONT) { o3_closefont = ar[++i]; continue; }
660			if (ar[i] == TEXTSIZE) { o3_textsize = ar[++i]; continue; }
661			if (ar[i] == CAPTIONSIZE) { o3_captionsize = ar[++i]; continue; }
662			if (ar[i] == CLOSESIZE) { o3_closesize = ar[++i]; continue; }
663			if (ar[i] == FRAME) { opt_FRAME(ar[++i]); continue; }
664			if (ar[i] == TIMEOUT) { o3_timeout = ar[++i]; continue; }
665			if (ar[i] == FUNCTION) { udf = 0; if (typeof ar[i+1] != 'number') v = ar[++i]; opt_FUNCTION(v); continue; } 
666			if (ar[i] == DELAY) { o3_delay = ar[++i]; continue; }
667			if (ar[i] == HAUTO) { o3_hauto = (o3_hauto == 0) ? 1 : 0; continue; }
668			if (ar[i] == VAUTO) { o3_vauto = (o3_vauto == 0) ? 1 : 0; continue; }
669			if (ar[i] == CLOSECLICK) { o3_closeclick = (o3_closeclick == 0) ? 1 : 0; continue; }
670			if (ar[i] == CSSOFF) { o3_css = ar[i]; continue; }
671			if (ar[i] == CSSSTYLE) { o3_css = ar[i]; continue; }
672			if (ar[i] == CSSCLASS) { o3_css = ar[i]; continue; }
673			if (ar[i] == FGCLASS) { o3_fgclass = ar[++i]; continue; }
674			if (ar[i] == BGCLASS) { o3_bgclass = ar[++i]; continue; }
675			if (ar[i] == TEXTFONTCLASS) { o3_textfontclass = ar[++i]; continue; }
676			if (ar[i] == CAPTIONFONTCLASS) { o3_captionfontclass = ar[++i]; continue; }
677			if (ar[i] == CLOSEFONTCLASS) { o3_closefontclass = ar[++i]; continue; }
678			if (ar[i] == PADUNIT) { o3_padunit = ar[++i]; continue; }
679			if (ar[i] == HEIGHTUNIT) { o3_heightunit = ar[++i]; continue; }
680			if (ar[i] == WIDTHUNIT) { o3_widthunit = ar[++i]; continue; }
681			if (ar[i] == TEXTSIZEUNIT) { o3_textsizeunit = ar[++i]; continue; }
682			if (ar[i] == TEXTDECORATION) { o3_textdecoration = ar[++i]; continue; }
683			if (ar[i] == TEXTSTYLE) { o3_textstyle = ar[++i]; continue; }
684			if (ar[i] == TEXTWEIGHT) { o3_textweight = ar[++i]; continue; }
685			if (ar[i] == CAPTIONSIZEUNIT) { o3_captionsizeunit = ar[++i]; continue; }
686			if (ar[i] == CAPTIONDECORATION) { o3_captiondecoration = ar[++i]; continue; }
687			if (ar[i] == CAPTIONSTYLE) { o3_captionstyle = ar[++i]; continue; }
688			if (ar[i] == CAPTIONWEIGHT) { o3_captionweight = ar[++i]; continue; }
689			if (ar[i] == CLOSESIZEUNIT) { o3_closesizeunit = ar[++i]; continue; }
690			if (ar[i] == CLOSEDECORATION) { o3_closedecoration = ar[++i]; continue; }
691			if (ar[i] == CLOSESTYLE) { o3_closestyle = ar[++i]; continue; }
692			if (ar[i] == CLOSEWEIGHT) { o3_closeweight = ar[++i]; continue; }
693		}
694	}
695	if (udf && o3_function) o3_text = o3_function();
696
697	if (o3_delay == 0) {
698		return overlib351();
699	} else {
700		o3_delayid = setTimeout("overlib351()", o3_delay);
701		return false;
702	}
703}
704
705
706
707// Clears popups if appropriate
708function nd() {
709	if ( o3_removecounter >= 1 ) { o3_showingsticky = 0 };
710	if ( (ns4) || (ie4) || (ns6) ) {
711		if ( o3_showingsticky == 0 ) {
712			o3_allowmove = 0;
713			if (over != null) hideObject(over);
714		} else {
715			o3_removecounter++;
716		}
717	}
718	
719	return true;
720}
721
722
723
724
725
726
727
728////////////////////////////////////////////////////////////////////////////////////
729// OVERLIB 3.51 FUNCTION
730////////////////////////////////////////////////////////////////////////////////////
731
732
733// This function decides what it is we want to display and how we want it done.
734function overlib351() {
735
736	// Make layer content
737	var layerhtml;
738
739	if (o3_background != "" || o3_fullhtml) {
740		// Use background instead of box.
741		layerhtml = ol_content_background(o3_text, o3_background, o3_fullhtml);
742	} else {
743		// They want a popup box.
744
745		// Prepare popup background
746		if (o3_fgbackground != "" && o3_css == CSSOFF) {
747			o3_fgbackground = "BACKGROUND=\""+o3_fgbackground+"\"";
748		}
749		if (o3_bgbackground != "" && o3_css == CSSOFF) {
750			o3_bgbackground = "BACKGROUND=\""+o3_bgbackground+"\"";
751		}
752
753		// Prepare popup colors
754		if (o3_fgcolor != "" && o3_css == CSSOFF) {
755			o3_fgcolor = "BGCOLOR=\""+o3_fgcolor+"\"";
756		}
757		if (o3_bgcolor != "" && o3_css == CSSOFF) {
758			o3_bgcolor = "BGCOLOR=\""+o3_bgcolor+"\"";
759		}
760
761		// Prepare popup height
762		if (o3_height > 0 && o3_css == CSSOFF) {
763			o3_height = "HEIGHT=" + o3_height;
764		} else {
765			o3_height = "";
766		}
767
768		// Decide which kinda box.
769		if (o3_cap == "") {
770			// Plain
771			layerhtml = ol_content_simple(o3_text);
772		} else {
773			// With caption
774			if (o3_sticky) {
775				// Show close text
776				layerhtml = ol_content_caption(o3_text, o3_cap, o3_close);
777			} else {
778				// No close text
779				layerhtml = ol_content_caption(o3_text, o3_cap, "");
780			}
781		}
782	}
783	
784	// We want it to stick!
785	if (o3_sticky) {
786		if (o3_timerid > 0) {
787			clearTimeout(o3_timerid);
788			o3_timerid = 0;
789		}
790		o3_showingsticky = 1;
791		o3_removecounter = 0;
792	}
793	
794	// Write layer
795	layerWrite(layerhtml);
796	
797	// Prepare status bar
798	if (o3_autostatus > 0) {
799		o3_status = o3_text;
800		if (o3_autostatus > 1) {
801			o3_status = o3_cap;
802		}
803	}
804
805	// When placing the layer the first time, even stickies may be moved.
806	o3_allowmove = 0;
807
808	// Initiate a timer for timeout
809	if (o3_timeout > 0) {
810		if (o3_timerid > 0) clearTimeout(o3_timerid);
811		o3_timerid = setTimeout("cClick()", o3_timeout);
812	}
813
814	// Show layer
815	disp(o3_status);
816
817	// Stickies should stay where they are.	
818	if (o3_sticky) o3_allowmove = 0;
819
820	return (o3_status != '');
821}
822
823
824
825////////////////////////////////////////////////////////////////////////////////////
826// LAYER GENERATION FUNCTIONS
827////////////////////////////////////////////////////////////////////////////////////
828
829// Makes simple table without caption
830function ol_content_simple(text) {
831	if (o3_css == CSSCLASS) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 class=\""+o3_bgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+o3_fgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+o3_textfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
832	if (o3_css == CSSSTYLE) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 style=\"background-color: "+o3_bgcolor+"; height: "+o3_height+o3_heightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+o3_fgcolor+"; background-color: "+o3_fgcolor+"; height: "+o3_height+o3_heightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+o3_textfont+"; color: "+o3_textcolor+"; font-size: "+o3_textsize+o3_textsizeunit+"; text-decoration: "+o3_textdecoration+"; font-weight: "+o3_textweight+"; font-style:"+o3_textstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
833	if (o3_css == CSSOFF) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 "+o3_bgcolor+" "+o3_height+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+o3_fgcolor+" "+o3_fgbackground+" "+o3_height+"><TR><TD VALIGN=TOP><FONT FACE=\""+o3_textfont+"\" COLOR=\""+o3_textcolor+"\" SIZE=\""+o3_textsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
834
835	set_background("");
836	return txt;
837}
838
839
840
841
842// Makes table with caption and optional close link
843function ol_content_caption(text, title, close) {
844	closing = "";
845	closeevent = "onMouseOver";
846
847	if (o3_closeclick == 1) closeevent = "onClick";
848	if (o3_capicon != "") o3_capicon = "<IMG SRC=\""+o3_capicon+"\"> ";
849
850	if (close != "") {
851		if (o3_css == CSSCLASS) closing = "<TD ALIGN=RIGHT>
851<A HREF=\"javascript:return "+fnRef+"cClick();\" "+closeevent+"=\"return " + fnRef + "cClick();\" class=\""+o3_closefontclass+"\">"+close+"</A></TD>";
852		if (o3_css == CSSSTYLE) closing = "<TD ALIGN=RIGHT><A HREF=\"javascript:return "+fnRef+"cClick();\" "+closeevent+"=\"return " + fnRef + "cClick();\" style=\"color: "+o3_closecolor+"; font-family: "+o3_closefont+"; font-size: "+o3_closesize+o3_closesizeunit+"; text-decoration: "+o3_closedecoration+"; font-weight: "+o3_closeweight+"; font-style:"+o3_closestyle+";\">"+close+"</A></TD>";
853		if (o3_css == CSSOFF) closing = "<TD ALIGN=RIGHT><A HREF=\"javascript:return "+fnRef+"cClick();\" "+closeevent+"=\"return " + fnRef + "cClick();\"><FONT COLOR=\""+o3_closecolor+"\" FACE=\""+o3_closefont+"\" SIZE=\""+o3_closesize+"\">"+close+"</FONT></A></TD>";
854	}
855
856	if (o3_css == CSSCLASS) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 class=\""+o3_bgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT class=\""+o3_captionfontclass+"\">"+o3_capicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+o3_fgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+o3_textfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
857	if (o3_css == CSSSTYLE) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 style=\"background-color: "+o3_bgcolor+"; background-image: url("+o3_bgbackground+"); height: "+o3_height+o3_heightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT style=\"font-family: "+o3_captionfont+"; color: "+o3_capcolor+"; font-size: "+o3_captionsize+o3_captionsizeunit+"; font-weight: "+o3_captionweight+"; font-style: "+o3_captionstyle+"; text-decoration: " + o3_captiondecoration + ";\">"+o3_capicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+o3_fgcolor+"; background-color: "+o3_fgcolor+"; height: "+o3_height+o3_heightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+o3_textfont+"; color: "+o3_textcolor+"; font-size: "+o3_textsize+o3_textsizeunit+"; text-decoration: "+o3_textdecoration+"; font-weight: "+o3_textweight+"; font-style:"+o3_textstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
858	if (o3_css == CSSOFF) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 "+o3_bgcolor+" "+o3_bgbackground+" "+o3_height+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><B><FONT COLOR=\""+o3_capcolor+"\" FACE=\""+o3_captionfont+"\" SIZE=\""+o3_captionsize+"\">"+o3_capicon+title+"</FONT></B></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+o3_fgcolor+" "+o3_fgbackground+" "+o3_height+"><TR><TD VALIGN=TOP><FONT COLOR=\""+o3_textcolor+"\" FACE=\""+o3_textfont+"\" SIZE=\""+o3_textsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
859
860	set_background("");
861	return txt;
862}
863
864// Sets the background picture, padding and lots more. :)
865function ol_content_background(text, picture, hasfullhtml) {
866	var txt;
867	if (hasfullhtml) {
868		txt = text;
869	} else {
870		var pU, hU, wU;
871		pU = (o3_padunit == '%' ? '%' : '');
872		hU = (o3_heightunit == '%' ? '%' : '');
873		wU = (o3_widthunit == '%' ? '%' : '');
874
875		if (o3_css == CSSCLASS) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+"></TD></TR><TR><TD WIDTH="+o3_padxl+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+"><FONT class=\""+o3_textfontclass+"\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+"></TD></TR></TABLE>";
876		if (o3_css == CSSSTYLE) txt = "<TABLE WIDTH="+o3_width+wU+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+hU+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+pU+"></TD></TR><TR><TD WIDTH="+o3_padxl+pU+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+pU+"><FONT style=\"font-family: "+o3_textfont+"; color: "+o3_textcolor+"; font-size: "+o3_textsize+o3_textsizeunit+";\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+pU+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+pU+"></TD></TR></TABLE>";
877		if (o3_css == CSSOFF) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+"></TD></TR><TR><TD WIDTH="+o3_padxl+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+"><FONT FACE=\""+o3_textfont+"\" COLOR=\""+o3_textcolor+"\" SIZE=\""+o3_textsize+"\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+"></TD></TR></TABLE>";
878	}
879	set_background(picture);
880	return txt;
881}
882
883// Loads a picture into the div.
884function set_background(pic) {
885	if (pic == "") {
886		if (ns4) over.background.src = null;
887		if (ie4) over.backgroundImage = "none";
888		if (ns6) over.style.backgroundImage = "none";
889	} else {
890		if (ns4) {
891			over.background.src = pic;
892		} else if (ie4) {
893			over.backgroundImage = "url("+pic+")";
894		} else if (ns6) {
895			over.style.backgroundImage = "url("+pic+")";
896		}
897	}
898}
899
900
901
902////////////////////////////////////////////////////////////////////////////////////
903// HANDLING FUNCTIONS
904////////////////////////////////////////////////////////////////////////////////////
905
906
907// Displays the popup
908function disp(statustext) {
909	if ( (ns4) || (ie4) || (ns6) ) {
910		if (o3_allowmove == 0) 	{
911			placeLayer();
912			showObject(over);
913			o3_allowmove = 1;
914		}
915	}
916
917	if (statustext != "") {
918		self.status = statustext;
919	}
920}
921
922// Decides where we want the popup.
923function placeLayer() {
924	var placeX, placeY;
925	
926	// HORIZONTAL PLACEMENT
927	if (o3_fixx > -1) {
928		// Fixed position
929		placeX = o3_fixx;
930	} else {
931		winoffset = (ie4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset;
932		if (ie4) iwidth = eval('o3_frame.'+docRoot+'.clientWidth');
933		if (ns4 || ns6) iwidth = o3_frame.innerWidth;
934		
935		// If HAUTO, decide what to use.
936		if (o3_hauto == 1) {
937			if ( (o3_x - winoffset) > ((eval(iwidth)) / 2)) {
938				o3_hpos = LEFT;
939			} else {
940				o3_hpos = RIGHT;
941			}
942		}
943		
944		// From mouse
945		if (o3_hpos == CENTER) { // Center
946			placeX = o3_x+o3_offsetx-(o3_width/2);
947			if (placeX < winoffset) placeX = winoffset;
948		}
949		if (o3_hpos == RIGHT) { // Right
950			placeX = o3_x+o3_offsetx;
951			if ( (eval(placeX) + eval(o3_width)) > (winoffset + iwidth) ) {
952				placeX = iwidth + winoffset - o3_width;
953				if (placeX < 0) placeX = 0;
954			}
955		}
956		if (o3_hpos == LEFT) { // Left
957			placeX = o3_x-o3_offsetx-o3_width;
958			if (placeX < winoffset) placeX = winoffset;
959		}
960	
961		// Snapping!
962		if (o3_snapx > 1) {
963			var snapping = placeX % o3_snapx;
964			if (o3_hpos == LEFT) {
965				placeX = placeX - (o3_snapx + snapping);
966			} else {
967				// CENTER and RIGHT
968				placeX = placeX + (o3_snapx - snapping);
969			}
970			if (placeX < winoffset) placeX = winoffset;
971		}
972	}
973
974	
975	
976	// VERTICAL PLACEMENT
977	if (o3_fixy > -1) {
978		// Fixed position
979		placeY = o3_fixy;
980	} else {
981		scrolloffset = (ie4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset;
982
983		// If VAUTO, decide what to use.
984		if (o3_vauto == 1) {
985			if (ie4) iheight = eval('o3_frame.'+docRoot+'.clientHeight');
986			if (ns4 || ns6) iheight = o3_frame.innerHeight;
987
988			iheight = (eval(iheight)) / 2;
989			if ( (o3_y - scrolloffset) > iheight) {
990				o3_vpos = ABOVE;
991			} else {
992				o3_vpos = BELOW;
993			}
994		}
995
996
997		// From mouse
998		if (o3_vpos == ABOVE) {
999			if (o3_aboveheight == 0) {
1000				var divref = (ie4) ? o3_frame.document.all['overDiv'] : over;
1001				o3_aboveheight = (ns4) ? divref.clip.height : divref.offsetHeight;
1002			}
1003
1004			placeY = o3_y - (o3_aboveheight + o3_offsety);
1005			if (placeY < scrolloffset) placeY = scrolloffset;
1006		} else {
1007			// BELOW
1008			placeY = o3_y + o3_offsety;
1009		}
1010
1011		// Snapping!
1012		if (o3_snapy > 1) {
1013			var snapping = placeY % o3_snapy;
1014			
1015			if (o3_aboveheight > 0 && o3_vpos == ABOVE) {
1016				placeY = placeY - (o3_snapy + snapping);
1017			} else {
1018				placeY = placeY + (o3_snapy - snapping);
1019			}
1020			
1021			if (placeY < scrolloffset) placeY = scrolloffset;
1022		}
1023	}
1024
1025
1026	// Actually move the object.	
1027	repositionTo(over, placeX, placeY);
1028}
1029
1030
1031// Moves the layer
1032function mouseMove(e) {
1033	if ( (ns4) || (ns6) ) {o3_x=e.pageX; o3_y=e.pageY;}
1034	if (ie4) {o3_x=event.x; o3_y=event.y;}
1035	if (ie5) {o3_x=eval('event.x+o3_frame.'+docRoot+'.scrollLeft'); o3_y=eval('event.y+o3_frame.'+docRoot+'.scrollTop');}
1036	
1037	if (o3_allowmove == 1) {
1038		placeLayer();
1039	}
1040}
1041
1042// The Close onMouseOver function for stickies
1043function cClick() {
1044	hideObject(over);
1045	o3_showingsticky = 0;
1046	
1047	return false;
1048}
1049
1050
1051// Makes sure target frame has overLIB
1052function compatibleframe(frameid) {
1053	if (ns4) {
1054		if (typeof frameid.document.overDiv =='undefined') return false;
1055	} else if (ie4) {
1056		if (typeof frameid.document.all["overDiv"] =='undefined') return false;
1057	} else if (ns6) {
1058		if (frameid.document.getElementById('overDiv') == null) return false;
1059	}
1060
1061	return true;
1062}
1063
1064
1065
1066////////////////////////////////////////////////////////////////////////////////////
1067// LAYER FUNCTIONS
1068////////////////////////////////////////////////////////////////////////////////////
1069
1070
1071// Writes to a layer
1072function layerWrite(txt) {
1073	txt += "\n";
1074	
1075	if (ns4) {
1076		var lyr = o3_frame.document.overDiv.document
1077		lyr.write(txt)
1078		lyr.close()
1079	} else if (ie4) {
1080		o3_frame.document.all["overDiv"].innerHTML = txt
1081	} else if (ns6) {
1082		range = o3_frame.document.createRange();
1083		range.setStartBefore(over);
1084		domfrag = range.createContextualFragment(txt);
1085		while (over.hasChildNodes()) {
1086			over.removeChild(over.lastChild);
1087		}
1088		over.appendChild(domfrag);
1089	}
1090}
1091
1092// Make an object visible
1093function showObject(obj) {
1094	if (ns4) obj.visibility = "show";
1095	else if (ie4) obj.visibility = "visible";
1096	else if (ns6) obj.style.visibility = "visible";
1097}
1098
1099// Hides an object
1100function hideObject(obj) {
1101	if (ns4) obj.visibility = "hide";
1102	else if (ie4) obj.visibility = "hidden";
1103	else if (ns6) obj.style.visibility = "hidden";
1104
1105	if (o3_timerid > 0) clearTimeout(o3_timerid);
1106	if (o3_delayid > 0) clearTimeout(o3_delayid);
1107	o3_timerid = 0;
1108	o3_delayid = 0;
1109	self.status = "";
1110}
1111
1112// Move a layer
1113function repositionTo(obj,xL,yL) {
1114	if ( (ns4) || (ie4) ) {
1115		obj.left = (ie4 ? xL + 'px' : xL);
1116		obj.top = (ie4 ? yL + 'px' : yL);
1117	} else if (ns6) {
1118		obj.style.left = xL + "px";
1119		obj.style.top = yL+ "px";
1120	}
1121}
1122
1123function getFrameRef(thisFrame, ofrm) {
1124	var retVal = '';
1125	for (var i=0; i<thisFrame.length; i++) {
1126		if (thisFrame[i].length > 0) { 
1127			retVal = getFrameRef(thisFrame[i],ofrm);
1128			if (retVal == '') continue;
1129		} else if (thisFrame[i] != ofrm) continue;
1130		
1131		retVal = '['+i+']' + retVal;
1132		break;
1133	}
1134	
1135	return retVal;
1136}
1137
1138
1139
1140
1141////////////////////////////////////////////////////////////////////////////////////
1142// PARSER FUNCTIONS
1143////////////////////////////////////////////////////////////////////////////////////
1144
1145
1146// Defines which frame we should point to.
1147function opt_FRAME(frm) {
1148	o3_frame = compatibleframe(frm) ? frm : ol_frame;
1149
1150	if (o3_frame != ol_frame) {
1151		var tFrm = getFrameRef(top.frames, o3_frame);
1152		var sFrm = getFrameRef(top.frames, ol_frame);
1153
1154		if (sFrm.length == tFrm.length) { 
1155			l = tFrm.lastIndexOf('['); 
1156			if (l) {
1157				while(sFrm.substring(0,l) != tFrm.substring(0,l)) l = tFrm.lastIndexOf('[',l-1);
1158				tFrm = tFrm.substr(l);
1159				sFrm = sFrm.substr(l);
1160			}
1161		}
1162			
1163		var cnt = 0, p = '', str = tFrm;
1164			
1165		while((k = str.lastIndexOf('[')) != -1) {
1166			cnt++;
1167			str = str.substring(0,k);
1168		}
1169
1170		for (var i=0; i<cnt; i++) p = p + 'parent.';
1171		fnRef = p + 'frames' + sFrm + '.';
1172	}
1173
1174	if ( (ns4) || (ie4 || (ns6)) ) {
1175		if (ns4) over = o3_frame.document.overDiv;
1176		if (ie4) over = o3_frame.overDiv.style;
1177		if (ns6) over = o3_frame.document.getElementById("overDiv");
1178	}
1179
1180	return 0;
1181}
1182
1183// Calls an external function
1184function opt_FUNCTION(callme) {
1185	o3_text = (callme ? callme() : (o3_function ? o3_function() : 'No Function'));
1186	return 0;
1187}
1188
1189
1190
1191
1192//end (For internal purposes.)
1193////////////////////////////////////////////////////////////////////////////////////
1194// OVERLIB 2 COMPATABILITY FUNCTIONS
1195// If you aren't upgrading you can remove the below section.
1196////////////////////////////////////////////////////////////////////////////////////
1197
1198// Converts old 0=left, 1=right and 2=center into constants.
1199function vpos_convert(d) {
1200	if (d == 0) {
1201		d = LEFT;
1202	} else {
1203		if (d == 1) {
1204			d = RIGHT;
1205		} else {
1206			d = CENTER;
1207		}
1208	}
1209	
1210	return d;
1211}
1212
1213// Simple popup
1214function dts(d,text) {
1215	o3_hpos = vpos_convert(d);
1216	overlib(text, o3_hpos, CAPTION, "");
1217}
1218
1219// Caption popup
1220function dtc(d,text, title) {
1221	o3_hpos = vpos_convert(d);
1222	overlib(text, CAPTION, title, o3_hpos);
1223}
1224
1225// Sticky
1226function stc(d,text, title) {
1227	o3_hpos = vpos_convert(d);
1228	overlib(text, CAPTION, title, o3_hpos, STICKY);
1229}
1230
1231// Simple popup right
1232function drs(text) {
1233	dts(1,text);
1234}
1235
1236// Caption popup right
1237function drc(text, title) {
1238	dtc(1,text,title);
1239}
1240
1241// Sticky caption right
1242function src(text,title) {
1243	stc(1,text,title);
1244}
1245
1246// Simple popup left
1247function dls(text) {
1248	dts(0,text);
1249}
1250
1251// Caption popup left
1252function dlc(text, title) {
1253	dtc(0,text,title);
1254}
1255
1256// Sticky caption left
1257function slc(text,title) {
1258	stc(0,text,title);
1259}
1260
1261// Simple popup center
1262function dcs(text) {
1263	dts(2,text);
1264}
1265
1266// Caption popup center
1267function dcc(text, title) {
1268	dtc(2,text,title);
1269}
1270
1271// Sticky caption center
1272function scc(text,title) {
1273	stc(2,text,title);
1274}

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.