IMpreload('photos_files', 'shapeimage_2', '0');
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/IMG_0732.jpg', '800', '534', 'Paul greets participants at bus');
slides[1] = new Slide('../photos_files/IMG_0776.jpg', '534', '800', 'Traditional Custodian Welcome by Tony Dalton');
slides[2] = new Slide('../photos_files/IMG_0791.jpg', '534', '800', 'Looking up - stars in the sky');
slides[3] = new Slide('../photos_files/IMG_0803.jpg', '534', '800', 'Jim from L.O.V.E (Live Organic Vital Energy) tells us about Organic Food');
slides[4] = new Slide('../photos_files/DSCN0665.jpg', '600', '800', 'Ewen Maddock Dam');
slides[5] = new Slide('../photos_files/IMG_0811.jpg', '800', '534', 'Tash takes our thinking to 2026 and beyond');
slides[6] = new Slide('../photos_files/IMG_0814.jpg', '534', '800', 'Probable future presentations');
slides[7] = new Slide('../photos_files/IMG_0816.jpg', '534', '800', 'Probable future presentations');
slides[8] = new Slide('../photos_files/IMG_0860.jpg', '534', '800', 'Probable future Analysis');
slides[9] = new Slide('../photos_files/IMG_0818.jpg', '800', '534', 'Josh comments');
slides[10] = new Slide('../photos_files/IMG_0272.jpg', '600', '800', 'Scenic Amenity Exercise');
slides[11] = new Slide('../photos_files/IMG_0838.jpg', '800', '534', 'Focus on teamwork - Tibrogargan');
slides[12] = new Slide('../photos_files/IMG_0270.jpg', '600', '800', 'Focus on the Landscape');
slides[13] = new Slide('../photos_files/IMG_0252.jpg', '600', '800', 'Frame and Focus');
slides[14] = new Slide('../photos_files/RIMG0599.jpg', '800', '600', 'Wetland Landscape');
slides[15] = new Slide('../photos_files/IMG_0261.jpg', '800', '600', 'What is Landscape?');
slides[16] = new Slide('../photos_files/DSC03177.jpg', '600', '800', 'Micro and Macro');
slides[17] = new Slide('../photos_files/DSC03196.jpg', '600', '800', 'Frame the Landscape');
slides[18] = new Slide('../photos_files/CIMG0480.jpg', '600', '800', 'CIMG0480');
slides[19] = new Slide('../photos_files/IMG_0278.jpg', '647', '800', 'Beerwah Group');
slides[20] = new Slide('../photos_files/CIMG0485.jpg', '600', '800', 'Beerburrum Group');
slides[21] = new Slide('../photos_files/IMG_0825.jpg', '710', '800', 'Tibrogargan Group');
slides[22] = new Slide('../photos_files/CIMG0473.jpg', '600', '800', 'Rosalee');
slides[23] = new Slide('../photos_files/IMG_0267.jpg', '600', '800', 'Ben frames Reeds');
slides[24] = new Slide('../photos_files/CIMG0474.jpg', '800', '600', 'Landscape Heritage?');
slides[25] = new Slide('../photos_files/IMG_0861.jpg', '534', '800', 'Slide-Didge Learnshop');
slides[26] = new Slide('../photos_files/DSCF5364.jpg', '450', '800', 'Forest Scene');
slides[27] = new Slide('../photos_files/IMG_0894.jpg', '800', '534', 'Forest Path');
slides[28] = new Slide('../photos_files/DSCF5400.jpg', '800', '450', 'Experiencing Regional Landscape');
slides[29] = new Slide('../photos_files/DSCF5368.jpg', '800', '450', 'Sunlight through trees');
slides[30] = new Slide('../photos_files/DSCF5402.jpg', '450', '800', 'Rock Amphitheatre');
slides[31] = new Slide('../photos_files/DSCF5376.jpg', '450', '800', 'Attention on the detail');
slides[32] = new Slide('../photos_files/DSCF5385.jpg', '450', '800', 'Touching the earth lightly');
slides[33] = new Slide('../photos_files/IMG_0901.jpg', '800', '534', 'Hanging Out in the forest');
slides[34] = new Slide('../photos_files/IMG_0902.jpg', '534', '800', 'Amazing Beauty - worth protecting for the future');
slides[35] = new Slide('../photos_files/IMG_0906.jpg', '534', '800', 'Song-writing Learnshop');
slides[36] = new Slide('../photos_files/IMG_0907.jpg', '534', '800', 'Song-writing Learnshop');
slides[37] = new Slide('../photos_files/IMG_0912.jpg', '534', '800', 'Ewen Maddock Dam at dusk');
slides[38] = new Slide('../photos_files/IMG_0937.jpg', '534', '800', 'Stuart and Josh Play Slide-Didge');
slides[39] = new Slide('../photos_files/IMG_0914.jpg', '534', '800', 'Slide-didge by the water');
slides[40] = new Slide('../photos_files/IMG_0915.jpg', '534', '800', 'Sunset Splash');
slides[41] = new Slide('../photos_files/IMG_0926.jpg', '534', '800', 'Sunset');
slides[42] = new Slide('../photos_files/IMG_0930.jpg', '534', '800', 'Breakdance silhouette');
slides[43] = new Slide('../photos_files/IMG_0943.jpg', '534', '800', 'Lighting the night');
slides[44] = new Slide('../photos_files/IMG_0948_2.jpg', '667', '800', 'Wildlife spotting with WPSQ');
slides[45] = new Slide('../photos_files/IMG_0949.jpg', '534', '800', 'Look Up, down, all around');
slides[46] = new Slide('../photos_files/IMG_0976.jpg', '534', '800', 'Acoustic sng-along');
slides[47] = new Slide('../photos_files/IMG_0312.jpg', '600', '800', 'Campfire sing-along');
slides[48] = new Slide('../photos_files/IMG_0318.jpg', '600', '800', 'Campfire sing-along');
slides[49] = new Slide('../photos_files/IMG_0992.jpg', '534', '800', 'Documentation Crew interviewing future visionaries');
slides[50] = new Slide('../photos_files/IMG_1007.jpg', '534', '800', 'Documentation Crew - Linda, Rich & Alex');
slides[51] = new Slide('../photos_files/IMG_0998.jpg', '800', '534', 'Documentation');
slides[52] = new Slide('../photos_files/DSC03430.jpg', '600', '800', 'Canoes on the Water');
slides[53] = new Slide('../photos_files/DSC03308.jpg', '800', '600', 'Reference Maps');
slides[54] = new Slide('../photos_files/IMG_1032.jpg', '800', '534', 'Bug-eyed Toshi');
slides[55] = new Slide('../photos_files/IMG_1035.jpg', '534', '800', 'Steve from Office of Urban Management addresses Think Tank');
slides[56] = new Slide('../photos_files/DSC03377.jpg', '600', '800', 'Coochin Group Presents Vision Map');
slides[57] = new Slide('../photos_files/IMG_1044.jpg', '534', '800', 'Coochin Group');
slides[58] = new Slide('../photos_files/DSC03376.jpg', '600', '800', 'Coochin Group');
slides[59] = new Slide('../photos_files/DSC03379.jpg', '600', '800', 'Coochin Group');
slides[60] = new Slide('../photos_files/DSC03323.jpg', '600', '800', 'Coochin Group - Wildlife Bridges - connecting Greenspace');
slides[61] = new Slide('../photos_files/DSC03322.jpg', '600', '800', 'Linking the Green');
slides[62] = new Slide('../photos_files/IMG_0328.jpg', '600', '800', 'Fauna Movement vital');
slides[63] = new Slide('../photos_files/DSC03388.jpg', '600', '800', 'Beerwah Group Present');
slides[64] = new Slide('../photos_files/IMG_1045.jpg', '800', '534', 'Vertical Farming, Variety of Housing');
slides[65] = new Slide('../photos_files/DSC03389.jpg', '800', '600', 'Diversity of Options');
slides[66] = new Slide('../photos_files/IMG_0330.jpg', '600', '800', 'Beerwah Vision Map');
slides[67] = new Slide('../photos_files/IMG_1048.jpg', '800', '534', 'Beerburrum Presents Vision Map');
slides[68] = new Slide('../photos_files/DSC03396.jpg', '800', '600', 'Ami explains relationships between balancing forces');
slides[69] = new Slide('../photos_files/DSC03392.jpg', '800', '600', 'Beerburrum Eco-City');
slides[70] = new Slide('../photos_files/IMG_0334.jpg', '600', '800', 'Connecting the city with green infrastructure');
slides[71] = new Slide('../photos_files/IMG_1049.jpg', '534', '800', 'Beerburrum Vision Map');
slides[72] = new Slide('../photos_files/IMG_0336.jpg', '600', '800', 'Gather ‘round people, I’ll tell you a story');
slides[73] = new Slide('../photos_files/IMG_0338.jpg', '600', '800', 'Elimbah Vision Map');
slides[74] = new Slide('../photos_files/IMG_1053.jpg', '534', '800', 'Elimbah presents Vision');
slides[75] = new Slide('../photos_files/IMG_1054.jpg', '800', '534', 'Elimbah presentation');
slides[76] = new Slide('../photos_files/IMG_0337.jpg', '600', '800', 'Elimbah Group');
slides[77] = new Slide('../photos_files/IMG_0341.jpg', '600', '800', 'Coonowrin Group');
slides[78] = new Slide('../photos_files/DSCN0708.jpg', '600', '800', 'Coonowrin presents Vision Map');
slides[79] = new Slide('../photos_files/IMG_0343.jpg', '600', '800', 'Coonowrin Presentation');
slides[80] = new Slide('../photos_files/IMG_0345.jpg', '600', '800', 'Coonowrin Presentation');
slides[81] = new Slide('../photos_files/DSC03410.jpg', '600', '800', 'Fragile Balance of Connected Region');
slides[82] = new Slide('../photos_files/IMG_0347.jpg', '600', '800', 'Coonowrin presents Vision Map');
slides[83] = new Slide('../photos_files/IMG_0994.jpg', '534', '800', 'Focus on Tibrogargan Installation');
slides[84] = new Slide('../photos_files/DSC03427.jpg', '600', '800', 'Tibrogargan Group Presentation');
slides[85] = new Slide('../photos_files/DSC03422.jpg', '600', '800', 'Tibrogargan Group Presentation');
slides[86] = new Slide('../photos_files/IMG_0358.jpg', '600', '800', 'Gather at Rock Amphitheatre');
slides[87] = new Slide('../photos_files/IMG_1057.jpg', '534', '800', 'Final Presentations');
slides[88] = new Slide('../photos_files/DSC03442.jpg', '600', '800', 'The Air is Clean, It was a dream and what a scene we have created');
slides[89] = new Slide('../photos_files/IMG_1063.jpg', '800', '569', 'Vision Song Performance by Tim & Kieran');
slides[90] = new Slide('../photos_files/IMG_1070.jpg', '800', '534', '“Where’s The Integration?”');
slides[91] = new Slide('../photos_files/IMG_1069.jpg', '800', '534', 'Interpretative Performance');
slides[92] = new Slide('../photos_files/DSC03456.jpg', '600', '800', 'Interpretative Performance by Ryan & Anna');
slides[93] = new Slide('../photos_files/IMG_1077.jpg', '534', '800', 'Didge');
slides[94] = new Slide('../photos_files/IMG_1082.jpg', '800', '534', 'Steve from the Office of Urban Management gives feedback');
slides[95] = new Slide('../photos_files/IMG_0378.jpg', '600', '800', 'Steve addresses Think Tank');
slides[96] = new Slide('../photos_files/IMG_1056.jpg', '547', '800', 'Final Round-up');
slides[97] = new Slide('../photos_files/IMG_0382.jpg', '800', '600', 'We’re all in this together!');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

IMpreload('photos_files', 'shapeimage_4', '0');
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 onPageLoad()
{
    detectBrowser();
    adjustLineHeightIfTooBig("id5");
    adjustFontSizeIfTooBig("id5");
    adjustLineHeightIfTooBig("id106");
    adjustFontSizeIfTooBig("id106");
    fixupIEPNG("id1", "photos_files/transparent.gif");
    fixupIEPNG("id2", "photos_files/transparent.gif");
    fixupIEPNG("id3", "photos_files/transparent.gif");
    fixupIEPNG("id4", "photos_files/transparent.gif");
    fixupIEPNG("shapeimage_2_link_0", "photos_files/transparent.gif");
    fixupIEPNG("shapeimage_2", "photos_files/transparent.gif");
    fixupIEPNG("id6", "photos_files/transparent.gif");
    fixupAllIEPNGBGs();
    fixupIEPNG("id7", "photos_files/transparent.gif");
    fixupIEPNG("id8", "photos_files/transparent.gif");
    fixupIEPNG("id9", "photos_files/transparent.gif");
    fixupIEPNG("id10", "photos_files/transparent.gif");
    fixupIEPNG("id11", "photos_files/transparent.gif");
    fixupIEPNG("id12", "photos_files/transparent.gif");
    fixupIEPNG("id13", "photos_files/transparent.gif");
    fixupIEPNG("id14", "photos_files/transparent.gif");
    fixupIEPNG("id15", "photos_files/transparent.gif");
    fixupIEPNG("id16", "photos_files/transparent.gif");
    fixupIEPNG("id17", "photos_files/transparent.gif");
    fixupIEPNG("id18", "photos_files/transparent.gif");
    fixupIEPNG("id19", "photos_files/transparent.gif");
    fixupIEPNG("id20", "photos_files/transparent.gif");
    fixupIEPNG("id21", "photos_files/transparent.gif");
    fixupIEPNG("id22", "photos_files/transparent.gif");
    fixupIEPNG("id23", "photos_files/transparent.gif");
    fixupIEPNG("id24", "photos_files/transparent.gif");
    fixupIEPNG("id25", "photos_files/transparent.gif");
    fixupIEPNG("id26", "photos_files/transparent.gif");
    fixupIEPNG("id27", "photos_files/transparent.gif");
    fixupIEPNG("id28", "photos_files/transparent.gif");
    fixupIEPNG("id29", "photos_files/transparent.gif");
    fixupIEPNG("id30", "photos_files/transparent.gif");
    fixupIEPNG("id31", "photos_files/transparent.gif");
    fixupIEPNG("id32", "photos_files/transparent.gif");
    fixupIEPNG("id33", "photos_files/transparent.gif");
    fixupIEPNG("id34", "photos_files/transparent.gif");
    fixupIEPNG("id35", "photos_files/transparent.gif");
    fixupIEPNG("id36", "photos_files/transparent.gif");
    fixupIEPNG("id37", "photos_files/transparent.gif");
    fixupIEPNG("id38", "photos_files/transparent.gif");
    fixupIEPNG("id39", "photos_files/transparent.gif");
    fixupIEPNG("id40", "photos_files/transparent.gif");
    fixupIEPNG("id41", "photos_files/transparent.gif");
    fixupIEPNG("id42", "photos_files/transparent.gif");
    fixupIEPNG("id43", "photos_files/transparent.gif");
    fixupIEPNG("id44", "photos_files/transparent.gif");
    fixupIEPNG("id45", "photos_files/transparent.gif");
    fixupIEPNG("id46", "photos_files/transparent.gif");
    fixupIEPNG("id47", "photos_files/transparent.gif");
    fixupIEPNG("id48", "photos_files/transparent.gif");
    fixupIEPNG("id49", "photos_files/transparent.gif");
    fixupIEPNG("id50", "photos_files/transparent.gif");
    fixupIEPNG("id51", "photos_files/transparent.gif");
    fixupIEPNG("id52", "photos_files/transparent.gif");
    fixupIEPNG("id53", "photos_files/transparent.gif");
    fixupIEPNG("id54", "photos_files/transparent.gif");
    fixupIEPNG("id55", "photos_files/transparent.gif");
    fixupIEPNG("id56", "photos_files/transparent.gif");
    fixupIEPNG("id57", "photos_files/transparent.gif");
    fixupIEPNG("id58", "photos_files/transparent.gif");
    fixupIEPNG("id59", "photos_files/transparent.gif");
    fixupIEPNG("id60", "photos_files/transparent.gif");
    fixupIEPNG("id61", "photos_files/transparent.gif");
    fixupIEPNG("id62", "photos_files/transparent.gif");
    fixupIEPNG("id63", "photos_files/transparent.gif");
    fixupIEPNG("id64", "photos_files/transparent.gif");
    fixupIEPNG("id65", "photos_files/transparent.gif");
    fixupIEPNG("id66", "photos_files/transparent.gif");
    fixupIEPNG("id67", "photos_files/transparent.gif");
    fixupIEPNG("id68", "photos_files/transparent.gif");
    fixupIEPNG("id69", "photos_files/transparent.gif");
    fixupIEPNG("id70", "photos_files/transparent.gif");
    fixupIEPNG("id71", "photos_files/transparent.gif");
    fixupIEPNG("id72", "photos_files/transparent.gif");
    fixupIEPNG("id73", "photos_files/transparent.gif");
    fixupIEPNG("id74", "photos_files/transparent.gif");
    fixupIEPNG("id75", "photos_files/transparent.gif");
    fixupIEPNG("id76", "photos_files/transparent.gif");
    fixupIEPNG("id77", "photos_files/transparent.gif");
    fixupIEPNG("id78", "photos_files/transparent.gif");
    fixupIEPNG("id79", "photos_files/transparent.gif");
    fixupIEPNG("id80", "photos_files/transparent.gif");
    fixupIEPNG("id81", "photos_files/transparent.gif");
    fixupIEPNG("id82", "photos_files/transparent.gif");
    fixupIEPNG("id83", "photos_files/transparent.gif");
    fixupIEPNG("id84", "photos_files/transparent.gif");
    fixupIEPNG("id85", "photos_files/transparent.gif");
    fixupIEPNG("id86", "photos_files/transparent.gif");
    fixupIEPNG("id87", "photos_files/transparent.gif");
    fixupIEPNG("id88", "photos_files/transparent.gif");
    fixupIEPNG("id89", "photos_files/transparent.gif");
    fixupIEPNG("id90", "photos_files/transparent.gif");
    fixupIEPNG("id91", "photos_files/transparent.gif");
    fixupIEPNG("id92", "photos_files/transparent.gif");
    fixupIEPNG("id93", "photos_files/transparent.gif");
    fixupIEPNG("id94", "photos_files/transparent.gif");
    fixupIEPNG("id95", "photos_files/transparent.gif");
    fixupIEPNG("id96", "photos_files/transparent.gif");
    fixupIEPNG("id97", "photos_files/transparent.gif");
    fixupIEPNG("id98", "photos_files/transparent.gif");
    fixupIEPNG("id99", "photos_files/transparent.gif");
    fixupIEPNG("id100", "photos_files/transparent.gif");
    fixupIEPNG("id101", "photos_files/transparent.gif");
    fixupIEPNG("id102", "photos_files/transparent.gif");
    fixupIEPNG("id103", "photos_files/transparent.gif");
    fixupIEPNG("id104", "photos_files/transparent.gif");
    fixupIEPNG("id105", "photos_files/transparent.gif");
    fixupIEPNG("shapeimage_4_link_0", "photos_files/transparent.gif");
    fixupIEPNG("shapeimage_4", "photos_files/transparent.gif");
    fixupIEPNG("id107", "photos_files/transparent.gif");
    fixupIEPNG("id108", "photos_files/transparent.gif");
    fixupIEPNG("id109", "photos_files/transparent.gif");
    return true;
}

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 IMpreload(path, name, areaIndex)
{
    var rolloverName = name+'_rollover_'+areaIndex;
    var rolloverPath = path+'/'+rolloverName+'.png';
    self[rolloverName] = new Image();
    self[rolloverName].src = rolloverPath;

    var linkName = name+'_link_'+areaIndex;
    var linkPath = path+'/'+linkName+'.png';
    self[linkName] = new Image();
    self[linkName].src = linkPath;
    return true;
}

function IMmouseover(name, areaIndex)
{
    var rolloverName = name+'_rollover_'+areaIndex;
    var linkName = name+'_link_'+areaIndex;
    var img  = document.getElementById(linkName);
    if (img)
    {
        img.src = self[rolloverName].src;
    }
    return true;
}

function IMmouseout(name, areaIndex)
{
    var linkName = name+'_link_'+areaIndex;
    var img  = document.getElementById(linkName);
    if (img)
    {
        img.src = self[linkName].src;
    }
    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;
    }
}

