function DateIT(daya,datea,montha,yeara,timea,text){
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date()
var wday = days[dateObj.getDay() + 1]
var month = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var year = dateObj.getYear()
if (year < 2000) {year = year + 1900}
if (montha=="January"){monthnumber="01"}
if (montha=="Febuary"){monthnumber="02"}
if (montha=="March"){monthnumber="03"}
if (montha=="April"){monthnumber="04"}
if (montha=="May"){monthnumber="05"}
if (montha=="June"){monthnumber="06"}
if (montha=="July"){monthnumber="07"}
if (montha=="August"){monthnumber="08"}
if (montha=="September"){monthnumber="09"}
if (montha=="October"){monthnumber="10"}
if (montha=="November"){monthnumber="11"}
if (montha=="December"){monthnumber="12"}
if (month=="January") {actualmonth="01"}
if (month=="Febuary") {actualmonth="02"}
if (month=="March") {actualmonth="03"}
if (month=="April") {actualmonth="04"}
if (month=="May") {actualmonth="05"}
if (month=="June") {actualmonth="06"}
if (month=="July") {actualmonth="07"}
if (month=="August") {actualmonth="08"}
if (month=="September") {actualmonth="09"}
if (month=="October") {actualmonth="10"}
if (month=="November") {actualmonth="11"}
if (month=="December") {actualmonth="12"}
enddate="<sup>th</sup>"
if (datea=="01"||datea=="21"|datea=="31"){enddate="<sup>st</sup>"}
if (datea=="02"|datea=="22"){enddate="<sup>nd</sup>"}
if (datea=="03"|datea=="23"){enddate="<sup>nd</sup>"}
//document.writeln(' Month: '+month+' ('+actualmonth+') Montha: '+montha+' ('+monthnumber+' )<br>');
if (year==yeara){
	if (actualmonth<monthnumber){
document.writeln(''+daya+' '+datea+''+enddate+' '+montha+' '+yeara+' at '+timea+'<br>');
document.writeln(text+'<p>')
}	
if (actualmonth==monthnumber&&date<datea){
togo=datea-date
if (togo==1) timetogo="<b>That's Tomorrow</b>";
if (togo==2) timetogo="<b>That's the day after tomorrow</b>";
if (togo>=3&&togo<7)timetogo="That's this week in <b>"+togo+"</b> days time";
if (togo>=7&&togo<14)timetogo="That's next week";
if (togo>=14&&togo<21)timetogo="That's the week after next";
if (togo>=21)timetogo="Later this month";
document.writeln(''+daya+' '+datea+''+enddate+' '+montha+'  '+yeara+' at '+timea+'<br>');
document.writeln(' (<i>'+timetogo+'</i>)<br>'+text+'<p>')
}
if (actualmonth==monthnumber&&date==datea){
document.writeln('<b><font color="#ff0000">Today at '+timea+'</font></b><br>');
document.writeln(text+'<p>')
}}}
