// JavaScript Document

function msgCountdown()
{
	
<!-- This script displays countdown to a specified date/event-->
<!-- Begin
var date = new Date("January 13, 2010");
var description = "Spring Semester Starts";
var now = new Date();
var diff = date.getTime() - now.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));
document.write("<center><font size=+1 color=#0000FF>")
if (days > 30 ) {
document.write(days + 1 + " days until " + description);
}
else if (days == 30) {
document.write("Only one month until " + description);
}
else if (days < 30 && days > 7) {
document.write(days + 1 + " days until " + description);
}
else if (days == 7){
document.write("Next week is" + description + ".<br /><font color=#006400>Check your class schedule and get your books!</font>");
//document.write("Next week is" + description + ".<br /><font color=#006400>Don't start daydreaming yet - still have midterms coming up!</font>");
//document.write("Next week is " + description + ".<br /><font color=#006400>Check your final exam schedule!</font>");
//document.write("Next week " + description + ".<br /><font color=#006400>Midterms coming up!</font>");
}
else if (days < 7 && days > 2) {
document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Are you ready?  Be sure to get your textbooks & supplies before classes begin.</font>");
//document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Are you ready?</font>");
//document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Are you ready?  Better hit the books!</font>");
//document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Are your bags packed!  Don't forget to study for midterms!</font>");
//document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Don't forget to study for midterms!</font>");
}
else if (days == 2) {
document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Time to check your schedule and get ready!</font>");
//document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Time for some serious shopping and wrapping!</font>");
//document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>Time for some serious studying!</font>");
//document.write(days + 1 + " days until " + description + ".<br /><font color=#006400>You've almost made it through half of the semester!</font>");
}
else if (days == 1) {
document.write("Only two days until " + description + ".<br /><font color=#006400>Are you ready? Make sure you have your books!</font>");
}
else if (days == 0) {
document.write("Tomorrow " + description +"." + "<br /><font color=#006400>Are you ready? Check your schedule for class times and rooms!</font>");
//document.write("Tomorrow " + description +"." + "<br /><font color=#006400>Enjoy!</font>");
//document.write("Tomorrow is the first day of " + description +"." + "<br /><font color=#006400>Good luck on your finals!</font>");
//document.write("Tomorrow is " + description +"." + "<br /><font color=#006400>Have fun and stay safe! (...and don't forget to come back!)</font>");
//document.write("Tomorrow is " + description +"." + "<br /><font color=#006400>We are approaching the holiday season fast! Stay focused a little longer!)</font>"); 
}
else if (days == -1) {
document.write("Today " + description +"." + "<br /><font color=#006400>Welcome Back!</font>");
//document.write("Today is the first day of " + description + "!" + "<br /><font color=#006400>Check your final exam schedule.  Good Luck!</font>");
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Enjoy!</font>"); 
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Congratulations - you made it halfway through the semester!</font>"); 
}
else if (days == -2) {
//document.write("Today is" + description +"." + "<br /><font color=#006400>Welcome Back!</font>");
//document.write("Today is the second day of " + description + "!" + "<br /><font color=#006400>Check your final exam schedule.  Good Luck!</font>");
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Enjoy!</font>"); 
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Congratulations - you made it halfway through the semester!</font>"); 
}
else if (days == -3) {
//document.write("Today is" + description +"." + "<br /><font color=#006400>Welcome Back!</font>");
//document.write("Today is the third day of " + description + "!" + "<br /><font color=#006400>Check your final exam schedule.  Good Luck!</font>");
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Enjoy!</font>"); 
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Congratulations - you made it halfway through the semester!</font>"); 
}
else if (days == -4 || days == -5) {
//document.write("Today is" + description +"." + "<br /><font color=#006400>Welcome Back!</font>");
//document.write("Monday is the last day of " + description + "!" + "<br /><font color=#006400>Check your final exam schedule.  Good Luck! You've almost made it!</font>");
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Enjoy!</font>"); 
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Congratulations - you made it halfway through the semester!</font>"); 
}
else if (days == -6) {
//document.write("Today is" + description +"." + "<br /><font color=#006400>Welcome Back!</font>");
//document.write("Today is the last day of " + description + "!" + "<br /><font color=#006400>Check your final exam schedule.  Good Luck! Hang in there - break is almost here!</font>");
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Enjoy!</font>"); 
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Congratulations - you made it halfway through the semester!</font>"); 
}
else if (days == -7) {
//document.write("Today is " + description +"." + "<br /><font color=#006400>Welcome Back!</font>");
//document.write(description + " are over!" + "<br /><font color=#006400>Enjoy your break! Happy Holidays!</font>");
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Enjoy!</font>"); 
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Congratulations - you made it halfway through the semester!</font>"); 
}
else if (days < -7) {
//document.write("Today is " + description +"." + "<br /><font color=#006400>Welcome Back!</font>");
//document.write("<font color=#006400>Enjoy your break! Happy Holidays!</font>");
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Enjoy!</font>"); 
//document.write("Today is " + description + "!" + "<br /><font color=#006400>Congratulations - you made it halfway through the semester!</font>"); 
}

document.write("</font></center>");

//document.write("Friday is GRADUATION." + "<br /><font color=#006400>Congratulations Graduates!</font>");
//document.write("Today is the first day of finals week." + "<br /><font color=#006400>Good luck!</font>");
//document.write("Friday is GRADUATION." + "<br /><font color=#006400>Congratulations Graduates!</font>");
// document.write("Monday is the end of the semester." + "<br /><font color=#006400>Have a good holiday break!</font>");

// End -->
}

//JavaScript code for countdown to a specific date - simplified version
	function specDays(CurrentDay) 
{
	var XYear=CurrentDay.getFullYear();
	var XDay=new Date("December, 25, 2010");
	XDay.setFullYear(XYear);
	var DayCount=(XDay-CurrentDay)/(1000*60*60*24);
	DayCount=Math.round(DayCount+1);
   return DayCount;
}
