Command Reference for the
overlibmws DHTML Popup Library
  maintained by Foteos Macrides at Macrides Web Services
 

  1.
Introduction

NOTE:  First-time visitors should review Getting Started and should mouse over all of the green, underlined anchors / links in this section.  You can select (click-n-drag) markup in sticky popups or the document's body for copy and paste opererations into your documents.  A Support Group is available.

This reference describes the commands for the overlibmws.js core module and its plugin modules to control the overlib() function of the overlibmws DHTML Popup Library.  The core and any overlibmws_name.js plugin modules should be imported via script blocks in the document's head.  The overDiv container (layer) can be declared as a positioned div immediately following the body start tag, or you may omit the declaration and let the core module create the div dynamically.

The commands in an overlib() function call are always in uppercase (case-sensitive) and can have none, one, or multiple parameters that may be quoted strings or unquoted numeric values.  Most of the commands which do not have parameters are implemented as toggles, with off (0) as their default, such that inclusion of the command in an overlib() call toggles it on for that call and the setting or action which the command name indicates will be applied.  If a command's default is changed (see below) to on (1), inclusion of the command will toggle it off for that call (opposite of what the command name indicates).  To reduce possible confusion in that context, a minus sign can be placed immediately before the command name to yield an unconditional off for that call (i.e., regardless of the default setting).
On this page



1. Introduction
2. Content
3. Behavior,
    Positioning
    and Sizes

4. Colors, Fonts
    and Images

5. Cascading Style
    Sheets

6. Dropshadow
7. Speech Bubbles
8. Transform Filters
9. Printing Popups
10. Debug Function
 
Status
overlib version: mws
Created: 2002-08-18
Changed: 2010-09-22

  Click to Donate
 
   
The commands are associated with configuration variables which set the default values. These variables begin with "ol_", followed by typically the command name in lower case.  Their values can be changed in the DEFAULT CONFIGURATION sections of the overlibmws.js core module and the plugin modules if you want the defaults changed across all of your HTML/XML files which use overlib popups.  These variables also can be defined in script blocks or imported js files for individual HTML/XML files.  Those definitions should be established via a script block in the head section before the script block for importing the overlibmws.js core module and any script blocks for importing plugin modules.  You instead can change the default values for individual files by calling the OLpageDefaults() function with its arguments structured as a comma-separated list of commands and their parameters if any, like those for an overlib call.  The OLpageDefaults() function call should be placed in a script block in the head section after the script block for importing the overlibmws.js core module and any script blocks for importing plugin modules.  Note that placing a minus sign immediately before a command name which is implemented as a toggle signifies unconditionally that off (0) is the page default for that command.  See the overlibmws distribution's overlibConfig.txt for more information.

The nd() function call for closing a primary popup (i.e., one invoked via an overlib() function call) that is a tooltip (i.e., not sticky) accepts an optional numeric argument indicating the number of msec after the nd call to close the popup. Note that if the time argument is used then an nd call will also close a sticky popup after that delay, e.g., onmouseout="nd(2000);" will cause the tooltip or sticky popup to close 2 sec after a mouseout from the object which invoked it.  See the Demonstration.  If the time argument is omitted or is 0, tooltips will close immediately but stickies will await an additional action (e.g., activation of a Close link in the caption).

The secondary popups that become available when the overlibmws_overtwo.js plugin module has been imported use overlib2() calls to invoke the secondary popups from within a primary overlib popup.  The primary popup must be sticky, and its secondary popups can be either tooltips or stickies.  The nd2() function is used for closing secondary popups that are tooltips (i.e., not sticky).  It does not support a time argument.  See the Demonstration.

The cClick() function is used internally by overlibmws to close sticky primary popups, e.g., via the Close link in their caption, and the cClick2() function is used for sticky secondary popups.  They can be used as public functions in wrapper scripts, or in markup associated with the FULLHTML command (See below, and the Demonstration).

Note that at most one primary popup plus at most one secondary popup can be open (displayed) at the same time.  If an overlib2 call is made when a secondary popup is already being displayed, a cClick2 call will be issued automatically to close the current secondary popup before the new secondary popup is displayed.  Similary, a cClick call will be issued automatically if an overlib call is made when a primary popup is being displayed.  Also note that if a primary popup is closed when its secondary popup is still being displayed, a cClick2 call will be issued automatically to close that secondary popup as well.

The OLgateOK global variable can be used in documents to disable popups by setting it equal to 0, and to re-enable popups by restoring it to its default value of 1 (See the Demonstration).

A function set in the ajaxcontentmws.js support script can be used to load popup content via AJAX.

A function set in the iframecontentmws.js support script can be used to implement popups with iframe content that is intended to be displayed (also see this example).

You can import the overlibmws_iframe.js plugin module for pages which contain system controls (e.g., some form elements, flash objects in 'window' mode, applets, quicktime objects) which obscure overlib popups.  It uses an iframe shim (as opposed to displayed iframe content) to prevent this problem for IE v5.5 or higher.  For earlier versions of IE and for other browsers, you also can import the overlibmws_hide.js plugin module and use its commands (e.g., HIDESELECTBOXES, see below) to hide potentially obscuring elements and objects with system controls, as illustrated for form elements, for a flash object, and with DRAGGABLE popups.

A function set in the htmlspecialcharsmws.js support script can be used to see the markup which the library's Layer Generation Functions are creating as popup content based on the arguments in the overlib or overlib2 function call, or which the browser is loading based on that markup, and may assist you in debugging any problems you have in formulating appropriate arguments (also see section 10. Debug Function).

Check the overlibmws Download and Test Directory regularly for any new example files.  Also check the Change History regularly for any bug fixes or enhancements that might merit your updating the overlibmws DHTML Popup Library for your site.

  2.
Content

Lead Argument
The lead argument in the overlib call normally is a quoted string that will be displayed in a table data cell that represents the main text area of the popup box.  Use single-quoting if the overall event attribute value that contains the overlib() function call uses double-quoting, and backslash escape any single-quotes (apostrophes) that occur within the string.  It can be plain text or HTML markup suitable for inclusion in a table data cell.  It can be replaced by INARRAY or FUNCTION as described below for those commands.  You also can define the string as a javascrpt variable via a script block or js file, and use the variable name (unquoted) as the lead argument.  Use of javascript variables or arrays is favored when the string is HTML markup.  The lead argument also can be a javascript function (unquoted) which returns a string.  Include the parens with the function reference, regardless of whether the function accepts arguments.  If the HTML markup is included directly in the overlib call as part of the value of an event attribute (e.g., onmouseover) and thus will be processed by the HTML parser on its first pass through the document, the HTML reserved characters such as angle brackets should be converted to HTML entities < for open-angle-bracket, and > for close-angle-bracket) to avoid corruption by some firewalls (particularly Norton's).  Do not use HTML entities for reserved characters when the HTML markup is declared in script blocks or imported js files as javascript variables, functions or arrays (the HTML parser skips script blocks and any imported js files on its first pass).  Note that absence of a lead argument as well as INARRAY and FUNCTION from the overlib call yields use of the default lead argument (ol_text).  Also, if a lead argument (quoted string, string variable name, string array entry, or function that returns a string) is used in an OLpageDefaults() function call (normally it is omitted), that becomes the default lead argument for the document.  The lead argument can be a concatenation (via plus signs) of quoted strings, string variable names, string array entries, and/or functions that return strings (Demonstration).  The lead argument can be URL-encoded (hex escaped), e.g., via the php rawurlencode() function, if it is derived from a server-side database and might otherwise include raw newline characters that would pre-maturely terminate the lead argument for the javascript parser.  If DECODE (see below) is toggled on in the overlib call or is made the page default, such lead arguments are decoded automatically via the decodeURIComponent() or unescape() javascript functions.
Variable: ol_text

CAPTION title
Sets the caption of the popup.  Can be plain text or HTML markup suitable for inclusion in a table data cell that represents the text portion of the popup's caption area.  In sticky popups, another table data cell to the right holds the 'Close' text and completes the overall caption area (see CLOSETEXT, NOCLOSE, and STICKY, below).  The CAPTION command can be replaced by an element of a javascript array (see CAPARRAY).  You also can define the string as a javascript variable via a script block or js file, and use the variable name (unquoted) as the parameter for CAPTION.  A javascript function (unquoted and including its parens regardless of whether the function has arguments) that returns a string also can be used as the parameter.  Use of javascript variables, arrays or functions is favored when the string is HTML markup.  If the HTML markup is included directly in the overlib call as part of the value of an event attribute (e.g., onmouseover), the HTML reserved characters such as angle brackets should be converted to HTML entities (< for open-angle-bracket, and > for close-angle-bracket).  Do not use HTML entities for reserved characters when the HTML markup is declared in script blocks or js files as javascript variables, arrays or functions.  The string cannot include raw newline characters, but instead should be made a concatenation (via plus signs) of sub-strings, or can be URL-encoded (hex-escaped), as described for the lead argument (see above), if DECODE (see below) is toggled on in the overlib call or is made the page default.
Variable: ol_cap

CLOSETEXT text
Replaces the default 'Close' link text in stickies with something else.  The replacement can be plain text or inline HTML markup suitable for use as Anchor content, and can be an image (icon) if the markup uses an IMG element.  A Close icon (exit.gif) is included in the distribution.
Demonstration
Variable: ol_close

CLOSECLICK
Force users to click on 'Close' or its replacement to close sticky popups.  This command toggles the feature on and off.
Demonstration
Variable: ol_closeclick
Unconditional off: -CLOSECLICK

CLOSETITLE title attribute value
Sets the text string value of the HTML/XML title attribute of the 'Close' link when CLOSECLICK is on.  The title attribute serves to invoke an OS tooltip when the curser hovers over the link for browsers which implement such tooltips via title attributes in links.  Default value is 'Click to Close'.
Variable: ol_closetitle
 
NOCLOSE
Doesn't display the 'Close' text in a captioned sticky.  The popup can be closed by moving the cursor onto and then off of it, or by invoking another overlib popup, if another is available in the page.  Moving the cursor onto a NOCLOSE popup also will cancel any TIMEOUT that was set, so that the popup will persist until the cursor is moved off of it (or until a link within it, if present, is clicked to invoke another document).  Also can be used to invoke these event handlers for captionless stickies, or for tooltip (non-sticky) popups with at least one fixed-position command such that the cursor could be moved over the popup.  This command toggles the feature on and off.
Demonstration
Variable: ol_noclose
Unconditional off: -NOCLOSE

MOUSEOFF
Applies the same event handlers that are applied when using the NOCLOSE command (see above), but allows the caption for sticky popups to include a 'Close' link.  This command toggles the feature on and off.
Demonstration
Variable: ol_mouseoff
Unconditional off: -MOUSEOFF

OFFDELAY millisecs
The delay in millisecs (default 300) for closing NOCLOSE or MOUSEOFF popups following a mouse off.  If a mouse back over the popup occurs during this delay, the close is cancelled.
Variable: ol_offdelay

CAPBELOW
Causes the caption, when present, to be positioned below the main text area instead of above it.  Commonly used when the main text area is an image.  This command toggles the feature on and off.
Demonstration 1
Demonstration 2
Variable: ol_capbelow
Unconditional off: -CAPBELOW

INARRAY id
Tells overlib to read the text from the ol_texts array (placed in overlibmws.js or in a SCRIPT block on the page).  The text strings loaded into the array can be plain text or HTML markup suitable for inclusion in a table data cell.  This command and its parameter can be used instead of the lead, single-quoted string in the overlib call.
Examples: return overlib(INARRAY, 0); return overlib2(INARRAY, 1);
Demonstration.
Variable: ol_texts

CAPARRAY id
Tells overlib to read the caption from the ol_caps array (placed in overlibmws.js or in a SCRIPT block on the page).  The text strings loaded into the array can be plain text or HTML markup suitable for inclusion in a table data cell.
Examples: return overlib(INARRAY, 0, CAPARRAY, 0); return overlib2(INARRAY, 1, CAPARRAY, 1);
Demonstration.
Variable: ol_caps

TEXTPADDING number
Specifies the cellpadding number for the table data cell which holds the main text.  Default is 2.  Overriden by any padding tokens specified via FGCLASS (see below).
Demonstration.
Variable: ol_textpadding

CAPTIONPADDING number
Specifies the cellpadding number for the table data cell which holds the caption.  Inherited by the Close text.  Default is 2.  Overriden by any padding tokens specified via CGCLASS (see below).
Demonstration.
Variable: ol_captionpadding

BORDER pixels
Makes the border of the popups thicker or thinner.
Variable: ol_border

BASE pixels
Makes the base of the popup thicker, beyond the thickness specified via the BORDER command or ol_border variable.
Variable: ol_base

FUNCTION functionname
Calls the specified function and takes the return value as the text that should be displayed in the popup.  You must import the overlibmws_function.js plugin module to use this feature.
The FUNCTION command and its parameter should replace the normally lead, single-quoted string argument in the overlib call, as do the INARRAY command and its parameter (see above).  The parameter can be omitted if a default function has been declared via variable ol_function.  The output of the function can be plain text or HTML markup suitable for inclusion in a table data cell.  The function is called when the overlib command parser runs.  If the function takes no arguments itself, you can use the function reference, without parens, as the FUNCTION command's parameter
Example: return overlib(FUNCTION, NoParamFunc);
Example: return overlib(FUNCTION, NoParamFunc());
Example: return overlib(FUNCTION, Func(arg1,arg2,arg3));
Demonstration
Variable: ol_function

STATUS text
Sets the text in the browser's status bar to text.  Note that IE7's default security setting allows this only on intranets.  Overriden by AUTOSTATUS and AUTOSTATUSCAP.
Variable: ol_status

AUTOSTATUS
Sets the status bar's text to the popup's text.  Note that IE7's default security setting allows this only on intranets.  This command toggles the feature on and off.  Overridden by AUTOSTATUSCAP.  Overrides STATUS.
Variable: ol_autostatus = 1
Unconditional off: -AUTOSTATUS

AUTOSTATUSCAP
Sets the status bar's text to the popup's caption.  Note that IE7's default security setting allows this only on intranets.  This command toggles the feature on and off.  Overrides AUTOSTATUS and STATUS.
Variable: ol_autostatus = 2
Unconditional off: -AUTOSTATUSCAP

DECODE
Causes any URL-encoded (hex-escaped) characters in the lead argument and/or caption to be decoded automaticaly via the decodeURIComponent() or unescape() javascript functions.  This command toggles the feature on or off (default is 0 such that decoding is not performed).  The URL-encoding (hex-escaping) normally is done server-side for strings that have been fetched from a database and might contain newline characters that would cause pre-mature termination of string parsing by the javascript interpeter if not encoded in the overlib() calls.  Note that care should be taken to avoid using the DECODE command directly on any strings which contain actual URLs with any characters that require their URL-encoding.
Demonstration
Variable: ol_decode
Unconditional off: -DECODE

  3.
Behavior, Positioning and Sizes

STICKY
Makes the popup stick around until actively closed.  When a sticky popup has been invoked, it does not follow the cursor movements.  This command toggles the feature on or off (default is 0).
Demonstration
Variable: ol_sticky
Unconditional off: -STICKY

EXCLUSIVE
Makes sticky primary popups exclusive, such that when an exclusive sticky primary popup has been displayed, no other primary popups can be displayed and replace it before the exclusive popup has been actively closed.  This command toggles the feature on or off (default is 0).  Associated commands are EXCLUSIVESTATUS and EXCLUSIVEOVERRIDE (see below).  You must import the overlibmws_exclusive.js plugin module to use this feature set.  Secondary popups cannot be made exclusive and can always be invoked from within an exclusive sticky primary popup to provide information about any links or other elements within the primary popup.
Demonstration
Variable: ol_exclusive
Unconditional off: -EXCLUSIVE

EXCLUSIVESTATUS text
Sets the text to be dispayed in the browser's status bar when an exclusive sticky is being displayed and other primary popups thus cannot be invoked (see above).  Default is 'Please act on or close the open popup.'
Variable: ol_exclusivestatus

EXCLUSIVEOVERRIDE
Command to override any EXCLUSIVE command (see above) that might be in effect, so that the current overlib call for a primary popup will proceed normally and any exclusive sticky that is being displayed will be closed, allowing the popup associated with the current overlib call to be displayed.  This command is implemented as a toggle (default is 0).
Variable: ol_exclusiveoverride
Unconditional off: -EXCLUSIVEOVERRIDE
 
MODAL
Makes a sticky primary or secondary popup modal, such that the user cannot access other items in the current document until the MODAL popup has been acted upon and closed.  This command toggles the feature on or off (default is 0).  You must import the overlibmws_modal.js plugin module to use this command.  During display of a modal popup, a shield is positioned between the popup and the underlying document.  The shield has a default color of '#bbbbbb' and a default opacity of 40.  These defaults can be changed via the MODALCOLOR and/or MODALOPACITY commands (see below).  The document's scroll bars are hidden, but can be allowed via the MODALSCROLL command (see below).  Note that objects with system controls, such as applets, also are blocked in the document for IE v5.5 or higher, but use of HIDEBYIDALL (see below) is needed to block them for earlier versions and other browsers.  If a primary popup is MODAL, a MODAL command in any overlib2 function call made via a link in the popup will be ignored.  Otherwise, a MODAL secondary popup will block access to items in the primary popup as well as to the other items in the current document.  If the MODAL popup content includes any textareas and/or inputs of type="text" then include onfocus="OLmEdit=1;" onblur="OLmEdit=0;" in their start tags to enable use of the paging and scrolling keys (including Spacebar and Enter) by the browser's text editor.
Demonstration 1
Demonstration 2
Variable: ol_modal
Unconditional off: -MODAL

MODALCOLOR color
Sets the color (default '#bbbbbb') of the shield that is placed between a MODAL popup (see above) and the document.  You must import the overlibmws_modal.js plugin module to use this command.
Demonstration
Variable: ol_modalcolor

MODALOPACITY percentage
Percentage (default 40) for the opacity of the shield that is placed between a MODAL popup (see above) and the document (100 is solid; 0 turns off the feature and thus also yields a solid shield).  The opacity feature is handled for IE on PCs and for the versions of Gecko-engine, Safari, Konqueror, and Opera browsers with opacity support.  The shield is solid for the browser versions which lack opacity support.  You must import the overlibmws_modal.js plugin module to use this command.
Demonstration
Variable: ol_modalopacity

MODALSCROLL
Allows the document to retain its vertical and/or horizontal scroll bars when an otherwise MODAL popup (see above) is invoked.  This command toggles the feature on or off (default is 0).  If scrolling of the document is performed when the popup is being displayed, e.g., because the popup's height and/or width exceed the current viewport dimensions, the document will be returned automatically to its earlier position when the popup is closed.  You must import the overlibmws_modal.js plugin module to use this command.
Demonstration
Variable: ol_modalscroll
Unconditional off: -MODALSCROLL

MODALCLICK
Allows a click on the modal shield to close a MODAL primary or secondary popup, equivalently to (or in lieu of) a Close link within the popup.  This command toggles the feature on or off (default is 0).  You must import the overlibmws_modal.js plugin module to use this command.
Demonstration
Variable: ol_modalclick
Unconditional off: -MODALCLICK

NOFOLLOW
Sets whether a tooltip (non-sticky) popup should stay put where initially invoked (like OS and title-based tooltips) instead of following the curser movements.  This command is implemented as a toggle (default 0 such that the cursor movements are followed).
Variable: ol_nofollow
Unconditional off: -NOFOLLOW

WIDTH pixels
Specifies the desired width of the box when you want it to differ from the default.  This is a recommended width.  The exact width may be somewhat different depending on how the browser handles table markup in relation to the popup content.  Overridden by WRAP.
Variable: ol_width

WRAP
Toggles off use of an a priori, fixed WIDTH for popups, so that instead the content determines the width.  It makes the popup be no wider than the content, except for normal padding, unless the content is wider than the current window display width, in which case wrapping of the content is adjusted for that maximum width.  If WRAPMAX (see below) has been set to a value greater than 0, wrapping of the content instead is adjusted to the smaller of either that value or the window display width.  Default is off (0).
Demonstration
Variable: ol_wrap
Unconditional off: -WRAP

WRAPMAX pixels
If set to a value greater than 0, sets the maximum width of the popup, up to the window display width, before wrapping occurs when the WRAP command is set (default 0).
Demonstration
Variable: ol_wrapmax

HEIGHT pixels
Sets the recommended height of the box.  The exact height may be somewhat different depending on how the browser handles table markup in relation to the popup content.
Variable: ol_height

RIGHT
Makes the popups go to the right of the cursor, but not overrun the right margin of the window unless NOJUSTX is set.  Mutually exclusive with LEFT and CENTER.  Overridden by REF, RELX, MIDX and FIXX.
Variable: ol_hpos = RIGHT

LEFT
Makes the popups go to the left of the cursor, but not overrun the left margin of the window unless NOJUSTX is set.  Mutually exclusive with RIGHT and CENTER.  Overridden by REF, RELX, MIDX and FIXX.
Variable: ol_hpos = LEFT

CENTER
Makes the popups centered relative to the cursor for the horizontal dimension, but not overrun the left or right margin of the window unless NOJUSTX is set.  The OFFSETX (ol_offsetx) setting also is applied, which by default is 10, roughly corresponding to the right edge of the hand for the cursor invoked by links. Include OFFSETX with a smaller value (typically 2) if you want the centering to be relative to the tip of the finger.  Mutually exclusive with RIGHT and LEFT.  Overridden by REF, RELX, MIDX and FIXX.
Variable: ol_hpos = CENTER

BELOW
Makes the popups go below the cursor, but not overrun the bottom margin of the window unless NOJUSTY is set.  Mutually exclusive with ABOVE and VCENTER.  Overridden by REF, RELY, MIDY and FIXY.
Variable: ol_vpos = BELOW

ABOVE
Makes the popups go above the cursor, but not overrun the top margin of the window unless NOJUSTY is set.  Mutually exclusive with BELOW and VCENTER.  Overridden by REF, RELY, MIDY and FIXY.
Variable: ol_vpos = ABOVE

VCENTER
Makes the popups centered relative to the cursor for the vertical dimension, but not overrun the top or bottom margin of the window unless NOJUSTY is set.  The OFFSETY (ol_offsety) setting also is applied, which by default is 10, roughly corresponding to the vertical mid-point of the hand for the cursor invoked by links. Include OFFSETY with a value of 0 if you want the centering to be relative to the tip of the finger.  Mutually exclusive with BELOW and ABOVE.  Overridden by REF, RELY, MIDY and FIXY.
Variable: ol_vpos = VCENTER

OFFSETX x
How far away from the cursor the popup will show up, horizontally.  Its parameter can be positive or negative for offsets in either horizontal direction.  The popup will not overrun the left or right margin of the window unless NOJUSTX is set.  Overridden by REF, RELX, MIDX and FIXX.
Variable: ol_offsetx

OFFSETY y
How far away from the cursor the popup will show up, vertically.  Its parameter can be positive or negative for offsets in either vertical direction.  The popup will not overrun the top or bottom margin of the window unless NOJUSTY is set.  Overridden by REF, RELY, MIDY and FIXY.
Variable: ol_offsety

SNAPX grid
Snaps the horizontal position of the popup to a position on a virtual grid.  Useful to prevent minor jitter if the user moves the cursor a few pixels.  The popup will not overrun the left or right margin of the window unless NOJUSTX is set.  Used in conjunction with RIGHT (the default), LEFT, HAUTO (to set LEFT or RIGHT automatically), CENTER or OFFSETX.  Overridden by REF, RELX, MIDX and FIXX.
Variable: ol_snapx

SNAPY grid
Snaps the vertical position of the popup to a position on a virtual grid.  Useful to prevent minor jitter if the user moves the cursor a few pixels.  The popup will not overrun the top or bottom margin of the window unless NOJUSTY is set.  Used in conjunction with BELOW (the default), ABOVE, VAUTO (to set BELOW or ABOVE automatically), or OFFSETY.  Overridden by REF, RELY, MIDY and FIXY.
Variable: ol_snapy

RELX position
Sets the popup's horizontal position to a column relative to the window display.  Overrides all other horizontal placement except REF and MIDX.  Positive numbers and 0 are treated as distances to the right from the left window margin for the left edge of the popup.  Negative numbers are treated as distances to the left from the right window margin for the right edge of the popup.  Will not overrun the left or right margin of the window unless NOJUSTX is set.
Variable: ol_relx

RELY position
Sets the popup's vertical position to a row relative to the window display.  Overrides all other vertical placement except REF and MIDY.  Positive numbers and 0 are treated as distances down from the top window margin for the top edge of the popup.  Negative numbers are treated as distances up from the bottom window margin for the bottom edge of the popup.  Will not overrun the top or bottom margin of the window unless NOJUSTY is set.
Variable: ol_rely

MIDX position
Sets the popup's horizontal midpoint to a column relative to the window display's horizontal midpoint.  Overrides all other horizontal placement except REF.  Positive numbers are treated as distances to the right from the window midpoint.  Negative numbers are treated as distances to the left from the window midpoint.  Will not overrun the left or right margin of the window unless NOJUSTX is set.
Example: return overlib('Text', MIDX,0,RELY,20);  keeps the popup centered horizontally within the window display and its top margin 20 pixels down from the top margin of the window regardless of any scrolling
Variable: ol_midx

MIDY position
Sets the popup's vertical midpoint to a row relative to the window display's vertical midpoint.  Overrides all other vertical placement except REF.  Positive numbers are treated as distances down from the window midpoint.  Negative numbers are treated as distances up from the window midpoint.  Will not overrun the top or bottom margin of the window unless NOJUSTY is set.
Example: return overlib('Text', MIDX,0,MIDY,0);  centers the popup within the window display regardless of any scrolling
Variable: ol_midy

SCROLL
You must import the overlibmws_scroll.js plugin module to use the scroll feature.  Keeps re-establishing a sticky popup's position with respect to the window margins and/or center (i.e., when RELX or MIDX, and RELY or MIDY are used) if the document is scrolled via the window's scroll bars.  This command toggles the feature on or off.  Is overridden by DRAGGABLE (see below) if in the same window, or in the same frame of a frameset.  Note that for framesets, the DOCTYPE declarations across frames should match for proper crossframe SCROLL handling.  Also note that scrolling of a primary popup is suspended whenever a secondary popup is displayed, and is re-asserted when the secondary popup is closed.  Sticky secondary popups also support the SCROLL command when RELX or MIDX and RELY or MIDY are used for positioning them, and do not require SCROLL to have been used for the the primary popup.
Demonstration
Variable: ol_scroll
Unconditional off: -SCROLL

REF reference
The NAME of an anchor or image, or the ID of a positioned layer, to be used as the reference object for positioning the popup.  Used in conjunction with REFC, REFP, REFX and REFY (specified, or with their default values).  Overrides all other positioning commands.  Will not overrun the margins of the window unless NOJUSTX and/or NOJUSTY are set.
Demonstration
Variable: ol_ref

REFC corner
Defines the corner of a reference object which should be use as the reference point for positioning a corner of the popup.  The allowable values are 'UL' (Upper Left), 'UR', (Upper Right), 'LL' (Lower Left), and 'LR' (Lower Right).  The value can be lower case, and must be specified as a string (i.e., quoted).  The default normally is 'UL'.  For anchors, only the default value of 'UL' is supported with Netscape 4.x, and with all browsers references the upper left corner of the first character in textual anchor content (including space above the character associated with the line height) even if there is wrapping in an anchor content string such that the wrapped portion is to the left of the first character.
Demonstration
Variable: ol_refc

REFP corner
Defines the corner of the popup which should be positioned with respect to a corner of the reference object.  The allowable values are 'UL' (Upper Left), 'UR', (Upper Right), 'LL' (Lower Left), and 'LR' (Lower Right).  The value can be lower case, and must be specified as a string (i.e., quoted).  The default normally is 'UL'.
Demonstration
Variable: ol_refp

REFX displacement
Sets the horizontal displacement between the reference object's and popup's corners.  Positive values move the popup to the right; negative to the left.  The default normally is 0.  The popup will not overrun the left or right margin of the window unless NOJUSTX is set. 
Demonstration
Variable: ol_refx

REFY displacement
Sets the vertical displacement between the reference object's and popup's corners.  Positive values move the popup down; negative up.  The default normally is 0.  The popup will not overrun the top or bottom margin of the window unless NOJUSTY is set. 
Demonstration
Variable: ol_refy

FIXX position
Sets the popup's horizontal position to a fixed column.  Overrides all other horizontal placement except REF, RELX and MIDX.  Positive numbers and 0 are treated as distances to the right for the left edge of the popup.  Negative numbers are invalid.  Will not overrun the window margins unless NOJUSTX is set.
Variable: ol_fixx

FIXY position
Sets the popup's vertical position to a fixed row.  Overrides all other vertical placement except REF, RELY and MIDY.  Positive numbers and 0 are treated as distances down for the top edge of the popup.  Negative numbers are invalid.  Will not overrun the window margins unless NOJUSTY is set.
Variable: ol_fixy

NOJUSTX
Toggles off the default justification of popups in the horizontal dimension that prevents overruns of the window display's left and right margins.  Can be used in conjunction with any horizontal positioning command, but most likely with FIXX or RELX to force use of the indicated horizontal position, with the assumption (sometimes incorrect, so beware) that the user can increase the window size to accommodate the entire popup. Also is used with DRAGGABLE for stickies, such that the user can drag any overrun portion of the popup back into the window display.
Variable: ol_nojustx
Unconditional off: -NOJUSTX

NOJUSTY
Toggles off the default justification of popups in the vertical dimension that prevents overruns of the window display's top and bottom margins.  Can be used in conjunction with any horizontal positioning command, but most likely with FIXY or RELY to force use of the indicated vertical position, with the assumption (sometimes incorrect, so beware) that the user can increase the window size to accommodate the entire popup. Also is used with DRAGGABLE for stickies, such that the user can drag any overrun portion of the popup back into the window display.
Variable: ol_nojusty
Unconditional off: -NOJUSTY

HAUTO
Automatically determine if the popup should be to the left or right of the cursor, depending on whether the cursor is to the right or left, respectively, of mid-screen and would extend beyond the window display area when the popup is invoked.  This command toggles the feature on or off.
Variable: ol_hauto
Unconditional off: -HAUTO

VAUTO
Automatically determine if the popup should be above or below the cursor, depending on whether the cursor is below or above, respectively, mid-screen and would extend beyond the window display area when the popup is invoked.  This command toggles the feature on or off.
Variable: ol_vauto
Unconditional off: -VAUTO
 
FRAME frame
Controls popups in a different frame or in an iframe's parent.  You must import the overlibmws_crossframe.js plugin module to use this feature.  You can declare an overDiv and/or overDiv2 positioned div container (layer) in the target frame or parent, or let the core module create them dynamically.  The parameter passed to this command should be a valid frame reference and not be treated as a text string (i.e., should not be quoted).
Examples: return overlib('Text', FRAME, parent.right); (assuming you have a frame called right)
  return overlib('Text', FRAME, parent); (in iframe content, see below)
Demonstration 1
Note that a secondary popup invoked via an overlib2 call inherits the frame reference of its primary popup by default, but can be positioned in a different frame via the FRAME command.  Also note that an iframe used as the content for a primary popup can use an overlib2 function call with a FRAME,parent command to handle the secondary popup in the parent document.  It thus is not bound by the margins of the iframe window, but nonetheless can use cursor-based positioning.
Demonstration 2
One also can use FRAME,parent in the overlib function calls within an embedded iframe to have the primary popup not be bound by the margins of the embedded iframe window, but still be able to use cursor-based positioning.  In that case, a secondary popup in the primary popup's content should reference the embedded iframe window from the parent's perspective, e.g., if the embedded iframe window's name were eif1, the primary popup's content would use self.eif1.overlib2 function calls for its secondary popups.
Demonstration 3
Note that use of FRAME,parent can introduce cross-domain security restrictions in modern browsers such that the overlib or overlib2 function calls may be blocked if the parent and iframe documents are from different domains.
Variable: ol_frame

TIMEOUT millisecs
Makes the popup go away after the requested delay.
Variable: ol_timeout

DELAY millisecs
Makes the popup behave more like an OS or title-based tooltip.  It will appear only after a certain delay specified in millisecs.  Note that to avoid a race condition, the DELAY command is blocked for secondary popups in embedded iframe content.
Variable: ol_delay
 
DRAGGABLE
Makes stickies draggable.  Toggles the feature on or off.  The overlibmws_draggable.js plugin module must be imported to use this command.  You can select text in draggable stickies for copy and paste operations by using Alt+Click (Option+Click on MACs; Ctrl+Click for Opera versions less than v8.01).  This command cannot be used (and thus is ignored) across frames.  However, it can be used for popups that have iframe content, in which case the caption area but not the main text area of the popup can be used for dragging.  Overrides SCROLL (see above) unless the SCROLL command is for a different frame.  Note that dragging for a primary popup is suspended whenever a secondary popup is being displayed, and is re-asserted when the secondary popup is closed.  Sticky secondary popups can be draggable.  See DRAGCAP and DRAGID, below.
Demonstration 1
Demonstration 2
Demonstration 3
Variable: ol_draggable
Unconditional off: -DRAGGABLE

DRAGCAP
Makes the dragging handle for draggable sticky popups restricted to the caption.  Toggles the feature on or off.  The overlibmws_draggable.js plugin module must be imported to use this command.  Is ignored if the popup does not have a caption.
Demonstration
Variable: ol_dragcap
Unconditional off: -DRAGCAP

DRAGID divID
Required if DRAGCAP is not used with DRAGGABLE for STICKY popups that have class-based CSS with an overflow:auto; rule to invoke scroll bars in the popup when its content is large.  The parameter is a quoted string with the id of such an encasing div for the popup content.  The overlibmws_draggable.js plugin module must be imported to use this command.
Demonstration
Variable: ol_dragid


HIDESELECTBOXES
Hides any select box(es) while a popup is displayed if the select box(es) would overlap with the popup and potientially obscure it.  This command toggles the feature on or off.  You must import the overlibmws_hide.js plugin module to use this command.  The command is not needed and thus is ignored for IE v5.5 or higher when the overlibmws_iframe.js plugin has been imported (see Introduction).  It also is ignored for Opera v7+, IE v7+, Netscape v7.1+ and corresponding Gecko-engine browsers (e.g., Mozilla v1.4+ and Firefox), whose popups are not obscured by any form elements, and for Netscape v4.x, whose popups are obscured by all form elements and which is handled via the HIDEBYIDNS4 command (see below).  Thus, this command is needed and not ignored primarily for versions of IE older than 5.5 whose popups otherwise are obscured by all portions of select boxes, and for Netscape v6.x and v7.0 and other correspondingly old Gecko-engine browsers whose popups otherwise can be obscured by the slide bars of select boxes.
Demonstration 1
Demonstration 2
Variable: ol_hideselectboxes
Unconditional off: -HIDESELECTBOXES

HIDEBYIDALL systemControlID(s)
Hides system controls (e.g., flash objects, applets) based on an id or comma-separated list of id's passed as the parameter for this command.  You must import the overlibmws_hide.js plugin module to use this command.  The command is not needed and thus is ignored for IE v5.5 or higher when the overlibmws_iframe.js plugin module has been imported (see Introduction).  If support for Netscape v4.x is needed, encase the system control in a div whose style includes position:relative and use that div's id (rather than the id of the system control, itself) in the parameter for this command.
Demonstration
Variable: ol_hidebyidall

HIDEBYIDNS4 positionedDivID(s)
Hides positioned div's (layers) based on an id or comma-separated list of id's passed as the parameter for this command.  You must import the overlibmws_hide.js plugin module to use this command.  The command is acted upon only for Netscape 4.x browsers to hide an entire form or sets of form fields encased by (a) positioned div(s) with the indicated id(s).  Use it together with HIDESELECTBOXES (see above) for the other browsers when support for Netscape v4.x also is needed.
Demonstration
Variable: ol_hidebyidns4

HIDEBYID formFieldID(s)
Hides form fields based on an id or comma-separated list of id's passed as the parameter for this command.  You must import the overlibmws_hide.js plugin module to use this command.  The command is not needed and thus is ignored for IE v5.5 or higher when the overlibmws_iframe.js plugin has been imported (see Introduction).  It also is ignored for Opera 7+ because no form fields obscure its popups, and for Netscape 6/7+ and corresponding Gecko-engine browsers (e.g., Mozilla) if the HIDESELECTBOXES command (see above) also is being used for the popup.  Finally, it is ignored for Netscape 4.x so that the HIDEBYIDNS4 command (see above) can be used selectively for positioned div's (layers) with that browser.  Although the command is not needed when the overlibmws_iframe.js plugin has been imported and the preferable HIDESELECTBOXES command also is used, it has been retained for backward compatibility.
Variable: ol_hidebyid

LABEL labelingString
For labeling primary sticky or tooltip popups.  The parameter for this command should be a labeling string, e.g., the id of the element which invokes the primary popup, or a label for a set of primary popups.  The label is asserted when the primary popup is invoked, and persists until it is closed (hidden).  The runtime variable for LABEL (o3_label) thus can be checked via javascript in HTML/XML documents to determine if a particular popup, or a member of a set, is being displayed.  An example of its use is in the support document for keyboard-invoked popups.  This complements the OLshowingsticky global variable, which is set (1, default 0) whenever any sticky primary popup is being displayed.
Variable: ol_label

LABEL2 labelingString
For labeling secondary sticky or tooltip popups.  The parameter for this command should be a labeling string, and functions equivalently to the LABEL parameter for primary popups (see above), such that the runtime variable for LABEL2 (o3_label2) can be used for determining whether particular secondary popups are being displayed.  This complements the OLshowingsticky2 global variable, which is set (1, default 0) whenever any sticky secondary popup is being displayed.
Variable: ol_label2

DONOTHING
Filler command which does nothing, takes no parameters, and has no configuration variable.  The command has been made available for use in wrapper functions that ultimately make an overlib call, and otherwise might require setups of multiple overlib calls with different numbers of commands.  Variables can be defined as stand-ins for some overlib commands and used in the wrapper function's overlib call.  Such variables can be equated to desired overlib commands under some contingencies, but might not be wanted under other contigencies and instead can be equated to DONOTHING when those contingencies are found to apply for the wrapper function.
Variable: none
Unconditional off: none

  4.
Colors, Fonts and Images

FGCOLOR color
Background color for the main text area of the popup box.  Overridden by FGCLASS.
Variable: ol_fgcolor

BGCOLOR color
Color of the border of the popup box.  Overridden by BGCLASS.
Variable: ol_bgcolor

CGCOLOR color
Background color for the caption area of the popup box.  Overridden by CGCLASS.
Variable: ol_cgcolor

TEXTCOLOR color
Sets the color of the main text.  Overridden by TEXTFONTCLASS.
Variable: ol_textcolor

CAPCOLOR color
Sets the color of the caption text.  Overridden by CAPTIONFONTCLASS.
Variable: ol_capcolor

CLOSECOLOR color
Sets the color of the 'Close' text.  Overridden by CLOSEFONTCLASS
Variable: ol_closecolor

TEXTFONT font
Sets the font to be used by the main text.  Overridden by TEXTFONTCLASS.
Variable: ol_textfont

CAPTIONFONT font
Sets the font of the caption.  Overridden by CAPTIONFONTCLASS.
Variable: ol_capfont

CLOSEFONT font
Defines the font for the 'Close' text.  Overridden by CLOSEFONTCLASS
Variable: ol_closefont

TEXTSIZE size
Size of the main text's font, normally expressed as an integer between 1 (default) and 7.  Can instead make the parameter a (quoted) string with a CSS font-size value and unit (e.g., '83%' or '14px').  Overridden by TEXTFONTCLASS.
Variable: ol_textsize

CAPTIONSIZE size
Size of the caption's font, normally expressed as an integer between 1 (default) and 7.  Can instead make the parameter a (quoted) string with a CSS font-size value and unit (e.g., '83%' or '14px').  Overridden by CAPTIONFONTCLASS
Variable: ol_captionsize

CLOSESIZE size
Size of the 'Close' text's font, normally expressed as an integer between 1 (default) and 7.  Can instead make the parameter a (quoted) string with a CSS font-size value and unit (e.g., '83%' or '14px').  Overridden by CLOSEFONTCLASS
Variable: ol_closesize

FGBACKGROUND picture
Defines a picture (typically, a textured background) to use instead of color for the inside, text table (main text area) of the popup.  Overridden by FGCLASS.
Demonstration
Variable: ol_fgbackground

BGBACKGROUND picture
Defines a picture to use instead of color for the outside, border table of the popup.  Netscape 4.x inappropriately tiles the image into all of the table data cells.  The workaround is also to use images rather than colors for the text area (see FGBACKGROUND, above) and caption area (see CGBACKGROUND, below).  Overridden by BGCLASS.
Demonstration
Variable: ol_bgbackground

CGBACKGROUND picture
Defines a picture to use instead of color for an inside, caption table (caption area) of the popup.  When having a Close link, Netscape 4.x will restart the image in that table data cell, making things look bad unless the image is a texture which can be tiled horizontally without visible seams.  Overridden by CGCLASS.
Demonstration
Variable: ol_cgbackground

CAPICON picture
Displays a small icon before the popup caption.
Variable: ol_capicon

BACKGROUND picture
Instead of using the table box as background, your picture will be used.
Demonstration
Variable: ol_background

PADX left right
Pads the background picture with horizontal whitespace for text placement.  Note that this is a two parameter command.
Variable: ol_padxl and ol_padxr

PADY top bottom
Pads the background picture with vertical whitespace for text placement.  Note that this is a two parameter command.
Variable: ol_padyt and ol_padyb

FULLHTML
Allows you to control the html over the BACKGROUND picture completely.  Also can be used without the BACKGROUND command, to specify the popup content entirely via your own markup (which could include background and/or foreground images).  The html code is expected in "text".  This command toggles the feature on or off.
Demonstration
Variable: ol_fullhtml
Unconditional off: -FULLHTML

  5.
Cascading Style Sheets

These are core commands, any (or all six) of which can be used in any combination.  The parameter is a quoted string corresponding to a class for a CSS style sheet declared in the head via a style block, or in an imported .css file.  Each command, if used, overrides some default formatting configuration variables and their associated commands as indicated below, and so the style sheet should include appropriate rules for the overridden variables (if their defaults are not null strings), in addition to any other style rules you wish to apply.  Demonstration 1Demonstration 2Demonstration 3Note that in documents with popups you should avoid global rules for the table, tr and td elements, and instead use only class-based rules so that you do not inadvertently affect the styling of the popups.  Also, if you use global rules for the body element, you should avoid a font-size rule so that you do not inadvertently affect the sizing of fonts in popups.  However, if you include the six class commands as explained below (plus the PRINTFONTCLASS command when the overlibmws_print.js plugin is imported) in an OLpageDefaults call to make them the page defaults, then the DHTML popups can be rendered according to those class-based CSS rules, unaffected by any generic CSS rules for the document's body, table, tr and/or td elements.

FGCLASS class
Class for the inside, text table (main text area) of the popup box.  Overrides ol_fgcolor / FGCOLOR, and ol_fgbackground / FGBACKGROUND (replace with background-color and/or background-image rules).  For block-level rules (e.g., text-align:center; for centering the main text).
Variable: ol_fgclass

CGCLASS class
Class for an inside, caption table (caption area) of the popup box.  Overrides ol_cgcolor / CGCOLOR, and ol_cgbackground / CGBACKROUND (replace with background-color and/or background-image rules).  For block-level rules (e.g., text-align:center; for centering the caption).
Variable: ol_cgclass

BGCLASS class
Class for the outside, border table of the popup box  Overrides ol_bgcolor / BGCOLOR, and ol_bgbackround / BGBACKGROUND (replace with background-color and/or background-image rules).  For block-level rules applicable to the outside border of the popup.
Variable: ol_bgclass

TEXTFONTCLASS class
Class for the main text area.  Overrides ol_textcolor / TEXTCOLOR, ol_textfont / TEXTFONT, and ol_textsize / TEXTSIZE (replace with color, font-family and font-size rules).  For inline rules related to the main text font (e.g., font-weight).  Block-level rules appropriate for an encasing div also can be used.
Variable: ol_textfontclass

CAPTIONFONTCLASS class
Class for the caption text. Overrides ol_capcolor / CAPCOLOR, ol_captionfont / CAPTIONFONT, and ol_captionsize / CAPTIONSIZE (replace with color, font-family and font-size rules).  For inline rules related to the caption font (e.g., font-weight).  Block-level rules appropriate for an encasing div also can be used.
Variable: ol_captionfontclass

CLOSEFONTCLASS class
Class for the Close link.  Overrides ol_closecolor / CLOSECOLOR, ol_closefont / CLOSEFONT, and ol_closesize / CLOSESIZE.  Use color, font-family, and font-size rules, and any other appropriate rules for an anchor such as font-weight and background-color, including for hover as illustrated in Demonstration 3 for the popups with Close links.  Also see PRINTFONTCLASS, which is the homologous command for the Print link when Printing Popups.
Variable: ol_closefontclass

  6.
Dropshadow

Requires the overlibmws_shadow.js plugin module.
Demonstration.

SHADOW
Toggle for whether to add a dropshadow (default 0).  Is overridden by FILTERSHADOW (or replaced by FILTERSHADOW,2) for IE v5.5+ browsers on PCs if FILTER also is set.  Thus, including SHADOW, FILTER and FILTERSHADOW commands in the overlib or overlib2 call will yield shadows for all of the supported browsers, plus FILTER-based fadein/fadeout effects for IE v5.5+ browsers or a simple fadein/fadeout effect for other browsers which have style-based opacity support (e.g., recent versions of Firefox and the other Gecko-engine browsers, Opera, Safari, and Konqueror, or the old 4.0 and 5.0 versions of IE).  See Section 8 for more information.
Variable: ol_shadow
Unconditional off: -SHADOW

SHADOWX pixels
Number of pixels for the horizontal shadow displacement (default 5).
Positive values yield displacements to the right, negative to the left.
Variable: ol_shadowx

SHADOWY pixels
Number of pixels for the vertical shadow displacement (default 5).
Positive values yield displacements down, negative up.
Variable: ol_shadowy

SHADOWCOLOR color
Hex code or name for the shadow color (default '#666666').
Variable: ol_shadowcolor

SHADOWIMAGE picture
URL for an image shadow (default "").
A semi-transparent image (semitrans.gif) is included in the distribution.  It can reside anywhere pointed to via this command or its variable.
Variable: ol_shadowimage

SHADOWOPACITY percentage
Percentage for the opacity (default 60) of the shadow (100 is solid; 0 turns off the feature and thus also yields a solid shadow).  The opacity feature is handled for IE on PCs and for the versions of Gecko-engine, Safari, Konqueror, and Opera browsers with opacity support.  The shadow is solid for the browser versions which lack opacity support.
Variable: ol_shadowopacity

  7.
Speech Bubbles

Requires the overlibmws_bubble.js plugin module.
Demonstration.

BUBBLE
Toggle for whether to show a speech bubble popup (default 0).
Variable: ol_bubble
Unconditional off: -BUBBLE

BUBBLETYPE type of bubble image
Specifies a string value, giving the type of "bubble" image to display.  Default value is 'flower'.  Other permissible values are 'oval', 'square,' 'pushpin,' 'quotation,' and 'roundcorners'.  The latter bubbletype employs a 3 x 3 table with the outer cells filled with images (cornerTL.gif, edgeT.gif, cornerTR.gif, edgeL.gif, edgeR.gif, cornerBL.gif, edgeB.gif, and cornerBR.gif), with the actual content in the center cell, and with the edge images scaled to match that content.  These and the other bubble images must be placed in a directory that can be specified via OLbubbleImageDir (see Pre-Init String Variables, below).  The default value is './'); preloading will occur automatically when the plugin is loaded.
Variable: ol_bubbletype

ADJBUBBLE
Toggles whether the "bubble" image will be resized proportionally (i.e., so that the aspect ratio [width/height] is held constant), according to how much content is in the popup.  Default value is off (0).  This command has no effect when BUBBLETYPE is 'roundcorners'.  Use of this command might cause popups to be displayed slowly, depending on your machine's processor speed, and perhaps should be used cautiously.
Variable: ol_adjbubble
Unconditional off: -ADJBUBBLE

RCBUBBLECOLOR color
Specifies a string value, giving the color for the textual content of speech bubble popups which have 'roundcorners' as their BUBBLETYPE parameter (see above).  Default value is '#ffffcc'.
Demonstration
Variable: ol_rcbubblecolor

BUBBLECLOSE
Toggles whether to block the normally automatic setting of NOCLOSE for bubble popups that are sticky.  Default value is off (0).  Toggle BUBBLECLOSE on if the popup content includes a close link that calls the cClick or cClick2 function for primary or secondary popups, respectively (see the Introduction, above), and you wish to require that it be used to close the bubble popup (i.e., without the popup also able to close via a mouseoff).
Variable: ol_bubbleclose
Unconditional off: -BUBBLECLOSE

Pre-Init String Variables:  OLbubbleImageDir, OLbubbleImageSet, OLbubbleImages, OLbubbleIMGsuffix, and OLbubbleRCsuffix
These string variables can be defined in a script block placed in the document's head before the block for importing the plugin module.  OLbubbleImageDir can be used to replace the default of './' for the directory where the bubble images are sought.  For example, if it is defined to '/images' they will be sought in a directory named images off the account's root directory.  OLbubbleImageSet is a comma-separated list which defines the BUBBLETYPE tokens for the full set of available bubble images.  It defaults to 'flower,oval,square,pushpin,quotation,roundcorners' and can be used to add tokens for any bubble images beyond those included in the overlibmws distribution.  Note that all of the tokens for roundcorners image sets must be last in the list and must begin with those same 12 characters.  OLbubbleImages can be defined to a comma-separated list of bubble images that are actually used by popups in the document (e.g., 'flower,roundcorners' if only flower.gif and the roundcorners image set are used), so that only those will be preloaded.  If not defined, the entire set of bubble images will be pre-loaded (see BUBBLETYPE, above).  OLbubbleIMGsuffix can be used to have a suffix added to the root name of non-roundcorners bubble images (e.g., flower_foo.gif), and OLbubbleRCsuffix can be used to do this for the roundcorners image set (e.g., cornerTL_foo.gif), which will be sought when the standard BUBBLETYPE values are used.  This makes it easy to use images which have modifications such as the color of those from the overlibmws distribution, but without any changes in their sizes.
Demonstration

Pre-Init Array Variables:  OLimgWidth, OLimgHeight, OLcontentWidth, OLcontentHeight, OLpadLeft, OLpadTop, OLarwTipX and OLarwTipY
These array variables provide values for sizing the bubble images and positioning content for the non-roundcorners bubbletypes, as explained in Sections 4 and 5 of the BUBBLE support document.  If you add such bubbletypes beyond the five in the overlibmws distribution, you can copy the default array definitions from near the top of the overlibmws_bubble.js plugin module, add the values for your additional bubbletypes, and place the expanded definitions in a script block before the block for importing that plugin module so that you need not edit the module, itself, whenever it is updated.
Demonstration

Commands that are Disabled for Speech Bubbles include:
  • BGCOLOR, FGCOLOR, BORDER, BASE
  • BGBACKGROUND, CGBACKGROUND, FGBACKGROUND, BACKGROUND
  • CAPTION
  • FULLHTML
  • SHADOW
  • LEFT, CENTER (except for roundcorners)
  • ABOVE, VCENTER (except for roundcorners)
  • HAUTO, VAUTO (except for roundcorners)
  • WRAP, WIDTH (except for roundcorners)

  8.
Transform Filters

Requires the overlibmws_filter.js plugin module.  This feature set is implemented primarily via the MS Filters and Transitions for IE v5.5+ browsers on PCs.  Browsers which lack these filters or their equivalents show fully normal popups but without the filter-based enhancements.  A simple fadein/fadeout effect, similar to transform filter type 25 is used for the other browsers which have style-based opacity support (e.g., recent versions of Firefox and other Gecko-engine browsers, Opera v9+, Safari, and Konqueror, or the old 4.0 and 5.0 versions of IE).
Demonstration 1 (all seventy-one links, whew!!!!).
Demonstration 2 (several links).
Demonstration 3 (most links).
Demonstration 4 (all 8 links).
Demonstration 5 (all links except some Speech Bubbles).
The FILTEROPACITY feature (see below) also is implemented for earlier versions of IE and for non-IE browsers with opacity support.

FILTER
Toggle for whether to use transform filters with the popup (default 0).  With the normal defaults, simply including the FILTER command will yield both a fadein and complementary fadeout for the popup in IE v5.5+ browsers on PCs, with the fadein/fadeout type selected at random from among the 51 available types, or will yield the simple fadein/fadeout for the other browsers with opacity support.  For IE v5.5+ browsers it also will cause SHADOW to be overridden or replaced by FILTERSHADOW (see below).
Variable: ol_filter
Unconditional off: -FILTER

FADEIN type of fade transform filter
Specifies a number from 1 to 51 for one of the 51 available fade transform filter types, or 52 (the IE v5.5+ default) for random selections of the type.  Use 0 to disable the fadein but still allow the fadeout and/or filter-based opacity and/or shadow features (see below).  The non-zero numbers all yield an emulation of 25 for the other browsers with opacity support.
Variable: ol_fadein

FADEOUT type of fade transform filter
Specifies a number from 1 to 51 for one of the 51 available fade transform filter types, or 52 (the IE v5.5+ default) for random selections of the type.  Use 0 to disable the fadeout but still allow the fadein and/or filter-based opacity and/or shadow features (see below).  For the other browsers with opacity support, the non-zero numbers all yield an emulation of 25, or may be treated as 0 in some frame documents.
Variable: ol_fadeout

FADETIME time in millisec
Specifies a time in millisec (default 800) for the duration of the FADEIN and/or FADEOUT.
Variable: ol_fadetime

FILTEROPACITY filter-based opacity value
Specifies a number for the FILTER-toggled opacity applied to the entire popup.  The higher the number, the more opaque (less transparent), with 100 (the default) representing solid (no transparency). Note that the value 0, which logically would make the popup invisible, instead is treated as 100 (no transparency).  This feature also is implemented for earlier versions of IE, and for the versions of Firefox, Netscape v6/7+, Mozilla and other Gecko-engine browsers, Safari, Konqueror and Opera with opacity support.
Variable: ol_filteropacity

FILTERSHADOW type of filter-based shadow
Specifies a number for the type of filter-based shadow.  The number 1 is for a dropshadow, and 2 is for a tapered shadow (0, the default, is for no shadow).  Note that the (drop)shadow feature via the overlibmws_shadow.js plugin module is implemented for all of the supported browsers, and includes commands for setting the size and displacement of the shadow.  The filter-based shadows are used primarily for special effects during fadeins and/or fadeouts.  Also note that if both the SHADOW and FILTER commands are toggled on, for IE v5.5+ on PCs the SHADOW command will be overridden by FILTERSHADOW (or replaced by FILTERSHADOW,2 if FILTERSHADOW was not included in the overlib or overlib2 call).  Thus, including SHADOW, FILTER and FILTERSHADOW commands in the call will yield shadows for all of the supported browsers, plus FILTER-based fadein/fadeout effects for IE v5.5+ browsers on PCs and for the other browsers which have style-based opacity support. See Section 6 for more information.
Variable: ol_filtershadow

FILTERSHADOWCOLOR color
Specifies a string with the hex code or name for the color of the filter-based shadow.
Variable: ol_filtershadowcolor

  9.
Printing Popups

Requires the overlibmws_print.js plugin module.
Demonstration 1 (Use of a Print link versus button)
Demonstration 2 (Printing standard, BACKGROUND, or FULLHTML Popups)
Demonstration 3 (Use of an external function for formatting and printing)

PRINT
Toggle for whether to insert a Print link at right in the DHTML popup's caption, or a Print button centered at the bottom of a captionless DHTML popup (default 0, meaning that a Print link or button is not inserted).  Although DHTML popups cannot be printed directly, activating the inserted Print link or button invokes a temporary window that displays the popup via equivalent markup.  That window is printed and then closed automatically (unless NOAUTOPRINT is set to substitute manual printing and closing, see below).  This feature applies only to DHTML popups which are sticky, such that the user can reach and activate the Print link or button.
Variable: ol_print
Unconditional off: -PRINT

PRINTBUTTON
Toggle for whether to force use of a Print button in the text area instead of a Print link in the caption when the PRINT toggle is on (default 0, meaning that a button is not forced).
Variable: ol_printbutton
Unconditional off: -PRINTBUTTON

NOAUTOPRINT
Toggle for whether to block the normally automatic printing and then closing of the temporary printing window created via the Print link or button (default 0, meaning the block is not applied).  If the block is applied, an alert box instructs the user to print and then close the temporary printing window manually.  This feature is primarily for allowing clear inspection of the printing window contents when initially setting up the printing for a popup.
Variable: ol_noautoprint
Unconditional off: -NOAUTOPRINT

PRINTCOLOR color
Sets the color of the Print link text.  Overridden by PRINTFONTCLASS
(Note that the Print button text always is black on a system-generated button.)
Variable: ol_printcolor

PRINTFONT font
Defines the font for the Print link text.  Overridden by PRINTFONTCLASS 
Variable: ol_printfont

PRINTSIZE size
Size of the Print link text's font, normally expressed as an integer between 1 (default) and 7.  Can instead make the parameter a (quoted) string with a CSS font-size value and unit (e.g., '83%' or '14px').  Overridden by PRINTFONTCLASS
Variable: ol_printsize

PRINTTEXT text
Replaces the default 'Print' link text in stickies with something else.  The replacement can be plain text or inline HTML/XML markup suitable for use as Anchor content, and can be an image (icon) if the markup uses an IMG element.  A Print icon (print.gif) is included in the distribution.
Demonstration
Variable: ol_printtext

PRINTBUTTONTEXT text
Replaces the default 'Print' button text in the text area of stickies with something else.  The replacement must be plain text suitable for a system-generated button (i.e., via an input tag with type="button").  Normally this is changed only to a word for 'Print' in a non-English language.
Variable: ol_printbuttontext

PRINTTITLE title attribute value
Sets the text string value of the HTML/XML title attribute for the Print link or button.  The title attribute serves to invoke an OS tooltip when the curser hovers over the link or button for browsers which implement such tooltips via title attributes.  Default value is 'Click to Print'.
Variable: ol_printtitle

PRINTFONTCLASS class
Class for the Print link.  Overrides ol_printcolor / PRINTCOLOR, ol_printfont / PRINTFONT, and ol_printsize / PRINTSIZE.  Use color, font-family, and font-size rules, and any other appropriate rules for an anchor such as font-weight and background-color, including for hover.  Also see CLOSEFONTCLASS, which is the homologous command for the Close link when using Cascading Style Sheets.
Variable: ol_printfontclass

PRINTCSSFILE URL
A partial, relative, or complete URL for a .css file containing all of the CSS rules that affect the styling of the popup.  It is placed in a:
 <link rel="stylesheet" type="text/css" href="URL" />
tag in the head section of the markup that is inserted into the temporary printing window.  The default is a null string (no URL between the open- and close-quotes), which prevents the tag from being included in the markup. It is best to specify the same .css file as is used for the original document.
Variable: ol_printcssfile

PRINTXML xml tag
String for an (optional) xml tag to be inserted at the top of the markup for the temporary printing window.  The default is a null string (nothing between the open- and close-quotes), which prevents the tag from being included in the markup.  An example parameter for this command is:
 '<?xml version="1.0" encoding="utf-8"?>'
in which case you also should set PRINTCHARSET (see below) to 'utf-8' and PRINTTYPE (see below) to the appropriate MIME type.
Variable: ol_printxml

PRINTDOCTYPE DOCTYPE declaration
String for the DOCTYPE declaration to be inserted at the top of the markup (below the xml tag if one is used, see above) for the temporary printing window.  The default is:
  '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" '
 +'"http://www.w3.org/TR/html4/loose.dtd">'

for HTML 4.01 with the loose (Transitional) DTD.  Omit the URL if you need to invoke "quirks" mode for the popular browsers.
Variable: ol_printdoctype

PRINTROOT root tag
String for the root tag to be inserted after the DOCTYPE declaration {see above) at the top of the markup for the temporary printing window.  The default is:
 '<html>'
An example alternative parameter for this command is:
 '<html lang="fa">'
which indicates that the document's language is Farsi.
Variable: ol_printroot

PRINTTYPE MIME type
String for the MIME type to be inserted within a meta tag in the head section of the markup for the temporary printing window.  The default is 'text/html' which together with the default PRINTCHARSET (see below) yields:
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
Variable: ol_printtype

PRINTCHARSET charset
String for the charset to be inserted within a meta tag in the head section of the markup for the temporary printing window.  The default is 'iso-8859-1' which together with the default PRINTTYPE (see above) yields:
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
Variable: ol_printcharset

PRINTURL URL
A partial, relative, or complete URL for a document (file or server-side script) to be printed via the temporary printing window.  Typically this is the URL for a document that was used as iframe or object content in the popup.  It also can be alternative content more suitable for printing than the displayed DHTML popup content, e.g., if the DHTML popup was invoked with CSS-based scroll bars, or if the caption of an iframe- or object-base DHTML popup needs to be reproduced as a header in the printed document.  Overrides PRINTJOB
Variable: ol_printurl

PRINTJOB functionstring
String for an external function's name, parens and any arguments, e.g.:
 'myPrintJob(myPrintTxt, myPrintCap)'
to be used instead of the overlibmws internal function for printing the popup content via a temporary printing window.  For considerations like those associated with PRINTURL (see above) but via a client-side wrapper script.  Overridden by PRINTURL
Demonstration (Use of an external function for formatting and printing.)
Variable: ol_printjob

10.
Debug Function

OLshowProperties(variable_label, variable, ...)
Requires the overlibmws_debug.js plugin module.

Uses its own positioned div container (layer):
  <div id="showProps" style="position:absolute;visibility:hidden;"></div>
which will be created dynamically, i.e, need not be declared in the document, but showProps should not be used as an id for another element.

The function can be inserted into a position within a debug copy of your overlibmws.js core module or of a plugin module to report the values of the indicated variable or variables whenever that position in the code is reached at run time.  You also can insert the function into multiple positions, and include a lead argument (before the variable_label,variable pairs) that indicates a unique id for each additional debug display layer which is thereby to be created.  These additional debug display layers also will be created dynamically and need not be declared explicitly in the body of the document.  The container's id value string is displayed as a link at upper left in the layer, and when multiple debug layers are displayed, can be used to cycle through the layers with respect to which layer is displayed on top.  The debug layer displays also have a close button labeled X at upper right, for casting the layer to hidden.  Once a debug layer has been cast to hidden, it will remain hidden unless it is cast to visible again via the ALLOWDEBUG command or its configuration variable.
Demonstration.

ALLOWDEBUG debugID(s)
Specifies a string value with the id of a debug layer or a comma-separated list of debug layer ids (default is the null string, "").  When the string value is non-null and points to valid id(s), the corresponding debug layer(s) that was(were) made hidden via the debug layer close button at upper right can be made visible again when an overlib call which can invoke the debug layer(s) is made again.  Such layers can be made hidden again via their close link.  The string value can be set on the command line, via the configuration variable, or via the OLpageDefaults() configuration function.
Variable: ol_allowdebug

Note that a function set (OLhtmlspecialchars, OLshowMarkup, OLoverHTMLshow, OLover2HTMLshow and OLresponseAJAXshow) in the htmlspecialcharsmws.js support script can be used to see the markup which the core and/or plugin modules are creating, or which the browser is loading based on that markup, and thereby may also assist you in debugging.  Furthermore, its OLhtmlspecialchars(str, quo) function, which performs the equivalent of the php htmlspecialchars(string, quote_style) function for converting special characters to HTML entities in HTML or XHTML fragments, can be used to make such fragments be displayed as their raw markup via the OLshowProperties function.

This document uses overlibmws and its commands.


Copyright Foteos Macrides
  2002-2010.
  All rights reserved.
Click to Donate