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/001_00E.jpg', '531', '800', 'Downtown Clifden');
slides[1] = new Slide('../Photos_files/002_36A.jpg', '531', '800', 'Lisa’s attempt to take arty pictures of pedestrians');
slides[2] = new Slide('../Photos_files/003_35A.jpg', '531', '800', 'Beautiful Connemara in Western Ireland');
slides[3] = new Slide('../Photos_files/004_34A.jpg', '531', '800', 'Some friends of ours from Connemara');
slides[4] = new Slide('../Photos_files/005_33A.jpg', '531', '800', 'Clifden Chamber of Commerce had a cool seal');
slides[5] = new Slide('../Photos_files/006_32A.jpg', '531', '800', 'Ancient Cross by the side of the road, Clifden');
slides[6] = new Slide('../Photos_files/007_31A.jpg', '531', '800', 'Lisa’s  thumb in Western ireland');
slides[7] = new Slide('../Photos_files/008_30A.jpg', '531', '800', 'Our hotel room after a night of partying');
slides[8] = new Slide('../Photos_files/009_29A.jpg', '531', '800', 'Lisa joined a nunnery');
slides[9] = new Slide('../Photos_files/010_28A.jpg', '531', '800', 'We’re not sure what this is');
slides[10] = new Slide('../Photos_files/011_27A.jpg', '531', '800', 'Ireland is a very magical place \u000d\u000d\u000d\u000d\u000d');
slides[11] = new Slide('../Photos_files/012_26A.jpg', '531', '800', 'Around the corner from the hotel/bar we played at in Connemara was the ocean and many hills and sheep \u000d');
slides[12] = new Slide('../Photos_files/013_25A.jpg', '531', '800', 'Lisa tried to take an arty photo of fellow hikers in Connemara \u000d');
slides[13] = new Slide('../Photos_files/014_23A.jpg', '531', '800', 'Mark and Joe of the Blood Red Mountain Band');
slides[14] = new Slide('../Photos_files/015_22A.jpg', '531', '800', 'Hugh at the Limerick Boat Club ');
slides[15] = new Slide('../Photos_files/016_21A.jpg', '531', '800', '');
slides[16] = new Slide('../Photos_files/017_20A.jpg', '531', '800', 'Ian at the Limerick Boat Club');
slides[17] = new Slide('../Photos_files/018_19A.jpg', '531', '800', 'Lucy from the Blood Red Mountain Band');
slides[18] = new Slide('../Photos_files/019_18A.jpg', '531', '800', 'The swans of Limerick');
slides[19] = new Slide('../Photos_files/020_17A.jpg', '531', '800', 'Wingding before his set. He sang a great song about a job he didn\u0027t get. \u000d');
slides[20] = new Slide('../Photos_files/021_16A.jpg', '531', '800', 'Wingding after his set');
slides[21] = new Slide('../Photos_files/022_15A.jpg', '531', '800', 'In Limerick there are Saints everywhere');
slides[22] = new Slide('../Photos_files/023_14A.jpg', '531', '800', 'The View from Paudy’s apartment');
slides[23] = new Slide('../Photos_files/024_12A.jpg', '531', '800', 'Cigarette Labels in Europe are less subtle');
slides[24] = new Slide('../Photos_files/025_11A.jpg', '531', '800', 'Paudy, the bartender from the Boat Club who was kind enough to let us crash at his place, and introduced us to Irish Mexican food. \u000d');
slides[25] = new Slide('../Photos_files/026_10A.jpg', '531', '800', 'We made it to Dublin');
slides[26] = new Slide('../Photos_files/027_09A.jpg', '531', '800', 'Heinz mayonaisse & Helman’s ketchup in IE');
slides[27] = new Slide('../Photos_files/028_08A.jpg', '531', '800', 'Dave chillin’ in Dublin');
slides[28] = new Slide('../Photos_files/029_07A.jpg', '531', '800', 'A view of the Thatch’s thatch roof, where we played in Devon, England \u000d');
slides[29] = new Slide('../Photos_files/030_06A.jpg', '531', '800', 'Wascally Wabbits of England');
slides[30] = new Slide('../Photos_files/031_05A.jpg', '531', '800', 'More Wabbits');
slides[31] = new Slide('../Photos_files/032_04A.jpg', '531', '800', 'and more');
slides[32] = new Slide('../Photos_files/033_03A.jpg', '531', '800', 'The beach in Croyde, England');
slides[33] = new Slide('../Photos_files/034_02A.jpg', '531', '800', 'Even little babies surf in North Devon (really, they sell wet suits for them in all the shops) \u000d');
slides[34] = new Slide('../Photos_files/035_01A.jpg', '531', '800', 'There were cool tide pools in Devon \u000d');
slides[35] = new Slide('../Photos_files/036_00A.jpg', '531', '800', 'Sheep grazed by the beach and seem to be defying gravity on the hillsides of Devon \u000d');
slides[36] = new Slide('../Photos_files/037_00A.jpg', '531', '800', 'Lisa\u0027s niece\u0027s name written in the sand in North Devon \u000d');
slides[37] = new Slide('../Photos_files/001_36A.jpg', '531', '800', 'Chalkboard sign at our gig at the Thatch');
slides[38] = new Slide('../Photos_files/003_34A.jpg', '531', '800', 'The girl on the right designed the sign');
slides[39] = new Slide('../Photos_files/002_35A.jpg', '531', '800', 'There was Foozball and beer bottles built into the walls\n\nth');
slides[40] = new Slide('../Photos_files/005_32A.jpg', '531', '800', 'The steps in Amsterdam are really high');
slides[41] = new Slide('../Photos_files/006_31A.jpg', '531', '800', 'Dave pondering what to do when he collects the millions from his Dutch map company');
slides[42] = new Slide('../Photos_files/007_30A.jpg', '531', '800', 'Everyone in Amsterdam rides bicycles. Watch out so you don\u0027t get hit \u000d');
slides[43] = new Slide('../Photos_files/008_29A.jpg', '531', '800', 'Dave blending in with the locals in Amsterdam’s Chinatown');
slides[44] = new Slide('../Photos_files/009_28A.jpg', '531', '800', 'Dave in Amsterdam doing as the locals do');
slides[45] = new Slide('../Photos_files/010_27A.jpg', '531', '800', '2nd drag');
slides[46] = new Slide('../Photos_files/011_26A.jpg', '531', '800', 'In Somerville we have the Someday Cafe, in Amsterdam there’s the Any Day Cafe');
slides[47] = new Slide('../Photos_files/012_25A.jpg', '531', '800', 'Who is he mysterious guy in the hat enjoying Kalio Gayo? \u000d');
slides[48] = new Slide('../Photos_files/013_24A.jpg', '531', '800', 'Dave chilling during soundcheck at KHL in Amsterdam');
slides[49] = new Slide('../Photos_files/014_23A_2.jpg', '531', '800', 'Sijman Hendricks from Kalio Gayo at KHL');
slides[50] = new Slide('../Photos_files/015_22A_2.jpg', '531', '800', 'Egbert Den Braber and Anja Pleit from Kalio Gayo');
slides[51] = new Slide('../Photos_files/016_21A_2.jpg', '531', '800', 'Kalio Gayo soundchecking');
slides[52] = new Slide('../Photos_files/017_20A_2.jpg', '531', '800', 'Our friend Marijn that we stayed with in Holland. In addition to hosting KHL, she is an excellent singer/songwriter \u000d');
slides[53] = new Slide('../Photos_files/018_19A_2.jpg', '531', '800', 'This guy was like Lisa’s brother if he lived in Holland');
slides[54] = new Slide('../Photos_files/019_18A_2.jpg', '531', '800', 'Marijn’s son Flo showing us a Dutch breakfast');
slides[55] = new Slide('../Photos_files/020_17A_2.jpg', '531', '800', 'Marijn’s daughter Josephine at the keyboard');
slides[56] = new Slide('../Photos_files/021_16A_2.jpg', '531', '800', 'Josephine showed us some of her beautiful cabinets that she painted herself \u000d');
slides[57] = new Slide('../Photos_files/022_15A_2.jpg', '531', '800', 'Train station in Antwerp, Belgium');
slides[58] = new Slide('../Photos_files/023_14A_2.jpg', '531', '800', 'Dave discovering Belgium');
slides[59] = new Slide('../Photos_files/024_13A.jpg', '531', '800', 'The Magic Kingdom of Belgium');
slides[60] = new Slide('../Photos_files/025_12A.jpg', '531', '800', 'They don’t make ‘em like they used to');
slides[61] = new Slide('../Photos_files/026_11A.jpg', '531', '800', 'Statue in a lamp post');
slides[62] = new Slide('../Photos_files/027_10A.jpg', '531', '800', 'Statues everywhere');
slides[63] = new Slide('../Photos_files/028_09A.jpg', '531', '800', 'Sweet Wednesday at Den Heksenketel');
slides[64] = new Slide('../Photos_files/029_08A.jpg', '531', '800', 'Our backpacking friends at Den Heksenketel');
slides[65] = new Slide('../Photos_files/030_07A.jpg', '531', '800', 'Lawrence offered a free beer to anyone who could calculate how many witches were in Den Heksenketel');
slides[66] = new Slide('../Photos_files/031_06A.jpg', '531', '800', 'They made us really cool signs');
slides[67] = new Slide('../Photos_files/032_05A.jpg', '531', '800', 'Interesting spidery wall hanging');
slides[68] = new Slide('../Photos_files/033_04A.jpg', '531', '800', 'Owner of Den Heksenketel');
slides[69] = new Slide('../Photos_files/034_03A.jpg', '531', '800', 'Awesome artwork by the guy in the last photo');
slides[70] = new Slide('../Photos_files/035_02A.jpg', '800', '531', 'Cool statue at Den Heksenketel');
slides[71] = new Slide('../Photos_files/036_01A.jpg', '531', '800', 'I think you’ve seen this before');
slides[72] = new Slide('../Photos_files/037_00A_2.jpg', '531', '800', 'Dave & his Aussie buddy from Den Heksenketel');
slides[73] = new Slide('../Photos_files/038_00A.jpg', '531', '800', 'Irish Pub in Belgium where we played');
slides[74] = new Slide('../Photos_files/007_18A.jpg', '531', '800', 'Baby squirrel living in our window sill before we left for Europe \u000d');
slides[75] = new Slide('../Photos_files/008_17A.jpg', '531', '800', 'Cool Dogwood tree outside our window \u000d');
slides[76] = new Slide('../Photos_files/009_16A.jpg', '531', '800', 'More baby squirrel cuteness \u000d');
slides[77] = new Slide('../Photos_files/010_15A.jpg', '531', '800', 'Lisa became addicted to photographing the baby squirrel \u000d');
slides[78] = new Slide('../Photos_files/011_14A.jpg', '531', '800', '');
slides[79] = new Slide('../Photos_files/012_13A.jpg', '531', '800', 'Can you find the baby squirrel? \u000d');
slides[80] = new Slide('../Photos_files/013_12A.jpg', '531', '800', 'How about now? \u000d');
slides[81] = new Slide('../Photos_files/014_11A.jpg', '531', '800', 'Glamour shot of baby squirrel\u000d');
slides[82] = new Slide('../Photos_files/015_10A.jpg', '531', '800', 'Baby squirrel\u0027s acting debut \u000d');
slides[83] = new Slide('../Photos_files/016_09A.jpg', '531', '800', 'Hey, where\u0027d he come from? \u000d');
slides[84] = new Slide('../Photos_files/017_08A.jpg', '531', '800', 'The Squirrel Brothers');
slides[85] = new Slide('../Photos_files/018_07A.jpg', '531', '800', 'more of the Squirrel Brothers');
slides[86] = new Slide('../Photos_files/019_06A.jpg', '531', '800', 'Watching the exciting drama in the road below \u000d\u000d\u000d\u000d\u000d');
slides[87] = new Slide('../Photos_files/020_05A.jpg', '531', '800', 'There\u0027s a lot of nuts here in Cambridge \u000d');
slides[88] = new Slide('../Photos_files/021_03A.jpg', '531', '800', 'Sleepy time \u000d');
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", "Photos_files/transparent.gif");
    fixupIEPNG("id3", "Photos_files/transparent.gif");
    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("id10", "Photos_files/transparent.gif");
    fixupIEPNG("id11", "Photos_files/transparent.gif");
    fixupIEPNG("id12", "Photos_files/transparent.gif");
    fixupIEPNG("id13", "Photos_files/transparent.gif");
    fixupIEPNG("id14", "Photos_files/transparent.gif");
    fixupIEPNG("id15", "Photos_files/transparent.gif");
    fixupIEPNG("id16", "Photos_files/transparent.gif");
    fixupIEPNG("id17", "Photos_files/transparent.gif");
    fixupIEPNG("id18", "Photos_files/transparent.gif");
    fixupIEPNG("id19", "Photos_files/transparent.gif");
    fixupIEPNG("id20", "Photos_files/transparent.gif");
    fixupIEPNG("id21", "Photos_files/transparent.gif");
    fixupIEPNG("id22", "Photos_files/transparent.gif");
    fixupIEPNG("id23", "Photos_files/transparent.gif");
    fixupIEPNG("id24", "Photos_files/transparent.gif");
    fixupIEPNG("id25", "Photos_files/transparent.gif");
    fixupIEPNG("id26", "Photos_files/transparent.gif");
    fixupIEPNG("id27", "Photos_files/transparent.gif");
    fixupIEPNG("id28", "Photos_files/transparent.gif");
    fixupIEPNG("id29", "Photos_files/transparent.gif");
    fixupIEPNG("id30", "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;
    }
}


