java/cewolf-1.0/src/site/overlib.js
author František Kučera <franta-hg@frantovo.cz>
Sat Feb 28 21:36:28 2009 +0100 (2009-02-28)
changeset 2 68cc9b54a153
permissions -rw-r--r--
Mavení problémy
     1 //\//////////////////////////////////////////////////////////////////////////////////
     2 //\  overLIB 3.50  --  This notice must remain untouched at all times.
     3 //\  Copyright Erik Bosrup 1998-2001. All rights reserved.
     4 //\
     5 //\  By Erik Bosrup (erik@bosrup.com).  Last modified 2001-08-28.
     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 erik@bosrup.com.
    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 ////////////////////////////////////////////////////////////////////////////////////
    30 var INARRAY		=	1;
    31 var CAPARRAY		=	2;
    32 var STICKY		=	3;
    33 var BACKGROUND		=	4;
    34 var NOCLOSE		=	5;
    35 var CAPTION		=	6;
    36 var LEFT		=	7;
    37 var RIGHT		=	8;
    38 var CENTER		=	9;
    39 var OFFSETX		=	10;
    40 var OFFSETY		=	11;
    41 var FGCOLOR		=	12;
    42 var BGCOLOR		=	13;
    43 var TEXTCOLOR		=	14;
    44 var CAPCOLOR		=	15;
    45 var CLOSECOLOR		=	16;
    46 var WIDTH		=	17;
    47 var BORDER		=	18;
    48 var STATUS		=	19;
    49 var AUTOSTATUS		=	20;
    50 var AUTOSTATUSCAP	=	21;
    51 var HEIGHT		=	22;
    52 var CLOSETEXT		=	23;
    53 var SNAPX		=	24;
    54 var SNAPY		=	25;
    55 var FIXX		=	26;
    56 var FIXY		=	27;
    57 var FGBACKGROUND	=	28;
    58 var BGBACKGROUND	=	29;
    59 var PADX		=	30; // PADX2 out
    60 var PADY		=	31; // PADY2 out
    61 var FULLHTML		=	34;
    62 var ABOVE		=	35;
    63 var BELOW		=	36;
    64 var CAPICON		=	37;
    65 var TEXTFONT		=	38;
    66 var CAPTIONFONT		=	39;
    67 var CLOSEFONT		=	40;
    68 var TEXTSIZE		=	41;
    69 var CAPTIONSIZE		=	42;
    70 var CLOSESIZE		=	43;
    71 var FRAME		=	44;
    72 var TIMEOUT		=	45;
    73 var FUNCTION		=	46;
    74 var DELAY		=	47;
    75 var HAUTO		=	48;
    76 var VAUTO		=	49;
    77 var CLOSECLICK		=	50;
    78 var CSSOFF		=	51;
    79 var CSSSTYLE		=	52;
    80 var CSSCLASS		=	53;
    81 var FGCLASS		=	54;
    82 var BGCLASS		=	55;
    83 var TEXTFONTCLASS	=	56;
    84 var CAPTIONFONTCLASS	=	57;
    85 var CLOSEFONTCLASS	=	58;
    86 var PADUNIT		=	59;
    87 var HEIGHTUNIT		=	60;
    88 var WIDTHUNIT		=	61;
    89 var TEXTSIZEUNIT	=	62;
    90 var TEXTDECORATION	=	63;
    91 var TEXTSTYLE		=	64;
    92 var TEXTWEIGHT		=	65;
    93 var CAPTIONSIZEUNIT	=	66;
    94 var CAPTIONDECORATION	=	67;
    95 var CAPTIONSTYLE	=	68;
    96 var CAPTIONWEIGHT	=	69;
    97 var CLOSESIZEUNIT	=	70;
    98 var CLOSEDECORATION	=	71;
    99 var CLOSESTYLE		=	72;
   100 var 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)
   111 if (typeof ol_fgcolor == 'undefined') { var ol_fgcolor = "#CCCCFF";}
   112 	
   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";}
   116 	
   117 // Text color
   118 // Usually a dark color
   119 if (typeof ol_textcolor == 'undefined') { var ol_textcolor = "#000000";}
   120 	
   121 // Color of the caption text
   122 // Usually a bright color
   123 if (typeof ol_capcolor == 'undefined') { var ol_capcolor = "#FFFFFF";}
   124 	
   125 // Color of "Close" when using Sticky
   126 // Usually a semi-bright color
   127 if (typeof ol_closecolor == 'undefined') { var ol_closecolor = "#9999FF";}
   128 
   129 // Font face for the main text
   130 if (typeof ol_textfont == 'undefined') { var ol_textfont = "Verdana,Arial,Helvetica";}
   131 
   132 // Font face for the caption
   133 if (typeof ol_captionfont == 'undefined') { var ol_captionfont = "Verdana,Arial,Helvetica";}
   134 
   135 // Font face for the close text
   136 if (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.
   140 if (typeof ol_textsize == 'undefined') { var ol_textsize = "1";}
   141 
   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";}
   145 
   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";}
   149 
   150 // Width of the popups in pixels
   151 // 100-300 pixels is typical
   152 if (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
   156 if (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
   160 if (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
   164 if (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.
   168 if (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.
   172 if (typeof ol_cap == 'undefined') { var ol_cap = ""; }
   173 
   174 // Decides if sticky popups are default.
   175 // 0 for non, 1 for stickies.
   176 if (typeof ol_sticky == 'undefined') { var ol_sticky = 0; }
   177 
   178 // Default background image. Better left empty unless you always want one.
   179 if (typeof ol_background == 'undefined') { var ol_background = ""; }
   180 
   181 // Text for the closing sticky popups.
   182 // Normal is "Close".
   183 if (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.
   187 if (typeof ol_hpos == 'undefined') { var ol_hpos = RIGHT; }
   188 
   189 // Default status bar text when a popup is invoked.
   190 if (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
   194 if (typeof ol_autostatus == 'undefined') { var ol_autostatus = 0; }
   195 
   196 // Default height for popup. Often best left alone.
   197 if (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.
   201 if (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.
   205 if (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.
   209 if (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.
   213 if (typeof ol_fixy == 'undefined') { var ol_fixy = -1; }
   214 
   215 // Background image for the popups inside.
   216 if (typeof ol_fgbackground == 'undefined') { var ol_fgbackground = ""; }
   217 
   218 // Background image for the popups frame.
   219 if (typeof ol_bgbackground == 'undefined') { var ol_bgbackground = ""; }
   220 
   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; }
   223 
   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; }
   226 
   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; }
   229 
   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; }
   232 
   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; }
   236 
   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; }
   240 
   241 // Default height of popup to use when placing the popup above the cursor.
   242 if (typeof ol_aboveheight == 'undefined') { var ol_aboveheight = 0; }
   243 
   244 // Default icon to place next to the popups caption.
   245 if (typeof ol_caption == 'undefined') { var ol_capicon = ""; }
   246 
   247 // Default frame. We default to current frame if there is no frame defined.
   248 if (typeof ol_frame == 'undefined') { var ol_frame = self; }
   249 
   250 // Default timeout. By default there is no timeout.
   251 if (typeof ol_timeout == 'undefined') { var ol_timeout = 0; }
   252 
   253 // Default javascript funktion. By default there is none.
   254 if (typeof ol_function == 'undefined') { var ol_function = Function(); }
   255 
   256 // Default timeout. By default there is no timeout.
   257 if (typeof ol_delay == 'undefined') { var ol_delay = 0; }
   258 
   259 // If overLIB should decide the horizontal placement.
   260 if (typeof ol_hauto == 'undefined') { var ol_hauto = 0; }
   261 
   262 // If overLIB should decide the vertical placement.
   263 if (typeof ol_vauto == 'undefined') { var ol_vauto = 0; }
   264 
   265 
   266 
   267 // If the user has to click to close stickies.
   268 if (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
   272 if (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)
   276 if (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)
   280 if (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)
   284 if (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)
   288 if (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)
   292 if (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" and more
   297 if (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" and more
   302 if (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" and more
   307 if (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)
   311 if (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)
   315 if (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)
   319 if (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)
   323 if (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)
   327 if (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)
   331 if (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)
   335 if (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)
   339 if (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)
   343 if (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)
   347 if (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)
   351 if (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)
   355 if (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.
   367 if (typeof ol_texts == 'undefined') { var ol_texts = new Array("Text 0", "Text 1"); }
   368 
   369 // Array with captions.
   370 if (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!
   389 var o3_text = "";
   390 var o3_cap = "";
   391 var o3_sticky = 0;
   392 var o3_background = "";
   393 var o3_close = "Close";
   394 var o3_hpos = RIGHT;
   395 var o3_offsetx = 2;
   396 var o3_offsety = 2;
   397 var o3_fgcolor = "";
   398 var o3_bgcolor = "";
   399 var o3_textcolor = "";
   400 var o3_capcolor = "";
   401 var o3_closecolor = "";
   402 var o3_width = 100;
   403 var o3_border = 1;
   404 var o3_status = "";
   405 var o3_autostatus = 0;
   406 var o3_height = -1;
   407 var o3_snapx = 0;
   408 var o3_snapy = 0;
   409 var o3_fixx = -1;
   410 var o3_fixy = -1;
   411 var o3_fgbackground = "";
   412 var o3_bgbackground = "";
   413 var o3_padxl = 0;
   414 var o3_padxr = 0;
   415 var o3_padyt = 0;
   416 var o3_padyb = 0;
   417 var o3_fullhtml = 0;
   418 var o3_vpos = BELOW;
   419 var o3_aboveheight = 0;
   420 var o3_capicon = "";
   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";
   427 var o3_frame = self;
   428 var o3_timeout = 0;
   429 var o3_timerid = 0;
   430 var o3_allowmove = 0;
   431 var o3_function = Function();
   432 var o3_delay = 0;
   433 var o3_delayid = 0;
   434 var o3_hauto = 0;
   435 var o3_vauto = 0;
   436 var o3_closeclick = 0;
   437 
   438 var o3_css = CSSOFF;
   439 var o3_fgclass = "";
   440 var o3_bgclass = "";
   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 = "";
   459 
   460 
   461 
   462 // Display state variables
   463 var o3_x = 0;
   464 var o3_y = 0;
   465 var o3_allow = 0;
   466 var o3_showingsticky = 0;
   467 var o3_removecounter = 0;
   468 
   469 // Our layer
   470 var over = null;
   471 
   472 
   473 // Decide browser version
   474 var ns4 = (document.layers)? true:false;
   475 var ns6 = (document.getElementById)? true:false;
   476 var ie4 = (document.all)? true:false;
   477 var ie5 = false;
   478 
   479 // Microsoft Stupidity Check(tm).
   480 if (ie4) {
   481 	if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
   482 		ie5 = true;
   483 	}
   484 	if (ns6) {
   485 		ns6 = false;
   486 	}
   487 }
   488 
   489 
   490 // Capture events, alt. diffuses the overlib function.
   491 if ( (ns4) || (ie4) || (ns6)) {
   492 	document.onmousemove = mouseMove
   493 	if (ns4) document.captureEvents(Event.MOUSEMOVE)
   494 } else {
   495 	overlib = no_overlib;
   496 	nd = no_overlib;
   497 	ver3fix = true;
   498 }
   499 
   500 
   501 // Fake function for 3.0 users.
   502 function no_overlib() {
   503 	return ver3fix;
   504 }
   505 
   506 
   507 
   508 ////////////////////////////////////////////////////////////////////////////////////
   509 // PUBLIC FUNCTIONS
   510 ////////////////////////////////////////////////////////////////////////////////////
   511 
   512 
   513 // overlib(arg0, ..., argN)
   514 // Loads parameters into global runtime variables.
   515 function overlib() {
   516 	
   517 	// Load defaults to runtime.
   518 	o3_text = ol_text;
   519 	o3_cap = ol_cap;
   520 	o3_sticky = ol_sticky;
   521 	o3_background = ol_background;
   522 	o3_close = ol_close;
   523 	o3_hpos = ol_hpos;
   524 	o3_offsetx = ol_offsetx;
   525 	o3_offsety = ol_offsety;
   526 	o3_fgcolor = ol_fgcolor;
   527 	o3_bgcolor = ol_bgcolor;
   528 	o3_textcolor = ol_textcolor;
   529 	o3_capcolor = ol_capcolor;
   530 	o3_closecolor = ol_closecolor;
   531 	o3_width = ol_width;
   532 	o3_border = ol_border;
   533 	o3_status = ol_status;
   534 	o3_autostatus = ol_autostatus;
   535 	o3_height = ol_height;
   536 	o3_snapx = ol_snapx;
   537 	o3_snapy = ol_snapy;
   538 	o3_fixx = ol_fixx;
   539 	o3_fixy = ol_fixy;
   540 	o3_fgbackground = ol_fgbackground;
   541 	o3_bgbackground = ol_bgbackground;
   542 	o3_padxl = ol_padxl;
   543 	o3_padxr = ol_padxr;
   544 	o3_padyt = ol_padyt;
   545 	o3_padyb = ol_padyb;
   546 	o3_fullhtml = ol_fullhtml;
   547 	o3_vpos = ol_vpos;
   548 	o3_aboveheight = ol_aboveheight;
   549 	o3_capicon = ol_capicon;
   550 	o3_textfont = ol_textfont;
   551 	o3_captionfont = ol_captionfont;
   552 	o3_closefont = ol_closefont;
   553 	o3_textsize = ol_textsize;
   554 	o3_captionsize = ol_captionsize;
   555 	o3_closesize = ol_closesize;
   556 	o3_timeout = ol_timeout;
   557 	o3_function = ol_function;
   558 	o3_delay = ol_delay;
   559 	o3_hauto = ol_hauto;
   560 	o3_vauto = ol_vauto;
   561 	o3_closeclick = ol_closeclick;
   562 	
   563 	o3_css = ol_css;
   564 	o3_fgclass = ol_fgclass;
   565 	o3_bgclass = ol_bgclass;
   566 	o3_textfontclass = ol_textfontclass;
   567 	o3_captionfontclass = ol_captionfontclass;
   568 	o3_closefontclass = ol_closefontclass;
   569 	o3_padunit = ol_padunit;
   570 	o3_heightunit = ol_heightunit;
   571 	o3_widthunit = ol_widthunit;
   572 	o3_textsizeunit = ol_textsizeunit;
   573 	o3_textdecoration = ol_textdecoration;
   574 	o3_textstyle = ol_textstyle;
   575 	o3_textweight = ol_textweight;
   576 	o3_captionsizeunit = ol_captionsizeunit;
   577 	o3_captiondecoration = ol_captiondecoration;
   578 	o3_captionstyle = ol_captionstyle;
   579 	o3_captionweight = ol_captionweight;
   580 	o3_closesizeunit = ol_closesizeunit;
   581 	o3_closedecoration = ol_closedecoration;
   582 	o3_closestyle = ol_closestyle;
   583 	o3_closeweight = ol_closeweight;
   584 	
   585 
   586 	// Special for frame support, over must be reset...
   587 	if ( (ns4) || (ie4) || (ns6) ) {
   588 		o3_frame = ol_frame;
   589 		if (ns4) over = o3_frame.document.overDiv
   590 		if (ie4) over = o3_frame.overDiv.style
   591 		if (ns6) over = o3_frame.document.getElementById("overDiv");
   592 	}
   593 	
   594 	
   595 	// What the next argument is expected to be.
   596 	var parsemode = -1;
   597 	
   598 	var ar = arguments;
   599 
   600 	for (i = 0; i < ar.length; i++) {
   601 
   602 		if (parsemode < 0) {
   603 			// Arg is maintext, unless INARRAY
   604 			if (ar[i] == INARRAY) {
   605 				o3_text = ol_texts[ar[++i]];
   606 			} else {
   607 				o3_text = ar[i];
   608 			}
   609 
   610 			parsemode = 0;
   611 		} else {
   612 			// Note: NS4 doesn't like switch cases with vars.
   613 			if (ar[i] == INARRAY) { o3_text = ol_texts[ar[++i]]; continue; }
   614 			if (ar[i] == CAPARRAY) { o3_cap = ol_caps[ar[++i]]; continue; }
   615 			if (ar[i] == STICKY) { o3_sticky = 1; continue; }
   616 			if (ar[i] == BACKGROUND) { o3_background = ar[++i]; continue; }
   617 			if (ar[i] == NOCLOSE) { o3_close = ""; continue; }
   618 			if (ar[i] == CAPTION) { o3_cap = ar[++i]; continue; }
   619 			if (ar[i] == CENTER || ar[i] == LEFT || ar[i] == RIGHT) { o3_hpos = ar[i]; continue; }
   620 			if (ar[i] == OFFSETX) { o3_offsetx = ar[++i]; continue; }
   621 			if (ar[i] == OFFSETY) { o3_offsety = ar[++i]; continue; }
   622 			if (ar[i] == FGCOLOR) { o3_fgcolor = ar[++i]; continue; }
   623 			if (ar[i] == BGCOLOR) { o3_bgcolor = ar[++i]; continue; }
   624 			if (ar[i] == TEXTCOLOR) { o3_textcolor = ar[++i]; continue; }
   625 			if (ar[i] == CAPCOLOR) { o3_capcolor = ar[++i]; continue; }
   626 			if (ar[i] == CLOSECOLOR) { o3_closecolor = ar[++i]; continue; }
   627 			if (ar[i] == WIDTH) { o3_width = ar[++i]; continue; }
   628 			if (ar[i] == BORDER) { o3_border = ar[++i]; continue; }
   629 			if (ar[i] == STATUS) { o3_status = ar[++i]; continue; }
   630 			if (ar[i] == AUTOSTATUS) { o3_autostatus = 1; continue; }
   631 			if (ar[i] == AUTOSTATUSCAP) { o3_autostatus = 2; continue; }
   632 			if (ar[i] == HEIGHT) { o3_height = ar[++i]; o3_aboveheight = ar[i]; continue; } // Same param again.
   633 			if (ar[i] == CLOSETEXT) { o3_close = ar[++i]; continue; }
   634 			if (ar[i] == SNAPX) { o3_snapx = ar[++i]; continue; }
   635 			if (ar[i] == SNAPY) { o3_snapy = ar[++i]; continue; }
   636 			if (ar[i] == FIXX) { o3_fixx = ar[++i]; continue; }
   637 			if (ar[i] == FIXY) { o3_fixy = ar[++i]; continue; }
   638 			if (ar[i] == FGBACKGROUND) { o3_fgbackground = ar[++i]; continue; }
   639 			if (ar[i] == BGBACKGROUND) { o3_bgbackground = ar[++i]; continue; }
   640 			if (ar[i] == PADX) { o3_padxl = ar[++i]; o3_padxr = ar[++i]; continue; }
   641 			if (ar[i] == PADY) { o3_padyt = ar[++i]; o3_padyb = ar[++i]; continue; }
   642 			if (ar[i] == FULLHTML) { o3_fullhtml = 1; continue; }
   643 			if (ar[i] == BELOW || ar[i] == ABOVE) { o3_vpos = ar[i]; continue; }
   644 			if (ar[i] == CAPICON) { o3_capicon = ar[++i]; continue; }
   645 			if (ar[i] == TEXTFONT) { o3_textfont = ar[++i]; continue; }
   646 			if (ar[i] == CAPTIONFONT) { o3_captionfont = ar[++i]; continue; }
   647 			if (ar[i] == CLOSEFONT) { o3_closefont = ar[++i]; continue; }
   648 			if (ar[i] == TEXTSIZE) { o3_textsize = ar[++i]; continue; }
   649 			if (ar[i] == CAPTIONSIZE) { o3_captionsize = ar[++i]; continue; }
   650 			if (ar[i] == CLOSESIZE) { o3_closesize = ar[++i]; continue; }
   651 			if (ar[i] == FRAME) { opt_FRAME(ar[++i]); continue; }
   652 			if (ar[i] == TIMEOUT) { o3_timeout = ar[++i]; continue; }
   653 			if (ar[i] == FUNCTION) { opt_FUNCTION(ar[++i]); continue; }
   654 			if (ar[i] == DELAY) { o3_delay = ar[++i]; continue; }
   655 			if (ar[i] == HAUTO) { o3_hauto = (o3_hauto == 0) ? 1 : 0; continue; }
   656 			if (ar[i] == VAUTO) { o3_vauto = (o3_vauto == 0) ? 1 : 0; continue; }
   657 			if (ar[i] == CLOSECLICK) { o3_closeclick = (o3_closeclick == 0) ? 1 : 0; continue; }
   658 			if (ar[i] == CSSOFF) { o3_css = ar[i]; continue; }
   659 			if (ar[i] == CSSSTYLE) { o3_css = ar[i]; continue; }
   660 			if (ar[i] == CSSCLASS) { o3_css = ar[i]; continue; }
   661 			if (ar[i] == FGCLASS) { o3_fgclass = ar[++i]; continue; }
   662 			if (ar[i] == BGCLASS) { o3_bgclass = ar[++i]; continue; }
   663 			if (ar[i] == TEXTFONTCLASS) { o3_textfontclass = ar[++i]; continue; }
   664 			if (ar[i] == CAPTIONFONTCLASS) { o3_captionfontclass = ar[++i]; continue; }
   665 			if (ar[i] == CLOSEFONTCLASS) { o3_closefontclass = ar[++i]; continue; }
   666 			if (ar[i] == PADUNIT) { o3_padunit = ar[++i]; continue; }
   667 			if (ar[i] == HEIGHTUNIT) { o3_heightunit = ar[++i]; continue; }
   668 			if (ar[i] == WIDTHUNIT) { o3_widthunit = ar[++i]; continue; }
   669 			if (ar[i] == TEXTSIZEUNIT) { o3_textsizeunit = ar[++i]; continue; }
   670 			if (ar[i] == TEXTDECORATION) { o3_textdecoration = ar[++i]; continue; }
   671 			if (ar[i] == TEXTSTYLE) { o3_textstyle = ar[++i]; continue; }
   672 			if (ar[i] == TEXTWEIGHT) { o3_textweight = ar[++i]; continue; }
   673 			if (ar[i] == CAPTIONSIZEUNIT) { o3_captionsizeunit = ar[++i]; continue; }
   674 			if (ar[i] == CAPTIONDECORATION) { o3_captiondecoration = ar[++i]; continue; }
   675 			if (ar[i] == CAPTIONSTYLE) { o3_captionstyle = ar[++i]; continue; }
   676 			if (ar[i] == CAPTIONWEIGHT) { o3_captionweight = ar[++i]; continue; }
   677 			if (ar[i] == CLOSESIZEUNIT) { o3_closesizeunit = ar[++i]; continue; }
   678 			if (ar[i] == CLOSEDECORATION) { o3_closedecoration = ar[++i]; continue; }
   679 			if (ar[i] == CLOSESTYLE) { o3_closestyle = ar[++i]; continue; }
   680 			if (ar[i] == CLOSEWEIGHT) { o3_closeweight = ar[++i]; continue; }
   681 		}
   682 	}
   683 
   684 	if (o3_delay == 0) {
   685 		return overlib350();
   686 	} else {
   687 		o3_delayid = setTimeout("overlib350()", o3_delay);
   688 
   689 		if (o3_sticky) {
   690 			return false;
   691 		} else {
   692 			return true;
   693 		}
   694 	}
   695 }
   696 
   697 
   698 
   699 // Clears popups if appropriate
   700 function nd() {
   701 	if ( o3_removecounter >= 1 ) { o3_showingsticky = 0 };
   702 	if ( (ns4) || (ie4) || (ns6) ) {
   703 		if ( o3_showingsticky == 0 ) {
   704 			o3_allowmove = 0;
   705 			if (over != null) hideObject(over);
   706 		} else {
   707 			o3_removecounter++;
   708 		}
   709 	}
   710 	
   711 	return true;
   712 }
   713 
   714 
   715 
   716 
   717 
   718 
   719 
   720 ////////////////////////////////////////////////////////////////////////////////////
   721 // OVERLIB 3.50 FUNCTION
   722 ////////////////////////////////////////////////////////////////////////////////////
   723 
   724 
   725 // This function decides what it is we want to display and how we want it done.
   726 function overlib350() {
   727 
   728 	// Make layer content
   729 	var layerhtml;
   730 
   731 	if (o3_background != "" || o3_fullhtml) {
   732 		// Use background instead of box.
   733 		layerhtml = ol_content_background(o3_text, o3_background, o3_fullhtml);
   734 	} else {
   735 		// They want a popup box.
   736 
   737 		// Prepare popup background
   738 		if (o3_fgbackground != "" && o3_css == CSSOFF) {
   739 			o3_fgbackground = "BACKGROUND=\""+o3_fgbackground+"\"";
   740 		}
   741 		if (o3_bgbackground != "" && o3_css == CSSOFF) {
   742 			o3_bgbackground = "BACKGROUND=\""+o3_bgbackground+"\"";
   743 		}
   744 
   745 		// Prepare popup colors
   746 		if (o3_fgcolor != "" && o3_css == CSSOFF) {
   747 			o3_fgcolor = "BGCOLOR=\""+o3_fgcolor+"\"";
   748 		}
   749 		if (o3_bgcolor != "" && o3_css == CSSOFF) {
   750 			o3_bgcolor = "BGCOLOR=\""+o3_bgcolor+"\"";
   751 		}
   752 
   753 		// Prepare popup height
   754 		if (o3_height > 0 && o3_css == CSSOFF) {
   755 			o3_height = "HEIGHT=" + o3_height;
   756 		} else {
   757 			o3_height = "";
   758 		}
   759 
   760 		// Decide which kinda box.
   761 		if (o3_cap == "") {
   762 			// Plain
   763 			layerhtml = ol_content_simple(o3_text);
   764 		} else {
   765 			// With caption
   766 			if (o3_sticky) {
   767 				// Show close text
   768 				layerhtml = ol_content_caption(o3_text, o3_cap, o3_close);
   769 			} else {
   770 				// No close text
   771 				layerhtml = ol_content_caption(o3_text, o3_cap, "");
   772 			}
   773 		}
   774 	}
   775 	
   776 	// We want it to stick!
   777 	if (o3_sticky) {
   778 		o3_showingsticky = 1;
   779 		o3_removecounter = 0;
   780 	}
   781 	
   782 	// Write layer
   783 	layerWrite(layerhtml);
   784 	
   785 	// Prepare status bar
   786 	if (o3_autostatus > 0) {
   787 		o3_status = o3_text;
   788 		if (o3_autostatus > 1) {
   789 			o3_status = o3_cap;
   790 		}
   791 	}
   792 
   793 	// When placing the layer the first time, even stickies may be moved.
   794 	o3_allowmove = 0;
   795 
   796 	// Initiate a timer for timeout
   797 	if (o3_timeout > 0) {          
   798 		if (o3_timerid > 0) clearTimeout(o3_timerid);
   799 		o3_timerid = setTimeout("cClick()", o3_timeout);
   800 	}
   801 
   802 	// Show layer
   803 	disp(o3_status);
   804 
   805 	// Stickies should stay where they are.	
   806 	if (o3_sticky) {
   807 		o3_allowmove = 0;
   808 		return false;
   809 	} else {
   810 		return true;
   811 	}
   812 }
   813 
   814 
   815 
   816 ////////////////////////////////////////////////////////////////////////////////////
   817 // LAYER GENERATION FUNCTIONS
   818 ////////////////////////////////////////////////////////////////////////////////////
   819 
   820 // Makes simple table without caption
   821 function ol_content_simple(text) {
   822 	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>";
   823 	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>";
   824 	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>";
   825 
   826 	set_background("");
   827 	return txt;
   828 }
   829 
   830 
   831 
   832 
   833 // Makes table with caption and optional close link
   834 function ol_content_caption(text, title, close) {
   835 	closing = "";
   836 	closeevent = "onMouseOver";
   837 
   838 	if (o3_closeclick == 1) closeevent = "onClick";
   839 	if (o3_capicon != "") o3_capicon = "<IMG SRC=\""+o3_capicon+"\"> ";
   840 
   841 	if (close != "") {
   842 		if (o3_css == CSSCLASS) closing = "<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\" class=\""+o3_closefontclass+"\">"+close+"</A></TD>";
   843 		if (o3_css == CSSSTYLE) closing = "<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return 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>";
   844 		if (o3_css == CSSOFF) closing = "<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\"><FONT COLOR=\""+o3_closecolor+"\" FACE=\""+o3_closefont+"\" SIZE=\""+o3_closesize+"\">"+close+"</FONT></A></TD>";
   845 	}
   846 
   847 	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>";
   848 	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+";\">"+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>";
   849 	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>";
   850 
   851 	set_background("");
   852 	return txt;
   853 }
   854 
   855 // Sets the background picture, padding and lots more. :)
   856 function ol_content_background(text, picture, hasfullhtml) {
   857 	if (hasfullhtml) {
   858 		txt = text;
   859 	} else {
   860 		if (o3_css == CSSCLASS) txt = "<TABLE WIDTH="+o3_width+o3_widthunit+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+o3_heightunit+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+o3_padunit+"></TD></TR><TR><TD WIDTH="+o3_padxl+o3_padunit+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+o3_padunit+"><FONT class=\""+o3_textfontclass+"\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+o3_padunit+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+o3_padunit+"></TD></TR></TABLE>";
   861 		if (o3_css == CSSSTYLE) txt = "<TABLE WIDTH="+o3_width+o3_widthunit+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+o3_heightunit+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+o3_padunit+"></TD></TR><TR><TD WIDTH="+o3_padxl+o3_padunit+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+o3_padunit+"><FONT style=\"font-family: "+o3_textfont+"; color: "+o3_textcolor+"; font-size: "+o3_textsize+o3_textsizeunit+";\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+o3_padunit+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+o3_padunit+"></TD></TR></TABLE>";
   862 		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>";
   863 	}
   864 	set_background(picture);
   865 	return txt;
   866 }
   867 
   868 // Loads a picture into the div.
   869 function set_background(pic) {
   870 	if (pic == "") {
   871 		if (ie4) over.backgroundImage = "none";
   872 		if (ns6) over.style.backgroundImage = "none";
   873 	} else {
   874 		if (ns4) {
   875 			over.background.src = pic;
   876 		} else if (ie4) {
   877 			over.backgroundImage = "url("+pic+")";
   878 		} else if (ns6) {
   879 			over.style.backgroundImage = "url("+pic+")";
   880 		}
   881 	}
   882 }
   883 
   884 
   885 
   886 ////////////////////////////////////////////////////////////////////////////////////
   887 // HANDLING FUNCTIONS
   888 ////////////////////////////////////////////////////////////////////////////////////
   889 
   890 
   891 // Displays the popup
   892 function disp(statustext) {
   893 	if ( (ns4) || (ie4) || (ns6) ) {
   894 		if (o3_allowmove == 0) 	{
   895 			placeLayer();
   896 			showObject(over);
   897 			o3_allowmove = 1;
   898 		}
   899 	}
   900 
   901 	if (statustext != "") {
   902 		self.status = statustext;
   903 	}
   904 }
   905 
   906 // Decides where we want the popup.
   907 function placeLayer() {
   908 	var placeX, placeY;
   909 	
   910 	// HORIZONTAL PLACEMENT
   911 	if (o3_fixx > -1) {
   912 		// Fixed position
   913 		placeX = o3_fixx;
   914 	} else {
   915 		winoffset = (ie4) ? o3_frame.document.body.scrollLeft : o3_frame.pageXOffset;
   916 		if (ie4) iwidth = o3_frame.document.body.clientWidth;
   917 		if (ns4) iwidth = o3_frame.innerWidth; // was screwed in mozilla, fixed now?
   918 		if (ns6) iwidth = o3_frame.outerWidth;
   919 		
   920 		// If HAUTO, decide what to use.
   921 		if (o3_hauto == 1) {
   922 			if ( (o3_x - winoffset) > ((eval(iwidth)) / 2)) {
   923 				o3_hpos = LEFT;
   924 			} else {
   925 				o3_hpos = RIGHT;
   926 			}
   927 		}
   928 		
   929 		// From mouse
   930 		if (o3_hpos == CENTER) { // Center
   931 			placeX = o3_x+o3_offsetx-(o3_width/2);
   932 		}
   933 		if (o3_hpos == RIGHT) { // Right
   934 			placeX = o3_x+o3_offsetx;
   935 			if ( (eval(placeX) + eval(o3_width)) > (winoffset + iwidth) ) {
   936 				placeX = iwidth + winoffset - o3_width;
   937 				if (placeX < 0) placeX = 0;
   938 			}
   939 		}
   940 		if (o3_hpos == LEFT) { // Left
   941 			placeX = o3_x-o3_offsetx-o3_width;
   942 			if (placeX < winoffset) placeX = winoffset;
   943 		}
   944 	
   945 		// Snapping!
   946 		if (o3_snapx > 1) {
   947 			var snapping = placeX % o3_snapx;
   948 			if (o3_hpos == LEFT) {
   949 				placeX = placeX - (o3_snapx + snapping);
   950 			} else {
   951 				// CENTER and RIGHT
   952 				placeX = placeX + (o3_snapx - snapping);
   953 			}
   954 			if (placeX < winoffset) placeX = winoffset;
   955 		}
   956 	}
   957 
   958 	
   959 	
   960 	// VERTICAL PLACEMENT
   961 	if (o3_fixy > -1) {
   962 		// Fixed position
   963 		placeY = o3_fixy;
   964 	} else {
   965 		scrolloffset = (ie4) ? o3_frame.document.body.scrollTop : o3_frame.pageYOffset;
   966 
   967 		// If VAUTO, decide what to use.
   968 		if (o3_vauto == 1) {
   969 			if (ie4) iheight = o3_frame.document.body.clientHeight;
   970 			if (ns4) iheight = o3_frame.innerHeight;
   971 			if (ns6) iheight = o3_frame.outerHeight;
   972 
   973 			iheight = (eval(iheight)) / 2;
   974 			if ( (o3_y - scrolloffset) > iheight) {
   975 				o3_vpos = ABOVE;
   976 			} else {
   977 				o3_vpos = BELOW;
   978 			}
   979 		}
   980 
   981 
   982 		// From mouse
   983 		if (o3_vpos == ABOVE) {
   984 			if (o3_aboveheight == 0) {
   985 				var divref = (ie4) ? o3_frame.document.all['overDiv'] : over;
   986 				o3_aboveheight = (ns4) ? divref.clip.height : divref.offsetHeight;
   987 			}
   988 
   989 			placeY = o3_y - (o3_aboveheight + o3_offsety);
   990 			if (placeY < scrolloffset) placeY = scrolloffset;
   991 		} else {
   992 			// BELOW
   993 			placeY = o3_y + o3_offsety;
   994 		}
   995 
   996 		// Snapping!
   997 		if (o3_snapy > 1) {
   998 			var snapping = placeY % o3_snapy;
   999 			
  1000 			if (o3_aboveheight > 0 && o3_vpos == ABOVE) {
  1001 				placeY = placeY - (o3_snapy + snapping);
  1002 			} else {
  1003 				placeY = placeY + (o3_snapy - snapping);
  1004 			}
  1005 			
  1006 			if (placeY < scrolloffset) placeY = scrolloffset;
  1007 		}
  1008 	}
  1009 
  1010 
  1011 	// Actually move the object.	
  1012 	repositionTo(over, placeX, placeY);
  1013 }
  1014 
  1015 
  1016 // Moves the layer
  1017 function mouseMove(e) {
  1018 	if ( (ns4) || (ns6) ) {o3_x=e.pageX; o3_y=e.pageY;}
  1019 	if (ie4) {o3_x=event.x; o3_y=event.y;}
  1020 	if (ie5) {o3_x=event.x+o3_frame.document.body.scrollLeft; o3_y=event.y+o3_frame.document.body.scrollTop;}
  1021 	
  1022 	if (o3_allowmove == 1) {
  1023 		placeLayer();
  1024 	}
  1025 }
  1026 
  1027 // The Close onMouseOver function for stickies
  1028 function cClick() {
  1029 	hideObject(over);
  1030 	o3_showingsticky = 0;
  1031 	
  1032 	return false;
  1033 }
  1034 
  1035 
  1036 // Makes sure target frame has overLIB
  1037 function compatibleframe(frameid) {        
  1038 	if (ns4) {
  1039 		if (typeof frameid.document.overDiv =='undefined') return false;
  1040 	} else if (ie4) {
  1041 		if (typeof frameid.document.all["overDiv"] =='undefined') return false;
  1042 	} else if (ns6) {
  1043 		if (frameid.document.getElementById('overDiv') == null) return false;
  1044 	}
  1045 
  1046 	return true;
  1047 }
  1048 
  1049 
  1050 
  1051 ////////////////////////////////////////////////////////////////////////////////////
  1052 // LAYER FUNCTIONS
  1053 ////////////////////////////////////////////////////////////////////////////////////
  1054 
  1055 
  1056 // Writes to a layer
  1057 function layerWrite(txt) {
  1058 	txt += "\n";
  1059 	
  1060         if (ns4) {
  1061                 var lyr = o3_frame.document.overDiv.document
  1062 
  1063                 lyr.write(txt)
  1064                 lyr.close()
  1065         } else if (ie4) {
  1066 		o3_frame.document.all["overDiv"].innerHTML = txt
  1067 	} else if (ns6) {
  1068 		range = o3_frame.document.createRange();
  1069 		range.setStartBefore(over);
  1070 		domfrag = range.createContextualFragment(txt);
  1071 		while (over.hasChildNodes()) {
  1072 			over.removeChild(over.lastChild);
  1073 		}
  1074 		over.appendChild(domfrag);
  1075 	}
  1076 }
  1077 
  1078 // Make an object visible
  1079 function showObject(obj) {
  1080         if (ns4) obj.visibility = "show";
  1081         else if (ie4) obj.visibility = "visible";
  1082 	else if (ns6) obj.style.visibility = "visible";
  1083 }
  1084 
  1085 // Hides an object
  1086 function hideObject(obj) {
  1087         if (ns4) obj.visibility = "hide";
  1088         else if (ie4) obj.visibility = "hidden";
  1089 	else if (ns6) obj.style.visibility = "hidden";
  1090         
  1091 	if (o3_timerid > 0) clearTimeout(o3_timerid);
  1092 	if (o3_delayid > 0) clearTimeout(o3_delayid);
  1093 	o3_timerid = 0;
  1094 	o3_delayid = 0;
  1095         self.status = "";
  1096 }
  1097 
  1098 // Move a layer
  1099 function repositionTo(obj,xL,yL) {
  1100 	if ( (ns4) || (ie4) ) {
  1101 	        obj.left = xL;
  1102 	        obj.top = yL;
  1103 	} else if (ns6) {
  1104 		obj.style.left = xL + "px";
  1105 		obj.style.top = yL+ "px";
  1106 	}
  1107 }
  1108 
  1109 
  1110 
  1111 
  1112 
  1113 ////////////////////////////////////////////////////////////////////////////////////
  1114 // PARSER FUNCTIONS
  1115 ////////////////////////////////////////////////////////////////////////////////////
  1116 
  1117 
  1118 // Defines which frame we should point to.
  1119 function opt_FRAME(frm) {
  1120         o3_frame = compatibleframe(frm) ? frm : ol_frame;
  1121 
  1122 	if ( (ns4) || (ie4 || (ns6)) ) {
  1123 		if (ns4) over = o3_frame.document.overDiv;
  1124 		if (ie4) over = o3_frame.overDiv.style;
  1125 		if (ns6) over = o3_frame.document.getElementById("overDiv");
  1126 	}
  1127 
  1128 	return 0;
  1129 }
  1130 
  1131 // Calls an external function
  1132 function opt_FUNCTION(callme) {
  1133 	o3_text = callme()
  1134 	return 0;
  1135 }
  1136 
  1137 
  1138 
  1139 
  1140 //end (For internal purposes.)
  1141 ////////////////////////////////////////////////////////////////////////////////////
  1142 // OVERLIB 2 COMPATABILITY FUNCTIONS
  1143 // If you aren't upgrading you can remove the below section.
  1144 ////////////////////////////////////////////////////////////////////////////////////
  1145 
  1146 // Converts old 0=left, 1=right and 2=center into constants.
  1147 function vpos_convert(d) {
  1148 	if (d == 0) {
  1149 		d = LEFT;
  1150 	} else {
  1151 		if (d == 1) {
  1152 			d = RIGHT;
  1153 		} else {
  1154 			d = CENTER;
  1155 		}
  1156 	}
  1157 	
  1158 	return d;
  1159 }
  1160 
  1161 // Simple popup
  1162 function dts(d,text) {
  1163 	o3_hpos = vpos_convert(d);
  1164 	overlib(text, o3_hpos, CAPTION, "");
  1165 }
  1166 
  1167 // Caption popup
  1168 function dtc(d,text, title) {
  1169 	o3_hpos = vpos_convert(d);
  1170 	overlib(text, CAPTION, title, o3_hpos);
  1171 }
  1172 
  1173 // Sticky
  1174 function stc(d,text, title) {
  1175 	o3_hpos = vpos_convert(d);
  1176 	overlib(text, CAPTION, title, o3_hpos, STICKY);
  1177 }
  1178 
  1179 // Simple popup right
  1180 function drs(text) {
  1181 	dts(1,text);
  1182 }
  1183 
  1184 // Caption popup right
  1185 function drc(text, title) {
  1186 	dtc(1,text,title);
  1187 }
  1188 
  1189 // Sticky caption right
  1190 function src(text,title) {
  1191 	stc(1,text,title);
  1192 }
  1193 
  1194 // Simple popup left
  1195 function dls(text) {
  1196 	dts(0,text);
  1197 }
  1198 
  1199 // Caption popup left
  1200 function dlc(text, title) {
  1201 	dtc(0,text,title);
  1202 }
  1203 
  1204 // Sticky caption left
  1205 function slc(text,title) {
  1206 	stc(0,text,title);
  1207 }
  1208 
  1209 // Simple popup center
  1210 function dcs(text) {
  1211 	dts(2,text);
  1212 }
  1213 
  1214 // Caption popup center
  1215 function dcc(text, title) {
  1216 	dtc(2,text,title);
  1217 }
  1218 
  1219 // Sticky caption center
  1220 function scc(text,title) {
  1221 	stc(2,text,title);
  1222 }