// Document footer script
// By Alexander S. Wood M1BNK
// www.alecwood.com
// V1.00
// 20 July 2003


var loc=String(this.location);  		// Find out the URL
loc=loc.split("/");  								// Look for the last / and dot
loc=loc[loc.length-1].split(".");   // Trim to leave the page name
loc=loc[loc.length-2];

if (typeof loc == "undefined")			// If the URL ends in /, as
{																		// when at the front page
loc="index"													// Set pagename to index
}


var path2html=String(" ")						// Index and copyright pages
if ( loc == "index" )								// are in html folder
{																		// path is different from
path2html="html/"										// index and content pages
}
else
{
path2html=" "
}


monthOfYear = new Array(12);				// Setup months of year
monthOfYear[1]='January';						// lookup table
monthOfYear[2]='February';
monthOfYear[3]='March';
monthOfYear[4]='April';
monthOfYear[5]='May';
monthOfYear[6]='June';
monthOfYear[7]='July';
monthOfYear[8]='August';
monthOfYear[9]='September';
monthOfYear[10]='October';
monthOfYear[11]='November';
monthOfYear[12]='December';

// Get date, extract info and correct year as necessary

moddate = new Date(document.lastModified);
theMonth = moddate.getMonth()+1;
theDate = moddate.getDate();
theYear = 1900 + moddate.getYear();


if (theYear >= 3900)
{ 
theYear = theYear - 1900
}
else if (theYear = 1900)
{
theYear = theYear + 100
}

// Write the info to the page

document.write('<div class="footer">')
document.writeln("Page: " + loc + ", last modified on " + theDate + " " + monthOfYear[theMonth] + " " + theYear + ".")
document.write('<br>')
document.writeln("This site and all contents &copy 2001 - " + theYear + " Amateur Radio Courses, all rights reserved")
document.write('<br>')
document.write('Click <a href="')
document.write(path2html)
document.write('cr.htm">here</a> for important Copyright information, or email the <a href="')
document.write(path2html)
document.write('contact.htm">Project Co-ordinator</a>')
document.write('<br>')
document.write('Web Space provided by <a href="http://nameroute.co.uk/callsign/">Hostroute.com Ltd</a>')
document.write('<br>')
document.write('</div>')
document.write('<p>&nbsp;</p>')
