// background variables
var today = new Date()
var bkgd = "Sunday.jpg"
var dow = today.getDay()
var tble

//foreground variables
var today = new Date()
var month = today.getMonth()
var date = today.getDate()
var year = today.getYear()
var month_whole = "January"
var year_whole = 2000
var wholeDate = "today"

// background figuring
if (dow == 0) {bkgd = "images/dates/sunday.gif"}
if (dow == 1) {bkgd = "images/dates/monday.gif"}
if (dow == 2) {bkgd = "images/dates/tuesday.gif"}
if (dow == 3) {bkgd = "images/dates/wednesday.gif"}
if (dow == 4) {bkgd = "images/dates/thursday.gif"}
if (dow == 5) {bkgd = "images/dates/friday.gif"}
if (dow == 6) {bkgd = "images/dates/saturday.gif"}

// foreground figuring
if (month == 0) {month_whole = "January"}
if (month == 1) {month_whole = "February"}
if (month == 2) {month_whole = "March"}
if (month == 3) {month_whole = "April"}
if (month == 4) {month_whole = "May"}
if (month == 5) {month_whole = "June"}
if (month == 6) {month_whole = "July"}
if (month == 7) {month_whole = "August"}
if (month == 8) {month_whole = "September"}
if (month == 9) {month_whole = "October"}
if (month == 10) {month_whole = "November"}
if (month == 11) {month_whole = "December"}

year_whole = 0000 + year

wholeDate = month_whole + " " + date

// creating table
tble = '<TABLE WIDTH="125" BORDER="0" CELLSPACING="0"';
tble += 'CELLPADDING="0" HEIGHT="27">';
tble += '  <TR>';
tble += '    <TD WIDTH="125" HEIGHT="27"ALIGN="center" VALIGN="bottom" BACKGROUND="';
tble += bkgd;
tble += '"><CENTER><FONT COLOR="#5a0021" FACE="Arial" SIZE="-2">';
tble += wholeDate;
tble += '    </FONT></CENTER></TD>';
tble += '  </TR>';
tble += '</TABLE>'

document.write(tble)
