slideShowURL = 'SlideShow_assets/SlideShow.html';       // paramater from openSlideShowWindow.js
slideShowNS4URL = 'SlideShow_assets/SlideShowNS4.html'; // parameter from openSlideShowWindow.js

slides = new Array();
slides[0] = new Slide('../karate lesson_files/Last Roll - 01.jpg', '308', '800', 'All lessons have a formal start and end.');
slides[1] = new Slide('../karate lesson_files/Last Roll - 06.jpg', '275', '800', 'Kihon: basic drills.');
slides[2] = new Slide('../karate lesson_files/Last Roll - 14.jpg', '287', '800', 'Kihon includes kicks...');
slides[3] = new Slide('../karate lesson_files/Last Roll - 23.jpg', '366', '800', '...punches...');
slides[4] = new Slide('../karate lesson_files/Last Roll - 04.jpg', '518', '800', '...and sometimes other drills.');
slides[5] = new Slide('../karate lesson_files/Last Roll - 09.jpg', '800', '697', 'Parents are welcome to watch.');
slides[6] = new Slide('../karate lesson_files/Last Roll - 07.jpg', '800', '546', 'Students help each other improve technique.');
slides[7] = new Slide('../karate lesson_files/Last Roll - 08.jpg', '800', '470', 'This is ‘Kaishi Kamae’...');
slides[8] = new Slide('../karate lesson_files/Last Roll - 10.jpg', '800', '462', '... a series of short coordinated exercises...');
slides[9] = new Slide('../karate lesson_files/Last Roll - 11.jpg', '800', '533', '...which train coordination...');
slides[10] = new Slide('../karate lesson_files/Last Roll - 12.jpg', '800', '526', '...speed...');
slides[11] = new Slide('../karate lesson_files/Last Roll - 13.jpg', '800', '499', '...and control of body weight.');
slides[12] = new Slide('../karate lesson_files/Last Roll - 22.jpg', '800', '533', 'All lessons normally include Kata.');
slides[13] = new Slide('../karate lesson_files/Last Roll - 37.jpg', '447', '800', 'Kata are longer sequences...');
slides[14] = new Slide('../karate lesson_files/Last Roll - 38.jpg', '532', '800', '...of fighting techniques.');
slides[15] = new Slide('../karate lesson_files/Last Roll - 40.jpg', '602', '800', 'Kata have names; this is Pinan Yondan.');
slides[16] = new Slide('../karate lesson_files/Last Roll - 17.jpg', '554', '800', 'Pinan Sandan kata.');
slides[17] = new Slide('../karate lesson_files/Last Roll - 41.jpg', '573', '800', 'The atmosphere in a class...');
slides[18] = new Slide('../karate lesson_files/Last Roll - 49.jpg', '800', '533', '...is one of focussed concentration.');
slides[19] = new Slide('../karate lesson_files/Last Roll - 50.jpg', '800', '533', 'If the hands are here, where are the feet?');
slides[20] = new Slide('../karate lesson_files/Last Roll - 16.jpg', '446', '800', 'Water break');
slides[21] = new Slide('../karate lesson_files/Last Roll - 18.jpg', '404', '800', 'Gekusai Ni kata');
slides[22] = new Slide('../karate lesson_files/Last Roll - 21.jpg', '415', '800', 'Training leg strength and wrist flexibility.');
slides[23] = new Slide('../karate lesson_files/Last Roll - 26.jpg', '800', '731', 'Bunkai: the meaning behind the katas.');
slides[24] = new Slide('../karate lesson_files/Last Roll - 27.jpg', '773', '800', 'Choreographed...');
slides[25] = new Slide('../karate lesson_files/Last Roll - 29.jpg', '783', '800', '...but performed with intent...');
slides[26] = new Slide('../karate lesson_files/Last Roll - 45.jpg', '800', '490', '...to train the partner’s defence.');
slides[27] = new Slide('../karate lesson_files/Last Roll - 46.jpg', '800', '533', 'Sanchin kata...');
slides[28] = new Slide('../karate lesson_files/Last Roll - 47.jpg', '800', '533', '...whole body tension is maintained...');
slides[29] = new Slide('../karate lesson_files/Last Roll - 48.jpg', '800', '578', '... the partner is helping to check tension.');
slides[30] = new Slide('../karate lesson_files/Last Roll - 51.jpg', '316', '800', 'Seienchun kata...');
slides[31] = new Slide('../karate lesson_files/Last Roll - 52.jpg', '318', '800', '...training shika dachi stance...');
slides[32] = new Slide('../karate lesson_files/Last Roll - 54.jpg', '488', '800', '...which has to be sustained for minutes.');
slides[33] = new Slide('../karate lesson_files/Last Roll - 55.jpg', '409', '800', 'Saifa kata');
slides[34] = new Slide('../karate lesson_files/Last Roll - 56.jpg', '421', '800', 'Balance...');
slides[35] = new Slide('../karate lesson_files/Last Roll - 57.jpg', '440', '800', '...with power');
slides[36] = new Slide('../karate lesson_files/Last Roll - 58.jpg', '800', '790', 'Hokei kumite...');
slides[37] = new Slide('../karate lesson_files/Last Roll - 59.jpg', '800', '681', '...paired exercises...');
slides[38] = new Slide('../karate lesson_files/Last Roll - 60.jpg', '655', '800', '...inspired by kata.');
slides[39] = new Slide('../karate lesson_files/Last Roll - 62.jpg', '507', '800', 'Etiquette is observed.');
slides[40] = new Slide('../karate lesson_files/Last Roll - 63.jpg', '800', '795', 'Pinan Sandan Hokei Kumite.');
slides[41] = new Slide('../karate lesson_files/Last Roll - 64.jpg', '409', '800', 'More Seienchun kata...');
slides[42] = new Slide('../karate lesson_files/Last Roll - 65.jpg', '448', '800', '...');
slides[43] = new Slide('../karate lesson_files/Last Roll - 66.jpg', '489', '800', '...');
slides[44] = new Slide('../karate lesson_files/Last Roll - 67.jpg', '464', '800', '...');
slides[45] = new Slide('../karate lesson_files/Last Roll - 68.jpg', '448', '800', '...');
slides[46] = new Slide('../karate lesson_files/Last Roll - 69.jpg', '533', '800', '...');
slides[47] = new Slide('../karate lesson_files/Last Roll - 70.jpg', '533', '800', 'Tensho kata');
slides[48] = new Slide('../karate lesson_files/Last Roll - 78.jpg', '679', '800', 'The sustained shikadachi stances...');
slides[49] = new Slide('../karate lesson_files/May2006-310.jpg', '515', '800', '...at the start of Seienchun...');
slides[50] = new Slide('../karate lesson_files/Last Roll - 79.jpg', '736', '800', '...');
slides[51] = new Slide('../karate lesson_files/Last Roll - 85.jpg', '619', '800', '...');
slides[52] = new Slide('../karate lesson_files/Last Roll - 86.jpg', '670', '800', 'The better you get...');
slides[53] = new Slide('../karate lesson_files/Last Roll - 87.jpg', '762', '800', '...the more important the details become.');
slides[54] = new Slide('../karate lesson_files/Last Roll - 90.jpg', '425', '800', '...');
slides[55] = new Slide('../karate lesson_files/Last Roll - 95.jpg', '598', '800', '...');
slides[56] = new Slide('../karate lesson_files/Last Roll - 96.jpg', '635', '800', '...');
slides[57] = new Slide('../karate lesson_files/Last Roll - 97.jpg', '617', '800', '...');
slides[58] = new Slide('../karate lesson_files/Last Roll - 71.jpg', '431', '800', 'Explanations of...');
slides[59] = new Slide('../karate lesson_files/Last Roll - 72.jpg', '711', '800', '...the finer points of shika dachi.');
slides[60] = new Slide('../karate lesson_files/Last Roll - 73.jpg', '637', '800', 'Arrive at the stance...');
slides[61] = new Slide('../karate lesson_files/Last Roll - 74.jpg', '586', '800', '...and with practice...');
slides[62] = new Slide('../karate lesson_files/Last Roll - 75.jpg', '670', '800', '...you can stay there...');
slides[63] = new Slide('../karate lesson_files/Last Roll - 76.jpg', '652', '800', '...for hours.');
slides[64] = new Slide('../karate lesson_files/Last Roll - 77.jpg', '680', '800', '“Just keep practicing”');
slides[65] = new Slide('../karate lesson_files/May2006-325a.jpg', '800', '521', 'Birthday celebrations at the end of the lesson.');
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)
    {
        fontSize = document.defaultView.getComputedStyle(element, null).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 oCachedHeight;
                if (windowsInternetExplorer)
                {
                    oCachedHeight = oTextBoxInnerDiv.style.height;
                    oTextBoxInnerDiv.style.height = "100px";
                }
                
                var clientHeight = oTextBoxInnerDiv.clientHeight;
                var specifiedHeight = clientHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if ((windowsInternetExplorer) && (clientHeight == 100))
                {
                    clientHeight = specifiedHeight;
                }
                if (clientHeight > specifiedHeight)
                {
                    // compute smallest font in text box for scale purposes.
                    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")
                                {
                                    fontSize = elementFontSize(oSpan);
                                    smallestFontSize = Math.min( smallestFontSize, fontSize );
                                }
                            }
                        }
                    }
                    var minimum = parseFloat(MINIMUM_FONT);
                    
                    var count = 0
                    while ((smallestFontSize > minimum) && (clientHeight > 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);
                            
                            // Scale all the fonts in the text box.
                            for (i = 0; i < aParaChildren.length; i++)
                            {
                                var oParagraphDiv = aParaChildren[i];
                                if (oParagraphDiv.nodeName == "DIV")
                                {
                                    var fontSize = elementFontSize(oParagraphDiv) * scale;
                                    oParagraphDiv.style.fontSize = fontSize + UNITS;
                                    oParagraphDiv.style.lineHeight = fontSize + UNITS;
                                    smallestFontSize = Math.min( smallestFontSize, fontSize );
                                    for (j = 0; j < oParagraphDiv.childNodes.length; j++)
                                    {
                                        var oSpan = oParagraphDiv.childNodes[j];
                                        if (oSpan.nodeName == "SPAN")
                                        {
                                            fontSize = elementFontSize(oSpan) * scale;
                                            oSpan.style.fontSize = fontSize + UNITS;
                                            oSpan.style.lineHeight = fontSize + UNITS;
                                            smallestFontSize = Math.min( smallestFontSize, fontSize );
                                        }
                                    }
                                }
                            }
                        }
                        
                        clientHeight = oTextBoxInnerDiv.clientHeight;
                    }
                }
                if (windowsInternetExplorer)
                {
                    oTextBoxInnerDiv.style.height = oCachedHeight;
                }
            }
        }
    }
}


function elementLineHeight(element)
{
    var lineHeight = MINIMUM_FONT; 
    
    if (document.defaultView)
    {
        lineHeight = document.defaultView.getComputedStyle(element, null).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 oCachedHeight;
                if (windowsInternetExplorer)
                {
                    oCachedHeight = oTextBoxInnerDiv.style.height;
                    oTextBoxInnerDiv.style.height = "100px";
                }
                
                var clientHeight = oTextBoxInnerDiv.clientHeight;
                var specifiedHeight = clientHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if ((windowsInternetExplorer) && (clientHeight == 100))
                {
                    clientHeight = specifiedHeight;
                }
                if (clientHeight > specifiedHeight)
                {
                    var adjusted = true;
                    var count = 0;
                    while ((adjusted) && (clientHeight > specifiedHeight) && (count < 10))
                    {
                        adjusted = false;
                        ++ count;
                        
                        // Scale all the line heights in the text box.
                        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")
                                    {
                                        var fontSize = elementFontSize(oSpan);
                                        var lineHeight = elementLineHeight(oSpan) * 0.95;
                                        if (lineHeight >= (fontSize * 1.1))
                                        {
                                            oSpan.style.lineHeight = lineHeight + UNITS;
                                            var adjusted = true;
                                        }
                                    }
                                }
                            }
                        }
                        
                        clientHeight = oTextBoxInnerDiv.clientHeight;
                    }
                }
                if (windowsInternetExplorer)
                {
                    oTextBoxInnerDiv.style.height = oCachedHeight;
                }
            }
        }
    }
}

function adjustPositioningIfWrongSize(idOfElement, shrinkPadding, shrink)
{
    var oTextBoxOuterDiv;
    var oTextBoxMiddleDiv;
    var oTextBoxInnerDiv;
    var oTextBoxAlternateImage;
    var oImg;
    var adjustPositioning = false;
    var adjustmentPixels = 0;
    var oTextBoxOuterDiv = document.getElementById(idOfElement);
    if (oTextBoxOuterDiv)
    {
        oTextBoxMiddleDiv = getChildOfType(oTextBoxOuterDiv, "DIV", 0);
        if (oTextBoxMiddleDiv)
        {
            oTextBoxInnerDiv = getChildOfType(oTextBoxMiddleDiv, "DIV", 0);
            if (oTextBoxInnerDiv)
            {
                var oCachedHeight;
                if (windowsInternetExplorer)
                {
                    oCachedHeight = oTextBoxInnerDiv.style.height;
                    oTextBoxInnerDiv.style.height = "100px";
                }
                var clientHeight = oTextBoxInnerDiv.clientHeight;
                var specifiedHeight = clientHeight;
                if (oTextBoxMiddleDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxMiddleDiv.style.height);
                }
                else if (oTextBoxOuterDiv.style.height != "")
                {
                    specifiedHeight = parseFloat(oTextBoxOuterDiv.style.height);
                }
                if ((windowsInternetExplorer) && (clientHeight == 100))
                {
                    clientHeight = specifiedHeight;
                }
                if (clientHeight > specifiedHeight || 
                    specifiedHeight > clientHeight + shrinkPadding )
                {
                    adjustPositioning = true;
                    adjustmentPixels = clientHeight - specifiedHeight;
                    if (specifiedHeight > clientHeight)
                    {
                      if (! shrink)
                      {
                          adjustPositioning = false;
                      }
                      else
                      {
                          adjustmentPixels += shrinkPadding;
                      }
                      
                    }
                }
                if (windowsInternetExplorer)
                {
                    oTextBoxInnerDiv.style.height = oCachedHeight;
                }
            }
        }
    }
    
    if (adjustPositioning)
    {
        var currentOuterHeight = parseInt(oTextBoxOuterDiv.style.height);
        var newOuterHeight = currentOuterHeight + adjustmentPixels;
        if( newOuterHeight <= 0 )        {            newOuterHeight = 1;        }        oTextBoxOuterDiv.style.height = "" + newOuterHeight + "px";

        oFooterLayer = document.getElementById("footer_layer");
        if (oFooterLayer)
        {
            var currentYPos = parseInt(oFooterLayer.style.top);
            var newYPos = currentYPos + adjustmentPixels;
            oFooterLayer.style.top = "" + newYPos + "px";
        }

        oBodyLayer = document.getElementById("body_layer");
        if (oBodyLayer)
        {
            var currentBodyLayerHeight = parseInt(oBodyLayer.style.height);
            var newBodyLayerHeight = currentBodyLayerHeight + adjustmentPixels;
            oBodyLayer.style.height = "" + newBodyLayerHeight + "px";
        }

        oBodyContentDiv = document.getElementById("bodyContent");
        if (oBodyContentDiv)
        {
            var currentBodyContentHeight = parseInt(oBodyContentDiv.style.height);
            var newBodyContentHeight = currentBodyContentHeight + adjustmentPixels;
            oBodyContentDiv.style.height = "" + newBodyContentHeight + "px";
        }

        oNavLayer = document.getElementById("nav_layer");
        if(oNavLayer)
        {
            var currentNavLayerHeight = parseInt(oNavLayer.style.height);
            var diff = currentNavLayerHeight - currentBodyContentHeight;
            if ((diff > -10) && (diff < 10))
            {
                var newNavLayerHeight = currentNavLayerHeight + adjustmentPixels;
                oNavLayer.style.height = "" + newNavLayerHeight + "px";

                oNavBG = getChildOfType(oNavLayer, "DIV", 0);
                if (oNavBG)
                {
                    var currentNavBGHeight = parseInt(oNavBG.style.height);
                    var newNavBGHeight = currentNavBGHeight + adjustmentPixels;
                    oNavBG.style.height = "" + newNavBGHeight + "px";
                }
            }
        }

    }
}
var smallTransparentGif = "";
function fixupIEPNG(strImageID, transparentGif) 
{
    smallTransparentGif = transparentGif;
    if (windowsInternetExplorer)
    {
        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(strImageID) 
{
    if (windowsInternetExplorer)
    {
        var oBlock = document.getElementById(strImageID);
        if (oBlock)
        {
            var currentBGStyle = oBlock.style.background;
            var urlStart = currentBGStyle.indexOf("url(");
            var urlEnd = currentBGStyle.indexOf(")", urlStart);
            var imageURL = currentBGStyle.substring(urlStart + 4, urlEnd);
            var filterStyle =
                "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
                imageURL +
                "', sizingMethod='crop');";

            oBlock.style.filter = filterStyle;
            oBlock.style.background = "";
        }
    }
}

function getChildOfType(oParent, sNodeName, requestedIndex)
{
    var index = 0;
    for (i = 0; i < oParent.childNodes.length; i++)
    {
        if (oParent.childNodes[i].nodeName == sNodeName)
        {
            if (index == requestedIndex)
            {
                return oParent.childNodes[i];
            }
            else
            {
                index++;
            }
        }
    }
    return null;
}

function getParaDescendantsRec(oAncestor, aResultArray, index)
{
    if (index == -1)
    {
        if ((oAncestor.nodeName == "DIV") &&
            (oAncestor.className.lastIndexOf("paragraph") != -1))
        {
            aResultArray[aResultArray.length] = oAncestor;
        }
        else if ((oAncestor.nodeName == "DIV") ||
                 (oAncestor.nodeName == "LI") ||
                 (oAncestor.nodeName == "OL") ||
                 (oAncestor.nodeName == "UL"))
        {
            getParaDescendantsRec(oAncestor, aResultArray, 0);
        }
    }
    else
    {
        getParaDescendantsRec(oAncestor.childNodes[index], aResultArray, -1);
        if (index < (oAncestor.childNodes.length - 1))
        {
            getParaDescendantsRec(oAncestor, aResultArray, index + 1);
        }
    }
}

function getParaDescendants(oAncestor)
{
    var aResultArray = new Array();
    getParaDescendantsRec(oAncestor, aResultArray, -1);

    return aResultArray;
}

var windowsInternetExplorer = false;
function detectBrowser()
{
    windowsInternetExplorer = false;
    var appVersion = navigator.appVersion;
    if ((appVersion.indexOf("MSIE") != -1) &&
        (appVersion.indexOf("Macintosh") == -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;
    }
}

function onPageLoad()
{
    detectBrowser();
    fixupIEPNGBG("id1");
    adjustPositioningIfWrongSize("id2", 50, 1);
    adjustLineHeightIfTooBig("id3");
    adjustFontSizeIfTooBig("id3");
    fixupIEPNGBG("id4");
    fixupIEPNGBG("id5");
    fixupIEPNGBG("id6");
    fixupIEPNGBG("id7");
    fixupIEPNGBG("id8");
    fixupIEPNGBG("id9");
    fixupIEPNGBG("id10");
    fixupIEPNGBG("id11");
    fixupIEPNGBG("id12");
    fixupIEPNGBG("id13");
    fixupIEPNGBG("id14");
    fixupIEPNGBG("id15");
    fixupIEPNGBG("id16");
    fixupIEPNGBG("id17");
    fixupIEPNGBG("id18");
    fixupIEPNGBG("id19");
    fixupIEPNGBG("id20");
    fixupIEPNGBG("id21");
    fixupIEPNGBG("id22");
    fixupIEPNGBG("id23");
    fixupIEPNGBG("id24");
    fixupIEPNGBG("id25");
    fixupIEPNGBG("id26");
    fixupIEPNGBG("id27");
    fixupIEPNGBG("id28");
    fixupIEPNGBG("id29");
    fixupIEPNGBG("id30");
    fixupIEPNGBG("id31");
    fixupIEPNGBG("id32");
    fixupIEPNGBG("id33");
    fixupIEPNGBG("id34");
    fixupIEPNGBG("id35");
    fixupIEPNGBG("id36");
    fixupIEPNGBG("id37");
    fixupIEPNGBG("id38");
    fixupIEPNGBG("id39");
    fixupIEPNGBG("id40");
    fixupIEPNGBG("id41");
    fixupIEPNGBG("id42");
    fixupIEPNGBG("id43");
    fixupIEPNGBG("id44");
    fixupIEPNGBG("id45");
    fixupIEPNGBG("id46");
    fixupIEPNGBG("id47");
    fixupIEPNGBG("id48");
    fixupIEPNGBG("id49");
    fixupIEPNGBG("id50");
    fixupIEPNGBG("id51");
    fixupIEPNGBG("id52");
    fixupIEPNGBG("id53");
    fixupIEPNGBG("id54");
    fixupIEPNGBG("id55");
    fixupIEPNGBG("id56");
    fixupIEPNGBG("id57");
    fixupIEPNGBG("id58");
    fixupIEPNGBG("id59");
    fixupIEPNGBG("id60");
    fixupIEPNGBG("id61");
    fixupIEPNGBG("id62");
    fixupIEPNGBG("id63");
    fixupIEPNGBG("id64");
    fixupIEPNGBG("id65");
    fixupIEPNGBG("id66");
    fixupIEPNGBG("id67");
    fixupIEPNGBG("id68");
    fixupIEPNGBG("id69");
    fixupIEPNGBG("id70");
    fixupIEPNGBG("id71");
    fixupIEPNGBG("id72");
    fixupIEPNGBG("id73");
    fixupIEPNGBG("id74");
    fixupIEPNGBG("id75");
    fixupIEPNGBG("id76");
    fixupIEPNGBG("id77");
    fixupIEPNGBG("id78");
    fixupIEPNGBG("id79");
    fixupIEPNGBG("id80");
    fixupIEPNGBG("id81");
    fixupIEPNGBG("id82");
    fixupIEPNGBG("id83");
    fixupIEPNGBG("id84");
    fixupIEPNGBG("id85");
    fixupIEPNGBG("id86");
    fixupIEPNGBG("id87");
    fixupIEPNGBG("id88");
    fixupIEPNGBG("id89");
    fixupIEPNGBG("id90");
    fixupIEPNGBG("id91");
    fixupIEPNGBG("id92");
    fixupIEPNGBG("id93");
    fixupIEPNGBG("id94");
    fixupIEPNGBG("id95");
    fixupIEPNGBG("id96");
    fixupIEPNGBG("id97");
    fixupIEPNGBG("id98");
    fixupIEPNGBG("id99");
    fixupIEPNGBG("id100");
    fixupIEPNGBG("id101");
    fixupIEPNGBG("id102");
    fixupIEPNGBG("id103");
    fixupIEPNGBG("id104");
    fixupIEPNGBG("id105");
    fixupIEPNGBG("id106");
    fixupIEPNGBG("id107");
    fixupIEPNGBG("id108");
    fixupIEPNGBG("id109");
    fixupIEPNGBG("id110");
    fixupIEPNGBG("id111");
    fixupIEPNGBG("id112");
    fixupIEPNGBG("id113");
    fixupIEPNGBG("id114");
    fixupIEPNGBG("id115");
    fixupIEPNGBG("id116");
    fixupIEPNGBG("id117");
    fixupIEPNGBG("id118");
    fixupIEPNGBG("id119");
    fixupIEPNGBG("id120");
    fixupIEPNGBG("id121");
    fixupIEPNGBG("id122");
    fixupIEPNGBG("id123");
    fixupIEPNGBG("id124");
    fixupIEPNGBG("id125");
    fixupIEPNGBG("id126");
    fixupIEPNGBG("id127");
    fixupIEPNGBG("id128");
    fixupIEPNGBG("id129");
    fixupIEPNGBG("id130");
    fixupIEPNGBG("id131");
    fixupIEPNGBG("id132");
    fixupIEPNGBG("id133");
    fixupIEPNGBG("id134");
    fixupIEPNGBG("id135");
    fixupIEPNG("id136", "karate lesson_files/transparent.gif");
    adjustLineHeightIfTooBig("id137");
    adjustFontSizeIfTooBig("id137");
    return true;
}


