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('../TCLPhotoGallery_files/San Felipe.jpg', '600', '800', 'Charming San Felipe');
slides[1] = new Slide('../TCLPhotoGallery_files/YFFA-2(Aug2009)-3.jpg', '600', '800', '“Welcome!” from the Staff at Tarpon Cay Lodge');
slides[2] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 13, 2005 047.jpg', '600', '800', 'Tarpon Tools of the Trade');
slides[3] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 12, 2005 016.jpg', '600', '800', 'Dawn at Tarpon Cay');
slides[4] = new Slide('../TCLPhotoGallery_files/_MG_6387.jpg', '533', '800', 'In Search of Silver');
slides[5] = new Slide('../TCLPhotoGallery_files/FlyDecision.jpg', '800', '532', 'Decisions... decisions...');
slides[6] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 13, 2005 006.jpg', '600', '800', 'Baby Beauty');
slides[7] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 13, 2005 014.jpg', '480', '640', 'Searching the Flats');
slides[8] = new Slide('../TCLPhotoGallery_files/Yucatan tarpon 08 2241.jpg', '532', '800', 'Working the “groves”');
slides[9] = new Slide('../TCLPhotoGallery_files/SilverRainbow.jpg', '532', '800', 'Chasing “silver” at the end of a rainbow...');
slides[10] = new Slide('../TCLPhotoGallery_files/Yucatan tarpon 08 1321.jpg', '532', '800', 'Hearty meals');
slides[11] = new Slide('../TCLPhotoGallery_files/SOL.jpg', '800', '532', 'Liquid sunshine!');
slides[12] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Pedro) 078.jpg', '600', '800', 'Working the Mangroves');
slides[13] = new Slide('../TCLPhotoGallery_files/_MG_6495.jpg', '533', '800', 'Youthful and Vibrant Tarpon');
slides[14] = new Slide('../TCLPhotoGallery_files/_MG_6594.jpg', '533', '800', 'Flamingo flight');
slides[15] = new Slide('../TCLPhotoGallery_files/_MG_6634.jpg', '517', '800', 'Fishing amongst Flamingos');
slides[16] = new Slide('../TCLPhotoGallery_files/Mangrove Baby T.jpg', '600', '800', 'Mangrove Baby Tarpon');
slides[17] = new Slide('../TCLPhotoGallery_files/_MG_6542.jpg', '533', '800', 'Midday Siesta');
slides[18] = new Slide('../TCLPhotoGallery_files/Top-Water Baby T!.jpg', '600', '800', 'Top-Water Baby T!');
slides[19] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Ellesayo) 007.jpg', '600', '800', 'Beneath Lies the Silver King...');
slides[20] = new Slide('../TCLPhotoGallery_files/_MG_6692.jpg', '800', '533', 'Aerobatic Tarpon');
slides[21] = new Slide('../TCLPhotoGallery_files/_MG_6725.jpg', '639', '800', 'Tarpon Fun!');
slides[22] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Ellesayo) 009.jpg', '600', '800', 'In the moment...');
slides[23] = new Slide('../TCLPhotoGallery_files/TarponHead.jpg', '532', '800', 'Baby Tarpon');
slides[24] = new Slide('../TCLPhotoGallery_files/YFFA-2(Aug2009)-2.jpg', '687', '800', 'Tarpon admiration...');
slides[25] = new Slide('../TCLPhotoGallery_files/RobertHill_TCL_JackC.jpg', '334', '400', 'By-catch Jack...');
slides[26] = new Slide('../TCLPhotoGallery_files/TCL Baby T.jpg', '600', '800', 'Tarpon Smile');
slides[27] = new Slide('../TCLPhotoGallery_files/IMG_2264_2.jpg', '800', '550', 'Nice Snook!');
slides[28] = new Slide('../TCLPhotoGallery_files/_MG_6508.jpg', '533', '800', 'Tarpon Cay guide at sunset...');
slides[29] = new Slide('../TCLPhotoGallery_files/Baby+Tarpon+Flies-+View+2.jpg', '299', '400', 'Must-have flies (Bill Ninke ties)');
slides[30] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Ellesayo) 029.jpg', '562', '800', 'The SeaDucer fools another Tarpon');
slides[31] = new Slide('../TCLPhotoGallery_files/IMG_0128.jpg', '800', '600', 'Guide Cresp washing down the rods...');
slides[32] = new Slide('../TCLPhotoGallery_files/P7052029_2_2.jpg', '600', '800', 'Tarpon going VERTICAL!!!');
slides[33] = new Slide('../TCLPhotoGallery_files/RobertHill_TCL_MigTarpon.jpg', '289', '400', 'Baby T on the flats');
slides[34] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 12, 2005 029.jpg', '600', '800', 'Dusk... the magic hour for anglers');
slides[35] = new Slide('../TCLPhotoGallery_files/IMG_2307.jpg', '532', '800', 'Guides Pedro, Cresp, and Carlos');
slides[36] = new Slide('../TCLPhotoGallery_files/DawnAdmiration.jpg', '595', '800', 'Admiring the dawn hour...');
slides[37] = new Slide('../TCLPhotoGallery_files/P7031894.jpg', '600', '800', 'Hooked up in deep mangrove cover');
slides[38] = new Slide('../TCLPhotoGallery_files/IMG_1438_2.jpg', '533', '800', 'Snook release...');
slides[39] = new Slide('../TCLPhotoGallery_files/P7041943_2_2.jpg', '600', '800', 'Getting bent at dusk...');
slides[40] = new Slide('../TCLPhotoGallery_files/P7041956.jpg', '600', '800', 'Evening baby Tarpon');
slides[41] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 13, 2005(PM-TopWater) 041.jpg', '600', '800', 'Sunset Tarpon');
slides[42] = new Slide('../TCLPhotoGallery_files/IMG_0189.jpg', '600', '800', 'Hearty meals!');
slides[43] = new Slide('../TCLPhotoGallery_files/Yucatan tarpon 08 1971.jpg', '588', '800', 'Teenaged Tarpon');
slides[44] = new Slide('../TCLPhotoGallery_files/P7052049_2_2.jpg', '621', '800', 'Flip’n Out Tarpon');
slides[45] = new Slide('../TCLPhotoGallery_files/IMG_2115.jpg', '522', '800', 'Local fisherman at dawn...');
slides[46] = new Slide('../TCLPhotoGallery_files/YFFA28Aug200929.jpg', '300', '400', 'Morning baby T on the flats...');
slides[47] = new Slide('../TCLPhotoGallery_files/IMG_2141.jpg', '800', '532', 'Boats with extensive casting decks');
slides[48] = new Slide('../TCLPhotoGallery_files/IMG_2167_2.jpg', '711', '800', 'Tarpon HeadShot');
slides[49] = new Slide('../TCLPhotoGallery_files/RobertHill_TCL_Tarpon.jpg', '182', '400', 'Silver sheen...');
slides[50] = new Slide('../TCLPhotoGallery_files/IMG_2181.jpg', '532', '800', 'Going long...');
slides[51] = new Slide('../TCLPhotoGallery_files/IMG_1317.jpg', '533', '800', 'Eye-to-eye with Mr. Cuda');
slides[52] = new Slide('../TCLPhotoGallery_files/_MG_6858.jpg', '533', '800', 'Migratory Tarpon \nJune - September');
slides[53] = new Slide('../TCLPhotoGallery_files/P7031867_2_2.jpg', '590', '800', 'Finally... Tarpon surrenders...');
slides[54] = new Slide('../TCLPhotoGallery_files/BlantonTarpon.jpg', '800', '583', 'Tarpon grins...');
slides[55] = new Slide('../TCLPhotoGallery_files/IMG_2133 - Version 2.jpg', '522', '800', 'Grande Tarpon!');
slides[56] = new Slide('../TCLPhotoGallery_files/_MG_6910.jpg', '533', '800', 'All smiles...');
slides[57] = new Slide('../TCLPhotoGallery_files/KeithKaneko-Tarpon(2).jpg', '600', '800', 'Tarpon and masked angler...');
slides[58] = new Slide('../TCLPhotoGallery_files/YFFA(Aug2009).jpg', '528', '800', 'Tarpon revival...');
slides[59] = new Slide('../TCLPhotoGallery_files/_MG_6973.jpg', '533', '800', 'Twin Tarpon');
slides[60] = new Slide('../TCLPhotoGallery_files/LeoBigT.jpg', '600', '800', 'Some giants to 80+ pounds!');
slides[61] = new Slide('../TCLPhotoGallery_files/P7031876.jpg', '800', '646', 'Tarpon Release');
slides[62] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Pedro) 002.jpg', '600', '800', 'Take a local tour with lodge host Beto');
slides[63] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Pedro) 003.jpg', '600', '800', 'Tour the wetlands on the boardwalk');
slides[64] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Pedro) 040.jpg', '600', '800', 'The harbor at San Felipe');
slides[65] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 12, 2005 005.jpg', '600', '800', 'Distant Thunderhead');
slides[66] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 12, 2005 022.jpg', '800', '600', 'Eating well at TCL!');
slides[67] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Pedro) 043.jpg', '600', '800', 'Tarpon Cay Lodge is on the water');
slides[68] = new Slide('../TCLPhotoGallery_files/TCL Rooms.jpg', '600', '800', 'TCL Rooms');
slides[69] = new Slide('../TCLPhotoGallery_files/P7051985.jpg', '600', '800', 'Guest Room');
slides[70] = new Slide('../TCLPhotoGallery_files/P7051996.jpg', '600', '800', 'Rooms with an ocean front view...');
slides[71] = new Slide('../TCLPhotoGallery_files/VillasManglar-Cancun-Leo Gutterres - June 13, 2005(PM-TopWater) 002.jpg', '480', '640', 'Oceanside rooms');
slides[72] = new Slide('../TCLPhotoGallery_files/TCL (Day 3) - TerryJenkins - June 14, 2005 (AM with Pedro) 060.jpg', '600', '800', 'The boat landing at Tarpon Cay Lodge');
slides[73] = new Slide('../TCLPhotoGallery_files/Relaxing at TCL.jpg', '600', '800', 'Relaxing at TCL');
slides[74] = new Slide('../TCLPhotoGallery_files/Baby T Conservation Tour.jpg', '600', '800', 'Baby T Conservation Tour');
slides[75] = new Slide('../TCLPhotoGallery_files/Baby T in Wetlands.jpg', '800', '642', 'Baby T in Wetlands');
slides[76] = new Slide('../TCLPhotoGallery_files/TCL (Day 5) -  Eco-Tour- June 17, 2005 011.jpg', '600', '800', 'Dzilam de Bravo Eco-Tour');
slides[77] = new Slide('../TCLPhotoGallery_files/TCL (Day 5) -  Eco-Tour- June 17, 2005 026.jpg', '600', '800', 'Largest cenote in the Mexico - Dzilam de Bravo');
slides[78] = new Slide('../TCLPhotoGallery_files/TCL (Day 5) -  Eco-Tour- June 17, 2005 033.jpg', '600', '800', 'Inland Mangrove Tour');
slides[79] = new Slide('../TCLPhotoGallery_files/TCL (Day 5) -  Eco-Tour- June 17, 2005 044.jpg', '800', '600', 'Cenote inhabitant');
slides[80] = new Slide('../TCLPhotoGallery_files/TCL (Day 5) -  Eco-Tour- June 17, 2005 059.jpg', '600', '800', 'Visit the flamingo (and Tarpon!) preserve');
slides[81] = new Slide('../TCLPhotoGallery_files/TCL (Day 5) -  Eco-Tour- June 17, 2005 071.jpg', '600', '800', 'Baby T caught at the Flamingo Lagoon');
slides[82] = new Slide('../TCLPhotoGallery_files/_MG_6816.jpg', '800', '533', 'Infamous Chichen Itza');
slides[83] = new Slide('../TCLPhotoGallery_files/_MG_6805.jpg', '800', '533', 'The face of Mayan history');
slides[84] = new Slide('../TCLPhotoGallery_files/Yucatan tarpon 08 079.jpg', '800', '532', 'Tarpon HeadShot');
slides[85] = new Slide('../TCLPhotoGallery_files/Yucatan tarpon 08 105_2.jpg', '629', '800', 'Baby Beauty... Sabalito');
slides[86] = new Slide('../TCLPhotoGallery_files/_MG_6794.jpg', '533', '800', 'Columns at Chichen Itza');
slides[87] = new Slide('../TCLPhotoGallery_files/TCL (Final Day) -  GroupShot- June 18, 2005 017.jpg', '600', '800', 'The lodge shuttle');
slides[88] = new Slide('../TCLPhotoGallery_files/TCL-RainStorm 001.jpg', '599', '800', 'Yes, this is the tropics,... so bring rain gear!');
isPureISOLatin1 = true;
contentEncodingConstant = 4;
feedbackURL = "TODO";
showFeedbackButton = false;
feedbackEnabled = true;

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

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

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

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

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


