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('../Locations_files/1001-b.jpg', '230', '360', '120 East Leigh - Homer, MI  \n(517)568-4430 • 24 hours • Subway • Tom\'s Donuts • Hot to Go Breakfast • Beer / Wine / Liquor • ATM');
slides[1] = new Slide('../Locations_files/1003.jpg', '640', '800', '8006 Spring Arbor Road -\nSpring Arbor, MI  (517)750-1911\nCar Wash • ATM \nTom\'s Donuts • Subway');
slides[2] = new Slide('../Locations_files/Coldwater-PS.jpg', '231', '360', '75 E. Chicago - Coldwater, MI\n(517)278-8163 \nTom\'s Donuts •  ATM');
slides[3] = new Slide('../Locations_files/Union-City.jpg', '167', '360', '8160 M-60 Union City - MI\n(517)741-3693 \nSubway • Tom\'s Donuts • \nBeer / Wine • ATM');
slides[4] = new Slide('../Locations_files/1020-drive-thru.jpg', '221', '360', '101 E. MI Ave. - Albion, MI \n(517)629-9233 • 24 hours • Tom\'s Donuts • Hot to Go Breakfast • Drive Through• ATM • Car Wash');
slides[5] = new Slide('../Locations_files/Marshall.jpg', '229', '360', '1002 W. MI - Marshall, MI  \n(269)781-7943   24 Hours\n Tom\'s Donuts • ATM');
slides[6] = new Slide('../Locations_files/1027.jpg', '640', '800', '202 E. Jackson Rd. - Concord, MI\n(517)524-8441\nSubway • Tom\'s Donuts • Hot to Go Breakfast • Beer / Wine / Liquor • ATM');
slides[7] = new Slide('../Locations_files/Helmer-Rd.jpg', '270', '360', '13256 S. Helmer - \nBattle Creek, MI  (269)965-7433 \nTom\'s Donuts • ATM');
slides[8] = new Slide('../Locations_files/1030.jpg', '193', '360', '6008 Beckley - Battle Creek, MI (269)979-2582 \nCar Wash • ATM');
slides[9] = new Slide('../Locations_files/1034 c.jpg', '640', '800', '15252 Old Us 27 N. - Marshall, MI\n(269)789-1982\nTruck Stop  • 24 hours • ATM \nKentucky Fried Chicken • \nTom\'s Donuts • Hot to Go Breakfast \n');
slides[10] = new Slide('../Locations_files/3001.jpg', '270', '360', '599 East Chicago - Coldwater, MI \n(517)279-8650 • 24 hours • ATM\nTom\'s Donuts');
slides[11] = new Slide('../Locations_files/3002.jpg', '226', '360', '17 E. Carleton - Hillsdale, MI \n(517)439-5833\nDrive Thru • 24 hours \nTom\'s Donuts • Hot to Go Breakfast • Beer / Wine / Liquor \nRed Barron Personal Pizza');
slides[12] = new Slide('../Locations_files/Longfellow.jpg', '209', '360', '500 Longfellow - Jackson, MI\n(517)787-8045\n');
slides[13] = new Slide('../Locations_files/3004.jpg', '248', '360', '815 Lansing Ave - Lansing, MI\n(517)782-8361\n');
slides[14] = new Slide('../Locations_files/Wisner.jpg', '245', '360', '918 Wisner - Jackson, MI  \n(517)782-9920   TCBY • ATM');
slides[15] = new Slide('../Locations_files/3006.jpg', '191', '360', '1301 S. West Ave - Jackson, MI\n(517)787-0200\nTom\'s Donuts • Hot To Go Breakfast • Iced Coffee •  ATM');
slides[16] = new Slide('../Locations_files/3007.jpg', '198', '360', '1502 Cooper St. - Jackson, MI\n(517)789-6496  Beer / Wine\nSubway • Tom\'s Donuts • ATM');
slides[17] = new Slide('../Locations_files/3008.jpg', '235', '360', '15551 11 Mile - Battle Creek, MI\n(269)968-7179  • 24 hours • Subway • Tom\'s Donuts • Hot To Go Breakfast • ATM\nTruck Stop');
slides[18] = new Slide('../Locations_files/3009-002.jpg', '261', '360', '600 S. Main - Reading, MI \n(517)283-3522 \nTom\'s Donuts • Subway \nBeer / Wine / Liquor • ATM');
slides[19] = new Slide('../Locations_files/3011-b.jpg', '212', '360', '10995 W. Carelton - Clayton, MI\n(517)445-2702 \nTom\'s Donuts\n Beer / Wine / Liquor • ATM');
slides[20] = new Slide('../Locations_files/5001.jpg', '195', '360', '14547 22 1/2 Mile - Marshall, MI  \n(269)781-9616  \n24 hours  •  Tom\'s Donuts  \nHot To Go Breakfast • Beer • ATM\nFull Service Restaurant • Truck Stop');
slides[21] = new Slide('../Locations_files/sunrise shops2.jpg', '378', '800', '');
slides[22] = new Slide('../Locations_files/6012.jpg', '597', '800', '1896 Front St.  Toledo, OH    \n(419) 691-1605\nATM  • Beer & Wine\n Tom\'s Donuts');
slides[23] = new Slide('../Locations_files/6013.jpg', '600', '800', '4711 S. Detroit Ave  Toledo, OH  (419) 385-9304  \n ATM •  Beer & Wine');
slides[24] = new Slide('../Locations_files/6014.jpg', '600', '800', '1540 Front St.  Toledo, OH  \n(419) 698-2723 \nATM  •  Beer & Wine');
slides[25] = new Slide('../Locations_files/6022.jpg', '597', '800', '1625  Miami St.  Toledo, OH  \n(419) 661-8376\nTom\'s Donuts\nATM   •  Beer & Wine\n\n');
slides[26] = new Slide('../Locations_files/6016.jpg', '597', '800', '5432 N Summit St.  Toledo, OH  (419) 729-4144\nATM  •  Beer & Wine\n\n');
slides[27] = new Slide('../Locations_files/6018.jpg', '597', '800', '552 Illinois Ave  Maumee, OH  (419) 891-9046 \nHot Food •  ATM  \n\n');
slides[28] = new Slide('../Locations_files/6019.jpg', '597', '800', '7503  Airport Highway  \nHolland, OH  (419) 865-8713  \nATM • Beer & Wine\n\n');
slides[29] = new Slide('../Locations_files/6021.jpg', '597', '800', '102 E. Airport Highway  \nSwanton, OH (419) 826-0004 \nATM  •  Beer & Wine');
slides[30] = new Slide('../Locations_files/perry3.jpg', '530', '710', '720 N. Main St. - Perry, MI \n(517)625-5700 \nSubway Drive Thru • Beer • Donuts • ATM • Wi Fi');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

var MINIMUM_FONT = "10";
var UNITS = "";

function elementFontSize(element)
{
    var fontSize = MINIMUM_FONT; 

    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            fontSize = computedStyle.getPropertyValue("font-size");
        }
    }
    else if (element.currentStyle)
    {
        fontSize = element.currentStyle.fontSize;
    }

    if ((UNITS.length == 0) && (fontSize != MINIMUM_FONT))
    {
        UNITS = fontSize.substring(fontSize.length - 2, fontSize.length)
    }

    return parseFloat(fontSize);
}

function adjustFontSizeIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var smallestFontSize = 200;
                    
                    var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                    var oneLine = false;
                    for (i = 0; i < aParaChildren.length; i++)
                    {
                        var oParagraphDiv = aParaChildren[i];
                        var lineHeight = elementLineHeight(oParagraphDiv);
                        oneLine = oneLine || (lineHeight * 1.5 >= specifiedHeight);
                        if (oParagraphDiv.nodeName == "DIV")
                        {
                            var fontSize = elementFontSize(oParagraphDiv);
                            smallestFontSize = Math.min( smallestFontSize, fontSize );
                            for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                            {
                                var oSpan = oParagraphDiv.childNodes[j];
                                if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                {
                                    fontSize = elementFontSize(oSpan);
                                    smallestFontSize = Math.min( smallestFontSize, fontSize );
                                }
                            }
                        }
                    }
                    var minimum = parseFloat(MINIMUM_FONT);
                    
                    var count = 0
                    while ((smallestFontSize > minimum) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        ++ count;
                        if (oneLine)
                        {
                            var oldWidth = parseInt(oTextBoxOuterDiv.style.width);
                            oTextBoxInnerDiv.style.width =
                                "" + oldWidth * Math.pow(1.05, count) + "px";
                        }
                        else
                        {
                            var scale = Math.max(0.95, minimum / smallestFontSize);
                            
                            for (i = 0; i < aParaChildren.length; i++)
                            {
                                var oParagraphDiv = aParaChildren[i];
                                if (oParagraphDiv.nodeName == "DIV")
                                {
                                    var paraFontSize = elementFontSize(oParagraphDiv) * scale;
                                    var paraLineHeight = elementLineHeight(oParagraphDiv) * scale;
                                    for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                    {
                                        var oSpan = oParagraphDiv.childNodes[j];
                                        if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                        {
                                            var spanFontSize = elementFontSize(oSpan) * scale;
                                            var spanLineHeight = elementLineHeight(oSpan) * scale;
                                            oSpan.style.fontSize = spanFontSize + UNITS;
                                            oSpan.style.lineHeight = spanLineHeight + UNITS;
                                            smallestFontSize = Math.min( smallestFontSize, spanFontSize );
                                        }
                                    }
                                    oParagraphDiv.style.fontSize = paraFontSize + UNITS;
                                    oParagraphDiv.style.lineHeight = paraLineHeight + UNITS;
                                    smallestFontSize = Math.min( smallestFontSize, paraFontSize );
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}


function elementLineHeight(element)
{
    var lineHeight = MINIMUM_FONT; 
    
    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            lineHeight = computedStyle.getPropertyValue("line-height");
        }
    }
    else if (element.currentStyle)
    {
        lineHeight = element.currentStyle.lineHeight;
    }
    
    if ((UNITS.length == 0) && (lineHeight != MINIMUM_FONT))
    {
        UNITS = lineHeight.substring(lineHeight.length - 2, lineHeight.length)
    }
    
    return parseFloat(lineHeight);
}

function adjustLineHeightIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var adjusted = true;
                    var count = 0;
                    while ((adjusted) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        adjusted = false;
                        ++ count;
                        
                        var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                        for (i = 0; i < aParaChildren.length; i++)
                        {
                            var oParagraphDiv = aParaChildren[i];
                            if (oParagraphDiv.nodeName == "DIV")
                            {
                                var fontSize = elementFontSize(oParagraphDiv);
                                var lineHeight = elementLineHeight(oParagraphDiv) * 0.95;
                                if (lineHeight >= (fontSize * 1.1))
                                {
                                    oParagraphDiv.style.lineHeight = lineHeight + UNITS;
                                    adjusted = true;
                                }
                                
                                
                                
                                for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                {
                                    var oSpan = oParagraphDiv.childNodes[j];
                                    if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                    {
                                        var fontSize = elementFontSize(oSpan);
                                        var lineHeight = elementLineHeight(oSpan) * 0.95;
                                        if (lineHeight >= (fontSize * 1.1))
                                        {
                                            oSpan.style.lineHeight = lineHeight + UNITS;
                                            var adjusted = true;
                                        }
                                    }
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}

var smallTransparentGif = "";
function fixupIEPNG(strImageID, transparentGif) 
{
    smallTransparentGif = transparentGif;
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        var img = document.getElementById(strImageID);
        if (img)
        {
            var src = img.src;
            img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
            img.src = transparentGif;
            img.attachEvent("onpropertychange", imgPropertyChanged);
        }
    }
}

function fixupIEPNGBG(oBlock) 
{
    if (oBlock)
    {
        var currentBGImage = oBlock.currentStyle.backgroundImage;
        var currentBGRepeat = oBlock.currentStyle.backgroundRepeat;
        var urlStart = currentBGImage.indexOf('url(');
        var urlEnd = currentBGImage.indexOf(')', urlStart);
        var imageURL = currentBGImage.substring(urlStart + 4, urlEnd);

        if (imageURL.charAt(0) == '"')
        {
            imageURL = imageURL.substring(1);
        }
        
        if (imageURL.charAt(imageURL.length - 1) == '"')
        {
            imageURL = imageURL.substring(0, imageURL.length - 1);
        }

        var overrideRepeat = false;

        var filterStyle =
            "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
            imageURL +
            "', sizingMethod='crop');";

        if (RegExp("/C[0-9A-F]{8}.png$").exec(imageURL) != null)
        {
            filterStyle =
                "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                imageURL +
                "', sizingMethod='scale');";

            overrideRepeat = true;
        }

        var backgroundImage = new Image();
        backgroundImage.src = imageURL;
        var tileWidth = backgroundImage.width;
        var tileHeight = backgroundImage.height; 
        
        var blockWidth = 0;
        var blockHeight = 0;
        if (oBlock.style.width)
        {
            blockWidth = parseInt(oBlock.style.width);
        }
        else
        {
            blockWidth = oBlock.offsetWidth;
        }
        if (oBlock.style.height)
        {
            blockHeight = parseInt(oBlock.style.height);
        }
        else
        {
            blockHeight = oBlock.offsetHeight;
        }

        if ((blockWidth == 0) || (blockHeight == 0))
        {
            return;
        }
        
        var wholeRows = 1;
        var wholeCols = 1;
        var extraHeight = 0;
        var extraWidth = 0;
        
        if ((currentBGRepeat.indexOf("no-repeat") != -1) ||
              ((tileWidth == 0) && (tileHeight == 0)) ||
              overrideRepeat)
        {
            tileWidth = blockWidth;
            tileHeight = blockHeight;

        }
        else if ((currentBGRepeat.indexOf("repeat-x") != -1) ||
              (tileHeight == 0))
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            tileHeight = blockHeight;

        }
        else if (currentBGRepeat.indexOf("repeat-y") != -1)
        {
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraHeight = blockHeight - (tileHeight * wholeRows);
            tileWidth = blockWidth;

        }
        else
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            extraHeight = blockHeight - (tileHeight * wholeRows);
        }
        
        var wrappedContent = document.createElement("div");
        wrappedContent.style.position = "relative";
        wrappedContent.style.zIndex = "1";
        wrappedContent.style.left = "0px";
        wrappedContent.style.top = "0px";
        if (!isNaN(parseInt(oBlock.style.width)))
        {
            wrappedContent.style.width = "" + blockWidth + "px";
        }
        if (!isNaN(parseInt(oBlock.style.height)))
        {
            wrappedContent.style.height = "" + blockHeight + "px";
        }
        var pngBGFixIsWrappedContentEmpty = true;
        while (oBlock.hasChildNodes())
        {
            if (oBlock.firstChild.nodeType == 3)
            {
                if (RegExp("^ *$").exec(oBlock.firstChild.data) == null)
                {
                    pngBGFixIsWrappedContentEmpty = false;
                }
            }
            else
            {
                pngBGFixIsWrappedContentEmpty = false;
            }
            wrappedContent.appendChild(oBlock.firstChild);
        }
        if (pngBGFixIsWrappedContentEmpty)
        {
            wrappedContent.style.lineHeight = "0px";
        }
        
        var newMarkup = "";
        for (var currentRow = 0; 
             currentRow < wholeRows; 
             currentRow++)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        
        if (extraHeight != 0)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        oBlock.innerHTML = newMarkup;

        oBlock.appendChild(wrappedContent);
        oBlock.style.background= "";
    }
}

function fixupAllIEPNGBGs()
{
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        try
        {
            var oDivNodes = document.getElementsByTagName('DIV');
            for (var iIndex=0; iIndex<oDivNodes.length; iIndex++)
            {
                var oNode = oDivNodes.item(iIndex);
                if (oNode.currentStyle &&
                    oNode.currentStyle.backgroundImage &&
                    (oNode.currentStyle.backgroundImage.indexOf('url(') != -1) &&
                    (oNode.currentStyle.backgroundImage.indexOf('.png")') != -1))
                {
                    fixupIEPNGBG(oNode);
                }
            }
        }
        catch (e)
        {
        }
    }
}

function getChildOfType(oParent, sNodeName, requestedIndex)
{
    var childrenOfType = oParent.getElementsByTagName(sNodeName);
    return (requestedIndex < childrenOfType.length) ?
           childrenOfType.item(requestedIndex) : null;
}

function onPageLoad()
{
    detectBrowser();
    adjustLineHeightIfTooBig("id2");
    adjustFontSizeIfTooBig("id2");
    adjustLineHeightIfTooBig("id4");
    adjustFontSizeIfTooBig("id4");
    adjustLineHeightIfTooBig("id6");
    adjustFontSizeIfTooBig("id6");
    fixupAllIEPNGBGs();
    fixupIEPNG("id1", "Locations_files/transparent.gif");
    fixupIEPNG("id3", "Locations_files/transparent.gif");
    fixupIEPNG("id5", "Locations_files/transparent.gif");
    fixupIEPNG("id7", "Locations_files/transparent.gif");
    fixupIEPNG("id8", "Locations_files/transparent.gif");
    fixupIEPNG("id9", "Locations_files/transparent.gif");
    fixupIEPNG("id10", "Locations_files/transparent.gif");
    fixupIEPNG("id11", "Locations_files/transparent.gif");
    fixupIEPNG("id12", "Locations_files/transparent.gif");
    fixupIEPNG("id13", "Locations_files/transparent.gif");
    fixupIEPNG("id14", "Locations_files/transparent.gif");
    fixupIEPNG("id15", "Locations_files/transparent.gif");
    fixupIEPNG("id16", "Locations_files/transparent.gif");
    fixupIEPNG("id17", "Locations_files/transparent.gif");
    fixupIEPNG("id18", "Locations_files/transparent.gif");
    fixupIEPNG("id19", "Locations_files/transparent.gif");
    fixupIEPNG("id20", "Locations_files/transparent.gif");
    fixupIEPNG("id21", "Locations_files/transparent.gif");
    fixupIEPNG("id22", "Locations_files/transparent.gif");
    fixupIEPNG("id23", "Locations_files/transparent.gif");
    fixupIEPNG("id24", "Locations_files/transparent.gif");
    fixupIEPNG("id25", "Locations_files/transparent.gif");
    fixupIEPNG("id26", "Locations_files/transparent.gif");
    fixupIEPNG("id27", "Locations_files/transparent.gif");
    fixupIEPNG("id28", "Locations_files/transparent.gif");
    fixupIEPNG("id29", "Locations_files/transparent.gif");
    fixupIEPNG("id30", "Locations_files/transparent.gif");
    fixupIEPNG("id31", "Locations_files/transparent.gif");
    fixupIEPNG("id32", "Locations_files/transparent.gif");
    fixupIEPNG("id33", "Locations_files/transparent.gif");
    fixupIEPNG("id34", "Locations_files/transparent.gif");
    fixupIEPNG("id35", "Locations_files/transparent.gif");
    fixupIEPNG("id36", "Locations_files/transparent.gif");
    fixupIEPNG("id37", "Locations_files/transparent.gif");
    fixupIEPNG("id38", "Locations_files/transparent.gif");
    fixupIEPNG("id39", "Locations_files/transparent.gif");
    fixupIEPNG("id40", "Locations_files/transparent.gif");
    fixupIEPNG("id41", "Locations_files/transparent.gif");
    fixupIEPNG("id42", "Locations_files/transparent.gif");
    fixupIEPNG("id43", "Locations_files/transparent.gif");
    fixupIEPNG("id44", "Locations_files/transparent.gif");
    fixupIEPNG("id45", "Locations_files/transparent.gif");
    fixupIEPNG("id46", "Locations_files/transparent.gif");
    fixupIEPNG("id47", "Locations_files/transparent.gif");
    fixupIEPNG("id48", "Locations_files/transparent.gif");
    fixupIEPNG("id49", "Locations_files/transparent.gif");
    fixupIEPNG("id50", "Locations_files/transparent.gif");
    fixupIEPNG("id51", "Locations_files/transparent.gif");
    fixupIEPNG("id52", "Locations_files/transparent.gif");
    fixupIEPNG("id53", "Locations_files/transparent.gif");
    fixupIEPNG("id54", "Locations_files/transparent.gif");
    fixupIEPNG("id55", "Locations_files/transparent.gif");
    fixupIEPNG("id56", "Locations_files/transparent.gif");
    fixupIEPNG("id57", "Locations_files/transparent.gif");
    fixupIEPNG("id58", "Locations_files/transparent.gif");
    fixupIEPNG("id59", "Locations_files/transparent.gif");
    fixupIEPNG("id60", "Locations_files/transparent.gif");
    fixupIEPNG("id61", "Locations_files/transparent.gif");
    fixupIEPNG("id62", "Locations_files/transparent.gif");
    fixupIEPNG("id63", "Locations_files/transparent.gif");
    fixupIEPNG("id64", "Locations_files/transparent.gif");
    fixupIEPNG("id65", "Locations_files/transparent.gif");
    fixupIEPNG("id66", "Locations_files/transparent.gif");
    fixupIEPNG("id67", "Locations_files/transparent.gif");
    fixupIEPNG("id68", "Locations_files/transparent.gif");
    fixupIEPNG("id69", "Locations_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;
}

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;
    }
}

