home *** CD-ROM | disk | FTP | other *** search
/ csi.uticak12.org / csi.uticak12.org.tar / csi.uticak12.org / js / overlib.js < prev    next >
Text File  |  2011-10-20  |  43KB  |  1,275 lines

  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 (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.
  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 = "#FFFFFF";}
  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 = "#CCC8BD";}
  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 = "#000";}
  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_capicon == '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 = null; }
  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 = 1; }
  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"
  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"
  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"
  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 = null;
  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. var fnRef;
  472.  
  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';
  478. var ie5 = false;
  479. if (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).
  487. if (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.
  499. if ( (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.
  510. function 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.
  523. function 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
  708. function 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.
  734. function 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
  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>";
  834.  
  835.     set_background("");
  836.     return txt;
  837. }
  838.  
  839.  
  840.  
  841.  
  842. // Makes table with caption and optional close link
  843. function 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><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. :)
  865. function 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.
  884. function 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
  908. function 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.
  923. function 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
  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');}
  1036.  
  1037.     if (o3_allowmove == 1) {
  1038.         placeLayer();
  1039.     }
  1040. }
  1041.  
  1042. // The Close onMouseOver function for stickies
  1043. function cClick() {
  1044.     hideObject(over);
  1045.     o3_showingsticky = 0;
  1046.  
  1047.     return false;
  1048. }
  1049.  
  1050.  
  1051. // Makes sure target frame has overLIB
  1052. function 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
  1072. function 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
  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";
  1097. }
  1098.  
  1099. // Hides an object
  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";
  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
  1113. function 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.  
  1123. function 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.
  1147. function 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
  1184. function 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.
  1199. function 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
  1214. function dts(d,text) {
  1215.     o3_hpos = vpos_convert(d);
  1216.     overlib(text, o3_hpos, CAPTION, "");
  1217. }
  1218.  
  1219. // Caption popup
  1220. function dtc(d,text, title) {
  1221.     o3_hpos = vpos_convert(d);
  1222.     overlib(text, CAPTION, title, o3_hpos);
  1223. }
  1224.  
  1225. // Sticky
  1226. function stc(d,text, title) {
  1227.     o3_hpos = vpos_convert(d);
  1228.     overlib(text, CAPTION, title, o3_hpos, STICKY);
  1229. }
  1230.  
  1231. // Simple popup right
  1232. function drs(text) {
  1233.     dts(1,text);
  1234. }
  1235.  
  1236. // Caption popup right
  1237. function drc(text, title) {
  1238.     dtc(1,text,title);
  1239. }
  1240.  
  1241. // Sticky caption right
  1242. function src(text,title) {
  1243.     stc(1,text,title);
  1244. }
  1245.  
  1246. // Simple popup left
  1247. function dls(text) {
  1248.     dts(0,text);
  1249. }
  1250.  
  1251. // Caption popup left
  1252. function dlc(text, title) {
  1253.     dtc(0,text,title);
  1254. }
  1255.  
  1256. // Sticky caption left
  1257. function slc(text,title) {
  1258.     stc(0,text,title);
  1259. }
  1260.  
  1261. // Simple popup center
  1262. function dcs(text) {
  1263.     dts(2,text);
  1264. }
  1265.  
  1266. // Caption popup center
  1267. function dcc(text, title) {
  1268.     dtc(2,text,title);
  1269. }
  1270.  
  1271. // Sticky caption center
  1272. function scc(text,title) {
  1273.     stc(2,text,title);
  1274. }
  1275.