/*
window.onload = onLoad;

imgTrueDir = imagesDir + "true.png";
imgFalseDir = imagesDir + "false.png";

function onLoad() {
    var tables = document.getElementsByTagName("TABLE");
    if (tables) {
        for (var index = 0; index < tables.length; index++) {
            FormatTable(tables[index], "EvenRows", "OddRows");
        }
    }
}

function FormatTable(tableObject, evenRowClass, oddRowClass) {
    var rows = tableObject.getElementsByTagName("TR");
    for (var i = 0; i < rows.length; i++) {
        //        if (i % 2) {
        //            rows[i].className = oddRowClass;
        //        }
        //        else {
        //            if(i == rows.length - 1)
        //                rows[i].className = evenRowClass + "_Last";
        //            else
        //                rows[i].className = evenRowClass;
        //        }
        FormatCells(rows[i]);
    }
}


//imagesDir - external variable
//example declaration: <script type="text/javascript" language="JavaScript">imagesDir = "../../images/table/";</script>
function FormatCells(tr) {
    if (tr && imagesDir) {
        var td = tr.getElementsByTagName('TD');
        if (td) {
            var lowerCase;
            for (var i = 0; i < td.length; i++) {
                if (td[i].innerHTML) {
                    lowerCase = td[i].innerHTML.toLowerCase().replace(/^\s*|\s*$/g, "");
                    if (lowerCase == 'true' || lowerCase == 'yes' || lowerCase == 'on') {
                        td[i].className = "boolean";
                        td[i].innerHTML = '<img src="' + imgTrueDir + '" alt="' + td[i].innerHTML + '"></img>';
                    }
                    else if (lowerCase == 'false' || lowerCase == 'no' || lowerCase == 'off') {
                        td[i].className = "boolean";
                        td[i].innerHTML = '<img src="' + imgFalseDir + '" alt="' + td[i].innerHTML + '"></img>';
                    }
                }
                else if (td[i].innertext) {
                    lowerCase = td[i].innertext.toLowerCase();
                    if (lowerCase == 'true' || lowerCase == 'yes' || lowerCase == 'on') {
                        td[i].className = "boolean";
                        td[i].innertext = '<img src="' + imgTrueDir + '" alt="' + td[i].innertext + '"></img>';
                    }
                    else if (lowerCase == 'false' || lowerCase == 'no' || lowerCase == 'off') {
                        td[i].className = "boolean";
                        td[i].innertext = '<img src="' + imgFalseDir + '" alt="' + td[i].innertext + '"></img>';
                    }
                }
            }
        }
    }
}
*/
