1 //\//////////////////////////////////////////////////////////////////////////////////
2 //\ overLIB 3.51 -- This notice must remain untouched at all times.
3 //\ Copyright Erik Bosrup 1998-2002. All rights reserved.
5 //\ By Erik Bosrup (erik@bosrup.com). Last modified 2002-11-01.
6 //\ Portions by Dan Steinman (dansteinman.com). Additions by other people are
7 //\ listed on the overLIB homepage.
9 //\ Get the latest version at http://www.bosrup.com/web/overlib/
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 erik@bosrup.com.
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.
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 //\//////////////////////////////////////////////////////////////////////////////////
26 ////////////////////////////////////////////////////////////////////////////////////
28 // Don't touch these. :)
29 ////////////////////////////////////////////////////////////////////////////////////
50 var AUTOSTATUSCAP = 21;
57 var FGBACKGROUND = 28;
58 var BGBACKGROUND = 29;
59 var PADX = 30; // PADX2 out
60 var PADY = 31; // PADY2 out
83 var TEXTFONTCLASS = 56;
84 var CAPTIONFONTCLASS = 57;
85 var CLOSEFONTCLASS = 58;
89 var TEXTSIZEUNIT = 62;
90 var TEXTDECORATION = 63;
93 var CAPTIONSIZEUNIT = 66;
94 var CAPTIONDECORATION = 67;
95 var CAPTIONSTYLE = 68;
96 var CAPTIONWEIGHT = 69;
97 var CLOSESIZEUNIT = 70;
98 var CLOSEDECORATION = 71;
100 var CLOSEWEIGHT = 73;
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 ////////////////////////////////////////////////////////////////////////////////////
109 // Main background color (the large area)
110 // Usually a bright color (white, yellow etc)
111 if (typeof ol_fgcolor == 'undefined') { var ol_fgcolor = "#CCCCFF";}
113 // Border color and color of caption
114 // Usually a dark color (black, brown etc)
115 if (typeof ol_bgcolor == 'undefined') { var ol_bgcolor = "#333399";}
118 // Usually a dark color
119 if (typeof ol_textcolor == 'undefined') { var ol_textcolor = "#000000";}
121 // Color of the caption text
122 // Usually a bright color
123 if (typeof ol_capcolor == 'undefined') { var ol_capcolor = "#FFFFFF";}
125 // Color of "Close" when using Sticky
126 // Usually a semi-bright color
127 if (typeof ol_closecolor == 'undefined') { var ol_closecolor = "#9999FF";}
129 // Font face for the main text
130 if (typeof ol_textfont == 'undefined') { var ol_textfont = "Verdana,Arial,Helvetica";}
132 // Font face for the caption
133 if (typeof ol_captionfont == 'undefined') { var ol_captionfont = "Verdana,Arial,Helvetica";}
135 // Font face for the close text
136 if (typeof ol_closefont == 'undefined') { var ol_closefont = "Verdana,Arial,Helvetica";}
138 // Font size for the main text
139 // When using CSS this will be very small.
140 if (typeof ol_textsize == 'undefined') { var ol_textsize = "1";}
142 // Font size for the caption
143 // When using CSS this will be very small.
144 if (typeof ol_captionsize == 'undefined') { var ol_captionsize = "1";}
146 // Font size for the close text
147 // When using CSS this will be very small.
148 if (typeof ol_closesize == 'undefined') { var ol_closesize = "1";}
150 // Width of the popups in pixels
151 // 100-300 pixels is typical
152 if (typeof ol_width == 'undefined') { var ol_width = "250";}
154 // How thick the ol_border should be in pixels
155 // 1-3 pixels is typical
156 if (typeof ol_border == 'undefined') { var ol_border = "1";}
158 // How many pixels to the right/left of the cursor to show the popup
159 // Values between 3 and 12 are best
160 if (typeof ol_offsetx == 'undefined') { var ol_offsetx = 10;}
162 // How many pixels to the below the cursor to show the popup
163 // Values between 3 and 12 are best
164 if (typeof ol_offsety == 'undefined') { var ol_offsety = 10;}
166 // Default text for popups
167 // Should you forget to pass something to overLIB this will be displayed.
168 if (typeof ol_text == 'undefined') { var ol_text = "Default Text"; }
171 // You should leave this blank or you will have problems making non caps popups.
172 if (typeof ol_cap == 'undefined') { var ol_cap = ""; }
174 // Decides if sticky popups are default.
175 // 0 for non, 1 for stickies.
176 if (typeof ol_sticky == 'undefined') { var ol_sticky = 0; }
178 // Default background image. Better left empty unless you always want one.
179 if (typeof ol_background == 'undefined') { var ol_background = ""; }
181 // Text for the closing sticky popups.
182 // Normal is "Close".
183 if (typeof ol_close == 'undefined') { var ol_close = "Close"; }
185 // Default vertical alignment for popups.
186 // It's best to leave RIGHT here. Other options are LEFT and CENTER.
187 if (typeof ol_hpos == 'undefined') { var ol_hpos = RIGHT; }
189 // Default status bar text when a popup is invoked.
190 if (typeof ol_status == 'undefined') { var ol_status = ""; }
192 // If the status bar automatically should load either text or caption.
193 // 0=nothing, 1=text, 2=caption
194 if (typeof ol_autostatus == 'undefined') { var ol_autostatus = 0; }
196 // Default height for popup. Often best left alone.
197 if (typeof ol_height == 'undefined') { var ol_height = -1; }
199 // Horizontal grid spacing that popups will snap to.
200 // 0 makes no grid, anything else will cause a snap to that grid spacing.
201 if (typeof ol_snapx == 'undefined') { var ol_snapx = 0; }
203 // Vertical grid spacing that popups will snap to.
204 // 0 makes no grid, andthing else will cause a snap to that grid spacing.
205 if (typeof ol_snapy == 'undefined') { var ol_snapy = 0; }
207 // Sets the popups horizontal position to a fixed column.
208 // Anything above -1 will cause fixed position.
209 if (typeof ol_fixx == 'undefined') { var ol_fixx = -1; }
211 // Sets the popups vertical position to a fixed row.
212 // Anything above -1 will cause fixed position.
213 if (typeof ol_fixy == 'undefined') { var ol_fixy = -1; }
215 // Background image for the popups inside.
216 if (typeof ol_fgbackground == 'undefined') { var ol_fgbackground = ""; }
218 // Background image for the popups frame.
219 if (typeof ol_bgbackground == 'undefined') { var ol_bgbackground = ""; }
221 // How much horizontal left padding text should get by default when BACKGROUND is used.
222 if (typeof ol_padxl == 'undefined') { var ol_padxl = 1; }
224 // How much horizontal right padding text should get by default when BACKGROUND is used.
225 if (typeof ol_padxr == 'undefined') { var ol_padxr = 1; }
227 // How much vertical top padding text should get by default when BACKGROUND is used.
228 if (typeof ol_padyt == 'undefined') { var ol_padyt = 1; }
230 // How much vertical bottom padding text should get by default when BACKGROUND is used.
231 if (typeof ol_padyb == 'undefined') { var ol_padyb = 1; }
233 // If the user by default must supply all html for complete popup control.
234 // Set to 1 to activate, 0 otherwise.
235 if (typeof ol_fullhtml == 'undefined') { var ol_fullhtml = 0; }
237 // Default vertical position of the popup. Default should normally be BELOW.
238 // ABOVE only works when HEIGHT is defined.
239 if (typeof ol_vpos == 'undefined') { var ol_vpos = BELOW; }
241 // Default height of popup to use when placing the popup above the cursor.
242 if (typeof ol_aboveheight == 'undefined') { var ol_aboveheight = 0; }
244 // Default icon to place next to the popups caption.
245 if (typeof ol_capicon == 'undefined') { var ol_capicon = ""; }
247 // Default frame. We default to current frame if there is no frame defined.
248 if (typeof ol_frame == 'undefined') { var ol_frame = self; }
250 // Default timeout. By default there is no timeout.
251 if (typeof ol_timeout == 'undefined') { var ol_timeout = 0; }
253 // Default javascript funktion. By default there is none.
254 if (typeof ol_function == 'undefined') { var ol_function = null; }
256 // Default timeout. By default there is no timeout.
257 if (typeof ol_delay == 'undefined') { var ol_delay = 0; }
259 // If overLIB should decide the horizontal placement.
260 if (typeof ol_hauto == 'undefined') { var ol_hauto = 0; }
262 // If overLIB should decide the vertical placement.
263 if (typeof ol_vauto == 'undefined') { var ol_vauto = 0; }
267 // If the user has to click to close stickies.
268 if (typeof ol_closeclick == 'undefined') { var ol_closeclick = 0; }
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
272 if (typeof ol_css == 'undefined') { var ol_css = CSSOFF; }
274 // Main background class (eqv of fgcolor)
275 // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
276 if (typeof ol_fgclass == 'undefined') { var ol_fgclass = ""; }
278 // Frame background class (eqv of bgcolor)
279 // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
280 if (typeof ol_bgclass == 'undefined') { var ol_bgclass = ""; }
283 // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
284 if (typeof ol_textfontclass == 'undefined') { var ol_textfontclass = ""; }
286 // Caption font class
287 // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
288 if (typeof ol_captionfontclass == 'undefined') { var ol_captionfontclass = ""; }
291 // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
292 if (typeof ol_closefontclass == 'undefined') { var ol_closefontclass = ""; }
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"
297 if (typeof ol_padunit == 'undefined') { var ol_padunit = "px";}
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"
302 if (typeof ol_heightunit == 'undefined') { var ol_heightunit = "px";}
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"
307 if (typeof ol_widthunit == 'undefined') { var ol_widthunit = "px";}
309 // Font size unit for the main text
310 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
311 if (typeof ol_textsizeunit == 'undefined') { var ol_textsizeunit = "px";}
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)
315 if (typeof ol_textdecoration == 'undefined') { var ol_textdecoration = "none";}
317 // Font style of the main text ("normal" or "italic")
318 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
319 if (typeof ol_textstyle == 'undefined') { var ol_textstyle = "normal";}
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)
323 if (typeof ol_textweight == 'undefined') { var ol_textweight = "normal";}
325 // Font size unit for the caption
326 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
327 if (typeof ol_captionsizeunit == 'undefined') { var ol_captionsizeunit = "px";}
329 // Decoration of the caption ("none", "underline", "line-through" or "blink")
330 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
331 if (typeof ol_captiondecoration == 'undefined') { var ol_captiondecoration = "none";}
333 // Font style of the caption ("normal" or "italic")
334 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
335 if (typeof ol_captionstyle == 'undefined') { var ol_captionstyle = "normal";}
337 // Font weight of the caption ("normal", "bold", "bolder", "lighter", ect.)
338 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
339 if (typeof ol_captionweight == 'undefined') { var ol_captionweight = "bold";}
341 // Font size unit for the close text
342 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
343 if (typeof ol_closesizeunit == 'undefined') { var ol_closesizeunit = "px";}
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)
347 if (typeof ol_closedecoration == 'undefined') { var ol_closedecoration = "none";}
349 // Font style of the close text ("normal" or "italic")
350 // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
351 if (typeof ol_closestyle == 'undefined') { var ol_closestyle = "normal";}
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)
355 if (typeof ol_closeweight == 'undefined') { var ol_closeweight = "normal";}
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
364 ////////////////////////////////////////////////////////////////////////////////////
367 if (typeof ol_texts == 'undefined') { var ol_texts = new Array("Text 0", "Text 1"); }
369 // Array with captions.
370 if (typeof ol_caps == 'undefined') { var ol_caps = new Array("Caption 0", "Caption 1"); }
373 ////////////////////////////////////////////////////////////////////////////////////
375 // Don't change anything below this line, all configuration is above.
376 ////////////////////////////////////////////////////////////////////////////////////
384 ////////////////////////////////////////////////////////////////////////////////////
386 ////////////////////////////////////////////////////////////////////////////////////
388 // Runtime variables init. Used for runtime only, don't change, not for config!
392 var o3_background = "";
393 var o3_close = "Close";
399 var o3_textcolor = "";
400 var o3_capcolor = "";
401 var o3_closecolor = "";
405 var o3_autostatus = 0;
411 var o3_fgbackground = "";
412 var o3_bgbackground = "";
419 var o3_aboveheight = 0;
421 var o3_textfont = "Verdana,Arial,Helvetica";
422 var o3_captionfont = "Verdana,Arial,Helvetica";
423 var o3_closefont = "Verdana,Arial,Helvetica";
424 var o3_textsize = "1";
425 var o3_captionsize = "1";
426 var o3_closesize = "1";
430 var o3_allowmove = 0;
431 var o3_function = null;
436 var o3_closeclick = 0;
441 var o3_textfontclass = "";
442 var o3_captionfontclass = "";
443 var o3_closefontclass = "";
444 var o3_padunit = "px";
445 var o3_heightunit = "px";
446 var o3_widthunit = "px";
447 var o3_textsizeunit = "px";
448 var o3_textdecoration = "";
449 var o3_textstyle = "";
450 var o3_textweight = "";
451 var o3_captionsizeunit = "px";
452 var o3_captiondecoration = "";
453 var o3_captionstyle = "";
454 var o3_captionweight = "";
455 var o3_closesizeunit = "px";
456 var o3_closedecoration = "";
457 var o3_closestyle = "";
458 var o3_closeweight = "";
462 // Display state variables
466 var o3_showingsticky = 0;
467 var o3_removecounter = 0;
473 // Decide browser version
474 var ns4 = (navigator.appName == 'Netscape' && parseInt(navigator.appVersion) == 4);
475 var ns6 = (document.getElementById)? true:false;
476 var ie4 = (document.all)? true:false;
477 if (ie4) var docRoot = 'document.body';
480 var oW = window.innerWidth;
481 var oH = window.innerHeight;
482 window.onresize = function () {if (oW!=window.innerWidth||oH!=window.innerHeight) location.reload();}
486 // Microsoft Stupidity Check(tm).
488 if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
489 if(document.compatMode && document.compatMode == 'CSS1Compat') docRoot = 'document.documentElement';
498 // Capture events, alt. diffuses the overlib function.
499 if ( (ns4) || (ie4) || (ns6)) {
500 document.onmousemove = mouseMove
501 if (ns4) document.captureEvents(Event.MOUSEMOVE)
503 overlib = no_overlib;
509 // Fake function for 3.0 users.
510 function no_overlib() {
516 ////////////////////////////////////////////////////////////////////////////////////
518 ////////////////////////////////////////////////////////////////////////////////////
521 // overlib(arg0, ..., argN)
522 // Loads parameters into global runtime variables.
525 // Load defaults to runtime.
528 o3_sticky = ol_sticky;
529 o3_background = ol_background;
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;
540 o3_border = ol_border;
541 o3_status = ol_status;
542 o3_autostatus = ol_autostatus;
543 o3_height = ol_height;
548 o3_fgbackground = ol_fgbackground;
549 o3_bgbackground = ol_bgbackground;
554 o3_fullhtml = ol_fullhtml;
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;
569 o3_closeclick = ol_closeclick;
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;
595 // Special for frame support, over must be reset...
596 if ( (ns4) || (ie4) || (ns6) ) {
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");
605 // What the next argument is expected to be.
606 var parsemode = -1, udf, v = null;
609 udf = (!ar.length ? 1 : 0);
611 for (i = 0; i < ar.length; i++) {
614 // Arg is maintext, unless its a PARAMETER
615 if (typeof ar[i] == 'number') {
616 udf = (ar[i] == FUNCTION ? 0 : 1);
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; }
695 if (udf && o3_function) o3_text = o3_function();
700 o3_delayid = setTimeout("overlib351()", o3_delay);
707 // Clears popups if appropriate
709 if ( o3_removecounter >= 1 ) { o3_showingsticky = 0 };
710 if ( (ns4) || (ie4) || (ns6) ) {
711 if ( o3_showingsticky == 0 ) {
713 if (over != null) hideObject(over);
728 ////////////////////////////////////////////////////////////////////////////////////
729 // OVERLIB 3.51 FUNCTION
730 ////////////////////////////////////////////////////////////////////////////////////
733 // This function decides what it is we want to display and how we want it done.
734 function overlib351() {
736 // Make layer content
739 if (o3_background != "" || o3_fullhtml) {
740 // Use background instead of box.
741 layerhtml = ol_content_background(o3_text, o3_background, o3_fullhtml);
743 // They want a popup box.
745 // Prepare popup background
746 if (o3_fgbackground != "" && o3_css == CSSOFF) {
747 o3_fgbackground = "BACKGROUND=\""+o3_fgbackground+"\"";
749 if (o3_bgbackground != "" && o3_css == CSSOFF) {
750 o3_bgbackground = "BACKGROUND=\""+o3_bgbackground+"\"";
753 // Prepare popup colors
754 if (o3_fgcolor != "" && o3_css == CSSOFF) {
755 o3_fgcolor = "BGCOLOR=\""+o3_fgcolor+"\"";
757 if (o3_bgcolor != "" && o3_css == CSSOFF) {
758 o3_bgcolor = "BGCOLOR=\""+o3_bgcolor+"\"";
761 // Prepare popup height
762 if (o3_height > 0 && o3_css == CSSOFF) {
763 o3_height = "HEIGHT=" + o3_height;
768 // Decide which kinda box.
771 layerhtml = ol_content_simple(o3_text);
776 layerhtml = ol_content_caption(o3_text, o3_cap, o3_close);
779 layerhtml = ol_content_caption(o3_text, o3_cap, "");
784 // We want it to stick!
786 if (o3_timerid > 0) {
787 clearTimeout(o3_timerid);
790 o3_showingsticky = 1;
791 o3_removecounter = 0;
795 layerWrite(layerhtml);
797 // Prepare status bar
798 if (o3_autostatus > 0) {
800 if (o3_autostatus > 1) {
805 // When placing the layer the first time, even stickies may be moved.
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);
817 // Stickies should stay where they are.
818 if (o3_sticky) o3_allowmove = 0;
820 return (o3_status != '');
825 ////////////////////////////////////////////////////////////////////////////////////
826 // LAYER GENERATION FUNCTIONS
827 ////////////////////////////////////////////////////////////////////////////////////
829 // Makes simple table without caption
830 function 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>";
842 // Makes table with caption and optional close link
843 function ol_content_caption(text, title, close) {
845 closeevent = "onMouseOver";
847 if (o3_closeclick == 1) closeevent = "onClick";
848 if (o3_capicon != "") o3_capicon = "<IMG SRC=\""+o3_capicon+"\"> ";
851 if (o3_css == CSSCLASS) closing = "<TD ALIGN=RIGHT><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>";
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>";
864 // Sets the background picture, padding and lots more. :)
865 function ol_content_background(text, picture, hasfullhtml) {
871 pU = (o3_padunit == '%' ? '%' : '');
872 hU = (o3_heightunit == '%' ? '%' : '');
873 wU = (o3_widthunit == '%' ? '%' : '');
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>";
879 set_background(picture);
883 // Loads a picture into the div.
884 function set_background(pic) {
886 if (ns4) over.background.src = null;
887 if (ie4) over.backgroundImage = "none";
888 if (ns6) over.style.backgroundImage = "none";
891 over.background.src = pic;
893 over.backgroundImage = "url("+pic+")";
895 over.style.backgroundImage = "url("+pic+")";
902 ////////////////////////////////////////////////////////////////////////////////////
903 // HANDLING FUNCTIONS
904 ////////////////////////////////////////////////////////////////////////////////////
907 // Displays the popup
908 function disp(statustext) {
909 if ( (ns4) || (ie4) || (ns6) ) {
910 if (o3_allowmove == 0) {
917 if (statustext != "") {
918 self.status = statustext;
922 // Decides where we want the popup.
923 function placeLayer() {
926 // HORIZONTAL PLACEMENT
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;
935 // If HAUTO, decide what to use.
937 if ( (o3_x - winoffset) > ((eval(iwidth)) / 2)) {
945 if (o3_hpos == CENTER) { // Center
946 placeX = o3_x+o3_offsetx-(o3_width/2);
947 if (placeX < winoffset) placeX = winoffset;
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;
956 if (o3_hpos == LEFT) { // Left
957 placeX = o3_x-o3_offsetx-o3_width;
958 if (placeX < winoffset) placeX = winoffset;
963 var snapping = placeX % o3_snapx;
964 if (o3_hpos == LEFT) {
965 placeX = placeX - (o3_snapx + snapping);
968 placeX = placeX + (o3_snapx - snapping);
970 if (placeX < winoffset) placeX = winoffset;
976 // VERTICAL PLACEMENT
981 scrolloffset = (ie4) ? eval('o3_frame.'+docRoot+'.scrollTop') : o3_frame.pageYOffset;
983 // If VAUTO, decide what to use.
985 if (ie4) iheight = eval('o3_frame.'+docRoot+'.clientHeight');
986 if (ns4 || ns6) iheight = o3_frame.innerHeight;
988 iheight = (eval(iheight)) / 2;
989 if ( (o3_y - scrolloffset) > iheight) {
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;
1004 placeY = o3_y - (o3_aboveheight + o3_offsety);
1005 if (placeY < scrolloffset) placeY = scrolloffset;
1008 placeY = o3_y + o3_offsety;
1013 var snapping = placeY % o3_snapy;
1015 if (o3_aboveheight > 0 && o3_vpos == ABOVE) {
1016 placeY = placeY - (o3_snapy + snapping);
1018 placeY = placeY + (o3_snapy - snapping);
1021 if (placeY < scrolloffset) placeY = scrolloffset;
1026 // Actually move the object.
1027 repositionTo(over, placeX, placeY);
1032 function 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');}
1037 if (o3_allowmove == 1) {
1042 // The Close onMouseOver function for stickies
1045 o3_showingsticky = 0;
1051 // Makes sure target frame has overLIB
1052 function compatibleframe(frameid) {
1054 if (typeof frameid.document.overDiv =='undefined') return false;
1056 if (typeof frameid.document.all["overDiv"] =='undefined') return false;
1058 if (frameid.document.getElementById('overDiv') == null) return false;
1066 ////////////////////////////////////////////////////////////////////////////////////
1068 ////////////////////////////////////////////////////////////////////////////////////
1071 // Writes to a layer
1072 function layerWrite(txt) {
1076 var lyr = o3_frame.document.overDiv.document
1080 o3_frame.document.all["overDiv"].innerHTML = txt
1082 range = o3_frame.document.createRange();
1083 range.setStartBefore(over);
1084 domfrag = range.createContextualFragment(txt);
1085 while (over.hasChildNodes()) {
1086 over.removeChild(over.lastChild);
1088 over.appendChild(domfrag);
1092 // Make an object visible
1093 function showObject(obj) {
1094 if (ns4) obj.visibility = "show";
1095 else if (ie4) obj.visibility = "visible";
1096 else if (ns6) obj.style.visibility = "visible";
1100 function hideObject(obj) {
1101 if (ns4) obj.visibility = "hide";
1102 else if (ie4) obj.visibility = "hidden";
1103 else if (ns6) obj.style.visibility = "hidden";
1105 if (o3_timerid > 0) clearTimeout(o3_timerid);
1106 if (o3_delayid > 0) clearTimeout(o3_delayid);
1113 function repositionTo(obj,xL,yL) {
1114 if ( (ns4) || (ie4) ) {
1115 obj.left = (ie4 ? xL + 'px' : xL);
1116 obj.top = (ie4 ? yL + 'px' : yL);
1118 obj.style.left = xL + "px";
1119 obj.style.top = yL+ "px";
1123 function getFrameRef(thisFrame, ofrm) {
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;
1131 retVal = '['+i+']' + retVal;
1141 ////////////////////////////////////////////////////////////////////////////////////
1143 ////////////////////////////////////////////////////////////////////////////////////
1146 // Defines which frame we should point to.
1147 function opt_FRAME(frm) {
1148 o3_frame = compatibleframe(frm) ? frm : ol_frame;
1150 if (o3_frame != ol_frame) {
1151 var tFrm = getFrameRef(top.frames, o3_frame);
1152 var sFrm = getFrameRef(top.frames, ol_frame);
1154 if (sFrm.length == tFrm.length) {
1155 l = tFrm.lastIndexOf('[');
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);
1163 var cnt = 0, p = '', str = tFrm;
1165 while((k = str.lastIndexOf('[')) != -1) {
1167 str = str.substring(0,k);
1170 for (var i=0; i<cnt; i++) p = p + 'parent.';
1171 fnRef = p + 'frames' + sFrm + '.';
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");
1183 // Calls an external function
1184 function opt_FUNCTION(callme) {
1185 o3_text = (callme ? callme() : (o3_function ? o3_function() : 'No Function'));
1192 //end (For internal purposes.)
1193 ////////////////////////////////////////////////////////////////////////////////////
1194 // OVERLIB 2 COMPATABILITY FUNCTIONS
1195 // If you aren't upgrading you can remove the below section.
1196 ////////////////////////////////////////////////////////////////////////////////////
1198 // Converts old 0=left, 1=right and 2=center into constants.
1199 function vpos_convert(d) {
1214 function dts(d,text) {
1215 o3_hpos = vpos_convert(d);
1216 overlib(text, o3_hpos, CAPTION, "");
1220 function dtc(d,text, title) {
1221 o3_hpos = vpos_convert(d);
1222 overlib(text, CAPTION, title, o3_hpos);
1226 function stc(d,text, title) {
1227 o3_hpos = vpos_convert(d);
1228 overlib(text, CAPTION, title, o3_hpos, STICKY);
1231 // Simple popup right
1232 function drs(text) {
1236 // Caption popup right
1237 function drc(text, title) {
1241 // Sticky caption right
1242 function src(text,title) {
1246 // Simple popup left
1247 function dls(text) {
1251 // Caption popup left
1252 function dlc(text, title) {
1256 // Sticky caption left
1257 function slc(text,title) {
1261 // Simple popup center
1262 function dcs(text) {
1266 // Caption popup center
1267 function dcc(text, title) {
1271 // Sticky caption center
1272 function scc(text,title) {