//start display day/date code

DaysofWeek = new Array()
DaysofWeek[0]="Sunday"
DaysofWeek[1]="Monday"
DaysofWeek[2]="Tuesday"
DaysofWeek[3]="Wednesday"
DaysofWeek[4]="Thursday"
DaysofWeek[5]="Friday"
DaysofWeek[6]="Saturday"

Months = new Array()
Months[0]="January"
Months[1]="February"
Months[2]="March"
Months[3]="April"
Months[4]="May"
Months[5]="June"
Months[6]="July"
Months[7]="August"
Months[8]="September"
Months[9]="October"
Months[10]="November"
Months[11]="December"


function fixNumber(the_number){
	if (the_number < 10){
		the_number = "0" + the_number;
		}
	return the_number;
}

function fixPMHours(the_number){
	if (the_number>12){
		the_number = the_number - 12;
		}
	return the_number;
} 

	var win_num=0;
	var	dayVal;
	var timeVal=new Date()
	var m=timeVal.getMinutes()
	var h=timeVal.getHours()
	var fixed_hour = fixPMHours(h);
	var da=timeVal.getDate()
	var mo=timeVal.getMonth()
	var year=timeVal.getYear()
	var showDay=DaysofWeek[timeVal.getDay()]
	var showMonth=Months[timeVal.getMonth()]
	var fixed_minute = fixNumber(m);
	var the_time = fixed_hour + ":" + fixed_minute;
	var the_date = (showDay+", "+showMonth+" "+da+"  ")

function showTime(){
	var timeValue = the_date
	document.write(timeValue);
}

function openNews(url) {
	openPlainScrollWindow(url, '400', '400', '50', '50');
}

function openCalendar(url) {
	openPlainScrollWindow(url, '400', '400', '50', '50');
}

function openPlainScrollWindow(url,w,h,l,t) {
        var att_string = "width="+w+",height="+h+"left="+l+",top="+t+",resizable=0,status=0,location=0,toolbar=0,menu=0,scrollbars=1";
        var win_name = "child_win" + win_num;
        win_num++;
        last_win_ref = window.open(url,win_name,att_string);
        return last_win_ref;
}

// this code goes right after the_date in var thimeValue to show hrs, min & am/pm
//+" "+the_time;
//	timeValue +=(h >= 12) ? " p.m." : " a.m.";
//end display day/date code

