franta-hg@1: //\//////////////////////////////////////////////////////////////////////////////////
franta-hg@1: //\ overLIB 3.50 -- This notice must remain untouched at all times.
franta-hg@1: //\ Copyright Erik Bosrup 1998-2001. All rights reserved.
franta-hg@1: //\
franta-hg@1: //\ By Erik Bosrup (erik@bosrup.com). Last modified 2001-08-28.
franta-hg@1: //\ Portions by Dan Steinman (dansteinman.com). Additions by other people are
franta-hg@1: //\ listed on the overLIB homepage.
franta-hg@1: //\
franta-hg@1: //\ Get the latest version at http://www.bosrup.com/web/overlib/
franta-hg@1: //\
franta-hg@1: //\ This script is published under an open source license. Please read the license
franta-hg@1: //\ agreement online at: http://www.bosrup.com/web/overlib/license.html
franta-hg@1: //\ If you have questions regarding the license please contact erik@bosrup.com.
franta-hg@1: //\
franta-hg@1: //\ This script library was originally created for personal use. By request it has
franta-hg@1: //\ later been made public. This is free software. Do not sell this as your own
franta-hg@1: //\ work, or remove this copyright notice. For full details on copying or changing
franta-hg@1: //\ this script please read the license agreement at the link above.
franta-hg@1: //\
franta-hg@1: //\ Please give credit on sites that use overLIB and submit changes of the script
franta-hg@1: //\ so other people can use them as well. This script is free to use, don't abuse.
franta-hg@1: //\//////////////////////////////////////////////////////////////////////////////////
franta-hg@1: //\mini
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // CONSTANTS
franta-hg@1: // Don't touch these. :)
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: var INARRAY = 1;
franta-hg@1: var CAPARRAY = 2;
franta-hg@1: var STICKY = 3;
franta-hg@1: var BACKGROUND = 4;
franta-hg@1: var NOCLOSE = 5;
franta-hg@1: var CAPTION = 6;
franta-hg@1: var LEFT = 7;
franta-hg@1: var RIGHT = 8;
franta-hg@1: var CENTER = 9;
franta-hg@1: var OFFSETX = 10;
franta-hg@1: var OFFSETY = 11;
franta-hg@1: var FGCOLOR = 12;
franta-hg@1: var BGCOLOR = 13;
franta-hg@1: var TEXTCOLOR = 14;
franta-hg@1: var CAPCOLOR = 15;
franta-hg@1: var CLOSECOLOR = 16;
franta-hg@1: var WIDTH = 17;
franta-hg@1: var BORDER = 18;
franta-hg@1: var STATUS = 19;
franta-hg@1: var AUTOSTATUS = 20;
franta-hg@1: var AUTOSTATUSCAP = 21;
franta-hg@1: var HEIGHT = 22;
franta-hg@1: var CLOSETEXT = 23;
franta-hg@1: var SNAPX = 24;
franta-hg@1: var SNAPY = 25;
franta-hg@1: var FIXX = 26;
franta-hg@1: var FIXY = 27;
franta-hg@1: var FGBACKGROUND = 28;
franta-hg@1: var BGBACKGROUND = 29;
franta-hg@1: var PADX = 30; // PADX2 out
franta-hg@1: var PADY = 31; // PADY2 out
franta-hg@1: var FULLHTML = 34;
franta-hg@1: var ABOVE = 35;
franta-hg@1: var BELOW = 36;
franta-hg@1: var CAPICON = 37;
franta-hg@1: var TEXTFONT = 38;
franta-hg@1: var CAPTIONFONT = 39;
franta-hg@1: var CLOSEFONT = 40;
franta-hg@1: var TEXTSIZE = 41;
franta-hg@1: var CAPTIONSIZE = 42;
franta-hg@1: var CLOSESIZE = 43;
franta-hg@1: var FRAME = 44;
franta-hg@1: var TIMEOUT = 45;
franta-hg@1: var FUNCTION = 46;
franta-hg@1: var DELAY = 47;
franta-hg@1: var HAUTO = 48;
franta-hg@1: var VAUTO = 49;
franta-hg@1: var CLOSECLICK = 50;
franta-hg@1: var CSSOFF = 51;
franta-hg@1: var CSSSTYLE = 52;
franta-hg@1: var CSSCLASS = 53;
franta-hg@1: var FGCLASS = 54;
franta-hg@1: var BGCLASS = 55;
franta-hg@1: var TEXTFONTCLASS = 56;
franta-hg@1: var CAPTIONFONTCLASS = 57;
franta-hg@1: var CLOSEFONTCLASS = 58;
franta-hg@1: var PADUNIT = 59;
franta-hg@1: var HEIGHTUNIT = 60;
franta-hg@1: var WIDTHUNIT = 61;
franta-hg@1: var TEXTSIZEUNIT = 62;
franta-hg@1: var TEXTDECORATION = 63;
franta-hg@1: var TEXTSTYLE = 64;
franta-hg@1: var TEXTWEIGHT = 65;
franta-hg@1: var CAPTIONSIZEUNIT = 66;
franta-hg@1: var CAPTIONDECORATION = 67;
franta-hg@1: var CAPTIONSTYLE = 68;
franta-hg@1: var CAPTIONWEIGHT = 69;
franta-hg@1: var CLOSESIZEUNIT = 70;
franta-hg@1: var CLOSEDECORATION = 71;
franta-hg@1: var CLOSESTYLE = 72;
franta-hg@1: var CLOSEWEIGHT = 73;
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // DEFAULT CONFIGURATION
franta-hg@1: // You don't have to change anything here if you don't want to. All of this can be
franta-hg@1: // changed on your html page or through an overLIB call.
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1: // Main background color (the large area)
franta-hg@1: // Usually a bright color (white, yellow etc)
franta-hg@1: if (typeof ol_fgcolor == 'undefined') { var ol_fgcolor = "#CCCCFF";}
franta-hg@1:
franta-hg@1: // Border color and color of caption
franta-hg@1: // Usually a dark color (black, brown etc)
franta-hg@1: if (typeof ol_bgcolor == 'undefined') { var ol_bgcolor = "#333399";}
franta-hg@1:
franta-hg@1: // Text color
franta-hg@1: // Usually a dark color
franta-hg@1: if (typeof ol_textcolor == 'undefined') { var ol_textcolor = "#000000";}
franta-hg@1:
franta-hg@1: // Color of the caption text
franta-hg@1: // Usually a bright color
franta-hg@1: if (typeof ol_capcolor == 'undefined') { var ol_capcolor = "#FFFFFF";}
franta-hg@1:
franta-hg@1: // Color of "Close" when using Sticky
franta-hg@1: // Usually a semi-bright color
franta-hg@1: if (typeof ol_closecolor == 'undefined') { var ol_closecolor = "#9999FF";}
franta-hg@1:
franta-hg@1: // Font face for the main text
franta-hg@1: if (typeof ol_textfont == 'undefined') { var ol_textfont = "Verdana,Arial,Helvetica";}
franta-hg@1:
franta-hg@1: // Font face for the caption
franta-hg@1: if (typeof ol_captionfont == 'undefined') { var ol_captionfont = "Verdana,Arial,Helvetica";}
franta-hg@1:
franta-hg@1: // Font face for the close text
franta-hg@1: if (typeof ol_closefont == 'undefined') { var ol_closefont = "Verdana,Arial,Helvetica";}
franta-hg@1:
franta-hg@1: // Font size for the main text
franta-hg@1: // When using CSS this will be very small.
franta-hg@1: if (typeof ol_textsize == 'undefined') { var ol_textsize = "1";}
franta-hg@1:
franta-hg@1: // Font size for the caption
franta-hg@1: // When using CSS this will be very small.
franta-hg@1: if (typeof ol_captionsize == 'undefined') { var ol_captionsize = "1";}
franta-hg@1:
franta-hg@1: // Font size for the close text
franta-hg@1: // When using CSS this will be very small.
franta-hg@1: if (typeof ol_closesize == 'undefined') { var ol_closesize = "1";}
franta-hg@1:
franta-hg@1: // Width of the popups in pixels
franta-hg@1: // 100-300 pixels is typical
franta-hg@1: if (typeof ol_width == 'undefined') { var ol_width = "200";}
franta-hg@1:
franta-hg@1: // How thick the ol_border should be in pixels
franta-hg@1: // 1-3 pixels is typical
franta-hg@1: if (typeof ol_border == 'undefined') { var ol_border = "1";}
franta-hg@1:
franta-hg@1: // How many pixels to the right/left of the cursor to show the popup
franta-hg@1: // Values between 3 and 12 are best
franta-hg@1: if (typeof ol_offsetx == 'undefined') { var ol_offsetx = 10;}
franta-hg@1:
franta-hg@1: // How many pixels to the below the cursor to show the popup
franta-hg@1: // Values between 3 and 12 are best
franta-hg@1: if (typeof ol_offsety == 'undefined') { var ol_offsety = 10;}
franta-hg@1:
franta-hg@1: // Default text for popups
franta-hg@1: // Should you forget to pass something to overLIB this will be displayed.
franta-hg@1: if (typeof ol_text == 'undefined') { var ol_text = "Default Text"; }
franta-hg@1:
franta-hg@1: // Default caption
franta-hg@1: // You should leave this blank or you will have problems making non caps popups.
franta-hg@1: if (typeof ol_cap == 'undefined') { var ol_cap = ""; }
franta-hg@1:
franta-hg@1: // Decides if sticky popups are default.
franta-hg@1: // 0 for non, 1 for stickies.
franta-hg@1: if (typeof ol_sticky == 'undefined') { var ol_sticky = 0; }
franta-hg@1:
franta-hg@1: // Default background image. Better left empty unless you always want one.
franta-hg@1: if (typeof ol_background == 'undefined') { var ol_background = ""; }
franta-hg@1:
franta-hg@1: // Text for the closing sticky popups.
franta-hg@1: // Normal is "Close".
franta-hg@1: if (typeof ol_close == 'undefined') { var ol_close = "Close"; }
franta-hg@1:
franta-hg@1: // Default vertical alignment for popups.
franta-hg@1: // It's best to leave RIGHT here. Other options are LEFT and CENTER.
franta-hg@1: if (typeof ol_hpos == 'undefined') { var ol_hpos = RIGHT; }
franta-hg@1:
franta-hg@1: // Default status bar text when a popup is invoked.
franta-hg@1: if (typeof ol_status == 'undefined') { var ol_status = ""; }
franta-hg@1:
franta-hg@1: // If the status bar automatically should load either text or caption.
franta-hg@1: // 0=nothing, 1=text, 2=caption
franta-hg@1: if (typeof ol_autostatus == 'undefined') { var ol_autostatus = 0; }
franta-hg@1:
franta-hg@1: // Default height for popup. Often best left alone.
franta-hg@1: if (typeof ol_height == 'undefined') { var ol_height = -1; }
franta-hg@1:
franta-hg@1: // Horizontal grid spacing that popups will snap to.
franta-hg@1: // 0 makes no grid, anything else will cause a snap to that grid spacing.
franta-hg@1: if (typeof ol_snapx == 'undefined') { var ol_snapx = 0; }
franta-hg@1:
franta-hg@1: // Vertical grid spacing that popups will snap to.
franta-hg@1: // 0 makes no grid, andthing else will cause a snap to that grid spacing.
franta-hg@1: if (typeof ol_snapy == 'undefined') { var ol_snapy = 0; }
franta-hg@1:
franta-hg@1: // Sets the popups horizontal position to a fixed column.
franta-hg@1: // Anything above -1 will cause fixed position.
franta-hg@1: if (typeof ol_fixx == 'undefined') { var ol_fixx = -1; }
franta-hg@1:
franta-hg@1: // Sets the popups vertical position to a fixed row.
franta-hg@1: // Anything above -1 will cause fixed position.
franta-hg@1: if (typeof ol_fixy == 'undefined') { var ol_fixy = -1; }
franta-hg@1:
franta-hg@1: // Background image for the popups inside.
franta-hg@1: if (typeof ol_fgbackground == 'undefined') { var ol_fgbackground = ""; }
franta-hg@1:
franta-hg@1: // Background image for the popups frame.
franta-hg@1: if (typeof ol_bgbackground == 'undefined') { var ol_bgbackground = ""; }
franta-hg@1:
franta-hg@1: // How much horizontal left padding text should get by default when BACKGROUND is used.
franta-hg@1: if (typeof ol_padxl == 'undefined') { var ol_padxl = 1; }
franta-hg@1:
franta-hg@1: // How much horizontal right padding text should get by default when BACKGROUND is used.
franta-hg@1: if (typeof ol_padxr == 'undefined') { var ol_padxr = 1; }
franta-hg@1:
franta-hg@1: // How much vertical top padding text should get by default when BACKGROUND is used.
franta-hg@1: if (typeof ol_padyt == 'undefined') { var ol_padyt = 1; }
franta-hg@1:
franta-hg@1: // How much vertical bottom padding text should get by default when BACKGROUND is used.
franta-hg@1: if (typeof ol_padyb == 'undefined') { var ol_padyb = 1; }
franta-hg@1:
franta-hg@1: // If the user by default must supply all html for complete popup control.
franta-hg@1: // Set to 1 to activate, 0 otherwise.
franta-hg@1: if (typeof ol_fullhtml == 'undefined') { var ol_fullhtml = 0; }
franta-hg@1:
franta-hg@1: // Default vertical position of the popup. Default should normally be BELOW.
franta-hg@1: // ABOVE only works when HEIGHT is defined.
franta-hg@1: if (typeof ol_vpos == 'undefined') { var ol_vpos = BELOW; }
franta-hg@1:
franta-hg@1: // Default height of popup to use when placing the popup above the cursor.
franta-hg@1: if (typeof ol_aboveheight == 'undefined') { var ol_aboveheight = 0; }
franta-hg@1:
franta-hg@1: // Default icon to place next to the popups caption.
franta-hg@1: if (typeof ol_caption == 'undefined') { var ol_capicon = ""; }
franta-hg@1:
franta-hg@1: // Default frame. We default to current frame if there is no frame defined.
franta-hg@1: if (typeof ol_frame == 'undefined') { var ol_frame = self; }
franta-hg@1:
franta-hg@1: // Default timeout. By default there is no timeout.
franta-hg@1: if (typeof ol_timeout == 'undefined') { var ol_timeout = 0; }
franta-hg@1:
franta-hg@1: // Default javascript funktion. By default there is none.
franta-hg@1: if (typeof ol_function == 'undefined') { var ol_function = Function(); }
franta-hg@1:
franta-hg@1: // Default timeout. By default there is no timeout.
franta-hg@1: if (typeof ol_delay == 'undefined') { var ol_delay = 0; }
franta-hg@1:
franta-hg@1: // If overLIB should decide the horizontal placement.
franta-hg@1: if (typeof ol_hauto == 'undefined') { var ol_hauto = 0; }
franta-hg@1:
franta-hg@1: // If overLIB should decide the vertical placement.
franta-hg@1: if (typeof ol_vauto == 'undefined') { var ol_vauto = 0; }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: // If the user has to click to close stickies.
franta-hg@1: if (typeof ol_closeclick == 'undefined') { var ol_closeclick = 0; }
franta-hg@1:
franta-hg@1: // This variable determines if you want to use CSS or inline definitions.
franta-hg@1: // CSSOFF=no CSS CSSSTYLE=use CSS inline styles CSSCLASS=use classes
franta-hg@1: if (typeof ol_css == 'undefined') { var ol_css = CSSOFF; }
franta-hg@1:
franta-hg@1: // Main background class (eqv of fgcolor)
franta-hg@1: // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
franta-hg@1: if (typeof ol_fgclass == 'undefined') { var ol_fgclass = ""; }
franta-hg@1:
franta-hg@1: // Frame background class (eqv of bgcolor)
franta-hg@1: // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
franta-hg@1: if (typeof ol_bgclass == 'undefined') { var ol_bgclass = ""; }
franta-hg@1:
franta-hg@1: // Main font class
franta-hg@1: // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
franta-hg@1: if (typeof ol_textfontclass == 'undefined') { var ol_textfontclass = ""; }
franta-hg@1:
franta-hg@1: // Caption font class
franta-hg@1: // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
franta-hg@1: if (typeof ol_captionfontclass == 'undefined') { var ol_captionfontclass = ""; }
franta-hg@1:
franta-hg@1: // Close font class
franta-hg@1: // This is only used if CSS is set to use classes (ol_css = CSSCLASS)
franta-hg@1: if (typeof ol_closefontclass == 'undefined') { var ol_closefontclass = ""; }
franta-hg@1:
franta-hg@1: // Unit to be used for the text padding above
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: // Options include "px", "%", "in", "cm" and more
franta-hg@1: if (typeof ol_padunit == 'undefined') { var ol_padunit = "px";}
franta-hg@1:
franta-hg@1: // Unit to be used for height of popup
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: // Options include "px", "%", "in", "cm" and more
franta-hg@1: if (typeof ol_heightunit == 'undefined') { var ol_heightunit = "px";}
franta-hg@1:
franta-hg@1: // Unit to be used for width of popup
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: // Options include "px", "%", "in", "cm" and more
franta-hg@1: if (typeof ol_widthunit == 'undefined') { var ol_widthunit = "px";}
franta-hg@1:
franta-hg@1: // Font size unit for the main text
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_textsizeunit == 'undefined') { var ol_textsizeunit = "px";}
franta-hg@1:
franta-hg@1: // Decoration of the main text ("none", "underline", "line-through" or "blink")
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_textdecoration == 'undefined') { var ol_textdecoration = "none";}
franta-hg@1:
franta-hg@1: // Font style of the main text ("normal" or "italic")
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_textstyle == 'undefined') { var ol_textstyle = "normal";}
franta-hg@1:
franta-hg@1: // Font weight of the main text ("normal", "bold", "bolder", "lighter", ect.)
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_textweight == 'undefined') { var ol_textweight = "normal";}
franta-hg@1:
franta-hg@1: // Font size unit for the caption
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_captionsizeunit == 'undefined') { var ol_captionsizeunit = "px";}
franta-hg@1:
franta-hg@1: // Decoration of the caption ("none", "underline", "line-through" or "blink")
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_captiondecoration == 'undefined') { var ol_captiondecoration = "none";}
franta-hg@1:
franta-hg@1: // Font style of the caption ("normal" or "italic")
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_captionstyle == 'undefined') { var ol_captionstyle = "normal";}
franta-hg@1:
franta-hg@1: // Font weight of the caption ("normal", "bold", "bolder", "lighter", ect.)
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_captionweight == 'undefined') { var ol_captionweight = "bold";}
franta-hg@1:
franta-hg@1: // Font size unit for the close text
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_closesizeunit == 'undefined') { var ol_closesizeunit = "px";}
franta-hg@1:
franta-hg@1: // Decoration of the close text ("none", "underline", "line-through" or "blink")
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_closedecoration == 'undefined') { var ol_closedecoration = "none";}
franta-hg@1:
franta-hg@1: // Font style of the close text ("normal" or "italic")
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_closestyle == 'undefined') { var ol_closestyle = "normal";}
franta-hg@1:
franta-hg@1: // Font weight of the close text ("normal", "bold", "bolder", "lighter", ect.)
franta-hg@1: // Only used if CSS inline styles are being used (ol_css = CSSSTYLE)
franta-hg@1: if (typeof ol_closeweight == 'undefined') { var ol_closeweight = "normal";}
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // ARRAY CONFIGURATION
franta-hg@1: // You don't have to change anything here if you don't want to. The following
franta-hg@1: // arrays can be filled with text and html if you don't wish to pass it from
franta-hg@1: // your html page.
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1: // Array with texts.
franta-hg@1: if (typeof ol_texts == 'undefined') { var ol_texts = new Array("Text 0", "Text 1"); }
franta-hg@1:
franta-hg@1: // Array with captions.
franta-hg@1: if (typeof ol_caps == 'undefined') { var ol_caps = new Array("Caption 0", "Caption 1"); }
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // END CONFIGURATION
franta-hg@1: // Don't change anything below this line, all configuration is above.
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // INIT
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1: // Runtime variables init. Used for runtime only, don't change, not for config!
franta-hg@1: var o3_text = "";
franta-hg@1: var o3_cap = "";
franta-hg@1: var o3_sticky = 0;
franta-hg@1: var o3_background = "";
franta-hg@1: var o3_close = "Close";
franta-hg@1: var o3_hpos = RIGHT;
franta-hg@1: var o3_offsetx = 2;
franta-hg@1: var o3_offsety = 2;
franta-hg@1: var o3_fgcolor = "";
franta-hg@1: var o3_bgcolor = "";
franta-hg@1: var o3_textcolor = "";
franta-hg@1: var o3_capcolor = "";
franta-hg@1: var o3_closecolor = "";
franta-hg@1: var o3_width = 100;
franta-hg@1: var o3_border = 1;
franta-hg@1: var o3_status = "";
franta-hg@1: var o3_autostatus = 0;
franta-hg@1: var o3_height = -1;
franta-hg@1: var o3_snapx = 0;
franta-hg@1: var o3_snapy = 0;
franta-hg@1: var o3_fixx = -1;
franta-hg@1: var o3_fixy = -1;
franta-hg@1: var o3_fgbackground = "";
franta-hg@1: var o3_bgbackground = "";
franta-hg@1: var o3_padxl = 0;
franta-hg@1: var o3_padxr = 0;
franta-hg@1: var o3_padyt = 0;
franta-hg@1: var o3_padyb = 0;
franta-hg@1: var o3_fullhtml = 0;
franta-hg@1: var o3_vpos = BELOW;
franta-hg@1: var o3_aboveheight = 0;
franta-hg@1: var o3_capicon = "";
franta-hg@1: var o3_textfont = "Verdana,Arial,Helvetica";
franta-hg@1: var o3_captionfont = "Verdana,Arial,Helvetica";
franta-hg@1: var o3_closefont = "Verdana,Arial,Helvetica";
franta-hg@1: var o3_textsize = "1";
franta-hg@1: var o3_captionsize = "1";
franta-hg@1: var o3_closesize = "1";
franta-hg@1: var o3_frame = self;
franta-hg@1: var o3_timeout = 0;
franta-hg@1: var o3_timerid = 0;
franta-hg@1: var o3_allowmove = 0;
franta-hg@1: var o3_function = Function();
franta-hg@1: var o3_delay = 0;
franta-hg@1: var o3_delayid = 0;
franta-hg@1: var o3_hauto = 0;
franta-hg@1: var o3_vauto = 0;
franta-hg@1: var o3_closeclick = 0;
franta-hg@1:
franta-hg@1: var o3_css = CSSOFF;
franta-hg@1: var o3_fgclass = "";
franta-hg@1: var o3_bgclass = "";
franta-hg@1: var o3_textfontclass = "";
franta-hg@1: var o3_captionfontclass = "";
franta-hg@1: var o3_closefontclass = "";
franta-hg@1: var o3_padunit = "px";
franta-hg@1: var o3_heightunit = "px";
franta-hg@1: var o3_widthunit = "px";
franta-hg@1: var o3_textsizeunit = "px";
franta-hg@1: var o3_textdecoration = "";
franta-hg@1: var o3_textstyle = "";
franta-hg@1: var o3_textweight = "";
franta-hg@1: var o3_captionsizeunit = "px";
franta-hg@1: var o3_captiondecoration = "";
franta-hg@1: var o3_captionstyle = "";
franta-hg@1: var o3_captionweight = "";
franta-hg@1: var o3_closesizeunit = "px";
franta-hg@1: var o3_closedecoration = "";
franta-hg@1: var o3_closestyle = "";
franta-hg@1: var o3_closeweight = "";
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: // Display state variables
franta-hg@1: var o3_x = 0;
franta-hg@1: var o3_y = 0;
franta-hg@1: var o3_allow = 0;
franta-hg@1: var o3_showingsticky = 0;
franta-hg@1: var o3_removecounter = 0;
franta-hg@1:
franta-hg@1: // Our layer
franta-hg@1: var over = null;
franta-hg@1:
franta-hg@1:
franta-hg@1: // Decide browser version
franta-hg@1: var ns4 = (document.layers)? true:false;
franta-hg@1: var ns6 = (document.getElementById)? true:false;
franta-hg@1: var ie4 = (document.all)? true:false;
franta-hg@1: var ie5 = false;
franta-hg@1:
franta-hg@1: // Microsoft Stupidity Check(tm).
franta-hg@1: if (ie4) {
franta-hg@1: if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
franta-hg@1: ie5 = true;
franta-hg@1: }
franta-hg@1: if (ns6) {
franta-hg@1: ns6 = false;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1: // Capture events, alt. diffuses the overlib function.
franta-hg@1: if ( (ns4) || (ie4) || (ns6)) {
franta-hg@1: document.onmousemove = mouseMove
franta-hg@1: if (ns4) document.captureEvents(Event.MOUSEMOVE)
franta-hg@1: } else {
franta-hg@1: overlib = no_overlib;
franta-hg@1: nd = no_overlib;
franta-hg@1: ver3fix = true;
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1: // Fake function for 3.0 users.
franta-hg@1: function no_overlib() {
franta-hg@1: return ver3fix;
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // PUBLIC FUNCTIONS
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1:
franta-hg@1: // overlib(arg0, ..., argN)
franta-hg@1: // Loads parameters into global runtime variables.
franta-hg@1: function overlib() {
franta-hg@1:
franta-hg@1: // Load defaults to runtime.
franta-hg@1: o3_text = ol_text;
franta-hg@1: o3_cap = ol_cap;
franta-hg@1: o3_sticky = ol_sticky;
franta-hg@1: o3_background = ol_background;
franta-hg@1: o3_close = ol_close;
franta-hg@1: o3_hpos = ol_hpos;
franta-hg@1: o3_offsetx = ol_offsetx;
franta-hg@1: o3_offsety = ol_offsety;
franta-hg@1: o3_fgcolor = ol_fgcolor;
franta-hg@1: o3_bgcolor = ol_bgcolor;
franta-hg@1: o3_textcolor = ol_textcolor;
franta-hg@1: o3_capcolor = ol_capcolor;
franta-hg@1: o3_closecolor = ol_closecolor;
franta-hg@1: o3_width = ol_width;
franta-hg@1: o3_border = ol_border;
franta-hg@1: o3_status = ol_status;
franta-hg@1: o3_autostatus = ol_autostatus;
franta-hg@1: o3_height = ol_height;
franta-hg@1: o3_snapx = ol_snapx;
franta-hg@1: o3_snapy = ol_snapy;
franta-hg@1: o3_fixx = ol_fixx;
franta-hg@1: o3_fixy = ol_fixy;
franta-hg@1: o3_fgbackground = ol_fgbackground;
franta-hg@1: o3_bgbackground = ol_bgbackground;
franta-hg@1: o3_padxl = ol_padxl;
franta-hg@1: o3_padxr = ol_padxr;
franta-hg@1: o3_padyt = ol_padyt;
franta-hg@1: o3_padyb = ol_padyb;
franta-hg@1: o3_fullhtml = ol_fullhtml;
franta-hg@1: o3_vpos = ol_vpos;
franta-hg@1: o3_aboveheight = ol_aboveheight;
franta-hg@1: o3_capicon = ol_capicon;
franta-hg@1: o3_textfont = ol_textfont;
franta-hg@1: o3_captionfont = ol_captionfont;
franta-hg@1: o3_closefont = ol_closefont;
franta-hg@1: o3_textsize = ol_textsize;
franta-hg@1: o3_captionsize = ol_captionsize;
franta-hg@1: o3_closesize = ol_closesize;
franta-hg@1: o3_timeout = ol_timeout;
franta-hg@1: o3_function = ol_function;
franta-hg@1: o3_delay = ol_delay;
franta-hg@1: o3_hauto = ol_hauto;
franta-hg@1: o3_vauto = ol_vauto;
franta-hg@1: o3_closeclick = ol_closeclick;
franta-hg@1:
franta-hg@1: o3_css = ol_css;
franta-hg@1: o3_fgclass = ol_fgclass;
franta-hg@1: o3_bgclass = ol_bgclass;
franta-hg@1: o3_textfontclass = ol_textfontclass;
franta-hg@1: o3_captionfontclass = ol_captionfontclass;
franta-hg@1: o3_closefontclass = ol_closefontclass;
franta-hg@1: o3_padunit = ol_padunit;
franta-hg@1: o3_heightunit = ol_heightunit;
franta-hg@1: o3_widthunit = ol_widthunit;
franta-hg@1: o3_textsizeunit = ol_textsizeunit;
franta-hg@1: o3_textdecoration = ol_textdecoration;
franta-hg@1: o3_textstyle = ol_textstyle;
franta-hg@1: o3_textweight = ol_textweight;
franta-hg@1: o3_captionsizeunit = ol_captionsizeunit;
franta-hg@1: o3_captiondecoration = ol_captiondecoration;
franta-hg@1: o3_captionstyle = ol_captionstyle;
franta-hg@1: o3_captionweight = ol_captionweight;
franta-hg@1: o3_closesizeunit = ol_closesizeunit;
franta-hg@1: o3_closedecoration = ol_closedecoration;
franta-hg@1: o3_closestyle = ol_closestyle;
franta-hg@1: o3_closeweight = ol_closeweight;
franta-hg@1:
franta-hg@1:
franta-hg@1: // Special for frame support, over must be reset...
franta-hg@1: if ( (ns4) || (ie4) || (ns6) ) {
franta-hg@1: o3_frame = ol_frame;
franta-hg@1: if (ns4) over = o3_frame.document.overDiv
franta-hg@1: if (ie4) over = o3_frame.overDiv.style
franta-hg@1: if (ns6) over = o3_frame.document.getElementById("overDiv");
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1: // What the next argument is expected to be.
franta-hg@1: var parsemode = -1;
franta-hg@1:
franta-hg@1: var ar = arguments;
franta-hg@1:
franta-hg@1: for (i = 0; i < ar.length; i++) {
franta-hg@1:
franta-hg@1: if (parsemode < 0) {
franta-hg@1: // Arg is maintext, unless INARRAY
franta-hg@1: if (ar[i] == INARRAY) {
franta-hg@1: o3_text = ol_texts[ar[++i]];
franta-hg@1: } else {
franta-hg@1: o3_text = ar[i];
franta-hg@1: }
franta-hg@1:
franta-hg@1: parsemode = 0;
franta-hg@1: } else {
franta-hg@1: // Note: NS4 doesn't like switch cases with vars.
franta-hg@1: if (ar[i] == INARRAY) { o3_text = ol_texts[ar[++i]]; continue; }
franta-hg@1: if (ar[i] == CAPARRAY) { o3_cap = ol_caps[ar[++i]]; continue; }
franta-hg@1: if (ar[i] == STICKY) { o3_sticky = 1; continue; }
franta-hg@1: if (ar[i] == BACKGROUND) { o3_background = ar[++i]; continue; }
franta-hg@1: if (ar[i] == NOCLOSE) { o3_close = ""; continue; }
franta-hg@1: if (ar[i] == CAPTION) { o3_cap = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CENTER || ar[i] == LEFT || ar[i] == RIGHT) { o3_hpos = ar[i]; continue; }
franta-hg@1: if (ar[i] == OFFSETX) { o3_offsetx = ar[++i]; continue; }
franta-hg@1: if (ar[i] == OFFSETY) { o3_offsety = ar[++i]; continue; }
franta-hg@1: if (ar[i] == FGCOLOR) { o3_fgcolor = ar[++i]; continue; }
franta-hg@1: if (ar[i] == BGCOLOR) { o3_bgcolor = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTCOLOR) { o3_textcolor = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPCOLOR) { o3_capcolor = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSECOLOR) { o3_closecolor = ar[++i]; continue; }
franta-hg@1: if (ar[i] == WIDTH) { o3_width = ar[++i]; continue; }
franta-hg@1: if (ar[i] == BORDER) { o3_border = ar[++i]; continue; }
franta-hg@1: if (ar[i] == STATUS) { o3_status = ar[++i]; continue; }
franta-hg@1: if (ar[i] == AUTOSTATUS) { o3_autostatus = 1; continue; }
franta-hg@1: if (ar[i] == AUTOSTATUSCAP) { o3_autostatus = 2; continue; }
franta-hg@1: if (ar[i] == HEIGHT) { o3_height = ar[++i]; o3_aboveheight = ar[i]; continue; } // Same param again.
franta-hg@1: if (ar[i] == CLOSETEXT) { o3_close = ar[++i]; continue; }
franta-hg@1: if (ar[i] == SNAPX) { o3_snapx = ar[++i]; continue; }
franta-hg@1: if (ar[i] == SNAPY) { o3_snapy = ar[++i]; continue; }
franta-hg@1: if (ar[i] == FIXX) { o3_fixx = ar[++i]; continue; }
franta-hg@1: if (ar[i] == FIXY) { o3_fixy = ar[++i]; continue; }
franta-hg@1: if (ar[i] == FGBACKGROUND) { o3_fgbackground = ar[++i]; continue; }
franta-hg@1: if (ar[i] == BGBACKGROUND) { o3_bgbackground = ar[++i]; continue; }
franta-hg@1: if (ar[i] == PADX) { o3_padxl = ar[++i]; o3_padxr = ar[++i]; continue; }
franta-hg@1: if (ar[i] == PADY) { o3_padyt = ar[++i]; o3_padyb = ar[++i]; continue; }
franta-hg@1: if (ar[i] == FULLHTML) { o3_fullhtml = 1; continue; }
franta-hg@1: if (ar[i] == BELOW || ar[i] == ABOVE) { o3_vpos = ar[i]; continue; }
franta-hg@1: if (ar[i] == CAPICON) { o3_capicon = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTFONT) { o3_textfont = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPTIONFONT) { o3_captionfont = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSEFONT) { o3_closefont = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTSIZE) { o3_textsize = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPTIONSIZE) { o3_captionsize = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSESIZE) { o3_closesize = ar[++i]; continue; }
franta-hg@1: if (ar[i] == FRAME) { opt_FRAME(ar[++i]); continue; }
franta-hg@1: if (ar[i] == TIMEOUT) { o3_timeout = ar[++i]; continue; }
franta-hg@1: if (ar[i] == FUNCTION) { opt_FUNCTION(ar[++i]); continue; }
franta-hg@1: if (ar[i] == DELAY) { o3_delay = ar[++i]; continue; }
franta-hg@1: if (ar[i] == HAUTO) { o3_hauto = (o3_hauto == 0) ? 1 : 0; continue; }
franta-hg@1: if (ar[i] == VAUTO) { o3_vauto = (o3_vauto == 0) ? 1 : 0; continue; }
franta-hg@1: if (ar[i] == CLOSECLICK) { o3_closeclick = (o3_closeclick == 0) ? 1 : 0; continue; }
franta-hg@1: if (ar[i] == CSSOFF) { o3_css = ar[i]; continue; }
franta-hg@1: if (ar[i] == CSSSTYLE) { o3_css = ar[i]; continue; }
franta-hg@1: if (ar[i] == CSSCLASS) { o3_css = ar[i]; continue; }
franta-hg@1: if (ar[i] == FGCLASS) { o3_fgclass = ar[++i]; continue; }
franta-hg@1: if (ar[i] == BGCLASS) { o3_bgclass = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTFONTCLASS) { o3_textfontclass = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPTIONFONTCLASS) { o3_captionfontclass = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSEFONTCLASS) { o3_closefontclass = ar[++i]; continue; }
franta-hg@1: if (ar[i] == PADUNIT) { o3_padunit = ar[++i]; continue; }
franta-hg@1: if (ar[i] == HEIGHTUNIT) { o3_heightunit = ar[++i]; continue; }
franta-hg@1: if (ar[i] == WIDTHUNIT) { o3_widthunit = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTSIZEUNIT) { o3_textsizeunit = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTDECORATION) { o3_textdecoration = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTSTYLE) { o3_textstyle = ar[++i]; continue; }
franta-hg@1: if (ar[i] == TEXTWEIGHT) { o3_textweight = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPTIONSIZEUNIT) { o3_captionsizeunit = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPTIONDECORATION) { o3_captiondecoration = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPTIONSTYLE) { o3_captionstyle = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CAPTIONWEIGHT) { o3_captionweight = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSESIZEUNIT) { o3_closesizeunit = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSEDECORATION) { o3_closedecoration = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSESTYLE) { o3_closestyle = ar[++i]; continue; }
franta-hg@1: if (ar[i] == CLOSEWEIGHT) { o3_closeweight = ar[++i]; continue; }
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: if (o3_delay == 0) {
franta-hg@1: return overlib350();
franta-hg@1: } else {
franta-hg@1: o3_delayid = setTimeout("overlib350()", o3_delay);
franta-hg@1:
franta-hg@1: if (o3_sticky) {
franta-hg@1: return false;
franta-hg@1: } else {
franta-hg@1: return true;
franta-hg@1: }
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: // Clears popups if appropriate
franta-hg@1: function nd() {
franta-hg@1: if ( o3_removecounter >= 1 ) { o3_showingsticky = 0 };
franta-hg@1: if ( (ns4) || (ie4) || (ns6) ) {
franta-hg@1: if ( o3_showingsticky == 0 ) {
franta-hg@1: o3_allowmove = 0;
franta-hg@1: if (over != null) hideObject(over);
franta-hg@1: } else {
franta-hg@1: o3_removecounter++;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: return true;
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // OVERLIB 3.50 FUNCTION
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1:
franta-hg@1: // This function decides what it is we want to display and how we want it done.
franta-hg@1: function overlib350() {
franta-hg@1:
franta-hg@1: // Make layer content
franta-hg@1: var layerhtml;
franta-hg@1:
franta-hg@1: if (o3_background != "" || o3_fullhtml) {
franta-hg@1: // Use background instead of box.
franta-hg@1: layerhtml = ol_content_background(o3_text, o3_background, o3_fullhtml);
franta-hg@1: } else {
franta-hg@1: // They want a popup box.
franta-hg@1:
franta-hg@1: // Prepare popup background
franta-hg@1: if (o3_fgbackground != "" && o3_css == CSSOFF) {
franta-hg@1: o3_fgbackground = "BACKGROUND=\""+o3_fgbackground+"\"";
franta-hg@1: }
franta-hg@1: if (o3_bgbackground != "" && o3_css == CSSOFF) {
franta-hg@1: o3_bgbackground = "BACKGROUND=\""+o3_bgbackground+"\"";
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Prepare popup colors
franta-hg@1: if (o3_fgcolor != "" && o3_css == CSSOFF) {
franta-hg@1: o3_fgcolor = "BGCOLOR=\""+o3_fgcolor+"\"";
franta-hg@1: }
franta-hg@1: if (o3_bgcolor != "" && o3_css == CSSOFF) {
franta-hg@1: o3_bgcolor = "BGCOLOR=\""+o3_bgcolor+"\"";
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Prepare popup height
franta-hg@1: if (o3_height > 0 && o3_css == CSSOFF) {
franta-hg@1: o3_height = "HEIGHT=" + o3_height;
franta-hg@1: } else {
franta-hg@1: o3_height = "";
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Decide which kinda box.
franta-hg@1: if (o3_cap == "") {
franta-hg@1: // Plain
franta-hg@1: layerhtml = ol_content_simple(o3_text);
franta-hg@1: } else {
franta-hg@1: // With caption
franta-hg@1: if (o3_sticky) {
franta-hg@1: // Show close text
franta-hg@1: layerhtml = ol_content_caption(o3_text, o3_cap, o3_close);
franta-hg@1: } else {
franta-hg@1: // No close text
franta-hg@1: layerhtml = ol_content_caption(o3_text, o3_cap, "");
franta-hg@1: }
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: // We want it to stick!
franta-hg@1: if (o3_sticky) {
franta-hg@1: o3_showingsticky = 1;
franta-hg@1: o3_removecounter = 0;
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Write layer
franta-hg@1: layerWrite(layerhtml);
franta-hg@1:
franta-hg@1: // Prepare status bar
franta-hg@1: if (o3_autostatus > 0) {
franta-hg@1: o3_status = o3_text;
franta-hg@1: if (o3_autostatus > 1) {
franta-hg@1: o3_status = o3_cap;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: // When placing the layer the first time, even stickies may be moved.
franta-hg@1: o3_allowmove = 0;
franta-hg@1:
franta-hg@1: // Initiate a timer for timeout
franta-hg@1: if (o3_timeout > 0) {
franta-hg@1: if (o3_timerid > 0) clearTimeout(o3_timerid);
franta-hg@1: o3_timerid = setTimeout("cClick()", o3_timeout);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Show layer
franta-hg@1: disp(o3_status);
franta-hg@1:
franta-hg@1: // Stickies should stay where they are.
franta-hg@1: if (o3_sticky) {
franta-hg@1: o3_allowmove = 0;
franta-hg@1: return false;
franta-hg@1: } else {
franta-hg@1: return true;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // LAYER GENERATION FUNCTIONS
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1: // Makes simple table without caption
franta-hg@1: function ol_content_simple(text) {
franta-hg@1: if (o3_css == CSSCLASS) txt = "
";
franta-hg@1: if (o3_css == CSSSTYLE) txt = "";
franta-hg@1: if (o3_css == CSSOFF) txt = "";
franta-hg@1:
franta-hg@1: set_background("");
franta-hg@1: return txt;
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: // Makes table with caption and optional close link
franta-hg@1: function ol_content_caption(text, title, close) {
franta-hg@1: closing = "";
franta-hg@1: closeevent = "onMouseOver";
franta-hg@1:
franta-hg@1: if (o3_closeclick == 1) closeevent = "onClick";
franta-hg@1: if (o3_capicon != "") o3_capicon = " ";
franta-hg@1:
franta-hg@1: if (close != "") {
franta-hg@1: if (o3_css == CSSCLASS) closing = ""+close+" | ";
franta-hg@1: if (o3_css == CSSSTYLE) closing = ""+close+" | ";
franta-hg@1: if (o3_css == CSSOFF) closing = ""+close+" | ";
franta-hg@1: }
franta-hg@1:
franta-hg@1: if (o3_css == CSSCLASS) txt = ""+o3_capicon+title+" | "+closing+"
|
";
franta-hg@1: if (o3_css == CSSSTYLE) txt = ""+o3_capicon+title+" | "+closing+"
|
";
franta-hg@1: if (o3_css == CSSOFF) txt = ""+o3_capicon+title+" | "+closing+"
|
";
franta-hg@1:
franta-hg@1: set_background("");
franta-hg@1: return txt;
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Sets the background picture, padding and lots more. :)
franta-hg@1: function ol_content_background(text, picture, hasfullhtml) {
franta-hg@1: if (hasfullhtml) {
franta-hg@1: txt = text;
franta-hg@1: } else {
franta-hg@1: if (o3_css == CSSCLASS) txt = "";
franta-hg@1: if (o3_css == CSSSTYLE) txt = "";
franta-hg@1: if (o3_css == CSSOFF) txt = "";
franta-hg@1: }
franta-hg@1: set_background(picture);
franta-hg@1: return txt;
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Loads a picture into the div.
franta-hg@1: function set_background(pic) {
franta-hg@1: if (pic == "") {
franta-hg@1: if (ie4) over.backgroundImage = "none";
franta-hg@1: if (ns6) over.style.backgroundImage = "none";
franta-hg@1: } else {
franta-hg@1: if (ns4) {
franta-hg@1: over.background.src = pic;
franta-hg@1: } else if (ie4) {
franta-hg@1: over.backgroundImage = "url("+pic+")";
franta-hg@1: } else if (ns6) {
franta-hg@1: over.style.backgroundImage = "url("+pic+")";
franta-hg@1: }
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // HANDLING FUNCTIONS
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1:
franta-hg@1: // Displays the popup
franta-hg@1: function disp(statustext) {
franta-hg@1: if ( (ns4) || (ie4) || (ns6) ) {
franta-hg@1: if (o3_allowmove == 0) {
franta-hg@1: placeLayer();
franta-hg@1: showObject(over);
franta-hg@1: o3_allowmove = 1;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: if (statustext != "") {
franta-hg@1: self.status = statustext;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Decides where we want the popup.
franta-hg@1: function placeLayer() {
franta-hg@1: var placeX, placeY;
franta-hg@1:
franta-hg@1: // HORIZONTAL PLACEMENT
franta-hg@1: if (o3_fixx > -1) {
franta-hg@1: // Fixed position
franta-hg@1: placeX = o3_fixx;
franta-hg@1: } else {
franta-hg@1: winoffset = (ie4) ? o3_frame.document.body.scrollLeft : o3_frame.pageXOffset;
franta-hg@1: if (ie4) iwidth = o3_frame.document.body.clientWidth;
franta-hg@1: if (ns4) iwidth = o3_frame.innerWidth; // was screwed in mozilla, fixed now?
franta-hg@1: if (ns6) iwidth = o3_frame.outerWidth;
franta-hg@1:
franta-hg@1: // If HAUTO, decide what to use.
franta-hg@1: if (o3_hauto == 1) {
franta-hg@1: if ( (o3_x - winoffset) > ((eval(iwidth)) / 2)) {
franta-hg@1: o3_hpos = LEFT;
franta-hg@1: } else {
franta-hg@1: o3_hpos = RIGHT;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: // From mouse
franta-hg@1: if (o3_hpos == CENTER) { // Center
franta-hg@1: placeX = o3_x+o3_offsetx-(o3_width/2);
franta-hg@1: }
franta-hg@1: if (o3_hpos == RIGHT) { // Right
franta-hg@1: placeX = o3_x+o3_offsetx;
franta-hg@1: if ( (eval(placeX) + eval(o3_width)) > (winoffset + iwidth) ) {
franta-hg@1: placeX = iwidth + winoffset - o3_width;
franta-hg@1: if (placeX < 0) placeX = 0;
franta-hg@1: }
franta-hg@1: }
franta-hg@1: if (o3_hpos == LEFT) { // Left
franta-hg@1: placeX = o3_x-o3_offsetx-o3_width;
franta-hg@1: if (placeX < winoffset) placeX = winoffset;
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Snapping!
franta-hg@1: if (o3_snapx > 1) {
franta-hg@1: var snapping = placeX % o3_snapx;
franta-hg@1: if (o3_hpos == LEFT) {
franta-hg@1: placeX = placeX - (o3_snapx + snapping);
franta-hg@1: } else {
franta-hg@1: // CENTER and RIGHT
franta-hg@1: placeX = placeX + (o3_snapx - snapping);
franta-hg@1: }
franta-hg@1: if (placeX < winoffset) placeX = winoffset;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: // VERTICAL PLACEMENT
franta-hg@1: if (o3_fixy > -1) {
franta-hg@1: // Fixed position
franta-hg@1: placeY = o3_fixy;
franta-hg@1: } else {
franta-hg@1: scrolloffset = (ie4) ? o3_frame.document.body.scrollTop : o3_frame.pageYOffset;
franta-hg@1:
franta-hg@1: // If VAUTO, decide what to use.
franta-hg@1: if (o3_vauto == 1) {
franta-hg@1: if (ie4) iheight = o3_frame.document.body.clientHeight;
franta-hg@1: if (ns4) iheight = o3_frame.innerHeight;
franta-hg@1: if (ns6) iheight = o3_frame.outerHeight;
franta-hg@1:
franta-hg@1: iheight = (eval(iheight)) / 2;
franta-hg@1: if ( (o3_y - scrolloffset) > iheight) {
franta-hg@1: o3_vpos = ABOVE;
franta-hg@1: } else {
franta-hg@1: o3_vpos = BELOW;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1: // From mouse
franta-hg@1: if (o3_vpos == ABOVE) {
franta-hg@1: if (o3_aboveheight == 0) {
franta-hg@1: var divref = (ie4) ? o3_frame.document.all['overDiv'] : over;
franta-hg@1: o3_aboveheight = (ns4) ? divref.clip.height : divref.offsetHeight;
franta-hg@1: }
franta-hg@1:
franta-hg@1: placeY = o3_y - (o3_aboveheight + o3_offsety);
franta-hg@1: if (placeY < scrolloffset) placeY = scrolloffset;
franta-hg@1: } else {
franta-hg@1: // BELOW
franta-hg@1: placeY = o3_y + o3_offsety;
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Snapping!
franta-hg@1: if (o3_snapy > 1) {
franta-hg@1: var snapping = placeY % o3_snapy;
franta-hg@1:
franta-hg@1: if (o3_aboveheight > 0 && o3_vpos == ABOVE) {
franta-hg@1: placeY = placeY - (o3_snapy + snapping);
franta-hg@1: } else {
franta-hg@1: placeY = placeY + (o3_snapy - snapping);
franta-hg@1: }
franta-hg@1:
franta-hg@1: if (placeY < scrolloffset) placeY = scrolloffset;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1: // Actually move the object.
franta-hg@1: repositionTo(over, placeX, placeY);
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1: // Moves the layer
franta-hg@1: function mouseMove(e) {
franta-hg@1: if ( (ns4) || (ns6) ) {o3_x=e.pageX; o3_y=e.pageY;}
franta-hg@1: if (ie4) {o3_x=event.x; o3_y=event.y;}
franta-hg@1: if (ie5) {o3_x=event.x+o3_frame.document.body.scrollLeft; o3_y=event.y+o3_frame.document.body.scrollTop;}
franta-hg@1:
franta-hg@1: if (o3_allowmove == 1) {
franta-hg@1: placeLayer();
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: // The Close onMouseOver function for stickies
franta-hg@1: function cClick() {
franta-hg@1: hideObject(over);
franta-hg@1: o3_showingsticky = 0;
franta-hg@1:
franta-hg@1: return false;
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1: // Makes sure target frame has overLIB
franta-hg@1: function compatibleframe(frameid) {
franta-hg@1: if (ns4) {
franta-hg@1: if (typeof frameid.document.overDiv =='undefined') return false;
franta-hg@1: } else if (ie4) {
franta-hg@1: if (typeof frameid.document.all["overDiv"] =='undefined') return false;
franta-hg@1: } else if (ns6) {
franta-hg@1: if (frameid.document.getElementById('overDiv') == null) return false;
franta-hg@1: }
franta-hg@1:
franta-hg@1: return true;
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // LAYER FUNCTIONS
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1:
franta-hg@1: // Writes to a layer
franta-hg@1: function layerWrite(txt) {
franta-hg@1: txt += "\n";
franta-hg@1:
franta-hg@1: if (ns4) {
franta-hg@1: var lyr = o3_frame.document.overDiv.document
franta-hg@1:
franta-hg@1: lyr.write(txt)
franta-hg@1: lyr.close()
franta-hg@1: } else if (ie4) {
franta-hg@1: o3_frame.document.all["overDiv"].innerHTML = txt
franta-hg@1: } else if (ns6) {
franta-hg@1: range = o3_frame.document.createRange();
franta-hg@1: range.setStartBefore(over);
franta-hg@1: domfrag = range.createContextualFragment(txt);
franta-hg@1: while (over.hasChildNodes()) {
franta-hg@1: over.removeChild(over.lastChild);
franta-hg@1: }
franta-hg@1: over.appendChild(domfrag);
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Make an object visible
franta-hg@1: function showObject(obj) {
franta-hg@1: if (ns4) obj.visibility = "show";
franta-hg@1: else if (ie4) obj.visibility = "visible";
franta-hg@1: else if (ns6) obj.style.visibility = "visible";
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Hides an object
franta-hg@1: function hideObject(obj) {
franta-hg@1: if (ns4) obj.visibility = "hide";
franta-hg@1: else if (ie4) obj.visibility = "hidden";
franta-hg@1: else if (ns6) obj.style.visibility = "hidden";
franta-hg@1:
franta-hg@1: if (o3_timerid > 0) clearTimeout(o3_timerid);
franta-hg@1: if (o3_delayid > 0) clearTimeout(o3_delayid);
franta-hg@1: o3_timerid = 0;
franta-hg@1: o3_delayid = 0;
franta-hg@1: self.status = "";
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Move a layer
franta-hg@1: function repositionTo(obj,xL,yL) {
franta-hg@1: if ( (ns4) || (ie4) ) {
franta-hg@1: obj.left = xL;
franta-hg@1: obj.top = yL;
franta-hg@1: } else if (ns6) {
franta-hg@1: obj.style.left = xL + "px";
franta-hg@1: obj.style.top = yL+ "px";
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // PARSER FUNCTIONS
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1:
franta-hg@1: // Defines which frame we should point to.
franta-hg@1: function opt_FRAME(frm) {
franta-hg@1: o3_frame = compatibleframe(frm) ? frm : ol_frame;
franta-hg@1:
franta-hg@1: if ( (ns4) || (ie4 || (ns6)) ) {
franta-hg@1: if (ns4) over = o3_frame.document.overDiv;
franta-hg@1: if (ie4) over = o3_frame.overDiv.style;
franta-hg@1: if (ns6) over = o3_frame.document.getElementById("overDiv");
franta-hg@1: }
franta-hg@1:
franta-hg@1: return 0;
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Calls an external function
franta-hg@1: function opt_FUNCTION(callme) {
franta-hg@1: o3_text = callme()
franta-hg@1: return 0;
franta-hg@1: }
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1:
franta-hg@1: //end (For internal purposes.)
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1: // OVERLIB 2 COMPATABILITY FUNCTIONS
franta-hg@1: // If you aren't upgrading you can remove the below section.
franta-hg@1: ////////////////////////////////////////////////////////////////////////////////////
franta-hg@1:
franta-hg@1: // Converts old 0=left, 1=right and 2=center into constants.
franta-hg@1: function vpos_convert(d) {
franta-hg@1: if (d == 0) {
franta-hg@1: d = LEFT;
franta-hg@1: } else {
franta-hg@1: if (d == 1) {
franta-hg@1: d = RIGHT;
franta-hg@1: } else {
franta-hg@1: d = CENTER;
franta-hg@1: }
franta-hg@1: }
franta-hg@1:
franta-hg@1: return d;
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Simple popup
franta-hg@1: function dts(d,text) {
franta-hg@1: o3_hpos = vpos_convert(d);
franta-hg@1: overlib(text, o3_hpos, CAPTION, "");
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Caption popup
franta-hg@1: function dtc(d,text, title) {
franta-hg@1: o3_hpos = vpos_convert(d);
franta-hg@1: overlib(text, CAPTION, title, o3_hpos);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Sticky
franta-hg@1: function stc(d,text, title) {
franta-hg@1: o3_hpos = vpos_convert(d);
franta-hg@1: overlib(text, CAPTION, title, o3_hpos, STICKY);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Simple popup right
franta-hg@1: function drs(text) {
franta-hg@1: dts(1,text);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Caption popup right
franta-hg@1: function drc(text, title) {
franta-hg@1: dtc(1,text,title);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Sticky caption right
franta-hg@1: function src(text,title) {
franta-hg@1: stc(1,text,title);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Simple popup left
franta-hg@1: function dls(text) {
franta-hg@1: dts(0,text);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Caption popup left
franta-hg@1: function dlc(text, title) {
franta-hg@1: dtc(0,text,title);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Sticky caption left
franta-hg@1: function slc(text,title) {
franta-hg@1: stc(0,text,title);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Simple popup center
franta-hg@1: function dcs(text) {
franta-hg@1: dts(2,text);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Caption popup center
franta-hg@1: function dcc(text, title) {
franta-hg@1: dtc(2,text,title);
franta-hg@1: }
franta-hg@1:
franta-hg@1: // Sticky caption center
franta-hg@1: function scc(text,title) {
franta-hg@1: stc(2,text,title);
franta-hg@1: }