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('../Artifacts_files/11402.jpg', '450', '621', 'Limited production on plywood 21” x 15” sign. Appears painted, but could be printed or decal.\nBecause most locals were small and signs were expensive, few CMIU signs are found today. \n[11402]');
slides[1] = new Slide('../Artifacts_files/11405.jpg', '450', '559', 'Cardboard store sign emphasizing home industry. “We work and live here. We spend our money here. Keep the home industries operating.” Circa 1915.\n[11405]');
slides[2] = new Slide('../Artifacts_files/11406.jpg', '552', '449', 'Van Horn signature on the Blue Label dates\nthis cardboard store sign to 1936-1944.\nSign distributed in Louisville, KY, area.\n[11406]');
slides[3] = new Slide('../Artifacts_files/11407.jpg', '622', '374', 'Tin store and outdoor 8” x 14” sign aimed at organized labor, urging support of “your own.”\nNot directly sponsored by the CMIU.\n[11407]');
slides[4] = new Slide('../Artifacts_files/11409.jpg', '622', '374', 'Personal convention badge of International Union President George W. Perkins. Mid to late 1890s.\n[11409]');
slides[5] = new Slide('../Artifacts_files/11417.jpg', '564', '450', 'Personal National convention badge of Union \nFirst Vice-President Samuel Gompers. \nMade by “David Handler Manufacturer of Badges and Rosettes, 201 S. Pearl Street, Albany, NY.”\n[11417]');
slides[6] = new Slide('../Artifacts_files/11410.jpg', '622', '235', 'Member’s badge, Cigar Makers Union No. 150, Sioux City, Iowa, organized in 1881.\nBadges-ribbons are 8” long.\n[11410]');
slides[7] = new Slide('../Artifacts_files/11411.jpg', '622', '235', 'Ribbons are reversible so they can be worn backwards at member’s funerals.\n[11411]');
slides[8] = new Slide('../Artifacts_files/11412.jpg', '622', '260', 'The Ottumwa, Iowa, member’s badge is 9” long.\nNote the inconsistencies between the two badges. Cigar maker is spelled as one word and two, with and without the possessive apostrophe. \n[11412]');
slides[9] = new Slide('../Artifacts_files/11413.jpg', '622', '260', 'Ribbons are reversible so they can be worn backwards at member’s funerals.\n[11413]');
slides[10] = new Slide('../Artifacts_files/11414.jpg', '622', '272', '5” badge was worn by a delegate to the 17th annual convention of the NY State Blue Label League of the Cigar Makers International Union held in Glens Falls, in 1916. With the Trust gone, the focus is on sanitary conditions, living wages and child labor. \nBy Bastian Bros., Rochester  [11414]');
slides[11] = new Slide('../Artifacts_files/11416.jpg', '622', '292', 'Visitor’s badge for the 1927 C.M.I.U. convention held in Chicago.  4.5” long.\n[11416]');
slides[12] = new Slide('../Artifacts_files/11421.jpg', '622', '276', 'Button-ribbon admitting the wearer to the reception at the 1900 Masquerade Ball held by giant Chicago Local #14 with over 1,000 members.\nMade by Whitehead & Hoag, the country’s largest manufacturer of custom pin-back buttons.\n[11421]');
slides[13] = new Slide('../Artifacts_files/11424.jpg', '661', '522', 'Simplest form of satin special purpose ribbons, worn with a straight pin. Left was made for a protest rally in Boston, center for a Boston publicity campaign, right for a member from St. Louis attending a regional meeting.\n[11424]');
slides[14] = new Slide('../Artifacts_files/11419.jpg', '622', '441', 'C.M.I.U. pin and medallion with ribbon missing. Satin ribbons deteriorate if not properly handled. Ebay sellers have destroyed a number of ribbons by inadequately anchoring the heavy medallions, which swing like a pendulum during shipment.\n[11419]');
slides[15] = new Slide('../Artifacts_files/11452.jpg', '649', '622', 'Unidentified medallion marked as from an annual convention held in Dayton, Ohio, in 1915.\nHave not been able to identify. \n[11452]');
slides[16] = new Slide('../Artifacts_files/11473.jpg', '349', '622', 'Constitutions and By-Laws from 1869, 1887,1917 and 1954. The NCM also owns 1912. \nOther years of these 4” x 6” books are wanted.\n[11473]');
slides[17] = new Slide('../Artifacts_files/w union.jpg', '334', '622', 'Receipt for repayment of one dollar loan by cigarmaker H. Schilling to Local 38\nin Springfield, Illinois, in 1887. The Union provided loans under a variety of circumstances, including\nmoving to find work in another town. \n Receipt not in the NCM collection.');
slides[18] = new Slide('../Artifacts_files/11447.jpg', '473', '661', 'Typical 4” x 5” C.M.I.U. member’s dues book.  \n[11447]');
slides[19] = new Slide('../Artifacts_files/11448.jpg', '473', '661', 'The treasurer of the Local pasted a stamp in the book upon receipt of the weekly 30¢ (1902). Each stamp is marked with the date paid.\n[11448]');
slides[20] = new Slide('../Artifacts_files/11449.jpg', '473', '661', '[11449]');
slides[21] = new Slide('../Artifacts_files/11450.jpg', '473', '661', 'The last page is reserved for special assessments. A 2/3 vote of the membership allowed special assessments to be collected. Each stamp represents 25¢ collected into the general fund.\n[11450]');
slides[22] = new Slide('../Artifacts_files/11486.jpg', '622', '403', 'July 4th, 1911, celebration included decorating the entire building with patriotically colored bunting, and of course, the Blue Label. Legend has it that the CMIU label is blue because the two local cigar unions whose stamp preceded it were red and white...and blue was a compromise.  [11486]');
slides[23] = new Slide('../Artifacts_files/11476.jpg', '407', '622', 'The C.M.I.U. loved a parade. This giant box was cow-pulled through the streets of Bangor, Maine, some time between 1910 and 1915.  \nThe NCM always seeks CMIU parade photos.\n[11476]');
slides[24] = new Slide('../Artifacts_files/11490.jpg', '622', '440', 'The Cigar Makers Official Journal published its first issue in 1875 and its last in 1972.  Filled with a mix of important news and petty detail, they were\npopular reading in some quarters and useful\\\nto today’s historian.\n[11490]');
slides[25] = new Slide('../Artifacts_files/11494.jpg', '457', '800', 'The C.M.I.U. had a variety of standard letterheads, but this one is special, direct from the office of \nG.W. Perkins, International Union President. There were hundreds of locals, how many envelopes?\nAlways best with interesting original contents.\n[11494]');
slides[26] = new Slide('../Artifacts_files/11548.jpg', '800', '557', 'Official correspondence is collectible when it has interesting contents about problems, solutions, campaigns, or other issues.\n[11548]');
slides[27] = new Slide('../Artifacts_files/11549.jpg', '358', '622', 'Any correspondence is more highly sought after\nwhen complete with original envelope.\n[11549]');
slides[28] = new Slide('../Artifacts_files/11495.jpg', '785', '622', 'More varieties of C.M.I.U. official letterhead.\n[11495]');
slides[29] = new Slide('../Artifacts_files/11496.jpg', '785', '622', 'More varieties of C.M.I.U. official letterhead.\n[11496]');
slides[30] = new Slide('../Artifacts_files/HPIM2427.jpg', '800', '527', 'More varieties of C.M.I.U. official letterhead.\nThis example not in the NCM collection.\n[w000]');
slides[31] = new Slide('../Artifacts_files/11455.jpg', '411', '661', 'Unusual envelope that chased the always-moving Sam Gompers...and never caught him. Sent by the newly formed Dunkirk, NY, local to Gompers in 1904 when he was CMIU VP and AFL President. That’s American Federation of Labor, not football.\n[11455]');
slides[32] = new Slide('../Artifacts_files/11403.jpg', '622', '443', 'Original photo personally autographed \n“For freedom, justice and humanity, yours faithfully, Sam’l Gompers.” What better signature from the most important man in labor history?\n[11403]');
slides[33] = new Slide('../Artifacts_files/11498.jpg', '622', '725', 'Photo of Gompers, right, with John Burns and David Holmes of England in 1894.\n[11498]');
slides[34] = new Slide('../Artifacts_files/11497.jpg', '550', '800', 'Original cabinet photo of Gompers on left was taken by J. E. Purdy of Boston in 1902. The photo on the right was taken in the early 1880’s, and was removed from a book where it was reproduced. \n[11497]');
slides[35] = new Slide('../Artifacts_files/11499.jpg', '593', '800', 'LEFT: Original photo on left taken in England c1900.  RIGHT: news wire photo of Gompers on the steps of NY City Hall after testifying before the Lockwood Comittee on whether courts should have power to review union decisions. “God save labor from the  courts,” he said.  Taken 1922. [11499]');
slides[36] = new Slide('../Artifacts_files/Apr17GompersDead.jpg', '462', '622', 'A couple years later, he was dead, After becoming sick on a trip to Mexico, he returned to the states only to die in San Antonio.\nNewspaper not in the NCM collection.');
slides[37] = new Slide('../Artifacts_files/11773.jpg', '568', '600', 'Cigar boxes with union themes are not common. Those that do exist are, more often than not, used by non-Union shops in an effort to fool smokers. The Gompers brand was created in 1914 and still around\nin the 1930’s. Fact. C-218, Alton, Illinois, 1931.\n[11773]');
slides[38] = new Slide('../Artifacts_files/9546.jpg', '506', '570', 'A few boxes have been found which picture Union owned buildings. This 1920 box is unusual in that the cigars were made in Salt Lake City.\n[9546]');
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");
    fixupAllIEPNGBGs();
    fixupIEPNG("id3", "Artifacts_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;
    }
}


