overlib.js 43 KB

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