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('../Christmas06_files/CIMG0159.jpg', '600', '800', 'Xavi & Bompa with the boat');
slides[1] = new Slide('../Christmas06_files/CIMG0180.jpg', '600', '800', 'Xavi prepares for gift opening on Christmas eve');
slides[2] = new Slide('../Christmas06_files/CIMG0183.jpg', '800', '600', 'Anouk & her Tante Tracy have a little girl time');
slides[3] = new Slide('../Christmas06_files/CIMG0166.jpg', '800', '600', 'Christmas arrives with a yelp!');
slides[4] = new Slide('../Christmas06_files/CIMG0167.jpg', '600', '800', 'Testing out the new toys');
slides[5] = new Slide('../Christmas06_files/CIMG0175.jpg', '600', '800', 'Anouk & Bomma share story time');
slides[6] = new Slide('../Christmas06_files/CIMG0173.jpg', '600', '800', 'Xavi plays a little tune');
slides[7] = new Slide('../Christmas06_files/CIMG0175_2.jpg', '600', '800', 'Bomman & Anouk have a little reading time');
slides[8] = new Slide('../Christmas06_files/CIMG0176.jpg', '600', '800', 'A successful Christmas!');
slides[9] = new Slide('../Christmas06_files/CIMG0189.jpg', '600', '800', 'Christmas morning');
slides[10] = new Slide('../Christmas06_files/CIMG0192.jpg', '600', '800', 'Ready for breakfast');
slides[11] = new Slide('../Christmas06_files/CIMG0194.jpg', '800', '600', 'Xavi shows off his big belly AFTER breakfast');
slides[12] = new Slide('../Christmas06_files/CIMG0208.jpg', '600', '800', 'Smiling in front of the Christmas tree');
slides[13] = new Slide('../Christmas06_files/CIMG0225.jpg', '600', '800', 'Karin and Tracy have their photo taken by one of the girls');
slides[14] = new Slide('../Christmas06_files/CIMG0226.jpg', '600', '800', 'Tom and his new, LOVELY, girlfriend');
slides[15] = new Slide('../Christmas06_files/CIMG0227.jpg', '600', '800', 'Anouk acts smug at Christmas dinner');
slides[16] = new Slide('../Christmas06_files/CIMG0240.jpg', '600', '800', 'Mama and Xavier smile before dessert hits the table');
slides[17] = new Slide('../Christmas06_files/CIMG0255.jpg', '600', '800', 'Bath time!');
slides[18] = new Slide('../Christmas06_files/CIMG0266.jpg', '600', '800', 'Fun, fun, fun');
slides[19] = new Slide('../Christmas06_files/CIMG0242.jpg', '600', '800', 'Playing around with Bompa');
slides[20] = new Slide('../Christmas06_files/CIMG0245.jpg', '800', '600', 'Hugging time');
slides[21] = new Slide('../Christmas06_files/CIMG0247.jpg', '800', '600', 'Anouk and Tracy have another moment together');
slides[22] = new Slide('../Christmas06_files/CIMG0249.jpg', '600', '800', 'Then Anouk and Mama have  a moment');
slides[23] = new Slide('../Christmas06_files/CIMG0250.jpg', '600', '800', 'And last, but not least... Anouk and Bomma share a cuddle');
slides[24] = new Slide('../Christmas06_files/CIMG0271.jpg', '600', '800', 'Wishing they could ALWAYS act like this');
slides[25] = new Slide('../Christmas06_files/CIMG0273.jpg', '600', '800', 'Leona’s friend (and neighbor), Emmy, join us for the evening');
slides[26] = new Slide('../Christmas06_files/CIMG0275.jpg', '600', '800', 'peace is possible');
slides[27] = new Slide('../Christmas06_files/CIMG0280.jpg', '800', '600', 'Tracy and Emmy');
slides[28] = new Slide('../Christmas06_files/CIMG0281.jpg', '600', '800', 'The ladies:\nTracy, Emmy, me, Leona');
slides[29] = new Slide('../Christmas06_files/CIMG0283.jpg', '600', '800', 'friends forever');
slides[30] = new Slide('../Christmas06_files/CIMG0284.jpg', '600', '800', '“Bompa” Bobby, Emmy, “Bomma” Leona, and Stan');
slides[31] = new Slide('../Christmas06_files/CIMG0286.jpg', '600', '800', 'the gang');
slides[32] = new Slide('../Christmas06_files/CIMG0287.jpg', '600', '800', 'trying on Bomma’s glasses');
slides[33] = new Slide('../Christmas06_files/CIMG0289.jpg', '600', '800', 'cute');
slides[34] = new Slide('../Christmas06_files/CIMG0295.jpg', '600', '800', 'visiting with Bart, Sigried, and new baby Dries');
slides[35] = new Slide('../Christmas06_files/CIMG0298.jpg', '800', '600', 'Bart and Xavi get cozy');
slides[36] = new Slide('../Christmas06_files/CIMG0303.jpg', '600', '800', 'Kris looks like he would have enjoyed having a boy');
slides[37] = new Slide('../Christmas06_files/CIMG0309.jpg', '600', '800', 'The kids: Kaat (holding Anouk), Heleen, and Xavier');
slides[38] = new Slide('../Christmas06_files/CIMG0310.jpg', '600', '800', 'Xavi and his cousin');
slides[39] = new Slide('../Christmas06_files/CIMG0311.jpg', '600', '800', 'Anouk and her #1 babysitter');
slides[40] = new Slide('../Christmas06_files/CIMG0315.jpg', '600', '800', 'our smily boy');
slides[41] = new Slide('../Christmas06_files/CIMG0317.jpg', '800', '600', 'a weird photo');
slides[42] = new Slide('../Christmas06_files/CIMG0323.jpg', '600', '800', 'the girls!');
slides[43] = new Slide('../Christmas06_files/CIMG0327.jpg', '600', '800', 'Mama and Anouk get some well-deserved Z’s');
slides[44] = new Slide('../Christmas06_files/CIMG0343.jpg', '600', '800', 'more friends: Tibe, Amber, with Anouk and Xavier');
slides[45] = new Slide('../Christmas06_files/CIMG0344.jpg', '600', '800', 'the kids had a great time together');
slides[46] = new Slide('../Christmas06_files/CIMG0346.jpg', '600', '800', 'Anouk and yet another babysitter: Amber');
slides[47] = new Slide('../Christmas06_files/CIMG0347.jpg', '600', '800', 'Seth and Els with their two and one of ours');
slides[48] = new Slide('../Christmas06_files/CIMG0348.jpg', '600', '800', '... now they have the other one');
slides[49] = new Slide('../Christmas06_files/CIMG0350.jpg', '600', '800', 'Xavi idolizes the toy that Tibe and Amber gave him');
slides[50] = new Slide('../Christmas06_files/CIMG0358.jpg', '600', '800', 'Riding the Bompa horse');
slides[51] = new Slide('../Christmas06_files/CIMG0368.jpg', '600', '800', 'Another round with Bomma’s glasses');
slides[52] = new Slide('../Christmas06_files/CIMG0370.jpg', '600', '800', 'Bomma and Xavi have some last minute hugs');
slides[53] = new Slide('../Christmas06_files/CIMG0371.jpg', '600', '800', '...and cuddles');
slides[54] = new Slide('../Christmas06_files/CIMG0383.jpg', '600', '800', '...as do Bompa and Anouk');
slides[55] = new Slide('../Christmas06_files/CIMG0385.jpg', '600', '800', 'Ang’s friend Lisa was on our flight from Amseterdam...amazing!');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = 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 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);
        }
    }
}

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;
    }
}

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 onPageLoad()
{
    detectBrowser();
    fixupIEPNG("id1", "Christmas06_files/transparent.gif");
    fixupIEPNG("id2", "Christmas06_files/transparent.gif");
    fixupAllIEPNGBGs();
    fixupIEPNG("id3", "Christmas06_files/transparent.gif");
    fixupIEPNG("id4", "Christmas06_files/transparent.gif");
    fixupIEPNG("id5", "Christmas06_files/transparent.gif");
    fixupIEPNG("id6", "Christmas06_files/transparent.gif");
    fixupIEPNG("id7", "Christmas06_files/transparent.gif");
    fixupIEPNG("id8", "Christmas06_files/transparent.gif");
    fixupIEPNG("id9", "Christmas06_files/transparent.gif");
    fixupIEPNG("id10", "Christmas06_files/transparent.gif");
    fixupIEPNG("id11", "Christmas06_files/transparent.gif");
    fixupIEPNG("id12", "Christmas06_files/transparent.gif");
    fixupIEPNG("id13", "Christmas06_files/transparent.gif");
    fixupIEPNG("id14", "Christmas06_files/transparent.gif");
    fixupIEPNG("id15", "Christmas06_files/transparent.gif");
    fixupIEPNG("id16", "Christmas06_files/transparent.gif");
    fixupIEPNG("id17", "Christmas06_files/transparent.gif");
    fixupIEPNG("id18", "Christmas06_files/transparent.gif");
    fixupIEPNG("id19", "Christmas06_files/transparent.gif");
    fixupIEPNG("id20", "Christmas06_files/transparent.gif");
    fixupIEPNG("id21", "Christmas06_files/transparent.gif");
    fixupIEPNG("id22", "Christmas06_files/transparent.gif");
    fixupIEPNG("id23", "Christmas06_files/transparent.gif");
    fixupIEPNG("id24", "Christmas06_files/transparent.gif");
    fixupIEPNG("id25", "Christmas06_files/transparent.gif");
    fixupIEPNG("id26", "Christmas06_files/transparent.gif");
    fixupIEPNG("id27", "Christmas06_files/transparent.gif");
    fixupIEPNG("id28", "Christmas06_files/transparent.gif");
    fixupIEPNG("id29", "Christmas06_files/transparent.gif");
    fixupIEPNG("id30", "Christmas06_files/transparent.gif");
    fixupIEPNG("id31", "Christmas06_files/transparent.gif");
    fixupIEPNG("id32", "Christmas06_files/transparent.gif");
    fixupIEPNG("id33", "Christmas06_files/transparent.gif");
    fixupIEPNG("id34", "Christmas06_files/transparent.gif");
    fixupIEPNG("id35", "Christmas06_files/transparent.gif");
    fixupIEPNG("id36", "Christmas06_files/transparent.gif");
    fixupIEPNG("id37", "Christmas06_files/transparent.gif");
    fixupIEPNG("id38", "Christmas06_files/transparent.gif");
    fixupIEPNG("id39", "Christmas06_files/transparent.gif");
    fixupIEPNG("id40", "Christmas06_files/transparent.gif");
    fixupIEPNG("id41", "Christmas06_files/transparent.gif");
    fixupIEPNG("id42", "Christmas06_files/transparent.gif");
    fixupIEPNG("id43", "Christmas06_files/transparent.gif");
    fixupIEPNG("id44", "Christmas06_files/transparent.gif");
    fixupIEPNG("id45", "Christmas06_files/transparent.gif");
    fixupIEPNG("id46", "Christmas06_files/transparent.gif");
    fixupIEPNG("id47", "Christmas06_files/transparent.gif");
    fixupIEPNG("id48", "Christmas06_files/transparent.gif");
    fixupIEPNG("id49", "Christmas06_files/transparent.gif");
    fixupIEPNG("id50", "Christmas06_files/transparent.gif");
    fixupIEPNG("id51", "Christmas06_files/transparent.gif");
    fixupIEPNG("id52", "Christmas06_files/transparent.gif");
    fixupIEPNG("id53", "Christmas06_files/transparent.gif");
    fixupIEPNG("id54", "Christmas06_files/transparent.gif");
    fixupIEPNG("id55", "Christmas06_files/transparent.gif");
    fixupIEPNG("id56", "Christmas06_files/transparent.gif");
    fixupIEPNG("id57", "Christmas06_files/transparent.gif");
    fixupIEPNG("id58", "Christmas06_files/transparent.gif");
    fixupIEPNG("id59", "Christmas06_files/transparent.gif");
    fixupIEPNG("id60", "Christmas06_files/transparent.gif");
    fixupIEPNG("id61", "Christmas06_files/transparent.gif");
    fixupIEPNG("id62", "Christmas06_files/transparent.gif");
    fixupIEPNG("id63", "Christmas06_files/transparent.gif");
    fixupIEPNG("id64", "Christmas06_files/transparent.gif");
    fixupIEPNG("id65", "Christmas06_files/transparent.gif");
    return true;
}


