// CUT DOWN VERSION - unused features removed to reduce file size - Frank Young 2002
// DO NOT RE-USE THIS VERSION - get original from below link 
//\//////////////////////////////////////////////////////////////////////////////////
//\  overLIB 3.50  --  This notice must remain untouched at all times.
//\  Copyright Erik Bosrup 1998-2001. All rights reserved.
//\
//\  By Erik Bosrup (erik@bosrup.com).  Last modified 2001-08-28.
//\  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.
var INARRAY     =   1;
var CAPTION     =   6;
var WIDTH       =   17;
var FIXX        =   26;
var FIXY        =   27;
var ol_frame = self;
var o3_text = "";
var o3_cap = "";
var o3_width = 100;
var o3_status = "";
var o3_fixx = -1;
var o3_fixy = -1;
var o3_frame = self;
var o3_allowmove = 0;
var o3_x = 0;
var o3_y = 0;
var o3_allow = 0;
var o3_showingsticky = 0;
var o3_removecounter = 0;
var over = null;
var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
var ie4 = (document.all)? true:false;
var ie5 = false;
// Microsoft Stupidity Check(tm).
if (ie4) {
    if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {
        ie5 = true;
    }
    if (ns6) {
        ns6 = false;
    }
}
function overlib() {
    o3_text = "Default Text";
    o3_cap = "";
    o3_width = "200";
    o3_status = "";       
    o3_fixx = -1;
    o3_fixy = -1;
    // Special for frame support, over must be reset...
    if ( (ns4) || (ie4) || (ns6) ) {
        o3_frame = ol_frame;
        if (ns4) over = o3_frame.document.overDiv
        if (ie4) over = o3_frame.overDiv.style
        if (ns6) over = o3_frame.document.getElementById("overDiv");
    }
   
    // What the next argument is expected to be.
    var parsemode = -1;
    var ar = arguments;
    for (i = 0; i < ar.length; i++) {
        if (parsemode < 0) {
            // Arg is maintext, unless INARRAY
            if (ar[i] == INARRAY) {
                o3_text = ol_texts[ar[++i]];
            } else {
                o3_text = ar[i];
            }
            parsemode = 0;
        } else {
            // Note: NS4 doesn't like switch cases with vars.
            if (ar[i] == CAPTION) { o3_cap = ar[++i]; continue; }
            if (ar[i] == WIDTH) { o3_width = ar[++i]; continue; }
            if (ar[i] == FIXX) { o3_fixx = ar[++i]; continue; }
            if (ar[i] == FIXY) { o3_fixy = ar[++i]; continue; }
        }
    }
        return overlib350();
}
function nd() {
    if ( o3_removecounter >= 1 ) { o3_showingsticky = 0 };
    if ( (ns4) || (ie4) || (ns6) ) {
        if ( o3_showingsticky == 0 ) {
            o3_allowmove = 0;
            if (over != null) hideObject(over);
        } else {
            o3_removecounter++;
        }
    }
    return true;
}
function overlib350() {
    var layerhtml;
    layerhtml = "<table border=1 cellpadding=1 cellspacing=0 width="+o3_width+" bordercolor=#000000 style='font-size: 11; font-family: verdana, sans-serif'>"+
                "<tr height=15>"+
                "<td bgcolor=#C0C0C0 bordercolor=#C0C0C0 style='border-bottom: 1 solid #000000'>"+
                o3_cap+
                "</td>"+
                "</tr>"+
                "<tr>"+
                "<td bordercolor=#FFFFFF bgcolor=#FFFFFF>"+
                o3_text+
                "</td>"+
                "</tr>"+
                "</table>"    
    layerWrite(layerhtml);
    o3_allowmove = 0;
    disp(o3_status);
}
function disp(statustext) {
    if ( (ns4) || (ie4) || (ns6) ) {
        if (o3_allowmove == 0)  {
            placeLayer();
            showObject(over);
            o3_allowmove = 1;
        }
    }
}
function placeLayer() {
    var placeX, placeY;
        placeX = o3_fixx;
        placeY = o3_fixy;
    repositionTo(over, placeX, placeY);
}
function layerWrite(txt) {
    txt += "\n";
        if (ns4) {
                var lyr = o3_frame.document.overDiv.document
                lyr.write(txt)
                lyr.close()
        } else if (ie4) {
        o3_frame.document.all["overDiv"].innerHTML = txt
    } else if (ns6) {
        range = o3_frame.document.createRange();
        range.setStartBefore(over);
        domfrag = range.createContextualFragment(txt);
        while (over.hasChildNodes()) {
            over.removeChild(over.lastChild);
        }
        over.appendChild(domfrag);
    }
}
function showObject(obj) {
        if (ns4) obj.visibility = "show";
        else if (ie4) obj.visibility = "visible";
    else if (ns6) obj.style.visibility = "visible";
}
function hideObject(obj) {
        if (ns4) obj.visibility = "hide";
        else if (ie4) obj.visibility = "hidden";
    else if (ns6) obj.style.visibility = "hidden";
}
function repositionTo(obj,xL,yL) {
    if ( (ns4) || (ie4) ) {
            obj.left = xL;
            obj.top = yL;
    } else if (ns6) {
        obj.style.left = xL + "px";
        obj.style.top = yL+ "px";
    }
}

