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('../ArtGallery_files/leo.jpg', '754', '800', 'Leo\nNEW SERIES');
slides[1] = new Slide('../ArtGallery_files/aires.jpg', '776', '576', 'Aires\nNEW SERIES');
slides[2] = new Slide('../ArtGallery_files/capricorn.jpg', '800', '623', 'Capricorn\nNEW SERIES');
slides[3] = new Slide('../ArtGallery_files/The Blue Grail.jpg', '801', '641', 'The Blue Grail\n');
slides[4] = new Slide('../ArtGallery_files/jazz\u0027in it up.jpg', '801', '641', 'Jazz\u0027in it up\n');
slides[5] = new Slide('../ArtGallery_files/blue lady.jpg', '801', '641', 'Blue Lady\n');
slides[6] = new Slide('../ArtGallery_files/Closing Time.jpg', '801', '641', 'Closing Time\n');
slides[7] = new Slide('../ArtGallery_files/Horny Men.jpg', '641', '801', 'Horny Men\n');
slides[8] = new Slide('../ArtGallery_files/Tea Leaves.jpg', '800', '516', 'Tea Leaves\n');
slides[9] = new Slide('../ArtGallery_files/Dawn mist on the valley.jpg', '800', '619', 'Dawn mist on the valley');
slides[10] = new Slide('../ArtGallery_files/Knickerbocker Trail.jpg', '619', '800', 'Knickerbocker Trail');
slides[11] = new Slide('../ArtGallery_files/Midnight-mass.jpg', '801', '538', 'Midnight-Mass');
slides[12] = new Slide('../ArtGallery_files/New Moon on the Hudson.jpg', '673', '800', 'New Moon on the Hudson');
slides[13] = new Slide('../ArtGallery_files/Graystone by Moonlihgt.jpg', '619', '800', 'Graystone by Moonlight');
slides[14] = new Slide('../ArtGallery_files/Riverside Park Bench.jpg', '800', '619', 'Riverside Park Bench');
slides[15] = new Slide('../ArtGallery_files/gas light in the square.jpg', '619', '800', 'Gas light in the square');
slides[16] = new Slide('../ArtGallery_files/salvador dali.jpg', '800', '619', 'Salvador Dali Replica');
slides[17] = new Slide('../ArtGallery_files/Full moon on the hudson.jpg', '619', '800', 'Full moon on the hudson');
slides[18] = new Slide('../ArtGallery_files/pa and me3.jpg', '800', '573', 'Pa and Me');
slides[19] = new Slide('../ArtGallery_files/Storm King.jpg', '800', '619', 'Storm King');
slides[20] = new Slide('../ArtGallery_files/novmber dawn.jpg', '619', '800', 'November Dawn');
slides[21] = new Slide('../ArtGallery_files/a time in the sun.jpg', '619', '800', 'A time in the sun');
slides[22] = new Slide('../ArtGallery_files/transformation-email.jpg', '489', '405', 'Transformation\n');
slides[23] = new Slide('../ArtGallery_files/The-Priory-email.jpg', '476', '395', 'The-Priory');
slides[24] = new Slide('../ArtGallery_files/The-Player-email.jpg', '478', '362', 'The-Player');
slides[25] = new Slide('../ArtGallery_files/Castillo-Sunset-email.jpg', '490', '384', 'Castillo-Sunset');
slides[26] = new Slide('../ArtGallery_files/A-Star-Is-Born-email.jpg', '460', '376', 'A-Star-Is-Born');
slides[27] = new Slide('../ArtGallery_files/Thinking-About-Art-email.jpg', '450', '393', 'Thinking-About-Art');
slides[28] = new Slide('../ArtGallery_files/Checking-Inn-email.jpg', '421', '370', 'Checking-Inn');
slides[29] = new Slide('../ArtGallery_files/The-Librarian-email.jpg', '462', '359', 'The-Librarian');
slides[30] = new Slide('../ArtGallery_files/The-Prophet-email.jpg', '584', '365', 'The-Prophet');
slides[31] = new Slide('../ArtGallery_files/Spanish-Guitar-email.jpg', '578', '389', 'Spanish-Guitar');
slides[32] = new Slide('../ArtGallery_files/The-Judas-Gate-email.jpg', '524', '389', 'The-Judas-Gate');
slides[33] = new Slide('../ArtGallery_files/Choices-email.jpg', '439', '386', 'Choices');
slides[34] = new Slide('../ArtGallery_files/The-Street-of-Dreams-email.jpg', '442', '390', 'The-Street-of-Dreams');
slides[35] = new Slide('../ArtGallery_files/Night-Shift-email.jpg', '436', '381', 'Night-Shift');
slides[36] = new Slide('../ArtGallery_files/The-Dressing-Room-(Left)-em.jpg', '431', '385', 'The-Dressing-Room\n(Left)');
slides[37] = new Slide('../ArtGallery_files/The-Dressing-Room-(Center)-.jpg', '430', '370', 'The-Dressing-Room(Center)');
slides[38] = new Slide('../ArtGallery_files/The-Dressing-Room-(Right)-e.jpg', '424', '376', 'The-Dressing-Room(Right)');
slides[39] = new Slide('../ArtGallery_files/The-Burden-email.jpg', '458', '366', 'The-Burden');
slides[40] = new Slide('../ArtGallery_files/Janus-email.jpg', '471', '384', 'Janus-');
slides[41] = new Slide('../ArtGallery_files/The-Mall-email.jpg', '448', '394', 'The-Mall');
slides[42] = new Slide('../ArtGallery_files/Controlling-Situations-emai.jpg', '465', '392', 'Controlling-Situations');
slides[43] = new Slide('../ArtGallery_files/Ray\u0027s-Blues-email.jpg', '384', '629', 'Ray\u0027s-Blues');
slides[44] = new Slide('../ArtGallery_files/Four-AM-in-the-City-email.jpg', '381', '468', 'Four-AM-in-the-City');
slides[45] = new Slide('../ArtGallery_files/The-Apartment-email.jpg', '376', '474', 'The-Apartment');
slides[46] = new Slide('../ArtGallery_files/Vanity-email.jpg', '540', '383', 'Vanity');
slides[47] = new Slide('../ArtGallery_files/All-She-Wants-To-Do-Is-Danc.jpg', '455', '401', 'All-She-Wants-To-Do-Is-Dance');
slides[48] = new Slide('../ArtGallery_files/The-Library-email.jpg', '411', '584', 'The-Library');
slides[49] = new Slide('../ArtGallery_files/Demon-Sleep-email.jpg', '531', '424', 'Demon-Sleep');
slides[50] = new Slide('../ArtGallery_files/Breaking-Out-email.jpg', '496', '384', 'Breaking-Out');
slides[51] = new Slide('../ArtGallery_files/Catch-of-the-Day-email.jpg', '356', '333', 'Catch-of-the-Day');
slides[52] = new Slide('../ArtGallery_files/Catching-Rays-email.jpg', '405', '280', 'Catching-Rays');
slides[53] = new Slide('../ArtGallery_files/Congas-email.jpg', '336', '311', 'Congas');
slides[54] = new Slide('../ArtGallery_files/Fiddling-Arround-email.jpg', '344', '306', 'Fiddling-Around');
slides[55] = new Slide('../ArtGallery_files/Keeping-the-Beat-email.jpg', '474', '401', 'Keeping-the-Beat');
slides[56] = new Slide('../ArtGallery_files/Madonna-and-Child-email.jpg', '436', '356', 'Madonna-and-Child');
slides[57] = new Slide('../ArtGallery_files/Perplexed-email.jpg', '394', '369', 'Perplexed');
slides[58] = new Slide('../ArtGallery_files/Woman-with-Cello-email.jpg', '352', '357', 'Woman-with-Cello');
slides[59] = new Slide('../ArtGallery_files/Uptown-Girl-email.jpg', '367', '329', 'Uptown-Girl');
slides[60] = new Slide('../ArtGallery_files/Two-Can-Dream-email.jpg', '396', '446', 'Two-Can-Dream');
slides[61] = new Slide('../ArtGallery_files/Tribute-to-a-Master-email.jpg', '508', '336', 'Tribute-to-a-Master');
slides[62] = new Slide('../ArtGallery_files/Sweet-Dreams-email.jpg', '353', '411', 'Sweet-Dreams-');
slides[63] = new Slide('../ArtGallery_files/Woman-with-Violin-email.jpg', '376', '425', 'Woman-with-Violin');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

var MINIMUM_FONT = "10";
var UNITS = "";

function elementFontSize(element)
{
    var fontSize = MINIMUM_FONT; 

    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            fontSize = computedStyle.getPropertyValue("font-size");
        }
    }
    else if (element.currentStyle)
    {
        fontSize = element.currentStyle.fontSize;
    }

    if ((UNITS.length == 0) && (fontSize != MINIMUM_FONT))
    {
        UNITS = fontSize.substring(fontSize.length - 2, fontSize.length)
    }

    return parseFloat(fontSize);
}

function adjustFontSizeIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var smallestFontSize = 200;
                    
                    var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                    var oneLine = false;
                    for (i = 0; i < aParaChildren.length; i++)
                    {
                        var oParagraphDiv = aParaChildren[i];
                        var lineHeight = elementLineHeight(oParagraphDiv);
                        oneLine = oneLine || (lineHeight * 1.5 >= specifiedHeight);
                        if (oParagraphDiv.nodeName == "DIV")
                        {
                            var fontSize = elementFontSize(oParagraphDiv);
                            smallestFontSize = Math.min( smallestFontSize, fontSize );
                            for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                            {
                                var oSpan = oParagraphDiv.childNodes[j];
                                if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                {
                                    fontSize = elementFontSize(oSpan);
                                    smallestFontSize = Math.min( smallestFontSize, fontSize );
                                }
                            }
                        }
                    }
                    var minimum = parseFloat(MINIMUM_FONT);
                    
                    var count = 0
                    while ((smallestFontSize > minimum) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        ++ count;
                        if (oneLine)
                        {
                            var oldWidth = parseInt(oTextBoxOuterDiv.style.width);
                            oTextBoxInnerDiv.style.width =
                                "" + oldWidth * Math.pow(1.05, count) + "px";
                        }
                        else
                        {
                            var scale = Math.max(0.95, minimum / smallestFontSize);
                            
                            for (i = 0; i < aParaChildren.length; i++)
                            {
                                var oParagraphDiv = aParaChildren[i];
                                if (oParagraphDiv.nodeName == "DIV")
                                {
                                    var paraFontSize = elementFontSize(oParagraphDiv) * scale;
                                    var paraLineHeight = elementLineHeight(oParagraphDiv) * scale;
                                    for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                    {
                                        var oSpan = oParagraphDiv.childNodes[j];
                                        if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                        {
                                            var spanFontSize = elementFontSize(oSpan) * scale;
                                            var spanLineHeight = elementLineHeight(oSpan) * scale;
                                            oSpan.style.fontSize = spanFontSize + UNITS;
                                            oSpan.style.lineHeight = spanLineHeight + UNITS;
                                            smallestFontSize = Math.min( smallestFontSize, spanFontSize );
                                        }
                                    }
                                    oParagraphDiv.style.fontSize = paraFontSize + UNITS;
                                    oParagraphDiv.style.lineHeight = paraLineHeight + UNITS;
                                    smallestFontSize = Math.min( smallestFontSize, paraFontSize );
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}


function elementLineHeight(element)
{
    var lineHeight = MINIMUM_FONT; 
    
    if (document.defaultView)
    {
        var computedStyle = document.defaultView.getComputedStyle(element, null);
        if (computedStyle)
        {
            lineHeight = computedStyle.getPropertyValue("line-height");
        }
    }
    else if (element.currentStyle)
    {
        lineHeight = element.currentStyle.lineHeight;
    }
    
    if ((UNITS.length == 0) && (lineHeight != MINIMUM_FONT))
    {
        UNITS = lineHeight.substring(lineHeight.length - 2, lineHeight.length)
    }
    
    return parseFloat(lineHeight);
}

function adjustLineHeightIfTooBig(idOfElement)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var offsetHeight = oTextBoxInnerDiv.offsetHeight;
                var specifiedHeight = offsetHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if (offsetHeight > specifiedHeight)
                {
                    var adjusted = true;
                    var count = 0;
                    while ((adjusted) && (offsetHeight > specifiedHeight) && (count < 10))
                    {
                        adjusted = false;
                        ++ count;
                        
                        var aParaChildren = getParaDescendants(oTextBoxInnerDiv);
                        for (i = 0; i < aParaChildren.length; i++)
                        {
                            var oParagraphDiv = aParaChildren[i];
                            if (oParagraphDiv.nodeName == "DIV")
                            {
                                var fontSize = elementFontSize(oParagraphDiv);
                                var lineHeight = elementLineHeight(oParagraphDiv) * 0.95;
                                if (lineHeight >= (fontSize * 1.1))
                                {
                                    oParagraphDiv.style.lineHeight = lineHeight + UNITS;
                                    adjusted = true;
                                }
                                
                                
                                
                                for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                {
                                    var oSpan = oParagraphDiv.childNodes[j];
                                    if ((oSpan.nodeName == "SPAN") || (oSpan.nodeName == "A"))
                                    {
                                        var fontSize = elementFontSize(oSpan);
                                        var lineHeight = elementLineHeight(oSpan) * 0.95;
                                        if (lineHeight >= (fontSize * 1.1))
                                        {
                                            oSpan.style.lineHeight = lineHeight + UNITS;
                                            var adjusted = true;
                                        }
                                    }
                                }
                            }
                        }
                        
                        offsetHeight = oTextBoxInnerDiv.offsetHeight;
                    }
                }
            }
        }
    }
}

var smallTransparentGif = "";
function fixupIEPNG(strImageID, transparentGif) 
{
    smallTransparentGif = transparentGif;
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        var img = document.getElementById(strImageID);
        if (img)
        {
            var src = img.src;
            img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
            img.src = transparentGif;
            img.attachEvent("onpropertychange", imgPropertyChanged);
        }
    }
}

function fixupIEPNGBG(oBlock) 
{
    if (oBlock)
    {
        var currentBGImage = oBlock.currentStyle.backgroundImage;
        var currentBGRepeat = oBlock.currentStyle.backgroundRepeat;
        var urlStart = currentBGImage.indexOf('url(');
        var urlEnd = currentBGImage.indexOf(')', urlStart);
        var imageURL = currentBGImage.substring(urlStart + 4, urlEnd);

        if (imageURL.charAt(0) == '"')
        {
            imageURL = imageURL.substring(1);
        }
        
        if (imageURL.charAt(imageURL.length - 1) == '"')
        {
            imageURL = imageURL.substring(0, imageURL.length - 1);
        }

        var overrideRepeat = false;

        var filterStyle =
            "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
            imageURL +
            "', sizingMethod='crop');";

        if (RegExp("/C[0-9A-F]{8}.png$").exec(imageURL) != null)
        {
            filterStyle =
                "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                imageURL +
                "', sizingMethod='scale');";

            overrideRepeat = true;
        }

        var backgroundImage = new Image();
        backgroundImage.src = imageURL;
        var tileWidth = backgroundImage.width;
        var tileHeight = backgroundImage.height; 
        
        var blockWidth = 0;
        var blockHeight = 0;
        if (oBlock.style.width)
        {
            blockWidth = parseInt(oBlock.style.width);
        }
        else
        {
            blockWidth = oBlock.offsetWidth;
        }
        if (oBlock.style.height)
        {
            blockHeight = parseInt(oBlock.style.height);
        }
        else
        {
            blockHeight = oBlock.offsetHeight;
        }

        if ((blockWidth == 0) || (blockHeight == 0))
        {
            return;
        }
        
        var wholeRows = 1;
        var wholeCols = 1;
        var extraHeight = 0;
        var extraWidth = 0;
        
        if ((currentBGRepeat.indexOf("no-repeat") != -1) ||
              ((tileWidth == 0) && (tileHeight == 0)) ||
              overrideRepeat)
        {
            tileWidth = blockWidth;
            tileHeight = blockHeight;

        }
        else if ((currentBGRepeat.indexOf("repeat-x") != -1) ||
              (tileHeight == 0))
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            tileHeight = blockHeight;

        }
        else if (currentBGRepeat.indexOf("repeat-y") != -1)
        {
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraHeight = blockHeight - (tileHeight * wholeRows);
            tileWidth = blockWidth;

        }
        else
        {
            wholeCols = Math.floor(blockWidth / tileWidth);
            wholeRows = Math.floor(blockHeight / tileHeight);
            extraWidth = blockWidth - (tileWidth * wholeCols);
            extraHeight = blockHeight - (tileHeight * wholeRows);
        }
        
        var wrappedContent = document.createElement("div");
        wrappedContent.style.position = "relative";
        wrappedContent.style.zIndex = "1";
        wrappedContent.style.left = "0px";
        wrappedContent.style.top = "0px";
        if (!isNaN(parseInt(oBlock.style.width)))
        {
            wrappedContent.style.width = "" + blockWidth + "px";
        }
        if (!isNaN(parseInt(oBlock.style.height)))
        {
            wrappedContent.style.height = "" + blockHeight + "px";
        }
        var pngBGFixIsWrappedContentEmpty = true;
        while (oBlock.hasChildNodes())
        {
            if (oBlock.firstChild.nodeType == 3)
            {
                if (RegExp("^ *$").exec(oBlock.firstChild.data) == null)
                {
                    pngBGFixIsWrappedContentEmpty = false;
                }
            }
            else
            {
                pngBGFixIsWrappedContentEmpty = false;
            }
            wrappedContent.appendChild(oBlock.firstChild);
        }
        if (pngBGFixIsWrappedContentEmpty)
        {
            wrappedContent.style.lineHeight = "0px";
        }
        
        var newMarkup = "";
        for (var currentRow = 0; 
             currentRow < wholeRows; 
             currentRow++)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + tileHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        
        if (extraHeight != 0)
        {
            for (currentCol = 0; 
                 currentCol < wholeCols; 
                 currentCol++)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + tileWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
            
            if (extraWidth != 0)
            {
                newMarkup += "<div style=" +
                        "\"position: absolute; line-height: 0px; " +
                        "width: " + extraWidth + "px; " +
                        "height: " + extraHeight + "px; " +
                        "left:" + currentCol *  tileWidth + "px; " +
                        "top:" + currentRow *  tileHeight + "px; " +
                        "filter:" + filterStyle + 
                        "\" > </div>";
            }
        }
        oBlock.innerHTML = newMarkup;

        oBlock.appendChild(wrappedContent);
        oBlock.style.background= "";
    }
}

function fixupAllIEPNGBGs()
{
    if (windowsInternetExplorer && (browserVersion < 7))
    {
        try
        {
            var oDivNodes = document.getElementsByTagName('DIV');
            for (var iIndex=0; iIndex<oDivNodes.length; iIndex++)
            {
                var oNode = oDivNodes.item(iIndex);
                if (oNode.currentStyle &&
                    oNode.currentStyle.backgroundImage &&
                    (oNode.currentStyle.backgroundImage.indexOf('url(') != -1) &&
                    (oNode.currentStyle.backgroundImage.indexOf('.png")') != -1))
                {
                    fixupIEPNGBG(oNode);
                }
            }
        }
        catch (e)
        {
        }
    }
}

function getChildOfType(oParent, sNodeName, requestedIndex)
{
    var childrenOfType = oParent.getElementsByTagName(sNodeName);
    return (requestedIndex < childrenOfType.length) ?
           childrenOfType.item(requestedIndex) : null;
}

function getParaDescendants(oAncestor)
{
    var oParaDescendants = new Array();
    var oPotentialParagraphs = oAncestor.getElementsByTagName('DIV');
    for (var iIndex=0; iIndex<oPotentialParagraphs.length; iIndex++)
    {
        var oNode = oPotentialParagraphs.item(iIndex);
        if (oNode.className.lastIndexOf('paragraph') != -1)
        {
            oParaDescendants.push(oNode);
        }
    }
    return oParaDescendants;
}

function onPageLoad()
{
    detectBrowser();
    adjustLineHeightIfTooBig("id3");
    adjustFontSizeIfTooBig("id3");
    fixupAllIEPNGBGs();
    fixupIEPNG("id1", "ArtGallery_files/transparent.gif");
    fixupIEPNG("id2", "ArtGallery_files/transparent.gif");
    fixupIEPNG("id4", "ArtGallery_files/transparent.gif");
    fixupIEPNG("id5", "ArtGallery_files/transparent.gif");
    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;
    }
}

