function writeLastModifiedDate( fontColourIn, fontSizeIn )
{
	var fontFace   = "Arial, Helvetica"
	var fontColour = fontColourIn;
    var fontSize   = fontSizeIn;

    if ( typeof( fontColourIn ) == "undefined"  ||  fontColourIn == null )
    {
        fontColour = "navy";
    }

    if ( typeof( fontSizeIn ) == "undefined"  &&  fontSizeIn == null )
    {
        fontSize = "2";
    }
 
	var dayName   = new Array( "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" );
	var monthName = new Array( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" );

	var lastModifiedDate = new Date( document.lastModified );

	var dayOfWeek = dayName[ lastModifiedDate.getUTCDay() ];
	var date      = lastModifiedDate.getUTCDate();
	var month     = monthName[ lastModifiedDate.getUTCMonth()] ;
	var year      = lastModifiedDate.getUTCFullYear();
	var hours     = lastModifiedDate.getUTCHours();
	var minutes   = lastModifiedDate.getUTCMinutes();

	if ( date < 10 )
	{
			date = "0" + date;
	}
	
	if ( minutes < 10 )
	{
			minutes = "0" + minutes;
	}

	var lastModifiedString = dayOfWeek + ", " + date + "-" + month + "-" + year + " " + hours + ":" + minutes + " GMT";
			
	document.write( "<FONT SIZE='" + fontSize + "' COLOR='" + fontColour + "' FACE='" + fontFace + "'>Last modified: <I><B>" + lastModifiedString + "</B></I></FONT>" );
}

function writeMailTo( userID, emailHost, domain, contactIn, contactPrependIn, fontSizeIn )
{
	var contact        = contactIn;
    var contactPrepend = "";

    if ( typeof( contactIn ) == "undefined"  ||  contactIn == null )
    {
        contact = userID + " at " + emailHost + " dot " + domain;
    }

    if ( typeof( contactPrependIn ) != "undefined"  &&  contactPrependIn != null )
    {
        contactPrepend = contactPrependIn + " ";
    }
 
	var aTag = "<A HREF=" + "mail" + "to:";
	
	aTag += userID + "@" + emailHost + "." + domain;
	aTag += ">" + contactPrepend + contact + "</A>"
	
	var fontFace   = "Arial, Helvetica"
    var fontSize   = fontSizeIn;

    if ( typeof( fontSizeIn ) == "undefined"  ||  fontSizeIn == null )
    {
        fontSize = "2";
    }
 
    document.write( "<FONT SIZE='" + fontSize + "' FACE='" + fontFace + "'>" );
	
	document.write( aTag );
	
	document.write( "</FONT> " );
}

function writeWebmasterEmailAddress( contactPrependIn )
{
    var contact   = "Garry Archer";
    var userID    = "g.archer";
    var emailHost = "att";
	var domain    = "net";
    
	writeMailTo( userID, emailHost, domain, contact, contactPrependIn );
}

function writePageFooter( homePageLink )
{
	// For now, the default...
	
	writeSASLPageFooter( homePageLink )
}

function writeSASLPageFooter( homePageLink )
{
	writePageFooter2( homePageLink, "SASL", true )
}

function writeCSSAPageFooter( homePageLink )
{
	writePageFooter2( homePageLink, "Temporary CSSA", false )
}

function writeCSHOFPageFooter( homePageLink )
{
	writePageFooter2( homePageLink, "Connecticut Soccer Hall of Fame", true )
}

function writePageFooter2( homePageLink, websiteName, includeQuestionsAndComments )
{
	var html = "<HR ALIGN='CENTER'>";
	
	html += "<TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' WIDTH='100%'>";
	html += "<TR>";
	html += "<TD WIDTH='87%' VALIGN='MIDDLE'>";
	html += "<FONT SIZE='2' FACE='Arial, Helvetica'>";
	html += "The <B><A HREF='" + homePageLink + "'>" + websiteName + " Website</A></B> is maintained by ";
	html += "<B><A HREF='http://gazarcher.home.att.net/'>Garry Archer</A></B>";
	html += "</FONT>";
	html += "</TD>";
	html += "<TD WIDTH='13%' ROWSPAN='2'>";
	html += "<P ALIGN='RIGHT'>"
	html += "<A HREF='http://www.amazon.com/Symantec-05-00-00797-Visual-Page-2-0/dp/B00002S99M'>";
	html += "<IMG SRC='http://g.archer.home.att.net/images/madewithVP.gif'";
	html += "WIDTH='109' HEIGHT='36' ALIGN='BOTTOM' ALT='* VisualPage *' BORDER='0'></A>";
	html += "</TD>";
	html += "</TR>";
	
	if ( includeQuestionsAndComments )
	{
		html += "<TR>";
		html += "<TD WIDTH='87%'>";
		html += "<FONT SIZE='2' FACE='Arial, Helvetica'>";
		html += "<ADDRESS>If you have any questions and/or comments, e-mail me at ";
		html += "</FONT><B>";
		
		document.write( html );
		
		var userID    = "g.archer";
		var emailHost = "att";
		var domain    = "net";

		writeMailTo( userID, emailHost, domain, null, null, "2" );
		
		document.write( "</B></ADDRESS></TD></TR></TABLE>" );
	}
	else
	{
		html += "</TABLE>";
		
		document.write( html );
	}
}
