//\//////////////////////////////////////////////////////////////////////////////////
//\  overLIB 3.51  --  This notice must remain untouched at all times.
//\  Copyright Erik Bosrup 1998-2002. All rights reserved.
//\
//\  By Erik Bosrup (erik@bosrup.com).  Last modified 2002-11-01.
//\  Portions by Dan Steinman (dansteinman.com). Additions by other people are
//\  listed on the overLIB homepage.
//\
//\  Get the latest version at http://www.bosrup.com/web/overlib/
//\
//\  This script is published under an open source license. Please read the license
//\  agreement online at: http://www.bosrup.com/web/overlib/license.html
//\  If you have questions regarding the license please contact erik@bosrup.com.
//\
//\  This script library was originally created for personal use. By request it has
//\  later been made public. This is free software. Do not sell this as your own
//\  work, or remove this copyright notice. For full details on copying or changing
//\  this script please read the license agreement at the link above.
//\
//\  Please give credit on sites that use overLIB and submit changes of the script
//\  so other people can use them as well. This script is free to use, don't abuse.
//\//////////////////////////////////////////////////////////////////////////////////
//\mini


////////////////////////////////////////////////////////////////////////////////////
// CONSTANTS
// Don't touch these. :)
////////////////////////////////////////////////////////////////////////////////////
var INARRAY		=	1;
var CAPARRAY		=	2;
var STICKY		=	3;
var BACKGROUND		=	4;
var NOCLOSE		=	5;
var CAPTION		=	6;
var LEFT		=	7;
var RIGHT		=	8;
var CENTER		=	9;
var OFFSETX		=	10;
var OFFSETY		=	11;
var FGCOLOR		=	12;
var BGCOLOR		=	13;
var TEXTCOLOR		=	14;
var CAPCOLOR		=	15;
var CLOSECOLOR		=	16;
var WIDTH		=	17;
var BORDER		=	18;
var STATUS		=	19;
var AUTOSTATUS		=	20;
var AUTOSTATUSCAP	=	21;
var HEIGHT		=	22;
var CLOSETEXT		=	23;
var SNAPX		=	24;
var SNAPY		=	25;
var FIXX		=	26;
var FIXY		=	27;
var FGBACKGROUND	=	28;
var BGBACKGROUND	=	29;
var PADX		=	30; // PADX2 out
var PADY		=	31; // PADY2 out
var FULLHTML		=	34;
var ABOVE		=	35;
var BELOW		=	36;
var CAPICON		=	37;
var TEXTFONT		=	38;
var CAPTIONFONT		=	39;
var CLOSEFONT		=	40;
var TEXTSIZE		=	41;
var CAPTIONSIZE		=	42;
var CLOSESIZE		=	43;
var FRAME		=	44;
var TIMEOUT		=	45;
var FUNCTION		=	46;
var DELAY		=	47;
var HAUTO		=	48;
var VAUTO		=	49;
var CLOSECLICK		=	50;
var CSSOFF		=	51;
var CSSSTYLE		=	52;
var CSSCLASS		=	53;
var FGCLASS		=	54;
var BGCLASS		=	55;
var TEXTFONTCLASS	=	56;
var CAPTIONFONTCLASS	=	57;
var CLOSEFONTCLASS	=	58;
var PADUNIT		=	59;
var HEIGHTUNIT		=	60;
var WIDTHUNIT		=	61;
var TEXTSIZEUNIT	=	62;
var TEXTDECORATION	=	63;
var TEXTSTYLE		=	64;
var TEXTWEIGHT		=	65;
var CAPTIONSIZEUNIT	=	66;
var CAPTIONDECORATION	=	67;
var CAPTIONSTYLE	=	68;
var CAPTIONWEIGHT	=	69;
var CLOSESIZEUNIT	=	70;
var CLOSEDECORATION	=	71;
var CLOSESTYLE		=	72;
var CLOSEWEIGHT		=	73;


////////////////////////////////////////////////////////////////////////////////////
// DEFAULT CONFIGURATION
// You don't have to change anything here if you don't want to. All of this can be
// changed on your html page or through an overLIB call.
////////////////////////////////////////////////////////////////////////////////////

// Main background color (the large area)
// Usually a bright color (white, yellow etc)
if (typeof Qol_fgcolor == 'undefined') { var Qol_fgcolor = "#CCCCFF";}
	
// Border color and color of caption
// Usually a dark color (black, brown etc)
if (typeof Qol_bgcolor == 'undefined') { var Qol_bgcolor = "#333399";}
	
// Text color
// Usually a dark color
if (typeof Qol_textcolor == 'undefined') { var Qol_textcolor = "#000000";}
	
// Color of the caption text
// Usually a bright color
if (typeof Qol_capcolor == 'undefined') { var Qol_capcolor = "#FFFFFF";}
	
// Color of "Close" when using Sticky
// Usually a semi-bright color
if (typeof Qol_closecolor == 'undefined') { var Qol_closecolor = "#9999FF";}

// Font face for the main text
if (typeof Qol_textfont == 'undefined') { var Qol_textfont = "Verdana,Arial,Helvetica";}

// Font face for the caption
if (typeof Qol_captionfont == 'undefined') { var Qol_captionfont = "Verdana,Arial,Helvetica";}

// Font face for the close text
if (typeof Qol_closefont == 'undefined') { var Qol_closefont = "Verdana,Arial,Helvetica";}

// Font size for the main text
// When using CSS this will be very small.
if (typeof Qol_textsize == 'undefined') { var Qol_textsize = "1";}

// Font size for the caption
// When using CSS this will be very small.
if (typeof Qol_captionsize == 'undefined') { var Qol_captionsize = "1";}

// Font size for the close text
// When using CSS this will be very small.
if (typeof Qol_closesize == 'undefined') { var Qol_closesize = "1";}

// Width of the popups in pixels
// 100-300 pixels is typical
if (typeof Qol_width == 'undefined') { var Qol_width = "200";}

// How thick the Qol_border should be in pixels
// 1-3 pixels is typical
if (typeof Qol_border == 'undefined') { var Qol_border = "1";}

// How many pixels to the right/left of the cursor to show the popup
// Values between 3 and 12 are best
if (typeof Qol_offsetx == 'undefined') { var Qol_offsetx = 10;}
	
// How many pixels to the below the cursor to show the popup
// Values between 3 and 12 are best
if (typeof Qol_offsety == 'undefined') { var Qol_offsety = 10;}

// Default text for popups
// Should you forget to pass something to overLIB this will be displayed.
if (typeof Qol_text == 'undefined') { var Qol_text = "Default Text"; }

// Default caption
// You should leave this blank or you will have problems making non caps popups.
if (typeof Qol_cap == 'undefined') { var Qol_cap = ""; }

// Decides if sticky popups are default.
// 0 for non, 1 for stickies.
if (typeof Qol_sticky == 'undefined') { var Qol_sticky = 0; }

// Default background image. Better left empty unless you always want one.
if (typeof Qol_background == 'undefined') { var Qol_background = ""; }

// Text for the closing sticky popups.
// Normal is "Close".
if (typeof Qol_close == 'undefined') { var Qol_close = "Close"; }

// Default vertical alignment for popups.
// It's best to leave RIGHT here. Other options are LEFT and CENTER.
if (typeof Qol_hpos == 'undefined') { var Qol_hpos = RIGHT; }

// Default status bar text when a popup is invoked.
if (typeof Qol_status == 'undefined') { var Qol_status = ""; }

// If the status bar automatically should load either text or caption.
// 0=nothing, 1=text, 2=caption
if (typeof Qol_autostatus == 'undefined') { var Qol_autostatus = 0; }

// Default height for popup. Often best left alone.
if (typeof Qol_height == 'undefined') { var Qol_height = -1; }

// Horizontal grid spacing that popups will snap to.
// 0 makes no grid, anything else will cause a snap to that grid spacing.
if (typeof Qol_snapx == 'undefined') { var Qol_snapx = 0; }

// Vertical grid spacing that popups will snap to.
// 0 makes no grid, andthing else will cause a snap to that grid spacing.
if (typeof Qol_snapy == 'undefined') { var Qol_snapy = 0; }

// Sets the popups horizontal position to a fixed column.
// Anything above -1 will cause fixed position.
if (typeof Qol_fixx == 'undefined') { var Qol_fixx = -1; }

// Sets the popups vertical position to a fixed row.
// Anything above -1 will cause fixed position.
if (typeof Qol_fixy == 'undefined') { var Qol_fixy = -1; }

// Background image for the popups inside.
if (typeof Qol_fgbackground == 'undefined') { var Qol_fgbackground = ""; }

// Background image for the popups frame.
if (typeof Qol_bgbackground == 'undefined') { var Qol_bgbackground = ""; }

// How much horizontal left padding text should get by default when BACKGROUND is used.
if (typeof Qol_padxl == 'undefined') { var Qol_padxl = 1; }

// How much horizontal right padding text should get by default when BACKGROUND is used.
if (typeof Qol_padxr == 'undefined') { var Qol_padxr = 1; }

// How much vertical top padding text should get by default when BACKGROUND is used.
if (typeof Qol_padyt == 'undefined') { var Qol_padyt = 1; }

// How much vertical bottom padding text should get by default when BACKGROUND is used.
if (typeof Qol_padyb == 'undefined') { var Qol_padyb = 1; }

// If the user by default must supply all html for complete popup control.
// Set to 1 to activate, 0 otherwise.
if (typeof Qol_fullhtml == 'undefined') { var Qol_fullhtml = 0; }

// Default vertical position of the popup. Default should normally be BELOW.
// ABOVE only works when HEIGHT is defined.
if (typeof Qol_vpos == 'undefined') { var Qol_vpos = BELOW; }

// Default height of popup to use when placing the popup above the cursor.
if (typeof Qol_aboveheight == 'undefined') { var Qol_aboveheight = 0; }

// Default icon to place next to the popups caption.
if (typeof Qol_capicon == 'undefined') { var Qol_capicon = ""; }

// Default frame. We default to current frame if there is no frame defined.
if (typeof Qol_frame == 'undefined') { var Qol_frame = self; }

// Default timeout. By default there is no timeout.
if (typeof Qol_timeout == 'undefined') { var Qol_timeout = 0; }

// Default javascript funktion. By default there is none.
if (typeof Qol_function == 'undefined') { var Qol_function = null; }

// Default timeout. By default there is no timeout.
if (typeof Qol_delay == 'undefined') { var Qol_delay = 0; }

// If overLIB should decide the horizontal placement.
if (typeof Qol_hauto == 'undefined') { var Qol_hauto = 0; }

// If overLIB should decide the vertical placement.
if (typeof Qol_vauto == 'undefined') { var Qol_vauto = 0; }



// If the user has to click to close stickies.
if (typeof Qol_closeclick == 'undefined') { var Qol_closeclick = 0; }

// This variable determines if you want to use CSS or inline definitions.
// CSSOFF=no CSS    CSSSTYLE=use CSS inline styles    CSSCLASS=use classes
if (typeof Qol_css == 'undefined') { var Qol_css = CSSOFF; }

// Main background class (eqv of fgcolor)
// This is only used if CSS is set to use classes (Qol_css = CSSCLASS)
if (typeof Qol_fgclass == 'undefined') { var Qol_fgclass = ""; }

// Frame background class (eqv of bgcolor)
// This is only used if CSS is set to use classes (Qol_css = CSSCLASS)
if (typeof Qol_bgclass == 'undefined') { var Qol_bgclass = ""; }

// Main font class
// This is only used if CSS is set to use classes (Qol_css = CSSCLASS)
if (typeof Qol_textfontclass == 'undefined') { var Qol_textfontclass = ""; }

// Caption font class
// This is only used if CSS is set to use classes (Qol_css = CSSCLASS)
if (typeof Qol_captionfontclass == 'undefined') { var Qol_captionfontclass = ""; }

// Close font class
// This is only used if CSS is set to use classes (Qol_css = CSSCLASS)
if (typeof Qol_closefontclass == 'undefined') { var Qol_closefontclass = ""; }

// Unit to be used for the text padding above
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
// Options include "px", "%", "in", "cm"
if (typeof Qol_padunit == 'undefined') { var Qol_padunit = "px";}

// Unit to be used for height of popup
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
// Options include "px", "%", "in", "cm"
if (typeof Qol_heightunit == 'undefined') { var Qol_heightunit = "px";}

// Unit to be used for width of popup
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
// Options include "px", "%", "in", "cm"
if (typeof Qol_widthunit == 'undefined') { var Qol_widthunit = "px";}

// Font size unit for the main text
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_textsizeunit == 'undefined') { var Qol_textsizeunit = "px";}

// Decoration of the main text ("none", "underline", "line-through" or "blink")
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_textdecoration == 'undefined') { var Qol_textdecoration = "none";}

// Font style of the main text ("normal" or "italic")
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_textstyle == 'undefined') { var Qol_textstyle = "normal";}

// Font weight of the main text ("normal", "bold", "bolder", "lighter", ect.)
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_textweight == 'undefined') { var Qol_textweight = "normal";}

// Font size unit for the caption
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_captionsizeunit == 'undefined') { var Qol_captionsizeunit = "px";}

// Decoration of the caption ("none", "underline", "line-through" or "blink")
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_captiondecoration == 'undefined') { var Qol_captiondecoration = "none";}

// Font style of the caption ("normal" or "italic")
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_captionstyle == 'undefined') { var Qol_captionstyle = "normal";}

// Font weight of the caption ("normal", "bold", "bolder", "lighter", ect.)
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_captionweight == 'undefined') { var Qol_captionweight = "bold";}

// Font size unit for the close text
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_closesizeunit == 'undefined') { var Qol_closesizeunit = "px";}

// Decoration of the close text ("none", "underline", "line-through" or "blink")
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_closedecoration == 'undefined') { var Qol_closedecoration = "none";}

// Font style of the close text ("normal" or "italic")
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_closestyle == 'undefined') { var Qol_closestyle = "normal";}

// Font weight of the close text ("normal", "bold", "bolder", "lighter", ect.)
// Only used if CSS inline styles are being used (Qol_css = CSSSTYLE)
if (typeof Qol_closeweight == 'undefined') { var Qol_closeweight = "normal";}



////////////////////////////////////////////////////////////////////////////////////
// ARRAY CONFIGURATION
// You don't have to change anything here if you don't want to. The following
// arrays can be filled with text and html if you don't wish to pass it from
// your html page.
////////////////////////////////////////////////////////////////////////////////////

// Array with texts.
if (typeof Qol_texts == 'undefined') { var Qol_texts = new Array("Text 0", "Text 1"); }

// Array with captions.
if (typeof Qol_caps == 'undefined') { var Qol_caps = new Array("Caption 0", "Caption 1"); }


////////////////////////////////////////////////////////////////////////////////////
// END CONFIGURATION
// Don't change anything below this line, all configuration is above.
////////////////////////////////////////////////////////////////////////////////////







////////////////////////////////////////////////////////////////////////////////////
// INIT
////////////////////////////////////////////////////////////////////////////////////

// Runtime variables init. Used for runtime only, don't change, not for config!
var Qo3_text = "";
var Qo3_cap = "";
var Qo3_sticky = 0;
var Qo3_background = "";
var Qo3_close = "Close";
var Qo3_hpos = RIGHT;
var Qo3_offsetx = 2;
var Qo3_offsety = 2;
var Qo3_fgcolor = "";
var Qo3_bgcolor = "";
var Qo3_textcolor = "";
var Qo3_capcolor = "";
var Qo3_closecolor = "";
var Qo3_width = 100;
var Qo3_border = 1;
var Qo3_status = "";
var Qo3_autostatus = 0;
var Qo3_height = -1;
var Qo3_snapx = 0;
var Qo3_snapy = 0;
var Qo3_fixx = -1;
var Qo3_fixy = -1;
var Qo3_fgbackground = "";
var Qo3_bgbackground = "";
var Qo3_padxl = 0;
var Qo3_padxr = 0;
var Qo3_padyt = 0;
var Qo3_padyb = 0;
var Qo3_fullhtml = 0;
var Qo3_vpos = BELOW;
var Qo3_aboveheight = 0;
var Qo3_capicon = "";
var Qo3_textfont = "Verdana,Arial,Helvetica";
var Qo3_captionfont = "Verdana,Arial,Helvetica";
var Qo3_closefont = "Verdana,Arial,Helvetica";
var Qo3_textsize = "1";
var Qo3_captionsize = "1";
var Qo3_closesize = "1";
var Qo3_frame = self;
var Qo3_timeout = 0;
var Qo3_timerid = 0;
var Qo3_allowmove = 0;
var Qo3_function = null; 
var Qo3_delay = 0;
var Qo3_delayid = 0;
var Qo3_hauto = 0;
var Qo3_vauto = 0;
var Qo3_closeclick = 0;

var Qo3_css = CSSOFF;
var Qo3_fgclass = "";
var Qo3_bgclass = "";
var Qo3_textfontclass = "";
var Qo3_captionfontclass = "";
var Qo3_closefontclass = "";
var Qo3_padunit = "px";
var Qo3_heightunit = "px";
var Qo3_widthunit = "px";
var Qo3_textsizeunit = "px";
var Qo3_textdecoration = "";
var Qo3_textstyle = "";
var Qo3_textweight = "";
var Qo3_captionsizeunit = "px";
var Qo3_captiondecoration = "";
var Qo3_captionstyle = "";
var Qo3_captionweight = "";
var Qo3_closesizeunit = "px";
var Qo3_closedecoration = "";
var Qo3_closestyle = "";
var Qo3_closeweight = "";



// Display state variables
var Qo3_x = 0;
var Qo3_y = 0;
var Qo3_allow = 0;
var Qo3_showingsticky = 0;
var Qo3_removecounter = 0;

// Our layer
var Qover = null;
var QfnRef;

// Decide browser version
var ns4 = (navigator.appName == 'Netscape' && parseInt(navigator.appVersion) == 4);
var ns6 = (document.getElementById)? true:false;
var ie4 = (document.all)? true:false;
if (ie4) var docRoot = 'document.body';
var ie5 = false;
if (ns4) {
	var oW = window.innerWidth;
	var oH = window.innerHeight;
	window.onresize = function () {if (oW!=window.innerWidth||oH!=window.innerHeight) location.reload();}
}


// Microsoft Stupidity Check(tm).
if (ie4) {
	if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
		if(document.compatMode && document.compatMode == 'CSS1Compat') docRoot = 'document.documentElement';
		ie5 = true;
	}
	if (ns6) {
		ns6 = false;
	}
}


// Capture events, alt. diffuses the overlib function.
var QmouseMoveWrap = null;
if ( (ns4) || (ie4) || (ns6)) {
        QmouseMoveWrap = document.onmousemove
	document.onmousemove = QmouseMove
	if (ns4) document.captureEvents(Event.MOUSEMOVE)
} else {
	Qoverlib = Qno_overlib;
	Qnd = Qno_overlib;
	ver3fix = true;
}


// Fake function for 3.0 users.
function Qno_overlib() {
	return ver3fix;
}



////////////////////////////////////////////////////////////////////////////////////
// PUBLIC FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////


// overlib(arg0, ..., argN)
// Loads parameters into global runtime variables.
function Qoverlib() {
	
	// Load defaults to runtime.
	Qo3_text = Qol_text;
	Qo3_cap = Qol_cap;
	Qo3_sticky = Qol_sticky;
	Qo3_background = Qol_background;
	Qo3_close = Qol_close;
	Qo3_hpos = Qol_hpos;
	Qo3_offsetx = Qol_offsetx;
	Qo3_offsety = Qol_offsety;
	Qo3_fgcolor = Qol_fgcolor;
	Qo3_bgcolor = Qol_bgcolor;
	Qo3_textcolor = Qol_textcolor;
	Qo3_capcolor = Qol_capcolor;
	Qo3_closecolor = Qol_closecolor;
	Qo3_width = Qol_width;
	Qo3_border = Qol_border;
	Qo3_status = Qol_status;
	Qo3_autostatus = Qol_autostatus;
	Qo3_height = Qol_height;
	Qo3_snapx = Qol_snapx;
	Qo3_snapy = Qol_snapy;
	Qo3_fixx = Qol_fixx;
	Qo3_fixy = Qol_fixy;
	Qo3_fgbackground = Qol_fgbackground;
	Qo3_bgbackground = Qol_bgbackground;
	Qo3_padxl = Qol_padxl;
	Qo3_padxr = Qol_padxr;
	Qo3_padyt = Qol_padyt;
	Qo3_padyb = Qol_padyb;
	Qo3_fullhtml = Qol_fullhtml;
	Qo3_vpos = Qol_vpos;
	Qo3_aboveheight = Qol_aboveheight;
	Qo3_capicon = Qol_capicon;
	Qo3_textfont = Qol_textfont;
	Qo3_captionfont = Qol_captionfont;
	Qo3_closefont = Qol_closefont;
	Qo3_textsize = Qol_textsize;
	Qo3_captionsize = Qol_captionsize;
	Qo3_closesize = Qol_closesize;
	Qo3_timeout = Qol_timeout;
	Qo3_function = Qol_function;
	Qo3_delay = Qol_delay;
	Qo3_hauto = Qol_hauto;
	Qo3_vauto = Qol_vauto;
	Qo3_closeclick = Qol_closeclick;
	
	Qo3_css = Qol_css;
	Qo3_fgclass = Qol_fgclass;
	Qo3_bgclass = Qol_bgclass;
	Qo3_textfontclass = Qol_textfontclass;
	Qo3_captionfontclass = Qol_captionfontclass;
	Qo3_closefontclass = Qol_closefontclass;
	Qo3_padunit = Qol_padunit;
	Qo3_heightunit = Qol_heightunit;
	Qo3_widthunit = Qol_widthunit;
	Qo3_textsizeunit = Qol_textsizeunit;
	Qo3_textdecoration = Qol_textdecoration;
	Qo3_textstyle = Qol_textstyle;
	Qo3_textweight = Qol_textweight;
	Qo3_captionsizeunit = Qol_captionsizeunit;
	Qo3_captiondecoration = Qol_captiondecoration;
	Qo3_captionstyle = Qol_captionstyle;
	Qo3_captionweight = Qol_captionweight;
	Qo3_closesizeunit = Qol_closesizeunit;
	Qo3_closedecoration = Qol_closedecoration;
	Qo3_closestyle = Qol_closestyle;
	Qo3_closeweight = Qol_closeweight;
	QfnRef = '';
	

	// Special for frame support, over must be reset...
	if ( (ns4) || (ie4) || (ns6) ) {
		if (Qover) QcClick();
		Qo3_frame = Qol_frame;
		if (ns4) Qover = Qo3_frame.document.QoverDiv
		if (ie4) Qover = Qo3_frame.QoverDiv.style
		if (ns6) Qover = Qo3_frame.document.getElementById("QoverDiv");
	}
	
	
	// What the next argument is expected to be.
	var parsemode = -1, udf, v = null;
	
	var ar = arguments;
	udf = (!ar.length ? 1 : 0);

	for (i = 0; i < ar.length; i++) {

		if (parsemode < 0) {
			// Arg is maintext, unless its a PARAMETER
			if (typeof ar[i] == 'number') {
				udf = (ar[i] == FUNCTION ? 0 : 1);
				i--;
			} else {
				Qo3_text = ar[i];
			}

			parsemode = 0;
		} else {
			// Note: NS4 doesn't like switch cases with vars.
			if (ar[i] == INARRAY) { udf = 0; Qo3_text = Qol_texts[ar[++i]]; continue; }
			if (ar[i] == CAPARRAY) { Qo3_cap = Qol_caps[ar[++i]]; continue; }
			if (ar[i] == STICKY) { Qo3_sticky = 1; continue; }
			if (ar[i] == BACKGROUND) { Qo3_background = ar[++i]; continue; }
			if (ar[i] == NOCLOSE) { Qo3_close = ""; continue; }
			if (ar[i] == CAPTION) { Qo3_cap = ar[++i]; continue; }
			if (ar[i] == CENTER || ar[i] == LEFT || ar[i] == RIGHT) { Qo3_hpos = ar[i]; continue; }
			if (ar[i] == OFFSETX) { Qo3_offsetx = ar[++i]; continue; }
			if (ar[i] == OFFSETY) { Qo3_offsety = ar[++i]; continue; }
			if (ar[i] == FGCOLOR) { Qo3_fgcolor = ar[++i]; continue; }
			if (ar[i] == BGCOLOR) { Qo3_bgcolor = ar[++i]; continue; }
			if (ar[i] == TEXTCOLOR) { Qo3_textcolor = ar[++i]; continue; }
			if (ar[i] == CAPCOLOR) { Qo3_capcolor = ar[++i]; continue; }
			if (ar[i] == CLOSECOLOR) { Qo3_closecolor = ar[++i]; continue; }
			if (ar[i] == WIDTH) { Qo3_width = ar[++i]; continue; }
			if (ar[i] == BORDER) { Qo3_border = ar[++i]; continue; }
			if (ar[i] == STATUS) { Qo3_status = ar[++i]; continue; }
			if (ar[i] == AUTOSTATUS) { Qo3_autostatus = (Qo3_autostatus == 1) ? 0 : 1; continue; }
			if (ar[i] == AUTOSTATUSCAP) { Qo3_autostatus = (Qo3_autostatus == 2) ? 0 : 2; continue; }
			if (ar[i] == HEIGHT) { Qo3_height = ar[++i]; Qo3_aboveheight = ar[i]; continue; } // Same param again.
			if (ar[i] == CLOSETEXT) { Qo3_close = ar[++i]; continue; }
			if (ar[i] == SNAPX) { Qo3_snapx = ar[++i]; continue; }
			if (ar[i] == SNAPY) { Qo3_snapy = ar[++i]; continue; }
			if (ar[i] == FIXX) { Qo3_fixx = ar[++i]; continue; }
			if (ar[i] == FIXY) { Qo3_fixy = ar[++i]; continue; }
			if (ar[i] == FGBACKGROUND) { Qo3_fgbackground = ar[++i]; continue; }
			if (ar[i] == BGBACKGROUND) { Qo3_bgbackground = ar[++i]; continue; }
			if (ar[i] == PADX) { Qo3_padxl = ar[++i]; Qo3_padxr = ar[++i]; continue; }
			if (ar[i] == PADY) { Qo3_padyt = ar[++i]; Qo3_padyb = ar[++i]; continue; }
			if (ar[i] == FULLHTML) { Qo3_fullhtml = 1; continue; }
			if (ar[i] == BELOW || ar[i] == ABOVE) { Qo3_vpos = ar[i]; continue; }
			if (ar[i] == CAPICON) { Qo3_capicon = ar[++i]; continue; }
			if (ar[i] == TEXTFONT) { Qo3_textfont = ar[++i]; continue; }
			if (ar[i] == CAPTIONFONT) { Qo3_captionfont = ar[++i]; continue; }
			if (ar[i] == CLOSEFONT) { Qo3_closefont = ar[++i]; continue; }
			if (ar[i] == TEXTSIZE) { Qo3_textsize = ar[++i]; continue; }
			if (ar[i] == CAPTIONSIZE) { Qo3_captionsize = ar[++i]; continue; }
			if (ar[i] == CLOSESIZE) { Qo3_closesize = ar[++i]; continue; }
			if (ar[i] == FRAME) { Qopt_FRAME(ar[++i]); continue; }
			if (ar[i] == TIMEOUT) { Qo3_timeout = ar[++i]; continue; }
			if (ar[i] == FUNCTION) { udf = 0; if (typeof ar[i+1] != 'number') v = ar[++i]; Qopt_FUNCTION(v); continue; } 
			if (ar[i] == DELAY) { Qo3_delay = ar[++i]; continue; }
			if (ar[i] == HAUTO) { Qo3_hauto = (Qo3_hauto == 0) ? 1 : 0; continue; }
			if (ar[i] == VAUTO) { Qo3_vauto = (Qo3_vauto == 0) ? 1 : 0; continue; }
			if (ar[i] == CLOSECLICK) { Qo3_closeclick = (Qo3_closeclick == 0) ? 1 : 0; continue; }
			if (ar[i] == CSSOFF) { Qo3_css = ar[i]; continue; }
			if (ar[i] == CSSSTYLE) { Qo3_css = ar[i]; continue; }
			if (ar[i] == CSSCLASS) { Qo3_css = ar[i]; continue; }
			if (ar[i] == FGCLASS) { Qo3_fgclass = ar[++i]; continue; }
			if (ar[i] == BGCLASS) { Qo3_bgclass = ar[++i]; continue; }
			if (ar[i] == TEXTFONTCLASS) { Qo3_textfontclass = ar[++i]; continue; }
			if (ar[i] == CAPTIONFONTCLASS) { Qo3_captionfontclass = ar[++i]; continue; }
			if (ar[i] == CLOSEFONTCLASS) { Qo3_closefontclass = ar[++i]; continue; }
			if (ar[i] == PADUNIT) { Qo3_padunit = ar[++i]; continue; }
			if (ar[i] == HEIGHTUNIT) { Qo3_heightunit = ar[++i]; continue; }
			if (ar[i] == WIDTHUNIT) { Qo3_widthunit = ar[++i]; continue; }
			if (ar[i] == TEXTSIZEUNIT) { Qo3_textsizeunit = ar[++i]; continue; }
			if (ar[i] == TEXTDECORATION) { Qo3_textdecoration = ar[++i]; continue; }
			if (ar[i] == TEXTSTYLE) { Qo3_textstyle = ar[++i]; continue; }
			if (ar[i] == TEXTWEIGHT) { Qo3_textweight = ar[++i]; continue; }
			if (ar[i] == CAPTIONSIZEUNIT) { Qo3_captionsizeunit = ar[++i]; continue; }
			if (ar[i] == CAPTIONDECORATION) { Qo3_captiondecoration = ar[++i]; continue; }
			if (ar[i] == CAPTIONSTYLE) { Qo3_captionstyle = ar[++i]; continue; }
			if (ar[i] == CAPTIONWEIGHT) { Qo3_captionweight = ar[++i]; continue; }
			if (ar[i] == CLOSESIZEUNIT) { Qo3_closesizeunit = ar[++i]; continue; }
			if (ar[i] == CLOSEDECORATION) { Qo3_closedecoration = ar[++i]; continue; }
			if (ar[i] == CLOSESTYLE) { Qo3_closestyle = ar[++i]; continue; }
			if (ar[i] == CLOSEWEIGHT) { Qo3_closeweight = ar[++i]; continue; }
		}
	}
	if (udf && Qo3_function) Qo3_text = Qo3_function();

	if (Qo3_delay == 0) {
		return Qoverlib351();
	} else {
		Qo3_delayid = setTimeout("Qoverlib351()", Qo3_delay);
		return false;
	}
}



// Clears popups if appropriate
function Qnd() {
	if ( Qo3_removecounter >= 1 ) { Qo3_showingsticky = 0 };
	if ( (ns4) || (ie4) || (ns6) ) {
		if ( Qo3_showingsticky == 0 ) {
			Qo3_allowmove = 0;
			if (Qover != null) QhideObject(Qover);
		} else {
			Qo3_removecounter++;
		}
	}
	
	return true;
}







////////////////////////////////////////////////////////////////////////////////////
// OVERLIB 3.51 FUNCTION
////////////////////////////////////////////////////////////////////////////////////


// This function decides what it is we want to display and how we want it done.
function Qoverlib351() {

	// Make layer content
	var layerhtml;

	if (Qo3_background != "" || Qo3_fullhtml) {
		// Use background instead of box.
		layerhtml = Qol_content_background(Qo3_text, Qo3_background, Qo3_fullhtml);
	} else {
		// They want a popup box.

		// Prepare popup background
		if (Qo3_fgbackground != "" && Qo3_css == CSSOFF) {
			Qo3_fgbackground = "BACKGROUND=\""+Qo3_fgbackground+"\"";
		}
		if (Qo3_bgbackground != "" && Qo3_css == CSSOFF) {
			Qo3_bgbackground = "BACKGROUND=\""+Qo3_bgbackground+"\"";
		}

		// Prepare popup colors
		if (Qo3_fgcolor != "" && Qo3_css == CSSOFF) {
			Qo3_fgcolor = "BGCOLOR=\""+Qo3_fgcolor+"\"";
		}
		if (Qo3_bgcolor != "" && Qo3_css == CSSOFF) {
			Qo3_bgcolor = "BGCOLOR=\""+Qo3_bgcolor+"\"";
		}

		// Prepare popup height
		if (Qo3_height > 0 && Qo3_css == CSSOFF) {
			Qo3_height = "HEIGHT=" + Qo3_height;
		} else {
			Qo3_height = "";
		}

		// Decide which kinda box.
		if (Qo3_cap == "") {
			// Plain
			layerhtml = Qol_content_simple(Qo3_text);
		} else {
			// With caption
			if (Qo3_sticky) {
				// Show close text
				layerhtml = Qol_content_caption(Qo3_text, Qo3_cap, Qo3_close);
			} else {
				// No close text
				layerhtml = Qol_content_caption(Qo3_text, Qo3_cap, "");
			}
		}
	}
	
	// We want it to stick!
	if (Qo3_sticky) {
		if (Qo3_timerid > 0) {
			clearTimeout(Qo3_timerid);
			Qo3_timerid = 0;
		}
		Qo3_showingsticky = 1;
		Qo3_removecounter = 0;
	}
	
	// Write layer
	QlayerWrite(layerhtml);
	
	// Prepare status bar
	if (Qo3_autostatus > 0) {
		Qo3_status = Qo3_text;
		if (Qo3_autostatus > 1) {
			Qo3_status = Qo3_cap;
		}
	}

	// When placing the layer the first time, even stickies may be moved.
	Qo3_allowmove = 0;

	// Initiate a timer for timeout
	if (Qo3_timeout > 0) {
		if (Qo3_timerid > 0) clearTimeout(Qo3_timerid);
		Qo3_timerid = setTimeout("QcClick()", Qo3_timeout);
	}

	// Show layer
	Qdisp(Qo3_status);

	// Stickies should stay where they are.	
	if (Qo3_sticky) Qo3_allowmove = 0;

	return (Qo3_status != '');
}



////////////////////////////////////////////////////////////////////////////////////
// LAYER GENERATION FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////

// Makes simple table without caption
function Qol_content_simple(text) {
	if (Qo3_css == CSSCLASS) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING="+Qo3_border+" CELLSPACING=0 class=\""+Qo3_bgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+Qo3_fgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+Qo3_textfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
	if (Qo3_css == CSSSTYLE) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING="+Qo3_border+" CELLSPACING=0 style=\"background-color: "+Qo3_bgcolor+"; height: "+Qo3_height+Qo3_heightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+Qo3_fgcolor+"; background-color: "+Qo3_fgcolor+"; height: "+Qo3_height+Qo3_heightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+Qo3_textfont+"; color: "+Qo3_textcolor+"; font-size: "+Qo3_textsize+Qo3_textsizeunit+"; text-decoration: "+Qo3_textdecoration+"; font-weight: "+Qo3_textweight+"; font-style:"+Qo3_textstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
	if (Qo3_css == CSSOFF) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING="+Qo3_border+" CELLSPACING=0 "+Qo3_bgcolor+" "+Qo3_height+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+Qo3_fgcolor+" "+Qo3_fgbackground+" "+Qo3_height+"><TR><TD VALIGN=TOP><FONT FACE=\""+Qo3_textfont+"\" COLOR=\""+Qo3_textcolor+"\" SIZE=\""+Qo3_textsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";

	Qset_background("");
	return txt;
}




// Makes table with caption and optional close link
function Qol_content_caption(text, title, close) {
	closing = "";
	closeevent = "onMouseOver";

	if (Qo3_closeclick == 1) closeevent = "onClick";
	if (Qo3_capicon != "") Qo3_capicon = "<IMG SRC=\""+Qo3_capicon+"\"> ";

	if (close != "") {
		if (Qo3_css == CSSCLASS) closing = "<TD ALIGN=RIGHT><A HREF=\"javascript:return "+QfnRef+"QcClick();\" "+closeevent+"=\"return " + QfnRef + "QcClick();\" class=\""+Qo3_closefontclass+"\">"+close+"</A></TD>";
		if (Qo3_css == CSSSTYLE) closing = "<TD ALIGN=RIGHT><A HREF=\"javascript:return "+QfnRef+"QcClick();\" "+closeevent+"=\"return " + QfnRef + "QcClick();\" style=\"color: "+Qo3_closecolor+"; font-family: "+Qo3_closefont+"; font-size: "+Qo3_closesize+Qo3_closesizeunit+"; text-decoration: "+Qo3_closedecoration+"; font-weight: "+Qo3_closeweight+"; font-style:"+Qo3_closestyle+";\">"+close+"</A></TD>";
		if (Qo3_css == CSSOFF) closing = "<TD ALIGN=RIGHT><A HREF=\"javascript:return "+QfnRef+"QcClick();\" "+closeevent+"=\"return " + QfnRef + "QcClick();\"><FONT COLOR=\""+Qo3_closecolor+"\" FACE=\""+Qo3_closefont+"\" SIZE=\""+Qo3_closesize+"\">"+close+"</FONT></A></TD>";
	}

	if (Qo3_css == CSSCLASS) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING="+Qo3_border+" CELLSPACING=0 class=\""+Qo3_bgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT class=\""+Qo3_captionfontclass+"\">"+Qo3_capicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+Qo3_fgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+Qo3_textfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
	if (Qo3_css == CSSSTYLE) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING="+Qo3_border+" CELLSPACING=0 style=\"background-color: "+Qo3_bgcolor+"; background-image: url("+Qo3_bgbackground+"); height: "+Qo3_height+Qo3_heightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT style=\"font-family: "+Qo3_captionfont+"; color: "+Qo3_capcolor+"; font-size: "+Qo3_captionsize+Qo3_captionsizeunit+"; font-weight: "+Qo3_captionweight+"; font-style: "+Qo3_captionstyle+"; text-decoration: " + Qo3_captiondecoration + ";\">"+Qo3_capicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+Qo3_fgcolor+"; background-color: "+Qo3_fgcolor+"; height: "+Qo3_height+Qo3_heightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+Qo3_textfont+"; color: "+Qo3_textcolor+"; font-size: "+Qo3_textsize+Qo3_textsizeunit+"; text-decoration: "+Qo3_textdecoration+"; font-weight: "+Qo3_textweight+"; font-style:"+Qo3_textstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
	if (Qo3_css == CSSOFF) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING="+Qo3_border+" CELLSPACING=0 "+Qo3_bgcolor+" "+Qo3_bgbackground+" "+Qo3_height+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><B><FONT COLOR=\""+Qo3_capcolor+"\" FACE=\""+Qo3_captionfont+"\" SIZE=\""+Qo3_captionsize+"\">"+Qo3_capicon+title+"</FONT></B></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+Qo3_fgcolor+" "+Qo3_fgbackground+" "+Qo3_height+"><TR><TD VALIGN=TOP><FONT COLOR=\""+Qo3_textcolor+"\" FACE=\""+Qo3_textfont+"\" SIZE=\""+Qo3_textsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";

	Qset_background("");
	return txt;
}

// Sets the background picture, padding and lots more. :)
function Qol_content_background(text, picture, hasfullhtml) {
	var txt;
	if (hasfullhtml) {
		txt = text;
	} else {
		var pU, hU, wU;
		pU = (Qo3_padunit == '%' ? '%' : '');
		hU = (Qo3_heightunit == '%' ? '%' : '');
		wU = (Qo3_widthunit == '%' ? '%' : '');

		if (Qo3_css == CSSCLASS) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+Qo3_height+"><TR><TD COLSPAN=3 HEIGHT="+Qo3_padyt+"></TD></TR><TR><TD WIDTH="+Qo3_padxl+"></TD><TD VALIGN=TOP WIDTH="+(Qo3_width-Qo3_padxl-Qo3_padxr)+"><FONT class=\""+Qo3_textfontclass+"\">"+text+"</FONT></TD><TD WIDTH="+Qo3_padxr+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+Qo3_padyb+"></TD></TR></TABLE>";
		if (Qo3_css == CSSSTYLE) txt = "<TABLE WIDTH="+Qo3_width+wU+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+Qo3_height+hU+"><TR><TD COLSPAN=3 HEIGHT="+Qo3_padyt+pU+"></TD></TR><TR><TD WIDTH="+Qo3_padxl+pU+"></TD><TD VALIGN=TOP WIDTH="+(Qo3_width-Qo3_padxl-Qo3_padxr)+pU+"><FONT style=\"font-family: "+Qo3_textfont+"; color: "+Qo3_textcolor+"; font-size: "+Qo3_textsize+Qo3_textsizeunit+";\">"+text+"</FONT></TD><TD WIDTH="+Qo3_padxr+pU+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+Qo3_padyb+pU+"></TD></TR></TABLE>";
		if (Qo3_css == CSSOFF) txt = "<TABLE WIDTH="+Qo3_width+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+Qo3_height+"><TR><TD COLSPAN=3 HEIGHT="+Qo3_padyt+"></TD></TR><TR><TD WIDTH="+Qo3_padxl+"></TD><TD VALIGN=TOP WIDTH="+(Qo3_width-Qo3_padxl-Qo3_padxr)+"><FONT FACE=\""+Qo3_textfont+"\" COLOR=\""+Qo3_textcolor+"\" SIZE=\""+Qo3_textsize+"\">"+text+"</FONT></TD><TD WIDTH="+Qo3_padxr+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+Qo3_padyb+"></TD></TR></TABLE>";
	}
	Qset_background(picture);
	return txt;
}

// Loads a picture into the div.
function Qset_background(pic) {
	if (pic == "") {
		if (ns4) Qover.background.src = null;
		if (ie4) Qover.backgroundImage = "none";
		if (ns6) Qover.style.backgroundImage = "none";
	} else {
		if (ns4) {
			Qover.background.src = pic;
		} else if (ie4) {
			Qover.backgroundImage = "url("+pic+")";
		} else if (ns6) {
			Qover.style.backgroundImage = "url("+pic+")";
		}
	}
}



////////////////////////////////////////////////////////////////////////////////////
// HANDLING FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////


// Displays the popup
function Qdisp(statustext) {
	if ( (ns4) || (ie4) || (ns6) ) {
		if (Qo3_allowmove == 0) 	{
			QplaceLayer();
			QshowObject(Qover);
			Qo3_allowmove = 1;
		}
	}

	if (statustext != "") {
		self.status = statustext;
	}
}

// Decides where we want the popup.
function QplaceLayer() {
	var placeX, placeY;
	
	// HORIZONTAL PLACEMENT
	if (Qo3_fixx > -1) {
		// Fixed position
		placeX = Qo3_fixx;
	} else {
		winoffset = (ie4) ? eval('Qo3_frame.'+docRoot+'.scrollLeft') : Qo3_frame.pageXOffset;
		if (ie4) iwidth = eval('Qo3_frame.'+docRoot+'.clientWidth');
		if (ns4 || ns6) iwidth = Qo3_frame.innerWidth;
		
		// If HAUTO, decide what to use.
		if (Qo3_hauto == 1) {
			if ( (Qo3_x - winoffset) > ((eval(iwidth)) / 2)) {
				Qo3_hpos = LEFT;
			} else {
				Qo3_hpos = RIGHT;
			}
		}
		
		// From mouse
		if (Qo3_hpos == CENTER) { // Center
			placeX = Qo3_x+Qo3_offsetx-(Qo3_width/2);
			if (placeX < winoffset) placeX = winoffset;
		}
		if (Qo3_hpos == RIGHT) { // Right
			placeX = Qo3_x+Qo3_offsetx;
			if ( (eval(placeX) + eval(Qo3_width)) > (winoffset + iwidth) ) {
				placeX = iwidth + winoffset - Qo3_width;
				if (placeX < 0) placeX = 0;
			}
		}
		if (Qo3_hpos == LEFT) { // Left
			placeX = Qo3_x-Qo3_offsetx-Qo3_width;
			if (placeX < winoffset) placeX = winoffset;
		}
	
		// Snapping!
		if (Qo3_snapx > 1) {
			var snapping = placeX % Qo3_snapx;
			if (Qo3_hpos == LEFT) {
				placeX = placeX - (Qo3_snapx + snapping);
			} else {
				// CENTER and RIGHT
				placeX = placeX + (Qo3_snapx - snapping);
			}
			if (placeX < winoffset) placeX = winoffset;
		}
	}

	
	
	// VERTICAL PLACEMENT
	if (Qo3_fixy > -1) {
		// Fixed position
		placeY = Qo3_fixy;
	} else {
		scrolloffset = (ie4) ? eval('Qo3_frame.'+docRoot+'.scrollTop') : Qo3_frame.pageYOffset;

		// If VAUTO, decide what to use.
		if (Qo3_vauto == 1) {
			if (ie4) iheight = eval('Qo3_frame.'+docRoot+'.clientHeight');
			if (ns4 || ns6) iheight = Qo3_frame.innerHeight;

			iheight = (eval(iheight)) / 2;
			if ( (Qo3_y - scrolloffset) > iheight) {
				Qo3_vpos = ABOVE;
			} else {
				Qo3_vpos = BELOW;
			}
		}


		// From mouse
		if (Qo3_vpos == ABOVE) {
			if (Qo3_aboveheight == 0) {
				var divref = (ie4) ? Qo3_frame.document.all['QoverDiv'] : Qover;
				Qo3_aboveheight = (ns4) ? divref.clip.height : divref.offsetHeight;
			}

			placeY = Qo3_y - (Qo3_aboveheight + Qo3_offsety);
			if (placeY < scrolloffset) placeY = scrolloffset;
		} else {
			// BELOW
			placeY = Qo3_y + Qo3_offsety;
		}

		// Snapping!
		if (Qo3_snapy > 1) {
			var snapping = placeY % Qo3_snapy;
			
			if (Qo3_aboveheight > 0 && Qo3_vpos == ABOVE) {
				placeY = placeY - (Qo3_snapy + snapping);
			} else {
				placeY = placeY + (Qo3_snapy - snapping);
			}
			
			if (placeY < scrolloffset) placeY = scrolloffset;
		}
	}


	// Actually move the object.	
	QrepositionTo(Qover, placeX, placeY);
}


// Moves the layer
function QmouseMove(e) {
	if ( (ns4) || (ns6) ) {Qo3_x=e.pageX; Qo3_y=e.pageY;}
	if (ie4) {Qo3_x=event.x; Qo3_y=event.y;}
	if (ie5) {Qo3_x=eval('event.x+Qo3_frame.'+docRoot+'.scrollLeft'); Qo3_y=eval('event.y+Qo3_frame.'+docRoot+'.scrollTop');}
	
	if (Qo3_allowmove == 1) {
		QplaceLayer();
	}
	if(QmouseMoveWrap) {
             QmouseMoveWrap(e);
	}
}

// The Close onMouseOver function for stickies
function QcClick() {
	QhideObject(Qover);
	Qo3_showingsticky = 0;
	
	return false;
}


// Makes sure target frame has overLIB
function Qcompatibleframe(frameid) {
	if (ns4) {
		if (typeof frameid.document.QoverDiv =='undefined') return false;
	} else if (ie4) {
		if (typeof frameid.document.all["QoverDiv"] =='undefined') return false;
	} else if (ns6) {
		if (frameid.document.getElementById('QoverDiv') == null) return false;
	}

	return true;
}



////////////////////////////////////////////////////////////////////////////////////
// LAYER FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////


// Writes to a layer
function QlayerWrite(txt) {
	txt += "\n";
	
	if (ns4) {
		var lyr = Qo3_frame.document.QoverDiv.document
		lyr.write(txt)
		lyr.close()
	} else if (ie4) {
		Qo3_frame.document.all["QoverDiv"].innerHTML = txt
	} else if (ns6) {
		range = Qo3_frame.document.createRange();
		range.setStartBefore(Qover);
		domfrag = range.createContextualFragment(txt);
		while (Qover.hasChildNodes()) {
			Qover.removeChild(Qover.lastChild);
		}
		Qover.appendChild(domfrag);
	}
}

// Make an object visible
function QshowObject(obj) {
	if (ns4) obj.visibility = "show";
	else if (ie4) obj.visibility = "visible";
	else if (ns6) obj.style.visibility = "visible";
}

// Hides an object
function QhideObject(obj) {
	if (ns4) obj.visibility = "hide";
	else if (ie4) obj.visibility = "hidden";
	else if (ns6) obj.style.visibility = "hidden";

	if (Qo3_timerid > 0) clearTimeout(Qo3_timerid);
	if (Qo3_delayid > 0) clearTimeout(Qo3_delayid);
	Qo3_timerid = 0;
	Qo3_delayid = 0;
	self.status = "";
}

// Move a layer
function QrepositionTo(obj,xL,yL) {
	if ( (ns4) || (ie4) ) {
		obj.left = (ie4 ? xL + 'px' : xL);
		obj.top = (ie4 ? yL + 'px' : yL);
	} else if (ns6) {
		obj.style.left = xL + "px";
		obj.style.top = yL+ "px";
	}
}

function QgetFrameRef(thisFrame, ofrm) {
	var retVal = '';
	for (var i=0; i<thisFrame.length; i++) {
		if (thisFrame[i].length > 0) { 
			retVal = QgetFrameRef(thisFrame[i],ofrm);
			if (retVal == '') continue;
		} else if (thisFrame[i] != ofrm) continue;
		
		retVal = '['+i+']' + retVal;
		break;
	}
	
	return retVal;
}




////////////////////////////////////////////////////////////////////////////////////
// PARSER FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////


// Defines which frame we should point to.
function Qopt_FRAME(frm) {
	Qo3_frame = Qcompatibleframe(frm) ? frm : Qol_frame;

	if (Qo3_frame != Qol_frame) {
		var tFrm = QgetFrameRef(top.frames, Qo3_frame);
		var sFrm = QgetFrameRef(top.frames, Qol_frame);

		if (sFrm.length == tFrm.length) { 
			l = tFrm.lastIndexOf('['); 
			if (l) {
				while(sFrm.substring(0,l) != tFrm.substring(0,l)) l = tFrm.lastIndexOf('[',l-1);
				tFrm = tFrm.substr(l);
				sFrm = sFrm.substr(l);
			}
		}
			
		var cnt = 0, p = '', str = tFrm;
			
		while((k = str.lastIndexOf('[')) != -1) {
			cnt++;
			str = str.substring(0,k);
		}

		for (var i=0; i<cnt; i++) p = p + 'parent.';
		QfnRef = p + 'frames' + sFrm + '.';
	}

	if ( (ns4) || (ie4 || (ns6)) ) {
		if (ns4) Qover = Qo3_frame.document.QoverDiv;
		if (ie4) Qover = Qo3_frame.QoverDiv.style;
		if (ns6) Qover = Qo3_frame.document.getElementById("QoverDiv");
	}

	return 0;
}

// Calls an external function
function Qopt_FUNCTION(callme) {
	Qo3_text = (callme ? callme() : (Qo3_function ? Qo3_function() : 'No Function'));
	return 0;
}

