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('../Aquarelles_files/DSC_0203.jpg', '540', '800', '1- Pont Saint-Jean\n(Bayeux)\n(470x545)\nvendu');
slides[1] = new Slide('../Aquarelles_files/DSC_0217.jpg', '800', '535', '2- Venise\n(500x400)\n400€');
slides[2] = new Slide('../Aquarelles_files/DSC_0214.jpg', '560', '800', '3- Quai d’Honfleur\n(570x720)\nvendu');
slides[3] = new Slide('../Aquarelles_files/DSC_0100.jpg', '800', '503', '4- Colmar\n(550x400)\n350 €');
slides[4] = new Slide('../Aquarelles_files/DSC_0101.jpg', '522', '800', '5- Fervaques\n(440x540)\nvendu');
slides[5] = new Slide('../Aquarelles_files/DSC_0102.jpg', '800', '532', '6- Bidon à lait\n(555x440)\ncollection personnelle');
slides[6] = new Slide('../Aquarelles_files/DSC_0174.jpg', '536', '800', '7- Grenouille\n(Costa Rica)\n(320x400)\nnon disponible');
slides[7] = new Slide('../Aquarelles_files/DSC_0001.jpg', '800', '595', '8- St Goustan\n(510x420)\n200 €');
slides[8] = new Slide('../Aquarelles_files/DSC_0013.jpg', '532', '800', '9- Honfleur\n(740x960)\nvendu');
slides[9] = new Slide('../Aquarelles_files/DSC_0013_1.jpg', '800', '576', '10- Venise\n(620x495)\nvendu');
slides[10] = new Slide('../Aquarelles_files/DSC_0004.jpg', '532', '800', '11- Neige sur l’Ariège\n(420x540)\n250 €');
slides[11] = new Slide('../Aquarelles_files/DSC_0003.jpg', '800', '599', '12- Bruges\n(530x445)\ncollection personnelle');
slides[12] = new Slide('../Aquarelles_files/DSC_0012.jpg', '544', '800', '13- Fenêtre Toscane\n(305x370)\ncollection personnelle');
slides[13] = new Slide('../Aquarelles_files/DSC_0002.jpg', '801', '642', '14- Bouquet champêtre\n(390x330)\nnon disponible\n');
slides[14] = new Slide('../Aquarelles_files/DSC_0011.jpg', '556', '800', '15- Venise\n(570x720)\nnon disponible');
slides[15] = new Slide('../Aquarelles_files/DSC_0008.jpg', '635', '800', '16- Prague\n(355x410)\nvendu');
slides[16] = new Slide('../Aquarelles_files/DSC_0003_1.jpg', '538', '801', '17- St Cado\n(270x350)\nnon disponible');
slides[17] = new Slide('../Aquarelles_files/DSC_0001_1.jpg', '514', '800', '18- Moulin à marée\n(350x445)\nnon disponible');
slides[18] = new Slide('../Aquarelles_files/DSC_0073.jpg', '532', '800', '19- L’épave\n(455x600)\n250 €');
slides[19] = new Slide('../Aquarelles_files/DSC_0002_1.jpg', '800', '526', '20- Port en Bessin\n(400x300)\nnon disponible');
slides[20] = new Slide('../Aquarelles_files/DSC_0001_2.jpg', '538', '801', '21- Église St Cado\n(300x400)\nvendu');
slides[21] = new Slide('../Aquarelles_files/DSC_0025.jpg', '532', '800', '22- Venise\n(380x450)\nnon diponible');
slides[22] = new Slide('../Aquarelles_files/DSC_0026.jpg', '532', '800', '23- Hivers sur Moisallou\n(500x650)\n450 €');
slides[23] = new Slide('../Aquarelles_files/DSC_0060.jpg', '532', '800', '24-Academia\n(360x460)\n450 €');
slides[24] = new Slide('../Aquarelles_files/DSC_0061.jpg', '800', '552', '25- Pont-audemer\n(550x450)\nvendu');
slides[25] = new Slide('../Aquarelles_files/DSC_0063.jpg', '532', '800', '26- Château de Vincennes\n(470x530)\n280 €');
slides[26] = new Slide('../Aquarelles_files/DSC_0004_1.jpg', '592', '800', '27- Cimetière Marin\n(390x490)\nvendu');
slides[27] = new Slide('../Aquarelles_files/DSC_0315.jpg', '532', '800', '28- Le poulailler\n(430x510)\n250 €');
slides[28] = new Slide('../Aquarelles_files/DSC_0070.jpg', '800', '532', '29- San Sylvestro\n(520x425)\nvendu');
slides[29] = new Slide('../Aquarelles_files/DSC_0359.jpg', '532', '800', '30- Soir sur le golfe\n(430x530)\nvendu');
slides[30] = new Slide('../Aquarelles_files/DSC_0358.jpg', '532', '800', '31- Bruges\n(450x560)\n650 €');
slides[31] = new Slide('../Aquarelles_files/DSC_0319.jpg', '532', '800', '32- Venise\n(560x720)\n900 €');
slides[32] = new Slide('../Aquarelles_files/DSC_0499.jpg', '532', '800', '33- Bruges sous la neige\n(450x460)\nvendu');
slides[33] = new Slide('../Aquarelles_files/DSC_0502.jpg', '532', '800', '34- Printemps normand\n(480x590)\n350 €');
slides[34] = new Slide('../Aquarelles_files/st pierre.jpg', '534', '801', '35- Saint pierre\n(560x710)\nvendu');
slides[35] = new Slide('../Aquarelles_files/VIEILLES BOUTEILLES.jpg', '534', '800', '36- Vieilles bouteilles\n(560x710)\nnon disponible');
slides[36] = new Slide('../Aquarelles_files/Gondoles.jpg', '534', '800', '37- Gondoles\n(560x710)\nvendu');
slides[37] = new Slide('../Aquarelles_files/eglise de triel.jpg', '532', '800', '38- Eglise de Triel\n(450x600)\nvendu');
slides[38] = new Slide('../Aquarelles_files/Pont Neuf.jpg', '575', '800', '39- Pont Neuf\n(760x960)\n1 800 €');
slides[39] = new Slide('../Aquarelles_files/Mont St Michel.jpg', '583', '800', '40- Mont St Michel\n(770x960)\n1 800 €');
slides[40] = new Slide('../Aquarelles_files/dam.jpg', '532', '800', '41- Dam\n(550x700)\nnon disponible');
slides[41] = new Slide('../Aquarelles_files/Chevaux.jpg', '558', '800', '42- Course de chevaux\n(550x750)\n600 €');
slides[42] = new Slide('../Aquarelles_files/honfleur.jpg', '532', '800', '43- Honfleur\n(520x670)\nvendu');
slides[43] = new Slide('../Aquarelles_files/venise.jpg', '800', '554', '44- Venise\n(650x550)\nvendu');
slides[44] = new Slide('../Aquarelles_files/carteret.jpg', '532', '800', '45- Carteret\n(570x620)\n300 €');
slides[45] = new Slide('../Aquarelles_files/DSC_0043.jpg', '517', '800', '46- Golfe du Morbihan\n(580x780)\n250 €\n');
slides[46] = new Slide('../Aquarelles_files/DSC_0007.jpg', '800', '532', '47- Venise \n(620 x 520)\n400 €');
slides[47] = new Slide('../Aquarelles_files/DSC_0005.jpg', '522', '800', '48- Grand Canal\n750x940\n1 800 €');
slides[48] = new Slide('../Aquarelles_files/DSC_0009.jpg', '517', '800', '49- L’Académie Française\n520 x 670\n450 €');
slides[49] = new Slide('../Aquarelles_files/DSC_0074.jpg', '532', '800', '50- Le Grand Palais\n560 x 670\n1 000 €');
slides[50] = new Slide('../Aquarelles_files/DSC_0078.jpg', '532', '800', '51- Les toits de Bonnieux\n440 x580\n450 €');
slides[51] = new Slide('../Aquarelles_files/DSC_1227.jpg', '800', '571', '52- Bruges dans la brume\n800 x 490\n300 €');
slides[52] = new Slide('../Aquarelles_files/DSC_0167.jpg', '542', '800', '53- Saint Julien le Pauvre\n510 x 640\n600 €\n');
slides[53] = new Slide('../Aquarelles_files/DSC_0127.jpg', '800', '532', '54- Venise\n620 x 510\n500 €');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

var MINIMUM_FONT = "10";
var UNITS = "";

function elementFontSize(element)
{
    var fontSize = MINIMUM_FONT; 

    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            fontSize = computedStyle.getPropertyValue("font-size");
        }
    }
    else if (element.currentStyle)
    {
        fontSize = element.currentStyle.fontSize;
    }

    if ((UNITS.length == 0) && (fontSize != MINIMUM_FONT))
    {
        UNITS = fontSize.substring(fontSize.length - 2, fontSize.length)
    }

    return parseFloat(fontSize);
}

function adjustFontSizeIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var smallestFontSize = 200;
                    
                    var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                    var oneLine = false;
                    for (i = 0; i < aParaChildren.length; i++)
                    {
                        var oParagraphDiv = aParaChildren[i];
                        var lineHeight = elementLineHeight(oParagraphDiv);
                        oneLine = oneLine || (lineHeight * 1.5 >= specifiedHeight);
                        if (oParagraphDiv.nodeName == "DIV")
                        {
                            var fontSize = elementFontSize(oParagraphDiv);
                            smallestFontSize = Math.min( smallestFontSize, fontSize );
                            for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                            {
                                var oSpan = oParagraphDiv.childNodes[j];
                                if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                {
                                    fontSize = elementFontSize(oSpan);
                                    smallestFontSize = Math.min( smallestFontSize, fontSize );
                                }
                            }
                        }
                    }
                    var minimum = parseFloat(MINIMUM_FONT);
                    
                    var count = 0
                    while ((smallestFontSize > minimum) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        ++ count;
                        if (oneLine)
                        {
                            var oldWidth = parseInt(oTextBoxOuterDiv.style.width);
                            oTextBoxInnerDiv.style.width =
                                "" + oldWidth * Math.pow(1.05, count) + "px";
                        }
                        else
                        {
                            var scale = Math.max(0.95, minimum / smallestFontSize);
                            
                            for (i = 0; i < aParaChildren.length; i++)
                            {
                                var oParagraphDiv = aParaChildren[i];
                                if (oParagraphDiv.nodeName == "DIV")
                                {
                                    var paraFontSize = elementFontSize(oParagraphDiv) * scale;
                                    var paraLineHeight = elementLineHeight(oParagraphDiv) * scale;
                                    for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                    {
                                        var oSpan = oParagraphDiv.childNodes[j];
                                        if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                        {
                                            var spanFontSize = elementFontSize(oSpan) * scale;
                                            var spanLineHeight = elementLineHeight(oSpan) * scale;
                                            oSpan.style.fontSize = spanFontSize + UNITS;
                                            oSpan.style.lineHeight = spanLineHeight + UNITS;
                                            smallestFontSize = Math.min( smallestFontSize, spanFontSize );
                                        }
                                    }
                                    oParagraphDiv.style.fontSize = paraFontSize + UNITS;
                                    oParagraphDiv.style.lineHeight = paraLineHeight + UNITS;
                                    smallestFontSize = Math.min( smallestFontSize, paraFontSize );
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}


function elementLineHeight(element)
{
    var lineHeight = MINIMUM_FONT; 
    
    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            lineHeight = computedStyle.getPropertyValue("line-height");
        }
    }
    else if (element.currentStyle)
    {
        lineHeight = element.currentStyle.lineHeight;
    }
    
    if ((UNITS.length == 0) && (lineHeight != MINIMUM_FONT))
    {
        UNITS = lineHeight.substring(lineHeight.length - 2, lineHeight.length)
    }
    
    return parseFloat(lineHeight);
}

function adjustLineHeightIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var adjusted = true;
                    var count = 0;
                    while ((adjusted) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        adjusted = false;
                        ++ count;
                        
                        var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                        for (i = 0; i < aParaChildren.length; i++)
                        {
                            var oParagraphDiv = aParaChildren[i];
                            if (oParagraphDiv.nodeName == "DIV")
                            {
                                var fontSize = elementFontSize(oParagraphDiv);
                                var lineHeight = elementLineHeight(oParagraphDiv) * 0.95;
                                if (lineHeight >= (fontSize * 1.1))
                                {
                                    oParagraphDiv.style.lineHeight = lineHeight + UNITS;
                                    adjusted = true;
                                }
                                
                                
                                
                                for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                {
                                    var oSpan = oParagraphDiv.childNodes[j];
                                    if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                    {
                                        var fontSize = elementFontSize(oSpan);
                                        var lineHeight = elementLineHeight(oSpan) * 0.95;
                                        if (lineHeight >= (fontSize * 1.1))
                                        {
                                            oSpan.style.lineHeight = lineHeight + UNITS;
                                            var adjusted = true;
                                        }
                                    }
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}

var smallTransparentGif = "";
function fixupIEPNG(strImageID, transparentGif) 
{
    smallTransparentGif = transparentGif;
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        var img = document.getElementById(strImageID);
        if (img)
        {
            var src = img.src;
            img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
            img.src = transparentGif;
            img.attachEvent("onpropertychange", imgPropertyChanged);
        }
    }
}

function fixupIEPNGBG(oBlock) 
{
    if (oBlock)
    {
        var currentBGImage = oBlock.currentStyle.backgroundImage;
        var currentBGRepeat = oBlock.currentStyle.backgroundRepeat;
        var urlStart = currentBGImage.indexOf('url(');
        var urlEnd = currentBGImage.indexOf(')', urlStart);
        var imageURL = currentBGImage.substring(urlStart + 4, urlEnd);

        if (imageURL.charAt(0) == '"')
        {
            imageURL = imageURL.substring(1);
        }
        
        if (imageURL.charAt(imageURL.length - 1) == '"')
        {
            imageURL = imageURL.substring(0, imageURL.length - 1);
        }

        var overrideRepeat = false;

        var filterStyle =
            "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
            imageURL +
            "', sizingMethod='crop');";

        if (RegExp("/C[0-9A-F]{8}.png$").exec(imageURL) != null)
        {
            filterStyle =
                "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                imageURL +
                "', sizingMethod='scale');";

            overrideRepeat = true;
        }

        var backgroundImage = new Image();
        backgroundImage.src = imageURL;
        var tileWidth = backgroundImage.width;
        var tileHeight = backgroundImage.height; 
        
        var blockWidth = 0;
        var blockHeight = 0;
        if (oBlock.style.width)
        {
            blockWidth = parseInt(oBlock.style.width);
        }
        else
        {
            blockWidth = oBlock.offsetWidth;
        }
        if (oBlock.style.height)
        {
            blockHeight = parseInt(oBlock.style.height);
        }
        else
        {
            blockHeight = oBlock.offsetHeight;
        }

        if ((blockWidth == 0) || (blockHeight == 0))
        {
            return;
        }
        
        var wholeRows = 1;
        var wholeCols = 1;
        var extraHeight = 0;
        var extraWidth = 0;
        
        if ((currentBGRepeat.indexOf("no-repeat") != -1) ||
              ((tileWidth == 0) && (tileHeight == 0)) ||
              overrideRepeat)
        {
            tileWidth = blockWidth;
            tileHeight = blockHeight;

        }
        else if ((currentBGRepeat.indexOf("repeat-x") != -1) ||
              (tileHeight == 0))
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            tileHeight = blockHeight;

        }
        else if (currentBGRepeat.indexOf("repeat-y") != -1)
        {
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraHeight = blockHeight - (tileHeight * wholeRows);
            tileWidth = blockWidth;

        }
        else
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            extraHeight = blockHeight - (tileHeight * wholeRows);
        }
        
        var wrappedContent = document.createElement("div");
        wrappedContent.style.position = "relative";
        wrappedContent.style.zIndex = "1";
        wrappedContent.style.left = "0px";
        wrappedContent.style.top = "0px";
        if (!isNaN(parseInt(oBlock.style.width)))
        {
            wrappedContent.style.width = "" + blockWidth + "px";
        }
        if (!isNaN(parseInt(oBlock.style.height)))
        {
            wrappedContent.style.height = "" + blockHeight + "px";
        }
        var pngBGFixIsWrappedContentEmpty = true;
        while (oBlock.hasChildNodes())
        {
            if (oBlock.firstChild.nodeType == 3)
            {
                if (RegExp("^ *$").exec(oBlock.firstChild.data) == null)
                {
                    pngBGFixIsWrappedContentEmpty = false;
                }
            }
            else
            {
                pngBGFixIsWrappedContentEmpty = false;
            }
            wrappedContent.appendChild(oBlock.firstChild);
        }
        if (pngBGFixIsWrappedContentEmpty)
        {
            wrappedContent.style.lineHeight = "0px";
        }
        
        var newMarkup = "";
        for (var currentRow = 0; 
             currentRow < wholeRows; 
             currentRow++)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        
        if (extraHeight != 0)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        oBlock.innerHTML = newMarkup;

        oBlock.appendChild(wrappedContent);
        oBlock.style.background= "";
    }
}

function fixupAllIEPNGBGs()
{
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        try
        {
            var oDivNodes = document.getElementsByTagName('DIV');
            for (var iIndex=0; iIndex<oDivNodes.length; iIndex++)
            {
                var oNode = oDivNodes.item(iIndex);
                if (oNode.currentStyle &&
                    oNode.currentStyle.backgroundImage &&
                    (oNode.currentStyle.backgroundImage.indexOf('url(') != -1) &&
                    (oNode.currentStyle.backgroundImage.indexOf('.png")') != -1))
                {
                    fixupIEPNGBG(oNode);
                }
            }
        }
        catch (e)
        {
        }
    }
}

function getChildOfType(oParent, sNodeName, requestedIndex)
{
    var childrenOfType = oParent.getElementsByTagName(sNodeName);
    return (requestedIndex < childrenOfType.length) ?
           childrenOfType.item(requestedIndex) : null;
}

function getParaDescendants(oAncestor)
{
    var oParaDescendants = new Array();
    var oPotentialParagraphs = oAncestor.getElementsByTagName('DIV');
    for (var iIndex=0; iIndex<oPotentialParagraphs.length; iIndex++)
    {
        var oNode = oPotentialParagraphs.item(iIndex);
        if (oNode.className.lastIndexOf('paragraph') != -1)
        {
            oParaDescendants.push(oNode);
        }
    }
    return oParaDescendants;
}

function onPageLoad()
{
    detectBrowser();
    adjustLineHeightIfTooBig("id1");
    adjustFontSizeIfTooBig("id1");
    adjustLineHeightIfTooBig("id57");
    adjustFontSizeIfTooBig("id57");
    fixupAllIEPNGBGs();
    fixupIEPNG("id2", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id3", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id4", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id5", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id6", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id7", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id8", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id9", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id10", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id11", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id12", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id13", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id14", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id15", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id16", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id17", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id18", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id19", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id20", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id21", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id22", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id23", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id24", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id25", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id26", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id27", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id28", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id29", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id30", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id31", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id32", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id33", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id34", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id35", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id36", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id37", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id38", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id39", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id40", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id41", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id42", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id43", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id44", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id45", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id46", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id47", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id48", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id49", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id50", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id51", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id52", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id53", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id54", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id55", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id56", "Aquarelles_files/transparent.gif");
    fixupIEPNG("id58", "Aquarelles_files/transparent.gif");
    return true;
}

function NBmouseover(index)
{
    var normal = document.getElementById("navbar_"+index+"_normal");
    var rollover = document.getElementById("navbar_"+index+"_rollover");
    if (normal && rollover)
    {
        normal.style.visibility = "hidden";
        rollover.style.visibility = "visible";
    }
    return true;
}

function NBmouseout(index)
{
    var normal = document.getElementById("navbar_"+index+"_normal");
    var rollover = document.getElementById("navbar_"+index+"_rollover");
    if (normal && rollover)
    {
        normal.style.visibility = "visible";
        rollover.style.visibility = "hidden";
    }
    return true;
}

var windowsInternetExplorer = false;
var browserVersion = 0;
function detectBrowser()
{
    windowsInternetExplorer = false;
    var appVersion = navigator.appVersion;
    if ((appVersion.indexOf("MSIE") != -1) &&
        (appVersion.indexOf("Macintosh") == -1))
    {
        var temp = appVersion.split("MSIE");
        browserVersion = parseFloat(temp[1]);
        windowsInternetExplorer = true;
    }
}

var inImgPropertyChanged = false;
function imgPropertyChanged()
{
    if ((window.event.propertyName == "src") && (! inImgPropertyChanged))
    {
        inImgPropertyChanged = true;
        var el = window.event.srcElement;
        if (el.src != smallTransparentGif)
        {
            el.filters.item(0).src = el.src;
            el.src = smallTransparentGif;
        }
        inImgPropertyChanged = false;
    }
}


