Peter
Junior Member
Coding God
Posts: 50
|
Post by Peter on Apr 29, 2006 13:31:56 GMT
Was a request, but thought it might be useful for others.
Global footer
<script type="text/javascript"> <!--
// Color for today var todayColor = "blue";
// Color for yesterday var yesterColor = "green";
var iCell = document.getElementsByTagName("td");
for(c = 0; c < iCell.length; c ++){ if(iCell.item(c).className == "windowbg2" && iCell.item(c).width.match(/^2(0|4)%/)){ if(iCell.item(c).firstChild.innerHTML.match(/(Today|Yesterday)/)){ switch(RegExp.$1){ case "Today" : iCell.item(c).firstChild.getElementsByTagName("b").item(0).style.color = todayColor; break; case "Yesterday" : iCell.item(c).firstChild.innerHTML = iCell.item(c).firstChild.innerHTML.replace(/(Yesterday)/, "<span style='color: " + yesterColor + "'>$1</span>"); break; } } } }
//--> </script>
|
|