var browserName=navigator.appName;
var isNS = (browserName=="Netscape")?true:false;
var isIE = (browserName=="Microsoft Internet Explorer")?true:false;

var new_Date = new Date();
var curr_Month = new_Date.getMonth();
var curr_Day = new_Date.getDay();
var curr_Date = new_Date.getDate();
var curr_Year = new_Date.getYear();
if(isNS){ curr_Year+=1900; }

var LongMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var LongDay = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var totalDays = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

var currentThird; var tDate;

function findDates() {
	currentDate = new_Date.getDate(); var ext = "";
	currentThird = findThird(curr_Month,curr_Year);
	if(currentDate>currentThird){ curr_Month+=1; currentThird = findThird(curr_Month,curr_Year); }
	tDate = new Date(curr_Year,curr_Month,currentThird);
	
	var tEnd = eval("\"" + currentThird + "\"");
	var endChar = parseInt(tEnd.length-1);
	
	if(tEnd.charAt(endChar)==1){ ext = "st"; }
	else if(tEnd.charAt(endChar)==2){ ext = "nd"; }
	else if(tEnd.charAt(endChar)==3){ ext = "rd"; }
	else { ext = "th"; }
	
	pDate = LongMonth[curr_Month] + " " + currentThird + ext + ", " + curr_Year; // + " @ 7:00PM";
	return pDate;	
}

function findThird(mon,yr){
	var tWeek = 0; var retDate;
	for(DayTest=1;DayTest<totalDays[mon];DayTest++){
		var TestDate = new Date(yr,mon,DayTest);
		curr_Day = TestDate.getDay();
		if(curr_Day==5){ tWeek++; }
		if(tWeek==3){ retDate = parseInt(TestDate.getDate()); return retDate; }
	}
}