
// ==================================================================================
// Name: tc07dateModified
// Purpose: to show the last modified date of the HTML page in UK format
function tc07dateModified() {
m = new String(document.lastModified)
n = new String("This page last modified on: ")

// Opera v8 can pretend to be any Browser so special measures are required
// Firefox claims to be Netscape but uses IE format for date!
// The following routine attempts to cover all situations...

//var $dateModified = n+m;
browser = navigator.appName;
if (m.charAt(2) == "/"){ 
    browser = new String("Microsoft Internet Explorer")//treat as IE
}

if (m.charAt(3) == ","){ 
    browser = new String("not Microsoft Internet Explorer")//treat as NOT IE
}

// Assemble print line for non Microsoft Internet Explorer browsers
if (browser != "Microsoft Internet Explorer") {
    $dateModified = new String(n+m);
}
// Assemble print line for Microsoft Internet Explorer browser only
else {
    if (m.substring(0,1) == 1){
    monthNum = m.substring(0,2)
    }
    else {
    monthNum = m.charAt(1)
    }

monTh = new Array("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
$dateModified = new String(n+m.charAt(3)+m.charAt(4)+" "+monTh[monthNum]+" "+m.substring(6,10)+" at: "+m.substring(11,19));
}
// Print the line
document.write('<small>'+$dateModified+'</small>');
}




// ==================================================================================
// Name: tc07email
// Purpose: helps to protect email addresses from robots
// Contains a list of the most popular domain names (more can be added)
// If $output is blank, shows full email address on html page
// If $output has a value, shows value of $output on html page
function tc07email($name,$domain,$output) { 
var $outdomain = "";
var $domainarray = new Array("",
	"a","aol.com",
	"b","blueyonder.co.uk",
	"bt","btinternet.com",
	"g","gmail.com",
	"h","hotmail.com",
	"tc","tandem-club.org.uk",
	"y","yahoo.co.uk",
	"");
var $counter;
$counter=1;

while ($counter<$domainarray.length) {
	if ($domain == $domainarray[$counter]) {
		$domain=$domainarray[$counter+1];}
	else {
	($counter=$counter+2)}
	}

var $href = "mailto:";
var $at = "@"; 

if ($output=="") {
	($output= $name + $at + $domain);
}

document.write("<a href=" + "'" + $href + $name + $at + $domain + "'>" + $output + "</a>");
}




// ==================================================================================
