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('../Grillen_files/100_2729.jpg', '600', '800', 'Elisa, Paula (I guess, hehehehe), the grill, Martin, Ronny & Aleks.. and SUN!!!');
slides[1] = new Slide('../Grillen_files/100_2730.jpg', '600', '800', 'Paula, Martin, the grill & Ronny... and SUN!!!');
slides[2] = new Slide('../Grillen_files/100_2731.jpg', '600', '800', 'Elisa, Alex, Sveta, Paula... and SUN!!');
slides[3] = new Slide('../Grillen_files/100_2732.jpg', '600', '800', 'Jaque (that\u0027s me!), Paula... and SUN!!');
slides[4] = new Slide('../Grillen_files/100_2733.jpg', '600', '800', 'Sveta... and SUN!!!');
slides[5] = new Slide('../Grillen_files/100_2735.jpg', '600', '800', 'Ronny, Martin, hidding grill , Aleks... and SUN!!');
slides[6] = new Slide('../Grillen_files/100_2736.jpg', '600', '800', 'Aleks, Alex, Sveta, Martin, Ronny, the grill (part of it!), Elisa, Paula... and... where\u0027s the sun?');
slides[7] = new Slide('../Grillen_files/100_2738.jpg', '600', '800', 'er... coal and... potatoes?');
slides[8] = new Slide('../Grillen_files/100_2739.jpg', '600', '800', 'hehehehe... typical german barbecue... please Brazilians, don\u0027t laugh! ;-)');
slides[9] = new Slide('../Grillen_files/100_2740.jpg', '600', '800', 'Paula and her parapsychological talent to deform forks... hehehehehe...');
slides[10] = new Slide('../Grillen_files/100_2741.jpg', '600', '800', 'Elisa, me, Aleks, Paula, the grill, Ronny, Sveta... and SUN! (ok, a little cold, but it\u0027s still sun...)');
slides[11] = new Slide('../Grillen_files/100_2742.jpg', '600', '800', 'Aleks, Paula... and SUN!');
slides[12] = new Slide('../Grillen_files/100_2743.jpg', '600', '800', 'Ronny (his back, actually), Alex, er... some food (?) and... sun (hmm... I\u0027m not sure)');
slides[13] = new Slide('../Grillen_files/100_2744.jpg', '600', '800', 'Sveta, Martin, Aleks, Elisa, beer... and sun! (yeah, it\u0027s still sun... hey, c\u0027mon, we had 8 hours barbecue! The sun got tired... hehehehehe)');
slides[14] = new Slide('../Grillen_files/100_2745.jpg', '600', '800', 'Martin, Sveta, Elisa, a sweet pepper, me and beer! :-)');
slides[15] = new Slide('../Grillen_files/100_2746.jpg', '600', '800', 'everyone except me (I\u0027m fed up with telling all the names)... and... no sun???');
slides[16] = new Slide('../Grillen_files/100_2747.jpg', '600', '800', 'almost everyone, the grill, some beer and no sun at all... (time to go upstairs and... the party must go on!)');
slides[17] = new Slide('../Grillen_files/100_2748.jpg', '600', '800', 'Martin and Aleks @ Aleks\u0027 place... nice kitchen!');
slides[18] = new Slide('../Grillen_files/100_2749.jpg', '600', '800', 'Martin and Aleks again');
slides[19] = new Slide('../Grillen_files/100_2750.jpg', '600', '800', 'Martin and Aleks again (Paula took these pics... dunno what she was trying to do...)');
slides[20] = new Slide('../Grillen_files/100_2752.jpg', '800', '600', 'Zubrówka, vodka from Polland... uhu! tasty! hehehehehe...');
slides[21] = new Slide('../Grillen_files/100_2753.jpg', '600', '800', 'Paula and her love for Zubrówka');
slides[22] = new Slide('../Grillen_files/100_2754.jpg', '600', '800', 'Ok, that was a kitchen party.. Alex and Aleks provided music and... LET\u0027S ROCK N\u0027 ROLL!!!');
slides[23] = new Slide('../Grillen_files/IMG_1406.jpg', '534', '800', 'These are the pics Aleks took... so back again to barbecue, you know everyone already...');
slides[24] = new Slide('../Grillen_files/IMG_1407.jpg', '534', '800', 'me, Aleks and... BEER!');
slides[25] = new Slide('../Grillen_files/IMG_1408.jpg', '534', '800', 'me, Aleks and... beer again! (déjà vu??)');
slides[26] = new Slide('../Grillen_files/IMG_1409.jpg', '534', '800', 'Elisa, me and... beer! (I am getting drunk only to write it here, hehehehe)');
slides[27] = new Slide('../Grillen_files/IMG_1410.jpg', '534', '800', 'Sveta and the pollish guy... what was his name?? oops... (ok, Aleks told me it now... his name is Jarek)');
slides[28] = new Slide('../Grillen_files/IMG_1411.jpg', '534', '800', 'Paulinchen and Ronny... oh ja, and beer!');
slides[29] = new Slide('../Grillen_files/IMG_1412.jpg', '534', '800', 'Déjà vu...');
slides[30] = new Slide('../Grillen_files/IMG_1413.jpg', '534', '800', 'Alex thinking: "where do I find more beer?"');
slides[31] = new Slide('../Grillen_files/IMG_1414.jpg', '534', '800', 'Me and Aleks (and beer, obviously)');
slides[32] = new Slide('../Grillen_files/IMG_1415.jpg', '534', '800', 'Déjà vu...');
slides[33] = new Slide('../Grillen_files/IMG_1416.jpg', '534', '800', 'Elisa, me and Aleks... I think we were already starting to get a little blue...');
slides[34] = new Slide('../Grillen_files/IMG_1417.jpg', '534', '800', 'The man with no name! (sorry, I really don\u0027t remember...- ok, now I know: Jarek)');
slides[35] = new Slide('../Grillen_files/IMG_1418.jpg', '534', '800', 'Sveta her furry coat and... beer!');
slides[36] = new Slide('../Grillen_files/IMG_1419.jpg', '534', '800', 'Paula and Aleks... that\u0027s a nice shot!');
slides[37] = new Slide('../Grillen_files/IMG_1420.jpg', '534', '800', 'Elisa... and BEER!');
slides[38] = new Slide('../Grillen_files/IMG_1426.jpg', '534', '800', 'Elisa and Paula... uhu, everybody fruity!!!');
slides[39] = new Slide('../Grillen_files/IMG_1427.jpg', '534', '800', 'Déjà vu...');
slides[40] = new Slide('../Grillen_files/IMG_1430.jpg', '534', '800', 'LET\u0027S ROCK AND ROLL!');
slides[41] = new Slide('../Grillen_files/IMG_1431.jpg', '534', '800', 'Aleks fruity (but not wasted!! cool girl, hehehehehe...)');
slides[42] = new Slide('../Grillen_files/IMG_1432.jpg', '534', '800', 'rock and rock and rock and roll...');
slides[43] = new Slide('../Grillen_files/IMG_1434.jpg', '534', '800', 'Aleks and Paula... hmmm... getting tired?');
slides[44] = new Slide('../Grillen_files/IMG_1435.jpg', '534', '800', 'Elisa, Aleks and Paula... ok, it was only a pause...');
slides[45] = new Slide('../Grillen_files/IMG_1436.jpg', '534', '800', 'Me - getting wasted... very, very slowly...');
slides[46] = new Slide('../Grillen_files/IMG_1421.jpg', '534', '800', 'Me... (wtf was this shot????)');
slides[47] = new Slide('../Grillen_files/IMG_1422.jpg', '534', '800', 'Aleks, cheer up! We still have lots and lots to celebrate! ;-)');
slides[48] = new Slide('../Grillen_files/IMG_1423.jpg', '534', '800', '*squish!* - I think Aleks couldn\u0027t breathe...');
slides[49] = new Slide('../Grillen_files/IMG_1425.jpg', '534', '800', 'our DJs Alex and Ronny');
slides[50] = new Slide('../Grillen_files/IMG_1429.jpg', '534', '800', 'they look sooooo sweet together... Martin and Aleks');
slides[51] = new Slide('../Grillen_files/IMG_1428.jpg', '534', '800', 'Aleks and Alex... ok, and out pick up in the kitchen...');
slides[52] = new Slide('../Grillen_files/IMG_1433.jpg', '534', '800', 'ok, I was REALLY dancing... and sweating...');
slides[53] = new Slide('../Grillen_files/IMG_1437.jpg', '534', '800', 'Aleks and THE HUNGER... hehehehhehe..');
slides[54] = new Slide('../Grillen_files/IMG_1438.jpg', '534', '800', 'I found some manuscripts... an ancient art called "Math"... I think I messed up the calculus of somebody, hehehehe');
slides[55] = new Slide('../Grillen_files/IMG_1439.jpg', '534', '800', 'still messing up with other\u0027s calculus');
slides[56] = new Slide('../Grillen_files/IMG_1440.jpg', '534', '800', '(maybe I can understand this stuff better when I am drunk...)');
slides[57] = new Slide('../Grillen_files/IMG_1441.jpg', '534', '800', 'at the end I just draw something stupid and let the papers rest in peace...');
slides[58] = new Slide('../Grillen_files/IMG_1442.jpg', '534', '800', 'end of the party...');
slides[59] = new Slide('../Grillen_files/IMG_1443.jpg', '534', '800', 'the last one: our pick up and combustibles... it was really a nice party!  We need to do this more often...');
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 fixupIECSS3Opacity(strElementID)
{
    if (windowsInternetExplorer)
    {
        var oNode = document.getElementById(strElementID);
        if (oNode)
        {
            oNode.style.height = '' + oNode.offsetHeight + 'px';
            oNode.style.filter =
                'progid:DXImageTransform.Microsoft.Alpha(opacity=' +
                 Math.round(100.0 - parseFloat(oNode.style.getAttribute('opacity')) * 100) +
                 ');'
        }
    }
}

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

