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('../Four_files/image_078.jpg', '600', '800', 'Morning');
slides[1] = new Slide('../Four_files/image_079.jpg', '600', '800', 'Packing');
slides[2] = new Slide('../Four_files/image_080.jpg', '534', '800', 'On the road again');
slides[3] = new Slide('../Four_files/image_081.jpg', '534', '800', 'Mogwai and Fosse got to meet their fav. wrestler... Snake');
slides[4] = new Slide('../Four_files/image_082.jpg', '600', '800', 'Fosse is having breakfast, and when he gets food he’s always happy.');
slides[5] = new Slide('../Four_files/image_083.jpg', '600', '800', 'CLAM JUICE!');
slides[6] = new Slide('../Four_files/image_084.jpg', '600', '800', 'Not to much room in the back');
slides[7] = new Slide('../Four_files/image_085.jpg', '800', '534', 'Mogwai pose');
slides[8] = new Slide('../Four_files/image_086.jpg', '534', '800', 'Snakeru in the tree');
slides[9] = new Slide('../Four_files/image_087.jpg', '534', '800', 'Am I Evil...?');
slides[10] = new Slide('../Four_files/image_088.jpg', '534', '800', 'Tree');
slides[11] = new Slide('../Four_files/image_089.jpg', '534', '800', 'Justin, Mogcaiz, Snake and Fosse');
slides[12] = new Slide('../Four_files/image_090.jpg', '534', '800', 'Snake');
slides[13] = new Slide('../Four_files/image_091.jpg', '800', '534', 'Fosse');
slides[14] = new Slide('../Four_files/image_092.jpg', '800', '534', 'Justin and his camera');
slides[15] = new Slide('../Four_files/image_093.jpg', '534', '800', 'Flower');
slides[16] = new Slide('../Four_files/image_094.jpg', '800', '534', 'Good times');
slides[17] = new Slide('../Four_files/image_095.jpg', '800', '534', 'Flash by Mogwai and Fosse');
slides[18] = new Slide('../Four_files/image_096.jpg', '800', '534', 'Something by Mogwai');
slides[19] = new Slide('../Four_files/image_097.jpg', '800', '534', 'Justin BW Flash');
slides[20] = new Slide('../Four_files/image_098.jpg', '800', '534', 'Mogwai and Fosse');
slides[21] = new Slide('../Four_files/image_099.jpg', '534', '800', 'The unknown session with Justin');
slides[22] = new Slide('../Four_files/image_100.jpg', '800', '534', 'Good times with Justin');
slides[23] = new Slide('../Four_files/image_101.jpg', '534', '800', 'WTF');
slides[24] = new Slide('../Four_files/image_102.jpg', '534', '800', 'Oooh...');
slides[25] = new Slide('../Four_files/image_103.jpg', '534', '800', 'The wait');
slides[26] = new Slide('../Four_files/image_104.jpg', '534', '800', ':)');
slides[27] = new Slide('../Four_files/image_105.jpg', '534', '800', 'Skullhead');
slides[28] = new Slide('../Four_files/image_106.jpg', '800', '534', 'The walk');
slides[29] = new Slide('../Four_files/image_107.jpg', '800', '534', 'Smile');
slides[30] = new Slide('../Four_files/image_109.jpg', '800', '534', 'Posing in the middle of nowhere');
slides[31] = new Slide('../Four_files/image_108.jpg', '800', '534', 'WATER!');
slides[32] = new Slide('../Four_files/image_110.jpg', '534', '800', 'Spider on Justins wall');
slides[33] = new Slide('../Four_files/image_111.jpg', '534', '800', 'Frog');
slides[34] = new Slide('../Four_files/image_112.jpg', '800', '534', 'Flash by Haime');
slides[35] = new Slide('../Four_files/image_113.jpg', '800', '534', 'Flash by Justin');
slides[36] = new Slide('../Four_files/image_114.jpg', '534', '800', 'Snake and Haime had in the back of Justins awsome car');
slides[37] = new Slide('../Four_files/image_115.jpg', '534', '800', 'Windy Snake');
slides[38] = new Slide('../Four_files/image_116.jpg', '534', '800', 'Windy Haime');
slides[39] = new Slide('../Four_files/image_117.jpg', '534', '800', 'Windy Evil');
slides[40] = new Slide('../Four_files/image_118.jpg', '534', '800', 'FF');
slides[41] = new Slide('../Four_files/image_119.jpg', '534', '800', 'Furious Flash Flash');
slides[42] = new Slide('../Four_files/image_120.jpg', '534', '800', 'Wicked!');
slides[43] = new Slide('../Four_files/image_121.jpg', '534', '800', 'Hell yeah! X');
slides[44] = new Slide('../Four_files/image_122.jpg', '534', '800', 'Haime Flash Two');
slides[45] = new Slide('../Four_files/image_123.jpg', '534', '800', '...');
slides[46] = new Slide('../Four_files/image_124.jpg', '534', '800', 'Shhhwoooofff!');
slides[47] = new Slide('../Four_files/image_125.jpg', '534', '800', 'Aerialz');
slides[48] = new Slide('../Four_files/image_126.jpg', '534', '800', 'Old house');
slides[49] = new Slide('../Four_files/image_127.jpg', '800', '534', 'Flash from old house');
slides[50] = new Slide('../Four_files/image_128.jpg', '534', '800', 'Evil, Haime, Justin and Snake');
slides[51] = new Slide('../Four_files/image_129.jpg', '534', '800', 'Feeding the goats');
slides[52] = new Slide('../Four_files/image_130.jpg', '534', '800', 'Group picture by Justins mom, Laura');
slides[53] = new Slide('../Four_files/image_131.jpg', '534', '800', 'One more');
slides[54] = new Slide('../Four_files/image_132.jpg', '800', '534', 'Am I Sexy?');
slides[55] = new Slide('../Four_files/image_133.jpg', '800', '534', 'Pizza for Sebben');
slides[56] = new Slide('../Four_files/image_134.jpg', '800', '534', 'Jaime goes for the carrots');
slides[57] = new Slide('../Four_files/image_135.jpg', '800', '534', 'Afraid');
slides[58] = new Slide('../Four_files/image_136.jpg', '534', '800', 'Justins dad was really funny');
slides[59] = new Slide('../Four_files/image_138.jpg', '534', '800', 'Think');
slides[60] = new Slide('../Four_files/image_137.jpg', '800', '534', 'Handyman');
slides[61] = new Slide('../Four_files/image_139.jpg', '800', '534', 'Burning Power');
slides[62] = new Slide('../Four_files/image_140.jpg', '800', '534', 'Burning Wisdom');
slides[63] = new Slide('../Four_files/image_141.jpg', '800', '534', 'Burning Freeze');
slides[64] = new Slide('../Four_files/image_142.jpg', '800', '534', 'Burning Flash');
slides[65] = new Slide('../Four_files/image_143.jpg', '800', '534', 'Everyone');
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("id70");
    adjustFontSizeIfTooBig("id70");
    adjustLineHeightIfTooBig("id71");
    adjustFontSizeIfTooBig("id71");
    adjustLineHeightIfTooBig("id72");
    adjustFontSizeIfTooBig("id72");
    fixupAllIEPNGBGs();
    fixupIEPNG("id2", "Four_files/transparent.gif");
    fixupIEPNG("id3", "Four_files/transparent.gif");
    fixupIEPNG("id4", "Four_files/transparent.gif");
    fixupIEPNG("id5", "Four_files/transparent.gif");
    fixupIEPNG("id6", "Four_files/transparent.gif");
    fixupIEPNG("id7", "Four_files/transparent.gif");
    fixupIEPNG("id8", "Four_files/transparent.gif");
    fixupIEPNG("id9", "Four_files/transparent.gif");
    fixupIEPNG("id10", "Four_files/transparent.gif");
    fixupIEPNG("id11", "Four_files/transparent.gif");
    fixupIEPNG("id12", "Four_files/transparent.gif");
    fixupIEPNG("id13", "Four_files/transparent.gif");
    fixupIEPNG("id14", "Four_files/transparent.gif");
    fixupIEPNG("id15", "Four_files/transparent.gif");
    fixupIEPNG("id16", "Four_files/transparent.gif");
    fixupIEPNG("id17", "Four_files/transparent.gif");
    fixupIEPNG("id18", "Four_files/transparent.gif");
    fixupIEPNG("id19", "Four_files/transparent.gif");
    fixupIEPNG("id20", "Four_files/transparent.gif");
    fixupIEPNG("id21", "Four_files/transparent.gif");
    fixupIEPNG("id22", "Four_files/transparent.gif");
    fixupIEPNG("id23", "Four_files/transparent.gif");
    fixupIEPNG("id24", "Four_files/transparent.gif");
    fixupIEPNG("id25", "Four_files/transparent.gif");
    fixupIEPNG("id26", "Four_files/transparent.gif");
    fixupIEPNG("id27", "Four_files/transparent.gif");
    fixupIEPNG("id28", "Four_files/transparent.gif");
    fixupIEPNG("id29", "Four_files/transparent.gif");
    fixupIEPNG("id30", "Four_files/transparent.gif");
    fixupIEPNG("id31", "Four_files/transparent.gif");
    fixupIEPNG("id32", "Four_files/transparent.gif");
    fixupIEPNG("id33", "Four_files/transparent.gif");
    fixupIEPNG("id34", "Four_files/transparent.gif");
    fixupIEPNG("id35", "Four_files/transparent.gif");
    fixupIEPNG("id36", "Four_files/transparent.gif");
    fixupIEPNG("id37", "Four_files/transparent.gif");
    fixupIEPNG("id38", "Four_files/transparent.gif");
    fixupIEPNG("id39", "Four_files/transparent.gif");
    fixupIEPNG("id40", "Four_files/transparent.gif");
    fixupIEPNG("id41", "Four_files/transparent.gif");
    fixupIEPNG("id42", "Four_files/transparent.gif");
    fixupIEPNG("id43", "Four_files/transparent.gif");
    fixupIEPNG("id44", "Four_files/transparent.gif");
    fixupIEPNG("id45", "Four_files/transparent.gif");
    fixupIEPNG("id46", "Four_files/transparent.gif");
    fixupIEPNG("id47", "Four_files/transparent.gif");
    fixupIEPNG("id48", "Four_files/transparent.gif");
    fixupIEPNG("id49", "Four_files/transparent.gif");
    fixupIEPNG("id50", "Four_files/transparent.gif");
    fixupIEPNG("id51", "Four_files/transparent.gif");
    fixupIEPNG("id52", "Four_files/transparent.gif");
    fixupIEPNG("id53", "Four_files/transparent.gif");
    fixupIEPNG("id54", "Four_files/transparent.gif");
    fixupIEPNG("id55", "Four_files/transparent.gif");
    fixupIEPNG("id56", "Four_files/transparent.gif");
    fixupIEPNG("id57", "Four_files/transparent.gif");
    fixupIEPNG("id58", "Four_files/transparent.gif");
    fixupIEPNG("id59", "Four_files/transparent.gif");
    fixupIEPNG("id60", "Four_files/transparent.gif");
    fixupIEPNG("id61", "Four_files/transparent.gif");
    fixupIEPNG("id62", "Four_files/transparent.gif");
    fixupIEPNG("id63", "Four_files/transparent.gif");
    fixupIEPNG("id64", "Four_files/transparent.gif");
    fixupIEPNG("id65", "Four_files/transparent.gif");
    fixupIEPNG("id66", "Four_files/transparent.gif");
    fixupIEPNG("id67", "Four_files/transparent.gif");
    fixupIEPNG("id68", "Four_files/transparent.gif");
    fixupIEPNG("id69", "Four_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;
    }
}

