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('../Birds_files/10345.jpg', '502', '600', 'The most heavily advertised bird brand belonged to Straiton & Storm. First used as their trade mark logo in the 1860’s, OWL and its successors will be the subject of their own exhibit. Fact. 47, 9th PA 1904\n[10345]');
slides[1] = new Slide('../Birds_files/10344.jpg', '545', '600', 'Straiton & Storm became General Cigar in 1917, but OWL remained a leading brand. Cigars made in Fact. 233 1st PA  1920.  \n[10344]');
slides[2] = new Slide('../Birds_files/10346.jpg', '566', '600', 'General introduced WHITE OWL to compete with OWL in early 1918. One sold for 7¢ the other for 8¢. OWL was dropped from General’s line in November 1921. General Cigar Co., Fact. 160, 12th PA  1923.\n[10346]');
slides[3] = new Slide('../Birds_files/10343.jpg', '568', '600', 'Pictured is one of the best known WHITE OWL boxes, used during the late 1930’s, 40’s and 50’s. Fact. 522, 5th New Jersey,  1940.\n[10343]');
slides[4] = new Slide('../Birds_files/birds5502.jpg', '340', '600', 'Eagles are the earliest birds found on U.S.\nboxes. Cigars by John Krohe, NYC, 1874.\n[5502]');
slides[5] = new Slide('../Birds_files/birds5547.jpg', '355', '600', 'Catalog card missing. C1900.\n[5547]');
slides[6] = new Slide('../Birds_files/birds5534.jpg', '505', '543', 'Strange birds with human heads. Do they represent the retailer’s children? Fact. 555, with 140 rollers, one of Chicago’s five biggest factories c1890\n[5534]');
slides[7] = new Slide('../Birds_files/birds5537.jpg', '469', '600', 'Charming box. Speckled in the name usually means the cigars were made of speckled tobacco, popular at that time. Made in Fact. 63, 9th PA by National Cigar Mfg. Co., West Manchester, PA, 1899.\n[5537]');
slides[8] = new Slide('../Birds_files/birds5511.jpg', '498', '600', 'A languishing lady and PEACOCK on a book shaped box with gilded edge, made in the early 1880’s in \nFact. 1029, 9th PA.\n[5511]');
slides[9] = new Slide('../Birds_files/birds5510.jpg', '408', '600', 'Black and gold ink on a classic NWH box made by the giant 1000 roller Sutro & Newmark Fact. 412, 3rd Dist NYC in the mid 1880’s.\n[5510]');
slides[10] = new Slide('../Birds_files/birds556.jpg', '492', '600', 'HOMING PIGEON made in Fact. 63, 9th Dist. PA,\nthe 15 man factory of Denah Gable, York, in 1881. Packed in an NWH with a colored liner and \nlovely inner.\n[5506]');
slides[11] = new Slide('../Birds_files/birds5544.jpg', '505', '595', 'Made in 1913 by William Griffin in Nevada City’s Fact. 25, 1st District of California. Label by\nCole Litho, Chicago.\n[5544]');
slides[12] = new Slide('../Birds_files/birds5546.jpg', '505', '555', 'A literary bird from Evansville, Indiana, in 1922 by the Val Roma Cigar Co., 10th and W. Franklin.\nFact. 194, 6th Dist. Indiana.\n[5546]');
slides[13] = new Slide('../Birds_files/birds5552.jpg', '505', '599', 'Red is a standout color for a normally black bird. This cardboard box held 100 cheap Depression-era cigars made in fact. 86, 18th Dist. Ohio, operated by Fred Kochendorfer, Newark, Ohio.  1934\n[5552]');
slides[14] = new Slide('../Birds_files/birds5526.jpg', '501', '600', 'A red bird that should be red advertises cigars made in Fact. 371 Indianapolis, Indiana by \nW.J. Steckbeck & Sons in 1948.\n[5526]');
slides[15] = new Slide('../Birds_files/birds5522.jpg', '493', '600', 'Distinctive four color label would stand out in any cigar counter. Label by F.M. Howell. Cigars by\nCharles Doubek, Menominee, Mich in\nFactory 95, 4th District.  1904\n[5522]');
slides[16] = new Slide('../Birds_files/birds5517.jpg', '505', '575', 'Very different bird label also from 1904,\nused by W.K. Gresh & Sons for cigars made\nin their Norristown, PA, Fact. 1839, 1st PA/\n[5517]');
slides[17] = new Slide('../Birds_files/birds5521.jpg', '476', '600', 'Two colors used effectively on this 1904 box by David Goodling, Fact. 1367, 9th Loganville, PA.\n[5521]');
slides[18] = new Slide('../Birds_files/birds554.jpg', '367', '600', 'Jim Crow had more than one meaning in 1872 when this distinctive two color label was used by Foxen, Bristol & Co., Fact. 424, 1st Michigan. Cigars made for R.H. Parker & Co., Sharon, PA., a town \nwith three cigar makers.  Hmmm???  [5504]');
slides[19] = new Slide('../Birds_files/9842.jpg', '710', '800', 'Birds of every color, including one symbolizing Peace and Purity issued in the earliest days of World War One. Fact. 223, 2nd Dist. Wisconsin.\n[9842]');
slides[20] = new Slide('../Birds_files/birds5515.jpg', '501', '600', 'Three colors make a dramatic label depicting\nan odd albino crow for an Oregon factory\nnumber 13 around 1912.\n[5515]');
slides[21] = new Slide('../Birds_files/birds5553.jpg', '504', '567', 'Hall Brothers in Wells, Minn. (Fact. 1000)\nused this lovely and dramatic box in 1934.\n[5553]');
slides[22] = new Slide('../Birds_files/birds5554.jpg', '301', '600', 'One of my favorite end label designs. Custom\ndesign, not just a repeat of the inner like\nmost outer labels.\n[5554]');
slides[23] = new Slide('../Birds_files/birds5527.jpg', '486', '600', 'Oval designs were not common in 1878 when this lovely swan was used by Francis Leggett & Co., Fact. 401, 3rd Dist. NYC.\n[5527]');
slides[24] = new Slide('../Birds_files/birds5529.jpg', '501', '600', 'A half century later, white swans still appeared on boxes. Fact. 711, 1st OPA, 1932, owner unknown.\n[5529]');
slides[25] = new Slide('../Birds_files/birds5531.jpg', '473', '600', 'Swans didn’t have to be white. Label from\nlabel catalog.\n[5531]');
slides[26] = new Slide('../Birds_files/birds5530.jpg', '505', '595', 'With minor emblemic modification, the red\nswans become blue. Labels could be\nmodified to suit any buyer’s whim.\nUsed by unknown owner of Fact. 38, Minn.\n[5530]');
slides[27] = new Slide('../Birds_files/9102.jpg', '505', '577', 'Certainly one of the most bizarre named boxes featuring a bird. Excuse the crudeness but I\ncan’t help picturing what it’s about to do on the\nbread. Cigars by O’Brien Bros. Fact. 4, IRD 34, Chatham, Ontario. c.1886    [9102]');
slides[28] = new Slide('../Birds_files/11029.jpg', '800', '676', 'A puffin puffin’ on a cigar makes for a delightful play on words on this simple monochrome label from around 1912. Cigars by El Francisco Cigar Co., Fact. 475, 9th PA in Wrightsville.\n[11029]');
slides[29] = new Slide('../Birds_files/themeC6297.jpg', '505', '585', '1960’s cardboard box-wrapped box with parrot theme. Permit 121, Pennsylvania.\n[6297]');
slides[30] = new Slide('../Birds_files/birds5551.jpg', '505', '550', 'Jacobs, Holdtzinger & Co. of Windsor, PA, Fact. 492, 1st PA, made this distinctive box in the 1930’s. Its four colors testifies to the effectiveness of a simple design used to attract the eye.\n[5551]');
slides[31] = new Slide('../Birds_files/birds5533.jpg', '518', '504', 'In stark contrast to the previous is this book shaped box of 10 with its ornate colorful embossed label from around 1914. Catalog card incomplete.\nThe slogan “Catches the Worm” is of questionable\neffectiveness inducing a smoker to try one. [5533]');
slides[32] = new Slide('../Birds_files/birds5542.jpg', '495', '600', 'Odd anthropomorphic birds in tuxedos with dickies.\n“They are singers, alright” doesn’t have meaning as a slogan.today. Fact. 925, 9th PA owned by\nCharles W. Snyder, Yoe.  c1913.\n[5542]');
slides[33] = new Slide('../Birds_files/birds555.jpg', '353', '600', 'Odd early subtly trichromatic flock of birds used by Landauer & Kaim, whose 250 roller factory 106 \nwas located on east 64th in NYC in 1886.\n[5505]');
slides[34] = new Slide('../Birds_files/7721.jpg', '455', '687', 'It’s difficult to find a type of bird that doesn’t \nappear on a cigar box. This Ohio turn-of-the-century box of 250 cigars is not in the NCM collection.\n[w0000]');
slides[35] = new Slide('../Birds_files/684c_3.jpg', '800', '533', 'Rare paper label tin 25/up with a dramatic bird label.\nCigars by G.A. Strobeck, Fact. 563, Red Lion, PA.\nNot in the NCM collecttion.\n[w 0000]');
slides[36] = new Slide('../Birds_files/birds5555.jpg', '400', '600', 'Bird parts! Cigars made for C.D. Slater of Reading, PA, featuring Elias Hartz, a local weatherman who forcast weather by the color of a goose breast bone. Unknown cigar maker, Fact. 358, 1st PA. 1910\n[5555]');
slides[37] = new Slide('../Birds_files/9165.jpg', '505', '529', 'More bird parts. Same exact box is found with the name EAGLE HEAD. Fact. 926 was owned by D.A. Shriver who employed 3 rollers in Manchester, PA\nin 1886.  Back strip advises retailers to tear the lid off and hang it as an advertising sign.  [9165]');
slides[38] = new Slide('../Birds_files/birds5538.jpg', '405', '600', 'This barnyard bird belongs with other barnyard critters in another exhibit. Watch for it there.\nBy Louis Ihlenfeldt, Springfield, Ill, Fact. C25, 8th  District, the earliest box I’ve seen with a C as part\nof the ID.  Dates between 1936-1941.  [5538]');
slides[39] = new Slide('../Birds_files/birds5539.jpg', '505', '595', 'Don’t believe anything you read on a cigar box. The label clearly says made by Fernandez Brothers in Tampa, but the ID (the only trustworthy part of a box) says they were made by P.H. Linsen, in Factory 2, New Orleans.  [5539]');
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");
    fixupAllIEPNGBGs();
    fixupIEPNG("id2", "Birds_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;
    }
}

