window.onload = init;

function init() {    
    if (document.getElementsByTagName) {
        tables = document.getElementsByTagName("table");
        // thanks w3c, for making the tables element the same
        // as an preorder tree traversel would make them. allows
        // me to go to the last entry in the array, and also
        // know it's the last in the tree!
        for (var i = 0; i < tables.length; i++) {
            if (tables[i].getElementsByTagName) {
                trs = tables[i].getElementsByTagName("tr");
                // remember, do not remove previous class things.
                trs[trs.length-1].className = trs[trs.length-1].className + " lastrow";
                
            }
        }
    }
    // here we add styling to the abbr element in IE. why does IE suck?
    // http://www.sovavsiti.cz/css/abbr.html (though not using his solution)
    if (window.ActiveXObject && document.body.innerHTML != "") {
        oldBodyText = document.body.innerHTML;
        reg = /<ABBR([^>]*)>(.*?)<\/ABBR>/gi;
        newBodyText = oldBodyText.replace(reg,'<ABBR $1><SPAN class=\"abbr\" $1>$2</SPAN></ABBR>');
        document.body.innerHTML = newBodyText;
    }    
}
