slideShowURL = 'SlideShow_assets/SlideShow.html';       // parameter from openSlideShowWindow.js
slideShowNS4URL = 'SlideShow_assets/SlideShowNS4.html'; // parameter from openSlideShowWindow.js

slides = new Array();
slides[0] = new Slide('../Assortments_files/NWH4272.jpg', '472', '800', 'Vote for your favorite 1880’s actress. Cabinet photo\ninserts of Marie Geistinger & Emelie Melville.  Cigars by Lewyn & Martin, Fact. 34, 3rd NYC,\n200 rollers. \n[4272]');
slides[1] = new Slide('../Assortments_files/21patriot69.jpg', '377', '800', 'Vote for your favorite local politician. Cabinet photo inserts of unknown men. Cigars by E.J. Fitzgerald,\nFact. 18, 3rd NYC, 1880’s.  60 rollers.\n\n[2169]');
slides[2] = new Slide('../Assortments_files/=color3405.jpg', '385', '661', 'Folding Novely NWHC which gives smoker choice\nof three colors of cigars. Fact. 215, 3rd NYC\nwith 45 rollers owned by Sol. Dobriner. Retailers didn’t like the large latch on top as it made the\nboxes nearly impossible to stack neatly.\n[3405]');
slides[3] = new Slide('../Assortments_files/34novelty6.jpg', '661', '463', 'Front lid unfolds forward creating an extra large space hog demanding to be atop the case. \nUnusual purple liner. Mid 1880’s.\n\n[*3406]');
slides[4] = new Slide('../Assortments_files/=c3403.jpg', '558', '661', 'Unusual tri-level unfolding novelty gives smokers choice of three colors of wrapper. 1889.\n\n[3403]');
slides[5] = new Slide('../Assortments_files/=color3402.jpg', '660', '469', 'Big space hog demands to be on top of the counter.\nCigars by Westcott & Son, Fact 320, 21st Dist NY,\nBinghamton’s 3rd largest factory with 300 rollers.\n\n[3402]');
slides[6] = new Slide('../Assortments_files/novelty3497.jpg', '800', '362', 'Very unusual long cigar box which offers Choice\nof Mild, Medium and Strong cigars. Length isn’t the odd part, but rather the fact the lid is hinged\non the short end. Huge space hog is difficult to \nput in a cigar case so gets put on top.\n[3497]');
slides[7] = new Slide('../Assortments_files/novelty3498.jpg', '800', '263', 'Cigars made by Kahner & Merkel, Fact. 65, 3rd NYC. Their 100th Street factory employed 500.\n\n[3498]');
slides[8] = new Slide('../Assortments_files/boxtype4358.jpg', '363', '661', 'Standard configuration for offering Mild, Medium & Strong choices of cigar. Cigars made by Kahner & Merkel, Fact. 65, 3rd NYC. Their 100th Street factory employed 500. Same maker as Cockney\n\n[4358]');
slides[9] = new Slide('../Assortments_files/boxtype4352.jpg', '676', '800', 'Singularly configured way of presenting choice of three colors in three drawers. Cigars by A.J. Hess in Fact. 16, 23rd Dist., Allegheny, PA  c1900.\n\n[4352]');
slides[10] = new Slide('../Assortments_files/21patriot68.jpg', '375', '800', 'Double jugate election box from 1904. Unusual use of 10 top boxes with cut-down inners. Choose between the Republicans or Democrats. Cigars by \nJ.H. Peters, Fact. 73, Nebraska City, NE.\n\n[2168]');
slides[11] = new Slide('../Assortments_files/boxtype4346.jpg', '463', '661', 'Very unusual use of two trays for a 6-choice assortment. Cigars by Factory 2762, 9th PA.\n1919 box depicts Henry Sage, philanthropist\ndonor to Cornell U., Bay City, MI, library.\n\n[4346]');
slides[12] = new Slide('../Assortments_files/=s 3413.jpg', '404', '661', 'There’s a good chance this Assortment was a salesman’s sample rather than a Christmas gift.\nFact. 1120, 115 Lake Street, 1st Illinois. 1913.\n\n[3413]');
slides[13] = new Slide('../Assortments_files/=sales3412.jpg', '363', '661', 'Cigars by S, Solares & Co., Lake Street, Chicago, were packed in this unusual compactly designed\ndouble lid eight pocket Assortment. \nA curator’s favorite.\n[3412]');
slides[14] = new Slide('../Assortments_files/=assort4383.jpg', '292', '661', 'Plain, but polished, wooden exterior, highlights this large Assortment of cigars from Isaac Jacobson’s \n3 man factory No. 321, 3rd Dist. NYC, c1914.\n[4383]');
slides[15] = new Slide('../Assortments_files/=assort4384.jpg', '460', '661', 'Five compartment Assortment was probably a Christmas gift. Purple isn’t a color associated with the Holidays but the patterned foil is. Foil is rarely found in such fine condition. \n\n[4384]');
slides[16] = new Slide('../Assortments_files/36misc8_2.jpg', '600', '765', 'GONZALEZ & SANCHEZ, Fact. 72 Florida, used this unusual compartmented and drawered box around\n1912±. Marked as “Made expressly for Fred Brooks, Jacksonville, Fla.”\n\n[3608]');
slides[17] = new Slide('../Assortments_files/36misc11.jpg', '600', '718', 'Unidentified maker created this unusual cruciform assortment around 1910. Catalog card missing and box in storage, so further data unavailable.\n\n[3611]');
slides[18] = new Slide('../Assortments_files/9927.jpg', '318', '570', 'One of the most common Assortments is this SBN with tray created in the 1930’s for Congress Cigar\nCompany’s top selling brand. Fact. 513 1st PA.\n\n[9927]');
slides[19] = new Slide('../Assortments_files/9928.jpg', '608', '570', 'Finest condition example of this box I’ve ever seen, A poor condition example was the 1st Assortment in my collection in 1954. Bottom of each compartment labeled POB with the frontmark of the cigars.\n\n[9928]');
slides[20] = new Slide('../Assortments_files/misc3624.jpg', '534', '661', 'Near mint condition 13/13 Assortment was\nprobably a Salesman’s Sample for cigars\nmade by Charles Fritz, Quakertown, PA,\nFactory 585, 1st District, c1915.\n\n[3624]');
slides[21] = new Slide('../Assortments_files/=assort4381.jpg', '527', '661', 'Very popular 1950 Christmas gift of 50 quality cigars in 5 shapes made by American Tobacco Co. \nin their giant Trenton, NJ, Factory 1, \nCustoms Dist. 11.\n\n[4381]');
slides[22] = new Slide('../Assortments_files/Salesmen70.jpg', '579', '661', 'Assortment from late 1940’s of 10 cigars made in Fact. 5 NJ by this famous New England Company. \nProbably a Waitt & Bond salesman’s sample.\n\n[0570]');
slides[23] = new Slide('../Assortments_files/Salesmen71.jpg', '661', '611', 'Salesman’s sample of A. Santaella’s\nquality cigars. Boxes of 8 cigars \n were not legal until 1959. \n[0571]');
slides[24] = new Slide('../Assortments_files/boxtype434.jpg', '661', '498', 'Famous Christmas gift Assortment. Unusual\nbox bottom depicts and describes contents.\nCigars by GHP in 1954.\n\n[4304]');
slides[25] = new Slide('../Assortments_files/testtruck.jpg', '800', '565', 'The same two photos were used in magazine ads.\nSaves on production costs. Twenty-five cigars were packed in the “Cigar Album” sold at $3.75.');
slides[26] = new Slide('../Assortments_files/boxtype433.jpg', '507', '661', 'Designer Paul Rand is responsible for this then avant-garde cover. Very popular when released, the box materials haven’t worn well over time. \nHard to find in fine condition. Ebay sellers\ntend to optimistically overestimate value.\n[4303]');
slides[27] = new Slide('../Assortments_files/misc8853.jpg', '677', '800', 'Attractive use of fragile plastic for this\nlate 1950’s assortment of 25 cigars\nin five shapes.\n\n[8853]');
slides[28] = new Slide('../Assortments_files/misc8854.jpg', '677', '800', 'A follow up to the popular Christmas gift of previous years, this assortment of 26 cigars in 9 shapes\nwas made after 1959 when boxes of 26 \nwere legalized. \n\n[8854]');
slides[29] = new Slide('../Assortments_files/70fulltwo95.jpg', '483', '800', 'Another innovative use of plastic in the post-1960 era. Two rows of 17 cigars and nestled in plastic lift-out inserts and displayed with a sliding lid.\n[7095]');
slides[30] = new Slide('../Assortments_files/boxtype4395.jpg', '800', '763', 'Box of 4 given away “Compliments of the Cigar Institute of America” though exactly when\nand why isn’t recorded. Can anyone help?\nCigars made in Fact. C-855. \n\n[4395]');
slides[31] = new Slide('../Assortments_files/modern6325.jpg', '335', '661', 'Post-1960 ANTONIO Y CLEOPATRA Assortment with\nvinyl exterior and inset sports theme image.\nAttractive use of modern materials. Date?\n\n[6325]');
slides[32] = new Slide('../Assortments_files/boxtype435.jpg', '435', '661', 'Thompson and Co.’s almost weightless cardboard\nAssortment designed 1880 for the mail order trade.\nUse of simple not particularly eye-catching designs, have become traditional with mail order.\n\n[4305]');
slides[33] = new Slide('../Assortments_files/UnNamed19.jpg', '800', '641', 'Not a single box, but certainly deserving of\nbeing seen is this clever use of matching\nslipcased “books” to hold the various sizes.\nLA CORONA for Christmas 1970.\n\n[3319]');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

var MINIMUM_FONT = "10";
var UNITS = "";

function elementFontSize(element)
{
    var fontSize = MINIMUM_FONT; 

    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            fontSize = computedStyle.getPropertyValue("font-size");
        }
    }
    else if (element.currentStyle)
    {
        fontSize = element.currentStyle.fontSize;
    }

    if ((UNITS.length == 0) && (fontSize != MINIMUM_FONT))
    {
        UNITS = fontSize.substring(fontSize.length - 2, fontSize.length)
    }

    return parseFloat(fontSize);
}

function adjustFontSizeIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var smallestFontSize = 200;
                    
                    var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                    var oneLine = false;
                    for (i = 0; i < aParaChildren.length; i++)
                    {
                        var oParagraphDiv = aParaChildren[i];
                        var lineHeight = elementLineHeight(oParagraphDiv);
                        oneLine = oneLine || (lineHeight * 1.5 >= specifiedHeight);
                        if (oParagraphDiv.nodeName == "DIV")
                        {
                            var fontSize = elementFontSize(oParagraphDiv);
                            smallestFontSize = Math.min( smallestFontSize, fontSize );
                            for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                            {
                                var oSpan = oParagraphDiv.childNodes[j];
                                if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                {
                                    fontSize = elementFontSize(oSpan);
                                    smallestFontSize = Math.min( smallestFontSize, fontSize );
                                }
                            }
                        }
                    }
                    var minimum = parseFloat(MINIMUM_FONT);
                    
                    var count = 0
                    while ((smallestFontSize > minimum) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        ++ count;
                        if (oneLine)
                        {
                            var oldWidth = parseInt(oTextBoxOuterDiv.style.width);
                            oTextBoxInnerDiv.style.width =
                                "" + oldWidth * Math.pow(1.05, count) + "px";
                        }
                        else
                        {
                            var scale = Math.max(0.95, minimum / smallestFontSize);
                            
                            for (i = 0; i < aParaChildren.length; i++)
                            {
                                var oParagraphDiv = aParaChildren[i];
                                if (oParagraphDiv.nodeName == "DIV")
                                {
                                    var paraFontSize = elementFontSize(oParagraphDiv) * scale;
                                    var paraLineHeight = elementLineHeight(oParagraphDiv) * scale;
                                    for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                    {
                                        var oSpan = oParagraphDiv.childNodes[j];
                                        if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                        {
                                            var spanFontSize = elementFontSize(oSpan) * scale;
                                            var spanLineHeight = elementLineHeight(oSpan) * scale;
                                            oSpan.style.fontSize = spanFontSize + UNITS;
                                            oSpan.style.lineHeight = spanLineHeight + UNITS;
                                            smallestFontSize = Math.min( smallestFontSize, spanFontSize );
                                        }
                                    }
                                    oParagraphDiv.style.fontSize = paraFontSize + UNITS;
                                    oParagraphDiv.style.lineHeight = paraLineHeight + UNITS;
                                    smallestFontSize = Math.min( smallestFontSize, paraFontSize );
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}


function elementLineHeight(element)
{
    var lineHeight = MINIMUM_FONT; 
    
    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            lineHeight = computedStyle.getPropertyValue("line-height");
        }
    }
    else if (element.currentStyle)
    {
        lineHeight = element.currentStyle.lineHeight;
    }
    
    if ((UNITS.length == 0) && (lineHeight != MINIMUM_FONT))
    {
        UNITS = lineHeight.substring(lineHeight.length - 2, lineHeight.length)
    }
    
    return parseFloat(lineHeight);
}

function adjustLineHeightIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var adjusted = true;
                    var count = 0;
                    while ((adjusted) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        adjusted = false;
                        ++ count;
                        
                        var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                        for (i = 0; i < aParaChildren.length; i++)
                        {
                            var oParagraphDiv = aParaChildren[i];
                            if (oParagraphDiv.nodeName == "DIV")
                            {
                                var fontSize = elementFontSize(oParagraphDiv);
                                var lineHeight = elementLineHeight(oParagraphDiv) * 0.95;
                                if (lineHeight >= (fontSize * 1.1))
                                {
                                    oParagraphDiv.style.lineHeight = lineHeight + UNITS;
                                    adjusted = true;
                                }
                                
                                
                                
                                for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                {
                                    var oSpan = oParagraphDiv.childNodes[j];
                                    if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                    {
                                        var fontSize = elementFontSize(oSpan);
                                        var lineHeight = elementLineHeight(oSpan) * 0.95;
                                        if (lineHeight >= (fontSize * 1.1))
                                        {
                                            oSpan.style.lineHeight = lineHeight + UNITS;
                                            var adjusted = true;
                                        }
                                    }
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}

var smallTransparentGif = "";
function fixupIEPNG(strImageID, transparentGif) 
{
    smallTransparentGif = transparentGif;
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        var img = document.getElementById(strImageID);
        if (img)
        {
            var src = img.src;
            img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
            img.src = transparentGif;
            img.attachEvent("onpropertychange", imgPropertyChanged);
        }
    }
}

function fixupIEPNGBG(oBlock) 
{
    if (oBlock)
    {
        var currentBGImage = oBlock.currentStyle.backgroundImage;
        var currentBGRepeat = oBlock.currentStyle.backgroundRepeat;
        var urlStart = currentBGImage.indexOf('url(');
        var urlEnd = currentBGImage.indexOf(')', urlStart);
        var imageURL = currentBGImage.substring(urlStart + 4, urlEnd);

        if (imageURL.charAt(0) == '"')
        {
            imageURL = imageURL.substring(1);
        }
        
        if (imageURL.charAt(imageURL.length - 1) == '"')
        {
            imageURL = imageURL.substring(0, imageURL.length - 1);
        }

        var overrideRepeat = false;

        var filterStyle =
            "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
            imageURL +
            "', sizingMethod='crop');";

        if (RegExp("/C[0-9A-F]{8}.png$").exec(imageURL) != null)
        {
            filterStyle =
                "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                imageURL +
                "', sizingMethod='scale');";

            overrideRepeat = true;
        }

        var backgroundImage = new Image();
        backgroundImage.src = imageURL;
        var tileWidth = backgroundImage.width;
        var tileHeight = backgroundImage.height; 
        
        var blockWidth = 0;
        var blockHeight = 0;
        if (oBlock.style.width)
        {
            blockWidth = parseInt(oBlock.style.width);
        }
        else
        {
            blockWidth = oBlock.offsetWidth;
        }
        if (oBlock.style.height)
        {
            blockHeight = parseInt(oBlock.style.height);
        }
        else
        {
            blockHeight = oBlock.offsetHeight;
        }

        if ((blockWidth == 0) || (blockHeight == 0))
        {
            return;
        }
        
        var wholeRows = 1;
        var wholeCols = 1;
        var extraHeight = 0;
        var extraWidth = 0;
        
        if ((currentBGRepeat.indexOf("no-repeat") != -1) ||
              ((tileWidth == 0) && (tileHeight == 0)) ||
              overrideRepeat)
        {
            tileWidth = blockWidth;
            tileHeight = blockHeight;

        }
        else if ((currentBGRepeat.indexOf("repeat-x") != -1) ||
              (tileHeight == 0))
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            tileHeight = blockHeight;

        }
        else if (currentBGRepeat.indexOf("repeat-y") != -1)
        {
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraHeight = blockHeight - (tileHeight * wholeRows);
            tileWidth = blockWidth;

        }
        else
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            extraHeight = blockHeight - (tileHeight * wholeRows);
        }
        
        var wrappedContent = document.createElement("div");
        wrappedContent.style.position = "relative";
        wrappedContent.style.zIndex = "1";
        wrappedContent.style.left = "0px";
        wrappedContent.style.top = "0px";
        if (!isNaN(parseInt(oBlock.style.width)))
        {
            wrappedContent.style.width = "" + blockWidth + "px";
        }
        if (!isNaN(parseInt(oBlock.style.height)))
        {
            wrappedContent.style.height = "" + blockHeight + "px";
        }
        var pngBGFixIsWrappedContentEmpty = true;
        while (oBlock.hasChildNodes())
        {
            if (oBlock.firstChild.nodeType == 3)
            {
                if (RegExp("^ *$").exec(oBlock.firstChild.data) == null)
                {
                    pngBGFixIsWrappedContentEmpty = false;
                }
            }
            else
            {
                pngBGFixIsWrappedContentEmpty = false;
            }
            wrappedContent.appendChild(oBlock.firstChild);
        }
        if (pngBGFixIsWrappedContentEmpty)
        {
            wrappedContent.style.lineHeight = "0px";
        }
        
        var newMarkup = "";
        for (var currentRow = 0; 
             currentRow < wholeRows; 
             currentRow++)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        
        if (extraHeight != 0)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        oBlock.innerHTML = newMarkup;

        oBlock.appendChild(wrappedContent);
        oBlock.style.background= "";
    }
}

function fixupAllIEPNGBGs()
{
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        try
        {
            var oDivNodes = document.getElementsByTagName('DIV');
            for (var iIndex=0; iIndex<oDivNodes.length; iIndex++)
            {
                var oNode = oDivNodes.item(iIndex);
                if (oNode.currentStyle &&
                    oNode.currentStyle.backgroundImage &&
                    (oNode.currentStyle.backgroundImage.indexOf('url(') != -1) &&
                    (oNode.currentStyle.backgroundImage.indexOf('.png")') != -1))
                {
                    fixupIEPNGBG(oNode);
                }
            }
        }
        catch (e)
        {
        }
    }
}

function getChildOfType(oParent, sNodeName, requestedIndex)
{
    var childrenOfType = oParent.getElementsByTagName(sNodeName);
    return (requestedIndex < childrenOfType.length) ?
           childrenOfType.item(requestedIndex) : null;
}

function getParaDescendants(oAncestor)
{
    var oParaDescendants = new Array();
    var oPotentialParagraphs = oAncestor.getElementsByTagName('DIV');
    for (var iIndex=0; iIndex<oPotentialParagraphs.length; iIndex++)
    {
        var oNode = oPotentialParagraphs.item(iIndex);
        if (oNode.className.lastIndexOf('paragraph') != -1)
        {
            oParaDescendants.push(oNode);
        }
    }
    return oParaDescendants;
}

function onPageLoad()
{
    detectBrowser();
    adjustLineHeightIfTooBig("id1");
    adjustFontSizeIfTooBig("id1");
    adjustLineHeightIfTooBig("id2");
    adjustFontSizeIfTooBig("id2");
    adjustLineHeightIfTooBig("id3");
    adjustFontSizeIfTooBig("id3");
    adjustLineHeightIfTooBig("id4");
    adjustFontSizeIfTooBig("id4");
    adjustLineHeightIfTooBig("id5");
    adjustFontSizeIfTooBig("id5");
    fixupAllIEPNGBGs();
    fixupIEPNG("id6", "Assortments_files/transparent.gif");
    return true;
}

function NBmouseover(index)
{
    var normal = document.getElementById("navbar_"+index+"_normal");
    var rollover = document.getElementById("navbar_"+index+"_rollover");
    if (normal && rollover)
    {
        normal.style.visibility = "hidden";
        rollover.style.visibility = "visible";
    }
    return true;
}

function NBmouseout(index)
{
    var normal = document.getElementById("navbar_"+index+"_normal");
    var rollover = document.getElementById("navbar_"+index+"_rollover");
    if (normal && rollover)
    {
        normal.style.visibility = "visible";
        rollover.style.visibility = "hidden";
    }
    return true;
}

var windowsInternetExplorer = false;
var browserVersion = 0;
function detectBrowser()
{
    windowsInternetExplorer = false;
    var appVersion = navigator.appVersion;
    if ((appVersion.indexOf("MSIE") != -1) &&
        (appVersion.indexOf("Macintosh") == -1))
    {
        var temp = appVersion.split("MSIE");
        browserVersion = parseFloat(temp[1]);
        windowsInternetExplorer = true;
    }
}

var inImgPropertyChanged = false;
function imgPropertyChanged()
{
    if ((window.event.propertyName == "src") && (! inImgPropertyChanged))
    {
        inImgPropertyChanged = true;
        var el = window.event.srcElement;
        if (el.src != smallTransparentGif)
        {
            el.filters.item(0).src = el.src;
            el.src = smallTransparentGif;
        }
        inImgPropertyChanged = false;
    }
}


