Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Sept 23, 2005 19:17:21 GMT
Main FooterAdds todays date into the info center <script type="text/javascript"> <!-- /* date in info center */
var pos = 1; //0 for in the box with 'Total Topics' etc. or 1 for with the 'Newest Member' etc.
var date = new Date(); var day = date.getDay(); var month = date.getMonth(); var daym = date.getDate(); if(daym == (1|21|31)){ext = 'st'} else if(daym == (2|22)){ext = 'nd'} else if(daym == (3|23)){ext = 'rd'} else{ext = 'th'} var dayarray=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; var montharray=["January","February","March","April","May","June","July","August","September", "October","November","December"]; var td = document.getElementsByTagName('td'); for(i=0; i<td.length; i++) if(td.width == '60%' && td[i+1].width == '40%') { td[i+pos].innerHTML+='<br/>Date: '+ dayarray[day] +', '+ daym +'<sup>' +ext+ '</sup> '+montharray[month]; } //--> </script>
|
|