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('../Exposition_files/P193a.jpg', '572', '800', '193a. Irène Boulanger-Michaud');
slides[1] = new Slide('../Exposition_files/P193b.jpg', '572', '800', '193b. Irène Boulanger-Michaud');
slides[2] = new Slide('../Exposition_files/P184a.jpg', '560', '801', '184a. Madeleine Leduc');
slides[3] = new Slide('../Exposition_files/P184b.jpg', '560', '801', '184b. Madeleine Leduc');
slides[4] = new Slide('../Exposition_files/P190a.jpg', '534', '800', '190a. Pilar Macias et Claude Pelletier');
slides[5] = new Slide('../Exposition_files/P190b.jpg', '534', '800', '190b. Pilar Macias et Claude Pelletier');
slides[6] = new Slide('../Exposition_files/P210a.jpg', '400', '800', '210a. Marcelle Simon');
slides[7] = new Slide('../Exposition_files/P210b.jpg', '400', '800', '210b. Marcelle Simon');
slides[8] = new Slide('../Exposition_files/P194a.R.F.jpg', '550', '800', '194a. R. F. Côté');
slides[9] = new Slide('../Exposition_files/P194b.R.jpg', '550', '800', '194b. R. F. Côté');
slides[10] = new Slide('../Exposition_files/P196a.jpg', '534', '800', '196a. Mystère');
slides[11] = new Slide('../Exposition_files/P196b.jpg', '534', '800', '196b. Mystère');
slides[12] = new Slide('../Exposition_files/P197a.jpg', '800', '534', '197a. Clemente Padin');
slides[13] = new Slide('../Exposition_files/P197b.jpg', '534', '800', '197b. Clemente Padin');
slides[14] = new Slide('../Exposition_files/P198a.jpg', '534', '800', '198a. Serge Roy');
slides[15] = new Slide('../Exposition_files/P198b.jpg', '534', '800', '198b. Serge Roy');
slides[16] = new Slide('../Exposition_files/P195a.jpg', '450', '800', '195a. Chantal Laurin');
slides[17] = new Slide('../Exposition_files/P195b.jpg', '450', '800', '195b. Chantal Laurin');
slides[18] = new Slide('../Exposition_files/P185.jpg', '572', '800', '185. Zoé St-Pierre');
slides[19] = new Slide('../Exposition_files/P186.jpg', '800', '554', '186. Francesca Penserini');
slides[20] = new Slide('../Exposition_files/P199a.jpg', '582', '800', '199a. Gracia Dubé');
slides[21] = new Slide('../Exposition_files/P199b.jpg', '582', '800', '199b. Gracia Dubé');
slides[22] = new Slide('../Exposition_files/P200a.jpg', '600', '800', '200a. Jocelyne Gaudreau');
slides[23] = new Slide('../Exposition_files/P200b.jpg', '600', '800', '200b. Jocelyne Gaudreau');
slides[24] = new Slide('../Exposition_files/P192a.jpg', '515', '800', '192a. Irène Boulanger-Michaud');
slides[25] = new Slide('../Exposition_files/P192b.jpg', '515', '800', '192b. Irène Boulanger-Michaud');
slides[26] = new Slide('../Exposition_files/P201a.jpg', '801', '801', '201a. Nancy Scali');
slides[27] = new Slide('../Exposition_files/P201b.jpg', '801', '801', '201b. Nancy Scali');
slides[28] = new Slide('../Exposition_files/P202a.jpg', '800', '658', '202a. Marcelle Simon');
slides[29] = new Slide('../Exposition_files/P202b.jpg', '658', '800', '202b. Marcelle Simon');
slides[30] = new Slide('../Exposition_files/P204a.jpg', '801', '560', '204a. Raynald Légaré');
slides[31] = new Slide('../Exposition_files/P204b.jpg', '801', '560', '204b. Raynald Légaré');
slides[32] = new Slide('../Exposition_files/P183a.jpg', '592', '800', '183a. Ryosuke Cohen');
slides[33] = new Slide('../Exposition_files/P183b.jpg', '592', '800', '183b. Ryosuke Cohen');
slides[34] = new Slide('../Exposition_files/P160a.jpg', '534', '800', '160a. Julianna Joos');
slides[35] = new Slide('../Exposition_files/P160b.jpg', '534', '800', '160b. Julianna Joos');
slides[36] = new Slide('../Exposition_files/P161.jpg', '534', '800', '161. Julianna Joos');
slides[37] = new Slide('../Exposition_files/P162.jpg', '534', '800', '162. Julianna Joos');
slides[38] = new Slide('../Exposition_files/P163.jpg', '534', '800', '163. Julianna Joos');
slides[39] = new Slide('../Exposition_files/P164.jpg', '534', '800', '164. Julianna Joos');
slides[40] = new Slide('../Exposition_files/P151b.jpg', '550', '800', '151a. Myriam Lalumière');
slides[41] = new Slide('../Exposition_files/P151a.jpg', '548', '800', '151b. Myriam Lalumière');
slides[42] = new Slide('../Exposition_files/P133a.jpg', '800', '575', '133a. Hélaine Morency');
slides[43] = new Slide('../Exposition_files/P133b.jpg', '575', '800', '133b. Hélaine Morency');
slides[44] = new Slide('../Exposition_files/P149b.jpg', '800', '686', '149. Martine Julman');
slides[45] = new Slide('../Exposition_files/P167.jpg', '800', '534', '167. Petra Jovanovska');
slides[46] = new Slide('../Exposition_files/P152a.jpg', '534', '800', '152a. Monique Leclerc');
slides[47] = new Slide('../Exposition_files/P152b.jpg', '534', '800', '152b. Monique Leclerc');
slides[48] = new Slide('../Exposition_files/P134a.jpg', '800', '800', '134a. Raymonde Lamothe');
slides[49] = new Slide('../Exposition_files/P134b.jpg', '800', '800', '134b. Raymonde Lamothe');
slides[50] = new Slide('../Exposition_files/P150a.jpg', '600', '800', '150a. Marie-Pier Deslandes');
slides[51] = new Slide('../Exposition_files/P150b.jpg', '600', '800', '150b. Marie-Pier Deslandes');
slides[52] = new Slide('../Exposition_files/P135a.jpg', '712', '800', '135a. Olivier Blot');
slides[53] = new Slide('../Exposition_files/P135b.jpg', '712', '800', '135b. Olivier Blot');
slides[54] = new Slide('../Exposition_files/P153a.jpg', '634', '800', '153a. Marie-Ève Hamel');
slides[55] = new Slide('../Exposition_files/P153b.jpg', '634', '800', '153b. Marie-Ève Hamel');
slides[56] = new Slide('../Exposition_files/P155a.jpg', '641', '801', '155a. Mylène Paquette');
slides[57] = new Slide('../Exposition_files/P155b.jpg', '641', '801', '155b. Mylène Paquette');
slides[58] = new Slide('../Exposition_files/P154a.jpg', '534', '800', '154a. Elma Granic');
slides[59] = new Slide('../Exposition_files/P154b.jpg', '534', '800', '154b. Elma Granic');
slides[60] = new Slide('../Exposition_files/P159a.jpg', '534', '800', '159a. Raymonde Lamothe');
slides[61] = new Slide('../Exposition_files/P159b.jpg', '534', '800', '159b. Raymonde Lamothe');
slides[62] = new Slide('../Exposition_files/P156a.jpg', '641', '801', '156a. Améle Patenaude');
slides[63] = new Slide('../Exposition_files/P156b.jpg', '641', '801', '156b. Amélie Patenaude');
slides[64] = new Slide('../Exposition_files/P157a.jpg', '641', '801', '157a. Sébastien Daudelin');
slides[65] = new Slide('../Exposition_files/P157b.jpg', '641', '801', '157b. Sébastien Daudelin');
slides[66] = new Slide('../Exposition_files/P166a.jpg', '800', '582', '166a. Dalamar');
slides[67] = new Slide('../Exposition_files/P166b.jpg', '800', '582', '166b. Dalamar');
slides[68] = new Slide('../Exposition_files/P168.jpg', '534', '800', '168. Jocelyne Aird-Bélanger');
slides[69] = new Slide('../Exposition_files/P174.jpg', '550', '800', '174. Cynthia Bédard');
slides[70] = new Slide('../Exposition_files/P175a.jpg', '800', '423', '175a. Sylvie Bilodeau');
slides[71] = new Slide('../Exposition_files/P175b.jpg', '800', '423', '175b. Sylvie Bilodeau');
slides[72] = new Slide('../Exposition_files/P120a.jpg', '550', '800', '120a. Monique Handfield');
slides[73] = new Slide('../Exposition_files/P120b.jpg', '550', '800', '120b. Monique Handfield');
slides[74] = new Slide('../Exposition_files/P115a.jpg', '572', '800', '115a. Cloé Troie');
slides[75] = new Slide('../Exposition_files/P115b.jpg', '572', '800', '115b. Cloé Troie');
slides[76] = new Slide('../Exposition_files/P113a.jpg', '534', '800', '113a. Pilar Macias et Claude Pelletier');
slides[77] = new Slide('../Exposition_files/P113b.jpg', '534', '800', '113b. Pilar Macias et Claude Pelletier');
slides[78] = new Slide('../Exposition_files/P106a.jpg', '572', '800', '106a. Cégep de La Pocatière');
slides[79] = new Slide('../Exposition_files/P106b.jpg', '572', '800', '106b. Cégep de La Pocatière');
slides[80] = new Slide('../Exposition_files/P110a.jpg', '800', '582', '110a. Gilles Vallée');
slides[81] = new Slide('../Exposition_files/P110b.jpg', '582', '800', '110b. Gilles Vallée');
slides[82] = new Slide('../Exposition_files/P111a.jpg', '616', '800', '111a. Myriam Déry');
slides[83] = new Slide('../Exposition_files/P111b.jpg', '616', '800', '111b. Myriam Déry');
slides[84] = new Slide('../Exposition_files/P112a.jpg', '437', '800', '112a. Stéphanie Roy');
slides[85] = new Slide('../Exposition_files/P112b.jpg', '437', '800', '112b. Stéphanie Roy');
slides[86] = new Slide('../Exposition_files/P78.jpg', '582', '800', '78. Olivier Blot ');
slides[87] = new Slide('../Exposition_files/P107a.jpg', '534', '800', '107. Gynette Mercier');
slides[88] = new Slide('../Exposition_files/P79a.jpg', '800', '534', '79a. Peter Dowker');
slides[89] = new Slide('../Exposition_files/P79b.jpg', '534', '800', '79b. Peter Dowker');
slides[90] = new Slide('../Exposition_files/P94a.jpg', '534', '800', '94a. Jocelyne Aird-Bélanger');
slides[91] = new Slide('../Exposition_files/P88a.jpg', '582', '800', '88. Gilles Vallée');
slides[92] = new Slide('../Exposition_files/P92a.jpg', '572', '800', '92a. Daniel Gagnon-Barbeau');
slides[93] = new Slide('../Exposition_files/P92b.jpg', '572', '800', '92b. Daniel Gagnon-Barbeau');
slides[94] = new Slide('../Exposition_files/P83a.jpg', '534', '800', '83. Mario Beaudet');
slides[95] = new Slide('../Exposition_files/P82a.jpg', '534', '800', '82. Mario Beaudet');
slides[96] = new Slide('../Exposition_files/P95a.jpg', '572', '800', '95a. Hélaine Morency');
slides[97] = new Slide('../Exposition_files/P95b.jpg', '572', '800', '95b. Hélaine Morency');
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("id4");
    adjustFontSizeIfTooBig("id4");
    adjustLineHeightIfTooBig("id6");
    adjustFontSizeIfTooBig("id6");
    adjustLineHeightIfTooBig("id8");
    adjustFontSizeIfTooBig("id8");
    adjustLineHeightIfTooBig("id10");
    adjustFontSizeIfTooBig("id10");
    adjustLineHeightIfTooBig("id12");
    adjustFontSizeIfTooBig("id12");
    adjustLineHeightIfTooBig("id14");
    adjustFontSizeIfTooBig("id14");
    adjustLineHeightIfTooBig("id16");
    adjustFontSizeIfTooBig("id16");
    adjustLineHeightIfTooBig("id18");
    adjustFontSizeIfTooBig("id18");
    adjustLineHeightIfTooBig("id20");
    adjustFontSizeIfTooBig("id20");
    adjustLineHeightIfTooBig("id21");
    adjustFontSizeIfTooBig("id21");
    adjustLineHeightIfTooBig("id121");
    adjustFontSizeIfTooBig("id121");
    fixupAllIEPNGBGs();
    fixupIEPNG("id1", "Exposition_files/transparent.gif");
    fixupIEPNG("id3", "Exposition_files/transparent.gif");
    fixupIEPNG("id5", "Exposition_files/transparent.gif");
    fixupIEPNG("id7", "Exposition_files/transparent.gif");
    fixupIEPNG("id9", "Exposition_files/transparent.gif");
    fixupIEPNG("id11", "Exposition_files/transparent.gif");
    fixupIEPNG("id13", "Exposition_files/transparent.gif");
    fixupIEPNG("id15", "Exposition_files/transparent.gif");
    fixupIEPNG("id17", "Exposition_files/transparent.gif");
    fixupIEPNG("id19", "Exposition_files/transparent.gif");
    fixupIEPNG("id22", "Exposition_files/transparent.gif");
    fixupIEPNG("id23", "Exposition_files/transparent.gif");
    fixupIEPNG("id24", "Exposition_files/transparent.gif");
    fixupIEPNG("id25", "Exposition_files/transparent.gif");
    fixupIEPNG("id26", "Exposition_files/transparent.gif");
    fixupIEPNG("id27", "Exposition_files/transparent.gif");
    fixupIEPNG("id28", "Exposition_files/transparent.gif");
    fixupIEPNG("id29", "Exposition_files/transparent.gif");
    fixupIEPNG("id30", "Exposition_files/transparent.gif");
    fixupIEPNG("id31", "Exposition_files/transparent.gif");
    fixupIEPNG("id32", "Exposition_files/transparent.gif");
    fixupIEPNG("id33", "Exposition_files/transparent.gif");
    fixupIEPNG("id34", "Exposition_files/transparent.gif");
    fixupIEPNG("id35", "Exposition_files/transparent.gif");
    fixupIEPNG("id36", "Exposition_files/transparent.gif");
    fixupIEPNG("id37", "Exposition_files/transparent.gif");
    fixupIEPNG("id38", "Exposition_files/transparent.gif");
    fixupIEPNG("id39", "Exposition_files/transparent.gif");
    fixupIEPNG("id40", "Exposition_files/transparent.gif");
    fixupIEPNG("id41", "Exposition_files/transparent.gif");
    fixupIEPNG("id42", "Exposition_files/transparent.gif");
    fixupIEPNG("id43", "Exposition_files/transparent.gif");
    fixupIEPNG("id44", "Exposition_files/transparent.gif");
    fixupIEPNG("id45", "Exposition_files/transparent.gif");
    fixupIEPNG("id46", "Exposition_files/transparent.gif");
    fixupIEPNG("id47", "Exposition_files/transparent.gif");
    fixupIEPNG("id48", "Exposition_files/transparent.gif");
    fixupIEPNG("id49", "Exposition_files/transparent.gif");
    fixupIEPNG("id50", "Exposition_files/transparent.gif");
    fixupIEPNG("id51", "Exposition_files/transparent.gif");
    fixupIEPNG("id52", "Exposition_files/transparent.gif");
    fixupIEPNG("id53", "Exposition_files/transparent.gif");
    fixupIEPNG("id54", "Exposition_files/transparent.gif");
    fixupIEPNG("id55", "Exposition_files/transparent.gif");
    fixupIEPNG("id56", "Exposition_files/transparent.gif");
    fixupIEPNG("id57", "Exposition_files/transparent.gif");
    fixupIEPNG("id58", "Exposition_files/transparent.gif");
    fixupIEPNG("id59", "Exposition_files/transparent.gif");
    fixupIEPNG("id60", "Exposition_files/transparent.gif");
    fixupIEPNG("id61", "Exposition_files/transparent.gif");
    fixupIEPNG("id62", "Exposition_files/transparent.gif");
    fixupIEPNG("id63", "Exposition_files/transparent.gif");
    fixupIEPNG("id64", "Exposition_files/transparent.gif");
    fixupIEPNG("id65", "Exposition_files/transparent.gif");
    fixupIEPNG("id66", "Exposition_files/transparent.gif");
    fixupIEPNG("id67", "Exposition_files/transparent.gif");
    fixupIEPNG("id68", "Exposition_files/transparent.gif");
    fixupIEPNG("id69", "Exposition_files/transparent.gif");
    fixupIEPNG("id70", "Exposition_files/transparent.gif");
    fixupIEPNG("id71", "Exposition_files/transparent.gif");
    fixupIEPNG("id72", "Exposition_files/transparent.gif");
    fixupIEPNG("id73", "Exposition_files/transparent.gif");
    fixupIEPNG("id74", "Exposition_files/transparent.gif");
    fixupIEPNG("id75", "Exposition_files/transparent.gif");
    fixupIEPNG("id76", "Exposition_files/transparent.gif");
    fixupIEPNG("id77", "Exposition_files/transparent.gif");
    fixupIEPNG("id78", "Exposition_files/transparent.gif");
    fixupIEPNG("id79", "Exposition_files/transparent.gif");
    fixupIEPNG("id80", "Exposition_files/transparent.gif");
    fixupIEPNG("id81", "Exposition_files/transparent.gif");
    fixupIEPNG("id82", "Exposition_files/transparent.gif");
    fixupIEPNG("id83", "Exposition_files/transparent.gif");
    fixupIEPNG("id84", "Exposition_files/transparent.gif");
    fixupIEPNG("id85", "Exposition_files/transparent.gif");
    fixupIEPNG("id86", "Exposition_files/transparent.gif");
    fixupIEPNG("id87", "Exposition_files/transparent.gif");
    fixupIEPNG("id88", "Exposition_files/transparent.gif");
    fixupIEPNG("id89", "Exposition_files/transparent.gif");
    fixupIEPNG("id90", "Exposition_files/transparent.gif");
    fixupIEPNG("id91", "Exposition_files/transparent.gif");
    fixupIEPNG("id92", "Exposition_files/transparent.gif");
    fixupIEPNG("id93", "Exposition_files/transparent.gif");
    fixupIEPNG("id94", "Exposition_files/transparent.gif");
    fixupIEPNG("id95", "Exposition_files/transparent.gif");
    fixupIEPNG("id96", "Exposition_files/transparent.gif");
    fixupIEPNG("id97", "Exposition_files/transparent.gif");
    fixupIEPNG("id98", "Exposition_files/transparent.gif");
    fixupIEPNG("id99", "Exposition_files/transparent.gif");
    fixupIEPNG("id100", "Exposition_files/transparent.gif");
    fixupIEPNG("id101", "Exposition_files/transparent.gif");
    fixupIEPNG("id102", "Exposition_files/transparent.gif");
    fixupIEPNG("id103", "Exposition_files/transparent.gif");
    fixupIEPNG("id104", "Exposition_files/transparent.gif");
    fixupIEPNG("id105", "Exposition_files/transparent.gif");
    fixupIEPNG("id106", "Exposition_files/transparent.gif");
    fixupIEPNG("id107", "Exposition_files/transparent.gif");
    fixupIEPNG("id108", "Exposition_files/transparent.gif");
    fixupIEPNG("id109", "Exposition_files/transparent.gif");
    fixupIEPNG("id110", "Exposition_files/transparent.gif");
    fixupIEPNG("id111", "Exposition_files/transparent.gif");
    fixupIEPNG("id112", "Exposition_files/transparent.gif");
    fixupIEPNG("id113", "Exposition_files/transparent.gif");
    fixupIEPNG("id114", "Exposition_files/transparent.gif");
    fixupIEPNG("id115", "Exposition_files/transparent.gif");
    fixupIEPNG("id116", "Exposition_files/transparent.gif");
    fixupIEPNG("id117", "Exposition_files/transparent.gif");
    fixupIEPNG("id118", "Exposition_files/transparent.gif");
    fixupIEPNG("id119", "Exposition_files/transparent.gif");
    fixupIEPNG("id120", "Exposition_files/transparent.gif");
    fixupIEPNG("id122", "Exposition_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;
    }
}

