// JavaScript Document
NS4 = (document.layers) ? true : false;
NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;

// Get Current Date
today= new Date();
// get Month and Day
switch (today.getMonth()) {
	case 0 :ThisMonth = "January"; break;
	case 1 :ThisMonth = "February"; break;
	case 2 :ThisMonth = "March"; break;
	case 3 :ThisMonth = "April"; break;
	case 4 :ThisMonth = "May"; break;
	case 5 :ThisMonth = "June"; break;
	case 6 :ThisMonth = "July"; break;
	case 7 :ThisMonth = "August"; break;
	case 8 :ThisMonth = "September"; break;
	case 9 :ThisMonth = "October"; break;
	case 10 :ThisMonth = "November"; break;
	case 11 :ThisMonth = "December"; break;
	default: ThisMonth = "Error";
	}
ThisDate = today.getDate();
MonthAndDay = ThisMonth + " "  + ThisDate;

function LinkToSchedule(filename,classes)
{
if (ThisMonth == "November" || ThisMonth == "December" ||ThisMonth == "January" || ThisMonth == "February") {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/spring/" + filename + "'>Spring " + classes + " Schedule</a>")
	}
if ((ThisMonth == "March" || ThisMonth == "April" || ThisMonth == "May") && classes != "Service Learning") {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/Sum1/" + filename + "'>Summer " + classes + " Schedule</a>")
	}
if (ThisMonth == "June" || ThisMonth == "July" || ThisMonth == "August" || ThisMonth == "September" || ThisMonth == "October") {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/fall/" + filename + "'>Fall " + classes + " Schedule</a>")
	}
}

//function MenuLink(filename,classes)
//{
//if (ThisMonth == "November" || ThisMonth == "December" ||ThisMonth == "January" || ThisMonth == "February") {
//	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/spring/" + filename + "'>Spring " + classes + " Schedule</a>")
//	}
//if (ThisMonth == "March" || ThisMonth == "April" || ThisMonth == "May") {
//	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/Sum1/" + filename + "'>Summer " + classes + " Schedule</a>")
//	}
//if (ThisMonth == "June" || ThisMonth == "July" || ThisMonth == "August" || ThisMonth == "September" || ThisMonth == "October") {
//	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/fall/" + filename + "'>Fall " + classes + " Schedule</a>")
//	}
//}

function LinkToMainSchedule()
{
if (ThisMonth == "November" || ThisMonth == "December" ||ThisMonth == "January" || ThisMonth == "February" || ThisMonth == "March" || ThisMonth == "April"  ) {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/spring/index.html'>Spring Credit Schedule</a>")
	}
if (ThisMonth == "March" || ThisMonth == "April" || ThisMonth == "May" || ThisMonth == "June" || ThisMonth == "July") {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/Sum1/index.html'>Summer 1 Credit Schedule</a>")
	}
if (ThisMonth == "March" || ThisMonth == "April" || ThisMonth == "May" || ThisMonth == "June" || ThisMonth == "July") {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/Sum2/index.html'>Summer 2 Credit Schedule</a>")
	}
if (ThisMonth == "June" || ThisMonth == "July" || ThisMonth == "August" || ThisMonth == "September" || ThisMonth == "October" ) {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/cdi/fall/index.html'>Fall Credit Schedule</a>")
	}
}

function LinkToeSchedule()
{
if (ThisMonth == "November" || ThisMonth == "December" ||ThisMonth == "January" || ThisMonth == "February" ) {
	document.writeln ("<p><a href='http://www.eastfieldcollege.edu/eSchedule/spring/index.html'>Spring Credit Schedule</a></p>")
	}
if (ThisMonth == "March" || ThisMonth == "April" || ThisMonth == "May" || ThisMonth == "June" || ThisMonth == "July") {
	document.writeln ("<p><a href='http://www.eastfieldcollege.edu/eSchedule/Sum1/index.html'>Summer 1 Credit Schedule</a></p>")
	}
if (ThisMonth == "March" || ThisMonth == "April" || ThisMonth == "May" || ThisMonth == "June" || ThisMonth == "July") {
	document.writeln ("<p><a href='http://www.eastfieldcollege.edu/eSchedule/Sum2/index.html'>Summer 2 Credit Schedule</a></p>")
	}
if (ThisMonth == "June" || ThisMonth == "July" || ThisMonth == "August" || ThisMonth == "September" || ThisMonth == "October" || ThisMonth == "November") {
	document.writeln ("<p><a href='http://www.eastfieldcollege.edu/eSchedule/fall/index.html'>Fall Credit Schedule</a></p>")
	}
}

function LinktoFinals ()
{
if ( ThisMonth == "August" || ThisMonth == "September" || ThisMonth == "October" || ThisMonth == "November" || ThisMonth == "December" ) {
	document.writeln ("<a  href='http://www.eastfieldcollege.edu/cdi/fallfinal.asp'>Fall Final Exam Schedule</a>")
	}	
if (ThisMonth == "January" || ThisMonth == "February" || ThisMonth == "March" || ThisMonth == "April"  ||ThisMonth == "May") {
	document.writeln ("<a  href='http://www.eastfieldcollege.edu/cdi/SpringFinal.asp'>Spring Final Exam Schedule</a>")
	}	
}

function LinkToCEDSchedule(filename,classes)
{
if (ThisMonth == "November" || ThisMonth == "December" ||ThisMonth == "January" || ThisMonth == "February" || ThisMonth == "March" || (ThisMonth == "April" && ThisDate <= 9 )) {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/ced/spring/" + filename + "'>Spring " + classes + " Schedule</a>")
	}
if ((ThisMonth == "April" && ThisDate >= 9 )|| ThisMonth == "May"  ) {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/ced/Summer/" + filename + "'>Summer " + classes + " Schedule</a>")
	}
if ((ThisMonth == "June" && ThisDate >= 11 )|| ThisMonth == "July" || ThisMonth == "August" || ThisMonth == "September" || ThisMonth == "October") {
	document.writeln ("<a href='http://www.eastfieldcollege.edu/ced/fall/" + filename + "'>Fall " + classes + " Schedule</a>")
	}
}
