Post by Peter on Jun 5, 2005 3:58:54 GMT -8
If you are using my other dividing category code, remove it. You only need to use one.
This one will allow you to add an end gradient.
<script type="text/javascript">
<!--
// Created by PopThosePringles
// Size of the gap between categories
var gapSize = 25;
// Gradient URL
var gradientURL = "";
// Mark as read image, incase it is custom
var iMark = "markasread.gif";
var tabHTML = '<td id="rr" colspan="5"></table></td></tr></table><div style="height:' + gapSize + '"></div><table width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="100%"><tr>';
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){
var tBod = document.getElementsByTagName("tbody");
for(tb = 0; tb < tBod.length; tb ++){
for(r = 2; r < tBod.item(tb).rows.length; r ++){
var tBodObj = tBod.item(tb).rows.item(r).cells.item(0);
if(tBodObj.className == "catbg" && tBodObj.colSpan == "5" && tBodObj.align != "right"){
var c = tabHTML + tBod.item(tb).firstChild.innerHTML + "</tr>";
var p = tBodObj.parentNode.innerHTML;
var tBodPar = tBod.item(tb).parentNode.parentNode.parentNode.parentNode.parentNode;
tBodPar.parentNode.innerHTML = tBodPar.parentNode.innerHTML.replace(p, c + p);
}
if(tBod.item(tb).rows.item(r).firstChild.id == "rr" || tBod.item(tb).rows.item(r).innerHTML.match(iMark)){
tBod.item(tb).rows.item(r).firstChild.style.backgroundImage = "url(" + gradientURL + ")";
tBod.item(tb).rows.item(r).style.height = "24";
}
}
}
}
//-->
</script>
Main footer
This one will allow you to add an end gradient.
<script type="text/javascript">
<!--
// Created by PopThosePringles
// Size of the gap between categories
var gapSize = 25;
// Gradient URL
var gradientURL = "";
// Mark as read image, incase it is custom
var iMark = "markasread.gif";
var tabHTML = '<td id="rr" colspan="5"></table></td></tr></table><div style="height:' + gapSize + '"></div><table width="100%" cellspacing="0" cellpadding="0" class="bordercolor"><tr><td><table cellpadding="4" cellspacing="1" width="100%"><tr>';
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){
var tBod = document.getElementsByTagName("tbody");
for(tb = 0; tb < tBod.length; tb ++){
for(r = 2; r < tBod.item(tb).rows.length; r ++){
var tBodObj = tBod.item(tb).rows.item(r).cells.item(0);
if(tBodObj.className == "catbg" && tBodObj.colSpan == "5" && tBodObj.align != "right"){
var c = tabHTML + tBod.item(tb).firstChild.innerHTML + "</tr>";
var p = tBodObj.parentNode.innerHTML;
var tBodPar = tBod.item(tb).parentNode.parentNode.parentNode.parentNode.parentNode;
tBodPar.parentNode.innerHTML = tBodPar.parentNode.innerHTML.replace(p, c + p);
}
if(tBod.item(tb).rows.item(r).firstChild.id == "rr" || tBod.item(tb).rows.item(r).innerHTML.match(iMark)){
tBod.item(tb).rows.item(r).firstChild.style.backgroundImage = "url(" + gradientURL + ")";
tBod.item(tb).rows.item(r).style.height = "24";
}
}
}
}
//-->
</script>
Main footer