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('../Photos_files/Isabel Firpoo Frimmersdorf \u002758.jpg', '800', '600', 'Isabel Firpoo Frimmersdorf \u002758');
slides[1] = new Slide('../Photos_files/Mary Horsman Brenner \u002745.jpg', '800', '600', 'Mary Horsman Brenner \u002745');
slides[2] = new Slide('../Photos_files/Nancy Canavese Woodfall \u002749.jpg', '800', '600', 'Nancy Canavese Woodfall \u002749');
slides[3] = new Slide('../Photos_files/Joan Verdino \u002749.jpg', '800', '600', 'Joan Verdino \u002749');
slides[4] = new Slide('../Photos_files/Sally Homan O\u0027Hare \u002755.jpg', '800', '600', 'Sally Homan O\u0027Hare \u002755');
slides[5] = new Slide('../Photos_files/Suzzanne Martin Fitzgerald \u002757.jpg', '800', '600', 'Suzzanne Martin Fitzgerald \u002757');
slides[6] = new Slide('../Photos_files/Jeanne Catherine Kelly \u002758.jpg', '800', '600', 'Jeanne Catherine Kelly \u002758');
slides[7] = new Slide('../Photos_files/Viola O\u0027Leary Nagel \u002754.jpg', '800', '600', 'Viola O\u0027Leary Nagel \u002754');
slides[8] = new Slide('../Photos_files/Florence Diepenbrock Stronck \u002750.jpg', '800', '600', 'Florence Diepenbrock Stronck \u002750');
slides[9] = new Slide('../Photos_files/Gayle Cummins Ray \u002758.jpg', '800', '600', 'Gayle Cummins Ray \u002758');
slides[10] = new Slide('../Photos_files/Beverly Belden Beban \u002758.jpg', '800', '600', 'Beverly Belden Beban \u002758');
slides[11] = new Slide('../Photos_files/Anne Spieler Styles \u002758.jpg', '800', '600', 'Anne Spieler Styles \u002758');
slides[12] = new Slide('../Photos_files/Mary Haggerty Elliott \u002756.jpg', '800', '600', 'Mary Haggerty Elliott \u002756');
slides[13] = new Slide('../Photos_files/Barbara higgins Beirne \u002756.jpg', '800', '600', 'Barbara higgins Beirne \u002756');
slides[14] = new Slide('../Photos_files/Elaine Altieri Smith \u002758.jpg', '800', '600', 'Elaine Altieri Smith \u002758');
slides[15] = new Slide('../Photos_files/Marjorie Watt Taylor \u002758.jpg', '800', '600', 'Marjorie Watt Taylor \u002758');
slides[16] = new Slide('../Photos_files/Anna Maes \u002741.jpg', '800', '600', 'Anna Maes \u002741');
slides[17] = new Slide('../Photos_files/Carole Lencioni Lewis \u002755.jpg', '800', '600', 'Carole Lencioni Lewis \u002755');
slides[18] = new Slide('../Photos_files/Sallie Chamberlin Scannell \u002755.jpg', '800', '600', 'Sallie Chamberlin Scannell \u002755');
slides[19] = new Slide('../Photos_files/Mary Mainland Sowell \u002755.jpg', '800', '600', 'Mary Mainland Sowell \u002755');
slides[20] = new Slide('../Photos_files/Maria Alber Brasher \u002755.jpg', '800', '600', 'Maria Alber Brasher \u002755');
slides[21] = new Slide('../Photos_files/Geraldine Bihler Roy \u002758.jpg', '800', '600', 'Geraldine Bihler Roy \u002758');
slides[22] = new Slide('../Photos_files/Buol Burns Dougherty \u002748.jpg', '800', '600', 'Buol Burns Dougherty \u002748');
slides[23] = new Slide('../Photos_files/Vivian Haggood LaMont \u002748.jpg', '800', '600', 'Vivian Haggood LaMont \u002748');
slides[24] = new Slide('../Photos_files/Patricia Smith McCue \u002748.jpg', '800', '600', 'Patricia Smith McCue \u002748');
slides[25] = new Slide('../Photos_files/Vivian Haggood Lamont, Barbara Royer Greenalch, Patricia Smith McCue, Buol Burns Dougherty, all \u002748.jpg', '600', '800', 'Vivian Haggood Lamont, Barbara Royer Greenalch, Patricia Smith McCue, Buol Burns Dougherty, all \u002748');
slides[26] = new Slide('../Photos_files/Mary Nehls DeMartini \u002748.jpg', '800', '600', 'Mary Nehls DeMartini \u002748');
slides[27] = new Slide('../Photos_files/Carol Ryan Regan \u002749.jpg', '800', '600', 'Carol Ryan Regan \u002749');
slides[28] = new Slide('../Photos_files/Yvonne Tomasena Gomez \u002748, Erin Mayo Makarczyk \u002758, Leona Thompson Kelly \u002758.jpg', '600', '800', 'Yvonne Tomasena Gomez \u002748, Erin Mayo Makarczyk \u002758, Leona Thompson Kelly \u002758');
slides[29] = new Slide('../Photos_files/Yvonne tomasena Gomez \u002758.jpg', '800', '600', 'Yvonne tomasena Gomez \u002758');
slides[30] = new Slide('../Photos_files/Leona Thompson Kelly \u002758.jpg', '800', '600', 'Leona Thompson Kelly \u002758');
slides[31] = new Slide('../Photos_files/Erin Mayo Makarczyk \u002758.jpg', '800', '600', 'Erin Mayo Makarczyk \u002758');
slides[32] = new Slide('../Photos_files/Maryellen Waters langley \u002758.jpg', '800', '600', 'Maryellen Waters langley \u002758');
slides[33] = new Slide('../Photos_files/Barbara Beles Racz \u002758.jpg', '800', '600', 'Barbara Beles Racz \u002758');
slides[34] = new Slide('../Photos_files/Farelyn Brady Lehane \u002758.jpg', '800', '600', 'Farelyn Brady Lehane \u002758');
slides[35] = new Slide('../Photos_files/Sr.jpg', '800', '600', 'Sr. Joan Panella \u002758');
slides[36] = new Slide('../Photos_files/Clare Diepenbrock \u002748.jpg', '800', '600', 'Clare Diepenbrock \u002748');
slides[37] = new Slide('../Photos_files/Connie Vigil D\u0027Amico \u002757.jpg', '800', '600', 'Connie Vigil D\u0027Amico \u002757');
slides[38] = new Slide('../Photos_files/Patricia Weaver Miller \u002748.jpg', '800', '600', 'Patricia Weaver Miller \u002748');
slides[39] = new Slide('../Photos_files/Patricia Weaver Miller \u002748, June Canvin Carros \u002748.jpg', '600', '800', 'Patricia Weaver Miller \u002748, June Canvin Carros \u002748');
slides[40] = new Slide('../Photos_files/Lois Healy \u002748, Patricia Mulligan meyer \u002748.jpg', '600', '800', 'Lois Healy \u002748, Patricia Mulligan meyer \u002748');
slides[41] = new Slide('../Photos_files/Ester Bugna \u002752.jpg', '800', '600', 'Ester Bugna \u002752');
slides[42] = new Slide('../Photos_files/Janice Miles \u002758.jpg', '800', '600', 'Janice Miles \u002758');
slides[43] = new Slide('../Photos_files/Sheila Darbey Emigh \u002758.jpg', '800', '600', 'Sheila Darbey Emigh \u002758');
slides[44] = new Slide('../Photos_files/Nonafay mercer Woolley \u002748, Patricia Oliver Powell \u002748, Sylvia Castro Kelly \u002748.jpg', '600', '800', 'Nonafay mercer Woolley \u002748, Patricia Oliver Powell \u002748, Sylvia Castro Kelly \u002748');
slides[45] = new Slide('../Photos_files/Nonafay Mercer Woolley \u002748.jpg', '800', '600', 'Nonafay Mercer Woolley \u002748');
slides[46] = new Slide('../Photos_files/Judith Maestri Williams \u002758.jpg', '800', '600', 'Judith Maestri Williams \u002758');
slides[47] = new Slide('../Photos_files/Judith Burke Scott \u002758.jpg', '800', '600', 'Judith Burke Scott \u002758');
slides[48] = new Slide('../Photos_files/Shirley Darbey Rich \u002758.jpg', '800', '600', 'Shirley Darbey Rich \u002758');
slides[49] = new Slide('../Photos_files/Mary Anne Dunlevy Wagner \u002758.jpg', '800', '600', 'Mary Anne Dunlevy Wagner \u002758');
slides[50] = new Slide('../Photos_files/Helen Wuesterfeld Burgard \u002755.jpg', '800', '600', 'Helen Wuesterfeld Burgard \u002755');
slides[51] = new Slide('../Photos_files/Clare Pors Thorpe \u002758.jpg', '800', '600', 'Clare Pors Thorpe \u002758');
slides[52] = new Slide('../Photos_files/Jeanne Lussier Kirkland \u002744.jpg', '800', '600', 'Jeanne Lussier Kirkland \u002744');
slides[53] = new Slide('../Photos_files/Ann Mainland McEntee \u002758.jpg', '800', '600', 'Ann Mainland McEntee \u002758');
slides[54] = new Slide('../Photos_files/Patricia Mulligan Meyer \u002748.jpg', '800', '600', 'Patricia Mulligan Meyer \u002748');
slides[55] = new Slide('../Photos_files/Patricia Oliver Powell \u002748.jpg', '800', '600', 'Patricia Oliver Powell \u002748');
slides[56] = new Slide('../Photos_files/Sylvia Castro kelly \u002748.jpg', '800', '600', 'Sylvia Castro kelly \u002748');
slides[57] = new Slide('../Photos_files/Shirley Darbey Rich \u002758, Janice Miles \u002758.jpg', '600', '800', 'Shirley Darbey Rich \u002758, Janice Miles \u002758');
slides[58] = new Slide('../Photos_files/Anne Baker Dobson \u002758.jpg', '800', '600', 'Anne Baker Dobson \u002758');
slides[59] = new Slide('../Photos_files/Sr_1.jpg', '800', '600', 'Sr. Julie Thorpe \u002748');
slides[60] = new Slide('../Photos_files/Class of \u002755 inside.jpg', '600', '800', 'Class of \u002755 inside');
slides[61] = new Slide('../Photos_files/Leora Rosetti \u002748, Anne Estrada, Nonafay Mercer Woolley \u002748.jpg', '600', '800', 'Leora Rosetti \u002748, Anne Estrada, Nonafay Mercer Woolley \u002748');
slides[62] = new Slide('../Photos_files/Sylvia Castro Kelly \u002748, Alice Wittrock Daly \u002740, Lois Healy \u002748.jpg', '600', '800', 'Sylvia Castro Kelly \u002748, Alice Wittrock Daly \u002740, Lois Healy \u002748');
slides[63] = new Slide('../Photos_files/June Canvin Caros \u002748, Leora Crosetti \u002748.jpg', '600', '800', 'June Canvin Caros \u002748, Leora Crosetti \u002748');
slides[64] = new Slide('../Photos_files/Vivian Haggood LaMont \u002748, Mary Nehls DeMartini \u002748, Buol Burns Dougherty \u002748.jpg', '600', '800', 'Vivian Haggood LaMont \u002748, Mary Nehls DeMartini \u002748, Buol Burns Dougherty \u002748');
slides[65] = new Slide('../Photos_files/2nd- Barbara Castellanos Cox \u002748, Sr.jpg', '600', '800', '2nd- Barbara Castellanos Cox \u002748, Sr. Celeste Pagliarulo \u002748, Patricia Mulligan Meyer \u002748');
slides[66] = new Slide('../Photos_files/Patricia Oliver Powell \u002748, Jeanne Lussier Kirkland \u002744.jpg', '600', '800', 'Patricia Oliver Powell \u002748, Jeanne Lussier Kirkland \u002744');
slides[67] = new Slide('../Photos_files/Lyra Tanner \u002709, Brooke McCallion \u002709, Danielle Egglie \u002709, Mia Aguillon \u002709, Jennifer Martinez \u002709.jpg', '600', '800', 'Lyra Tanner \u002709, Brooke McCallion \u002709, Danielle Egglie \u002709, Mia Aguillon \u002709, Jennifer Martinez \u002709');
slides[68] = new Slide('../Photos_files/Legacy Luncheon Crowd 2008.jpg', '600', '800', 'Legacy Luncheon Crowd 2008');
slides[69] = new Slide('../Photos_files/Mary Anne Dunlevy Wagner \u002758, Erin Mayo Makarczyk \u002758, Susan Montgomery Vales \u002758.jpg', '600', '800', 'Mary Anne Dunlevy Wagner \u002758, Erin Mayo Makarczyk \u002758, Susan Montgomery Vales \u002758');
slides[70] = new Slide('../Photos_files/Gayle cummins Ray \u002758, Anne Baker Dobson \u002758, Rosalie DuBois Becker \u002758.jpg', '600', '800', 'Gayle cummins Ray \u002758, Anne Baker Dobson \u002758, Rosalie DuBois Becker \u002758');
slides[71] = new Slide('../Photos_files/Rosalie DuBois Becker \u002758, Jeanne Catherine Kelly \u002758, Clare Pors Thorpe \u002758.jpg', '600', '800', 'Rosalie DuBois Becker \u002758, Jeanne Catherine Kelly \u002758, Clare Pors Thorpe \u002758');
slides[72] = new Slide('../Photos_files/Loretta Tuft Teresi \u002758, Gail lewis Castro \u002758, Sr.jpg', '600', '800', 'Loretta Tuft Teresi \u002758, Gail lewis Castro \u002758, Sr. Joan Panella \u002758');
slides[73] = new Slide('../Photos_files/Janet Greszewski Brooks \u002758.jpg', '800', '600', 'Janet Greszewski Brooks \u002758');
slides[74] = new Slide('../Photos_files/Joan Verdino \u002749, Nancy Canavese Woodfall \u002749, Carol Ryan Regan \u002749.jpg', '600', '800', 'Joan Verdino \u002749, Nancy Canavese Woodfall \u002749, Carol Ryan Regan \u002749');
slides[75] = new Slide('../Photos_files/Flora Bank Rubio \u002758, Geraldine Bihler Roy \u002758, Irene Pagni Andersen \u002758.jpg', '600', '800', 'Flora Bank Rubio \u002758, Geraldine Bihler Roy \u002758, Irene Pagni Andersen \u002758');
slides[76] = new Slide('../Photos_files/Elaine Altieri Smith \u002758, Marjorie Watt Taylor \u002758.jpg', '600', '800', 'Elaine Altieri Smith \u002758, Marjorie Watt Taylor \u002758');
slides[77] = new Slide('../Photos_files/Flora Bank Rubio \u002758.jpg', '600', '800', 'Flora Bank Rubio \u002758');
slides[78] = new Slide('../Photos_files/Class of 1958 Best.jpg', '600', '800', 'Class of 1958 Best');
slides[79] = new Slide('../Photos_files/Class of 1948 Best.jpg', '600', '800', 'Class of 1948 Best');
slides[80] = new Slide('../Photos_files/Class of 1955 best.jpg', '600', '800', 'Class of 1955 best');
slides[81] = new Slide('../Photos_files/40\u0027s and 50\u0027s best.jpg', '600', '800', '40\u0027s and 50\u0027s best');
slides[82] = new Slide('../Photos_files/Sr_2.jpg', '600', '800', 'Sr. Celeste Pagliarulo \u002748, Anne Estrada, Nonafay Mercer Woolley \u002748');
slides[83] = new Slide('../Photos_files/Class of \u002748 memorial bouquet.jpg', '800', '600', 'Class of \u002748 memorial bouquet');
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("id2");
    adjustFontSizeIfTooBig("id2");
    adjustLineHeightIfTooBig("id10");
    adjustFontSizeIfTooBig("id10");
    adjustLineHeightIfTooBig("id12");
    adjustFontSizeIfTooBig("id12");
    fixupIEPNG("id1", "Photos_files/transparent.gif");
    fixupIEPNG("id3", "Photos_files/transparent.gif");
    fixupAllIEPNGBGs();
    fixupIEPNG("id4", "Photos_files/transparent.gif");
    fixupIEPNG("id5", "Photos_files/transparent.gif");
    fixupIEPNG("id6", "Photos_files/transparent.gif");
    fixupIEPNG("id7", "Photos_files/transparent.gif");
    fixupIEPNG("id8", "Photos_files/transparent.gif");
    fixupIEPNG("id9", "Photos_files/transparent.gif");
    fixupIEPNG("id11", "Photos_files/transparent.gif");
    fixupIEPNG("id13", "Photos_files/transparent.gif");
    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;
    }
}


