/*
Author:  Aladin Alaily
Date:    November 19th, 2002
Contact:
    mail    - aladin@aladin.ca
    website - www.aladin.ca

Description:
Writes a footer on the intended page.

Features:
The date displayed on by the script and is intended to reflect
a "last modified" date.  In actuality, this date is
dependent on the accuracy of the server, which stamps each
uploaded page with the displayed date.

Please forward your questions or comments to the author.

If you use this script, please do not remove this information.  Enjoy.
*/

/* Variable declaration and initialization */
function makeArray0() {
   for (i = 0; i<makeArray0.arguments.length; i++)
      this[i] = makeArray0.arguments[i];
}


/* The stylesheet used for the footers */
function writeStyleSheet() {
	document.write( "<style type=\"text/css\">" );
	document.write( ".footer { font-family: Arial, Helvetica, sans-serif;font-size: 10px; }" );
	document.write( "</style>" );
}




/*
** Writes the footer that belongs to the homepage.
*/
function writeHomePage() {

	var months = new makeArray0('January','February','March','April','May','June','July','August','September','October','November','December');

	var i = new Date(document.lastModified);

	/* Gather the required data for the footer */
	var date  = i.getDate();
	var month = months[i.getMonth()];
	
	var year = i.getYear();

	if ( year >= 100 && year <= 1999) {
		year += 1900;
	}
	if( year <= 100 ) {
		year += 2000;
	}
	
	writeStyleSheet();

	// Check Browser Type here and display date accordingly:
	/*if( navigator.appName=="Netscape" && parseFloat(navigator.appVersion) < 4.7 ) {
	  year = i.getYear() + 2000;writeNetscapeStyle();
	  
	} else {
	  year = i.getFullYear();
	  writeExplorerStyle();
	}
	*/


	/* Begin writting the footer. */
	document.write( "<div class=\"footer\">" );
	document.write( "&copy; 2002, 2003, 2004, 2005, 2006 York Mills Collegiate Institute, TDSB<br>" );
	document.write( "490 York Mills Road, Toronto, ON M3B 1W6<br><br>" );
	document.write( "Contact - Design and Content: <a href=\"mailto:kathy.kawasaki@tel.tdsb.on.ca\">K. Kawasaki</a>, ACL, Library & Learning Resources - Tel. 416-395-3340<br>" );
	document.write( "Site Maintenance: <a href=\"http://www.aladin.ca/\">Aladin.ca</a><br><br>");
	document.write( "Last Updated: " + month + " " + year );
	document.write( "</div>" );
}


/*
** Writes the footer that belongs to regular pages.
*/
function writeDefaultPage() {

	var months = new makeArray0('January','February','March','April','May','June','July','August','September','October','November','December');

	var i = new Date(document.lastModified);

	/* Gather the required data for the footer */
	var date  = i.getDate();
	var month = months[i.getMonth()];
	var year = i.getYear();

	if ( year >= 100 && year <= 1999) {
		year += 1900;
	}
	if( year <= 100 ) {
		year += 2000;
	}
	
	writeStyleSheet();

	// Check Browser Type here and display date accordingly:
	/*if( navigator.appName=="Netscape" && parseFloat(navigator.appVersion) < 4.7 ) {
		year = i.getYear() + 2000;
		writeNetscapeStyle();
	} else {
	  	year = i.getFullYear();
		writeExplorerStyle();
	}
*/
	/* Begin writing the footer. */
	document.write( "<div class=\"footer\">" );
	document.write( "&copy; 2002, 2003, 2004, 2005, 2006 York Mills Collegiate Institute, TDSB<br>" );
	document.write( "490 York Mills Road, Toronto, ON M3B 1W6<br><br>" );
	document.write( "Contact - Design and Content: <a href=\"mailto:kathy.kawasaki@tel.tdsb.on.ca\">K. Kawasaki</a>, Curriculum Leader, School-wide Initiatives - Tel. 416-395-3340<br>" );
	document.write( "Site Maintenance: <a href=\"http://www.aladin.ca/\">Aladin.ca</a><br><br>");
	document.write( "Last Updated: " + month + " " + year );
	document.write( "</div>" );
}

