functiondisplayAbbreviations(){if(!document.getElementsByTagName ||!document.createElement ||!document.createTextNode)returnfalse;//get all the abbreviationsvar abbreviations = document.getElementsByTagName("abbr");if(abbreviations.length <1)returnfalse;var defs =newArray();//loop through the abbreviationsfor(var i =0; i < abbreviations.length; i++){var current_abbr = abbreviations[i];if(current_abbr.childNodes.length <1)continue;var definition = current_abbr.getAttribute("title");var key = current_abbr.lastChild.nodeValue;
defs[key]= definition;}//create the definition listvar dlist = document.createElement("dl");//loop through the definitionsfor(key in defs){var definition = defs[key];//create the definition titlevar dtitle = document.createElement("dt");var dtitle_text = document.createTextNode(key);
dtitle.appendChild(dtitle_text);//create the definition decriptionvar ddesc = document.createElement("dd");var ddesc_text = document.createTextNode(definition);
ddesc.appendChild(ddesc_text);//add them to the definition list
dlist.appendChild(dtitle);
dlist.appendChild(ddesc);}if(dlist.childNodes.length <1)returnfalse;//create a headlinevar header = document.createElement("h2");var header_text = document.createTextNode("Abbreviations");
header.appendChild(header_text);//add the headline to the body
document.body.appendChild(header);//add the definition list to the body
document.body.appendChild(dlist);}addLoadEvent(displayAbbreviations);
scripts/highlightRows.js
functionhighlightRows(){if(!document.getElementsByTagName)returnfalse;var rows = document.getElementsByTagName("tr");for(var i =0; i < rows.length; i++){
rows[i].onmouseover=function(){this.style.fontWeight ="bold";}
rows[i].onmouseout=function(){this.style.fontWeight ="normal";}}}addLoadEvent(highlightRows);