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('../Past Events & Press_files/DSC_0111.jpg', '536', '800', 'Self Titled featured artist: Brandon Evans');
slides[1] = new Slide('../Past Events & Press_files/DSC_0070.jpg', '575', '385', 'Self Titled featured artist: Sean Mahan');
slides[2] = new Slide('../Past Events & Press_files/DSC_0067.jpg', '536', '800', 'Self Titled featured artist: Sean Mahan');
slides[3] = new Slide('../Past Events & Press_files/bullshit.jpg', '767', '496', 'Natural In Conclusion\n(2010)');
slides[4] = new Slide('../Past Events & Press_files/due.jpg', '363', '235', 'Due Process\n(2010)');
slides[5] = new Slide('../Past Events & Press_files/love.jpg', '259', '800', 'Say Love\n(2010)');
slides[6] = new Slide('../Past Events & Press_files/septshoweb.jpg', '800', '261', 'Imbedded Narrative\n(2009)');
slides[7] = new Slide('../Past Events & Press_files/prospect terrainsm-cropped.jpg', '317', '104', 'Prospective Terrain (2009)');
slides[8] = new Slide('../Past Events & Press_files/minerwithnewdana.jpg', '488', '300', 'Repressed IV\n(2009)');
slides[9] = new Slide('../Past Events & Press_files/l_070bc9dba68937366db5c7effa6a2a01.jpg', '800', '518', 'Repressed III\n(2008)');
slides[10] = new Slide('../Past Events & Press_files/Unknown.jpg', '800', '518', 'Sleight of Hand (2008)');
slides[11] = new Slide('../Past Events & Press_files/rerpressedposterneeeew.jpg', '313', '203', 'Repressed II (2007)');
slides[12] = new Slide('../Past Events & Press_files/postercolorfemale2.jpg', '322', '186', 'Disrobed II (2007)');
slides[13] = new Slide('../Past Events & Press_files/l_1815c0b2907b739a727967b30ace0bcb.jpg', '769', '530', 'Disrobed II Living Nude Installation (2007)');
slides[14] = new Slide('../Past Events & Press_files/l_b9c0b21eb30a1d7a23a42e0f6355fb63.jpg', '413', '600', 'Disrobed II Living Nude Installation (2007)');
slides[15] = new Slide('../Past Events & Press_files/l_abaaea5323fbdadf5a15b0e43e29a238.jpg', '769', '530', 'Disrobed II Living Nude Installation (2007)');
slides[16] = new Slide('../Past Events & Press_files/l_c9305c6cd190ea6942aec8787e75d280.jpg', '413', '600', 'Disrobed II Living Nude Installation (2007)');
slides[17] = new Slide('../Past Events & Press_files/l_86dc6d98813c6e6086c2dd2f27fcd1fd.jpg', '769', '530', 'Disrobed II Living Nude Installation (2007)');
slides[18] = new Slide('../Past Events & Press_files/Untitled-11.jpg', '300', '192', 'Gateway Asia (2007)');
slides[19] = new Slide('../Past Events & Press_files/l_7306756df8cd6e702e54174790fe79ad.jpg', '412', '600', 'Gateway Asia Featured Artist: Nathalie Pham ');
slides[20] = new Slide('../Past Events & Press_files/l_ba51a82d539bcb9b817155c633726f9e.jpg', '412', '600', 'Gateway Asia Featured Artist: Nathalie Pham');
slides[21] = new Slide('../Past Events & Press_files/l_1a849c197ba3e80d616227b50b64cab5.jpg', '412', '600', 'Gateway Asia Featured Artist: Nathalie Pham');
slides[22] = new Slide('../Past Events & Press_files/l_fb1444f2e0edadf5acff1c89f31b37a9.jpg', '773', '600', 'Gateway Asia Featured Artist: Erjun Zhao');
slides[23] = new Slide('../Past Events & Press_files/l_6fb656296eb28a046b05068d2950c29c.jpg', '679', '600', 'Gateway Asia Featured Artist: Erjun Zhao');
slides[24] = new Slide('../Past Events & Press_files/l_2327edbd76f5a6cc6a91a3c5dea0074d.jpg', '800', '543', 'Gateway Asia Featured Artist: Lucien Dulfan');
slides[25] = new Slide('../Past Events & Press_files/l_8d0cbcea277daa789a30ad9cde587a27.jpg', '603', '600', 'Gateway Asia Featured Artist: Lucien Dulfan');
slides[26] = new Slide('../Past Events & Press_files/l_0821bd3f63ee957b521709453f814145.jpg', '317', '205', 'A Separate Piece\n(2007)');
slides[27] = new Slide('../Past Events & Press_files/l_35c18fd046664d684a5bce71555e3b9b.jpg', '800', '534', 'A Separate Piece artist: Adam Caldwell (2007)');
slides[28] = new Slide('../Past Events & Press_files/l_879c065bb930cbc9f6692595ea09cebe.jpg', '400', '600', 'A Separate Piece artist: Adam Caldwell (2007)');
slides[29] = new Slide('../Past Events & Press_files/l_15bc0b4fd7f4037ed5d9128827e8c3ed.jpg', '639', '413', 'Alarm\n(2007)');
slides[30] = new Slide('../Past Events & Press_files/index.jpg', '800', '517', 'The Carnival of 5 Fires (2007)');
slides[31] = new Slide('../Past Events & Press_files/carnivallsmall.jpg', '597', '400', 'The Carnival of 5 Fires (2008)');
slides[32] = new Slide('../Past Events & Press_files/carnivalposter.jpg', '800', '537', 'The Carnival of 5 Fires (2009)');
slides[33] = new Slide('../Past Events & Press_files/imlost2sm.jpg', '800', '486', 'Lost (2008)');
slides[34] = new Slide('../Past Events & Press_files/nonprofitsmall.jpg', '659', '400', 'A Non Profit Showcase\u2028(2010)');
slides[35] = new Slide('../Past Events & Press_files/index_2.jpg', '800', '539', 'Transfiguration\n(2007)');
slides[36] = new Slide('../Past Events & Press_files/consumptionposter.jpg', '800', '519', 'Not Fit for Human Consumption (2009)');
slides[37] = new Slide('../Past Events & Press_files/kingweb.jpg', '800', '518', 'The Cost of Living\u2028(2009)');
slides[38] = new Slide('../Past Events & Press_files/americanwoodturners.jpg', '800', '518', 'Turned for Use II\n(2009)');
slides[39] = new Slide('../Past Events & Press_files/russianfest.jpg', '317', '205', 'Mending Fences\n(2006)');
slides[40] = new Slide('../Past Events & Press_files/l_a93efbc7387f169aedb0d1f3f90e787c.jpg', '800', '518', 'I Dream of a Richmond...\n(2009)');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

IMpreload('Past Events & Press_files', 'shapeimage_2', '0');
IMpreload('Past Events & Press_files', 'shapeimage_3', '0');
IMpreload('Past Events & Press_files', 'shapeimage_4', '0');
IMpreload('Past Events & Press_files', 'shapeimage_5', '0');
function writeMovie1()
{
    document.write('<object id="id13" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="200" height="166" style="height: 166px; left: 1px; position: absolute; top: 843px; width: 200px; z-index: 1; "><param name="src" value="Past%20Events%20%26%20Press_files/Gallery5%203%20Year%20Video%20by%20Todd.mov" /><param name="controller" value="true" /><param name="autoplay" value="false" /><param name="scale" value="tofit" /><param name="volume" value="100" /><param name="loop" value="false" /><embed pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" class="mov" width="200" height="166" src="Past%20Events%20%26%20Press_files/Gallery5%203%20Year%20Video%20by%20Todd.mov" controller="true" autoplay="false" scale="tofit" volume="100" loop="false"></embed></object>');
}

function writeMovie2()
{
    document.write('<object id="id14" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="200" height="166" style="height: 166px; left: 1px; position: absolute; top: 1097px; width: 200px; z-index: 1; "><param name="src" value="Past%20Events%20%26%20Press_files/4%20year%20streaming.mov" /><param name="controller" value="true" /><param name="autoplay" value="false" /><param name="scale" value="tofit" /><param name="volume" value="100" /><param name="loop" value="false" /><embed pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" class="mov" width="200" height="166" src="Past%20Events%20%26%20Press_files/4%20year%20streaming.mov" controller="true" autoplay="false" scale="tofit" volume="100" loop="false"></embed></object>');
}

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("id4");
    adjustFontSizeIfTooBig("id4");
    adjustLineHeightIfTooBig("id6");
    adjustFontSizeIfTooBig("id6");
    adjustLineHeightIfTooBig("id7");
    adjustFontSizeIfTooBig("id7");
    adjustLineHeightIfTooBig("id9");
    adjustFontSizeIfTooBig("id9");
    adjustLineHeightIfTooBig("id10");
    adjustFontSizeIfTooBig("id10");
    adjustLineHeightIfTooBig("id11");
    adjustFontSizeIfTooBig("id11");
    adjustLineHeightIfTooBig("id12");
    adjustFontSizeIfTooBig("id12");
    adjustLineHeightIfTooBig("id15");
    adjustFontSizeIfTooBig("id15");
    adjustLineHeightIfTooBig("id16");
    adjustFontSizeIfTooBig("id16");
    adjustLineHeightIfTooBig("id17");
    adjustFontSizeIfTooBig("id17");
    fixupIEPNG("id1", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("id2", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("id3", "Past Events & Press_files/transparent.gif");
    fixupAllIEPNGBGs();
    fixupIEPNG("id5", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("id8", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_2_link_0", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_2", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_3_link_0", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_3", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_4_link_0", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_4", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_5_link_0", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("shapeimage_5", "Past Events & Press_files/transparent.gif");
    fixupIEPNG("id18", "Past Events & Press_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 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;
}

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

