/*---------------------------------------------------------------------------------------
 * JAVA SCRIPT
 *---------------------------------------------------------------------------------------
 */

// replace right-click functionality
function rightClick(e)
{
   if ( (navigator.appName == 'Netscape' && (e.which == 5 || e.which == 4 || e.which == 3 || e.which == 2)) ||
       (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3) ) )
   {
      alert("Copyright (C) 2005  Valley Amateur Repeater Association");
      return false;
   }
   return true;
}

document.onmousedown=rightClick;

if (document.layers)
   window.captureEvents(Event.MOUSEDOWN);

window.onmousedown=rightClick;



function webmasterEMailLinkOnly()
{
	usrnm = "vara";
	usrdm = "qsl.net";
	document.write('<a href=\"mailto:' + usrnm + '@' + usrdm + '\">');
}
/*
 *
 */
function getCurrentDateLong()
{
	var thedate   = new Date();
	var theyear   = thedate.getFullYear();
	var themonth  = thedate.getMonth();
	var theday    = thedate.getDate();
	var thedow    = thedate.getDay();

	var dow_array   = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
	var month_array = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

//	var dow_array[7] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
//	var month_array[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
/*
	var dow_array = new Array(7);
		dow_array[0] = "Sunday";
		dow_array[1] = "Monday";
		dow_array[2] = "Tuesday";
		dow_array[3] = "Wednesday";
		dow_array[4] = "Thursday";
		dow_array[5] = "Friday";
		dow_array[6] = "Saturday";
		
	var month_array = new Array(12);
		month_array[0] = "January";
		month_array[1] = "February";
		month_array[2] = "March";
		month_array[3] = "April";
		month_array[4] = "May";
		month_array[5] = "June";
		month_array[6] = "July";
		month_array[7] = "August";
		month_array[8] = "September";
		month_array[9] = "October";
		month_array[10]= "November";
		month_array[11]= "December";
*/

	var thedaysfx = "";


	if( theday == 1 || theday == 21 || theday == 31){
		thedaysfx = "st";
	} else if( theday == 2 || theday == 22){
		thedaysfx = "nd";
	} else if( theday == 3 || theday == 23){
		thedaysfx = "rd";
	} else {
		thedaysfx = "th";
	}


	var formattedDateString = "";
	formattedDateString = 
		dow_array[thedow]	+ ", " +
		month_array[themonth]	+ " " +
		theday			+ thedaysfx + ", " +
		theyear			+ "";

	document.write(formattedDateString);
}

function printTimeOfDayGreeting()
{
	var thetime = new Date( );
	var thehour = thetime.getHours( );
	var themonth = thetime.getMonth()+1;
	var theday   = thetime.getDate();

	if (themonth == 10 && theday == 31) {
		document.write("Happy Halloween!");
	//} else if (themonth == 11 && theday == 27) {
	//	document.write("Happy Thanksgiving!");
	} else if (themonth == 12 && theday == 25) {
		document.write("Merry Christmas!");
	} else if (themonth == 01 && theday == 01) {
		document.write("Happy New Year!");
	} else if (thehour < 12) {
		document.write("Good Morning!");
	} else if (thehour < 17) {
		document.write("Good Afternoon!");
	} else {
		document.write("Good Evening!");
	} 
}

function formatDate(LastModDate)
{
	return	"" +
		(LastModDate.getMonth()+1)	+ "/" +
		LastModDate.getDate()		+ "/" +
		(((LastModDate.getYear() >= 100 && LastModDate.getYear() < 2000) ? 1900:0)+LastModDate.getYear()) + "";
}

<!-- This shows the user the last date this page was modified -->
function pageLastModified()
{
	document.write("", formatDate(new Date(document.lastModified)), "");
}
/*
function pageLastModified()
{
	var LastModDate = new Date(document.lastModified);
	var currentYear = LastModDate.getYear();
	document.write("", formatDate(LastModDate), "");
	//document.write("", (LastModDate.getMonth()+1), "/", LastModDate.getDate(), "/", ((currentYear >= 100 && currentYear < 2000) ? 1900:0)+currentYear, "");
}
*/