//
// Centralized script used to display all VPS Web site Events information in alert boxes
// Written by: Conrad Matiuk, September 12, 2008
//

function events(whenisit,Eventdate)
{
switch(whenisit){
  case "0919":
	alert("Please Note:\n\nGame Info.\n\nAdditional news about the event scheduled for\n\n "+Eventdate+ ".\n\nClick on \"OK\" to close this message box.");
	break;
  case "0902":
	alert("Please Note:\n\nBlah blah blah about VPS Web site.\n\nAdditional news about the event scheduled for\n\n "+Eventdate+".\n\nClick on \"OK\" to close this message box.");
	break;
  case "0913":
	alert("Please Note:\n\nBlah blah blah about VPS Web site.\n\nAdditional news about the event scheduled for\n\n "+Eventdate+".\n\nClick on \"OK\" to close this message box.");
	break;
  case "0914":
	alert("Please Note:\n\nBlah blah blah about VPS Web site.\n\nAdditional news about the event scheduled for\n\n "+Eventdate+".\n\nClick on \"OK\" to close this message box.");
	break;
  case "0918":
	alert("Please Note:\n\nBlah blah blah about VPS Web site.\n\nAdditional news about the event scheduled for\n\n "+Eventdate+".\n\nClick on \"OK\" to close this message box.");
	break;
  } // end switch statement
}

// General Date function variables
var today_date= new Date()
var day=today_date.getDay()
var month=today_date.getMonth()
var today=today_date.getDate()
//var year=today_date.getYear()
var year=today_date.getFullYear()
var days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var alert_date = 'days[day]+", "+months[month]+" "+today+", "+year'

function menu_alert(thispage){
	alert("_________________\n\nThe " + thispage + " page is under development.\n\n Coming soon!\n\n--------------------------");
} // end function

// Functions to display date modified and URL
function nths(day) 
{
	if (day == 1 || day == 21 || day == 31) return 'st';
	if (day == 2 || day == 22) return 'nd';
	if (day == 3 || day == 23) return 'rd';
	return 'th'; 
}
				
function getCorrectedYear(year) 
{
	year = year - 0;
	if (year < 70) return (2000 + year);
	if (year < 1900) return (1900 + year);
	return year; 
}
				
function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function page_upd()
{				
var dateError = new Date(document.lastModified);
var date = new Date(getCorrectedYear(dateError.getYear()),dateError.getMonth(),dateError.getDate());
				
document.write('<div align="left" style="margin: 0px; padding: 0px;">Comment or question for the <a href="mailto:webmaster@altweb-design.com?subject=Alternative Web Design Inquiry" title="Email a Comment to the Alternative Web Design Webmaster">Webmaster</a>? | <a href="calendar.htm">Calendar</a><br/>');
document.write("Last updated on " + days[date.getDay()] + ", " + months[date.getMonth()] + " " + date.getDate() + nths(date.getDate()) + ", " + y2k(date.getYear()) + "<br/>");}
//document.write("URL: " + document.location.href); }

function dayoftheweek()
{
//------------------------------------------------------+
// Purpose: display day of the week and date.           | 
//------------------------------------------------------+
//    Date    By  Description
// ----------	--- ------------------------------------+
// 09/11/1999 cm  Initial revision.                     |
//------------------------------------------------------+
  var date = new Date();
  var dow  = date.getDay();
  var mon  = date.getMonth() + 1;
  var day  = date.getDate();
  var year = date.getYear();
  switch(dow){
  case 0:
	dow = "Sunday";
	break;
  case 1:
	dow = "Monday";
	break;
  case 2:
	dow = "Tuesday";
	break;
  case 3:
	dow = "Wednesday";
	break;
  case 4:
	dow = "Thursday";
	break;
  case 5:
	dow = "Friday";
	break;
  case 6:
	dow = "Saturday";
	break;
	}
  var todayDate = dow + ', ' + mon + '/' + day + '/' + year;
//  document.write( todayDate );
return todayDate;
}
