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/distillationprocess.jpg', '303', '427', 'Old diagram in a french distillery shows the distillation process');
slides[1] = new Slide('../Photos_files/enfleurage1.jpg', '297', '427', 'Display in Grasse shows enfleurage process');
slides[2] = new Slide('../Photos_files/enfleurage2.jpg', '294', '427', 'Display in Grasse shows enfleurage process');
slides[3] = new Slide('../Photos_files/enfleurgage3.jpg', '295', '430', 'Display in Grasse shows enfleurage process');
slides[4] = new Slide('../Photos_files/galimardstills.jpg', '512', '768', 'Distillation display at Galimard, Grasse');
slides[5] = new Slide('../Photos_files/galimardlabsm.jpg', '256', '384', 'Labs at Galimard, Grasse');
slides[6] = new Slide('../Photos_files/stillsinfrance.jpg', '291', '216', 'stillsinfrance');
slides[7] = new Slide('../Photos_files/oldoilpostcards.jpg', '416', '292', 'Collage of old oil labels');
slides[8] = new Slide('../Photos_files/lillalavender.jpg', '536', '800', 'Lilla Lavender Farm in Oregon');
slides[9] = new Slide('../Photos_files/lillalvander3.jpg', '536', '800', 'Three year old plants at Lilla Lavender');
slides[10] = new Slide('../Photos_files/lavender.jpg', '600', '800', 'One year old lavender plant at Lilla Lavender Farm');
slides[11] = new Slide('../Photos_files/Photo 8 of 37.jpg', '534', '800', 'U-Pick at Lilla Lavender');
slides[12] = new Slide('../Photos_files/Photo 10 of 37.jpg', '800', '534', 'Lavender field in Oregon');
slides[13] = new Slide('../Photos_files/P7170006.jpg', '600', '800', 'Our first bunches at Sherwood Lavender');
slides[14] = new Slide('../Photos_files/P7190001.jpg', '600', '800', 'Mountainside Lavender');
slides[15] = new Slide('../Photos_files/P7190002.jpg', '600', '800', 'One year old plants at Mountainside Lavender');
slides[16] = new Slide('../Photos_files/mountainside lavender farm.jpg', '600', '800', 'Mountainside Lavender Farm');
slides[17] = new Slide('../Photos_files/P4160022.jpg', '800', '600', 'Parking strip planted with lavandin for distillation at ACHS workshops');
slides[18] = new Slide('../Photos_files/P4160025.jpg', '600', '800', 'The fountain, set among flagstone pavers, attracts birds, butterflies, and visitors to the garden on hot summer days');
slides[19] = new Slide('../Photos_files/P4160029.jpg', '800', '600', 'The lavandin doesn’t care for this much bark mulch, we later have to pull away the mulch from the plants');
slides[20] = new Slide('../Photos_files/P1010051.jpg', '600', '800', 'Spanish lavender Lavandula stoechas does well in the terracotta pots');
slides[21] = new Slide('../Photos_files/lavender 6.jpg', '800', '600', 'lavender 6');
slides[22] = new Slide('../Photos_files/lavender 2.jpg', '800', '600', 'lavender 2');
slides[23] = new Slide('../Photos_files/Distillary France.jpg', '572', '800', 'Distillery France');
slides[24] = new Slide('../Photos_files/eoandhydrosolseperatorrobertoil1.jpg', '480', '640', 'Essential oil and hydrosol being separated');
slides[25] = new Slide('../Photos_files/hydrosolrobertoil2.jpg', '500', '375', 'Hydrosol coming from the separator');
slides[26] = new Slide('../Photos_files/DSCF1672.jpg', '600', '800', 'Robert and sophia with still at Mountainside Lavender');
slides[27] = new Slide('../Photos_files/DSCF1674.jpg', '800', '600', 'Mountainside Lavender');
slides[28] = new Slide('../Photos_files/DSCF1678.jpg', '800', '600', 'Mountainside Lavender');
slides[29] = new Slide('../Photos_files/DSCF1679.jpg', '800', '600', 'Mountainside Lavender');
slides[30] = new Slide('../Photos_files/DSCF1680.jpg', '600', '800', 'Mountainside Lavender');
slides[31] = new Slide('../Photos_files/lavender_1.jpg', '534', '800', 'Bunches of Lavender in Provence');
slides[32] = new Slide('../Photos_files/lavender-6web.jpg', '576', '432', 'Neat rows of lavender ');
slides[33] = new Slide('../Photos_files/Lavadin.jpg', '600', '800', 'Lavandin');
slides[34] = new Slide('../Photos_files/lavenderstoreyigzaw.jpg', '534', '800', 'A delightful lavender store in Provence');
slides[35] = new Slide('../Photos_files/Lavendar.jpg', '600', '800', 'Lavender');
slides[36] = new Slide('../Photos_files/lavendar bloom.jpg', '600', '800', 'Lavender flower');
slides[37] = new Slide('../Photos_files/Lavandin Blooms.jpg', '600', '800', 'Lavandin Blooms');
slides[38] = new Slide('../Photos_files/DSCF2681.jpg', '600', '800', 'Hood River Lavender, Oregon');
slides[39] = new Slide('../Photos_files/DSCF2687.jpg', '600', '800', 'Distillation Equipment from Robert Seidel');
slides[40] = new Slide('../Photos_files/DSCF2688.jpg', '600', '800', 'A young plant beside a copper still');
slides[41] = new Slide('../Photos_files/DSCF2692.jpg', '600', '800', 'Sophia, Dorene, and Erika at Hood River Lavender Blooms and Butterflies festival');
slides[42] = new Slide('../Photos_files/DSCF2698.jpg', '800', '600', 'Hood River Lavender');
slides[43] = new Slide('../Photos_files/DSCF2705.jpg', '600', '800', 'Its Organic, so you can eat it!');
slides[44] = new Slide('../Photos_files/DSCF2709.jpg', '800', '600', 'Its fun for all generations!');
slides[45] = new Slide('../Photos_files/DSCF2710.jpg', '600', '800', 'Sophia and Dorene harvest at Hood River Lavender');
slides[46] = new Slide('../Photos_files/DSCF2711.jpg', '800', '600', 'Kids LOVE picking lavender! Sophia at Hood River Lavender');
slides[47] = new Slide('../Photos_files/DSCF2712.jpg', '800', '600', 'Look Mom! I\u0027ve my own bunch! Sophia at Hood River Lavender');
slides[48] = new Slide('../Photos_files/DSCF2713.jpg', '600', '800', 'This stuff is so relaxing, you have to be careful not to fall asleep in the sun!');
slides[49] = new Slide('../Photos_files/DSCF2715.jpg', '600', '800', 'Sophia picks more at Hood River Lavender');
slides[50] = new Slide('../Photos_files/DSCF2717.jpg', '600', '800', 'The seperator in action (that is hydrosol spilling!)');
slides[51] = new Slide('../Photos_files/DSCF2718.jpg', '600', '800', 'testing the oil and hydrolat mixture in seperator');
slides[52] = new Slide('../Photos_files/DSCF2719.jpg', '600', '800', 'Sophia gets a lesson from Robert Seidel, the Guerilla Distiller!');
slides[53] = new Slide('../Photos_files/DSCF2735.jpg', '600', '800', 'What a view! Hood River Lavender with Mt Hood in the background');
slides[54] = new Slide('../Photos_files/DSCF2736.jpg', '600', '800', 'Isn\u0027t this the nicest verge you have ever seen! Hood River Lavender');
slides[55] = new Slide('../Photos_files/DSCF2769.jpg', '600', '800', 'Robert Seidel, the Guerilla Distiller, in action');
slides[56] = new Slide('../Photos_files/DSCF2770.jpg', '800', '600', 'Theo looks on, learning the art of distillation');
slides[57] = new Slide('../Photos_files/DSCF2773.jpg', '800', '600', 'A large pile of lavender waits for the still at Mountainside Lavender');
slides[58] = new Slide('../Photos_files/DSCF2775.jpg', '800', '600', 'Dorene keeps an eye on the process');
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("id7");
    adjustFontSizeIfTooBig("id7");
    adjustLineHeightIfTooBig("id9");
    adjustFontSizeIfTooBig("id9");
    fixupIEPNG("id1", "Photos_files/transparent.gif");
    fixupIEPNG("id3", "Photos_files/transparent.gif");
    fixupAllIEPNGBGs();
    fixupIEPNG("id4", "Photos_files/transparent.gif");
    fixupIEPNG("id5", "Photos_files/transparent.gif");
    fixupIEPNG("id6", "Photos_files/transparent.gif");
    fixupIEPNG("id8", "Photos_files/transparent.gif");
    fixupIEPNG("id10", "Photos_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;
    }
}


