Category Splitter (DOM version) Apr 8, 2007 15:14:40 GMT -5 Select PostDeselect PostLink to PostMemberGive GiftBack to Top Post by offline on Apr 8, 2007 15:14:40 GMT -5 This one runs just as quickly as the other. The only difference is that this one follows the W3C DOM standards.Description: Splits the main-page categories into tables separated by set margins.Cross-browser: YesMain Footer<script type="text/javascript"><!--// Category Splitter (DOM version)var u = "30px"; // Margin between categoriesvar split = [], tables = document.getElementById("container").getElementsByTagName("table");if(!location.href.match(/action=/) || location.href.match(/action=home/)) { for(var i = tables[2 - -countertables()].rows, x = 1, a = -1; x < i.length; x ++) { if(i[x].firstChild.className == "windowbg") { split.firstChild.appendChild(i[x].cloneNode(true)); } else if(i[x].firstChild.align != "right") { a ++; split = tables[2 - -countertables()].cloneNode(false); split.style.marginBottom = u; split.style.backgroundColor = tables[1].bgColor; split.appendChild(document.createElement("tbody")); split.firstChild.appendChild(i[0].cloneNode(true)); split.firstChild.appendChild(i[x].cloneNode(true)); } }; tables[1 - -countertables()].rows[0].cells[0].removeChild(tables[1 - -countertables()].rows[0].cells[0].firstChild); tables[1 - -countertables()].style.backgroundColor = "transparent"; for(var x in split) tables[1 - -countertables()].rows[0].cells[0].appendChild(split[x]);}//--></script>