var WindowDate = "";
function MaintenanceWindowDisplay(TheWindow)
{
	//Setting Variables
	var NextWindow = 0
	var CurrentDate = new Date()
	var Today = CurrentDate.getDay()
	var Time = CurrentDate.getHours()
	var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December")


	//Determines the next Maintenance Window
	//Determines if it is Sunday
	if (Today == 0)
	{
		//Determines if is 1:00 PM or later
		if (Time >= 13)
		{
			NextWindow = 7 + parseInt(CurrentDate.getDate())
		}
		else
		{
			NextWindow = parseInt(CurrentDate.getDate())
		}
	}
	//Otherwise Calculate the distance from Sunday
	else
	{
		DistFromSunday = 7 - parseInt(Today)
		NextWindow = DistFromSunday + parseInt(CurrentDate.getDate())
	}

	//Sets the Current Date to the next Maintenance Window
	CurrentDate.setDate(NextWindow)

	//Gets the Month, Day and Year
	var WindowMonth = CurrentDate.getMonth()
	var WindowDay = CurrentDate.getDate()
	var WindowYear = CurrentDate.getFullYear()

	//Outputs the Date in a nice format
	TheWindow = monthname[WindowMonth] + " " + WindowDay + ", " + WindowYear
	return (TheWindow)
	
}

//document.write ('<i><b><font color="red">Sunday May 27, 2006</font></b></i> -WebCT Vista will be unavailable beginning at 7:00 AM on Saturday May 27, 2006 to perform necessary maintenance. This maintenance will be done during the Extended UCS Maintenance Window that lasts from May 27 to May 28; for more details see the Academic Calendar available here: <a href="http://www.marshall.edu/calendar/academic/summer2006.asp"> http://www.marshall.edu/calendar/academic/<br>summer2006.asp</a>.<br> Access to WebCT Vista will intermittent during this window but we will work to have Vista available as soon as possible.<br><br>');
document.write ('<i><b><font color="red">Sunday ' + MaintenanceWindowDisplay(WindowDate) + '</font></b></i> - Vista will be unavailable from 7:00 AM to 1:00 PM to perform a system backup.  Services should be restored by 1:00 PM the same day.<br><br>');
//document.write ('<i><b><font color="red">Friday June 9, 2006</font></b></i> - Vista will be unavailable from 5:00 PM to 6:00 PM to perform system maintenance.  Services should be restored by 6:00 PM the same day.<br><br>');
//document.write ('<i><b><font color="red">Sunday May 21, 2006</font></b></i> - Vista will be unavailable from 6:00 AM to 1:00 PM to perform a system backup.  We will need to begin the maintenance an hour prior to the UCS Maintenance Window to ensure that we can complete all of the necessary maintenance before 1:00 PM.<br><br>');
document.write ('Are you having trouble getting logged into WebCT Vista because of Java Security windows locking up your computer? <a href="http://www.marshall.edu/muonline/vistatutorial/JavaSecurity.htm" target="_blank">Click here to find out how to fix it.</a><br>');


//document.write ('<i><b><font color="red">Friday March 10, 2006</font></b></i> - WebCT Vista was unavailable from around 9:00 PM on March 09, 2006 until 8:30 AM on March 10, 2006 because of issues affecting the power at Drinko Library. Vista is currently running and everything is working properly. We regret any inconvenience this has caused and we appreciate your patience on this matter.<br><br>');

//document.write ('<i><b><font color="red">Tuesday March 21, 2006</font></b></i> -WebCT Vista was unavailable from around 3:05 PM on March 21, 2006 until 4:25 PM on March 21, 2006 because of issues affecting the power at Drinko Library. Vista is currently running and everything is working properly. We regret any inconvenience this has caused and we appreciate your patience on this matter.<br><br>');


//document.write ('<i><b><font color="red">Sunday August 7, 2005</font></b></i> - WebCT Vista will be down at 6:00 AM Sunday morning on 08/07/2005 for extended maintenance and will be unavailable. We anticipate that WebCT Vista will be available at 2:00 PM the same afternoon. We regret any inconvenience this may cause.<br><br>');
//document.write ('<i><b><font color="red">Friday April, 08 2005</font></b></i> - We will be restarting Vista in the morning at 4:00 AM on 04/08/2005 which means that Vista will be unavailable at that time. This restart is necessary to resolve an issue being encountered with pin updates from Banner. Vista should be available again by 4:30 AM the same morning. We regret any inconvenience this may cause and we are working to make this impact as minimal as possible.<br>');
//document.write ('<i><b><font color="red">Friday November 5, 2004</font></b></i> - We will be restarting Vista in the morning at 3:00AM on 11/05/2004 which means that Vista will be unavailable at that time. This restart is necessary to change the information being logged on Vista. Vista should be available again by 3:30AM the same morning. We regret any inconvenience this may cause and we are working to make this impact as minimal as possible.<br><br>');

