function docTime(){
	// Get the document last modified property and return it in UK format
	var dTime = "Unknown", dateVal;
	if((dateVal = Date.parse(document.lastModified)) != 0) { // Valid date
		var Months = [" January ", " February ", " March ", " April ", " May ", " June ", " July ", " August ", " September ", " October ", " November ", " December "];
		var date = new Date(dateVal);
		var year = date.getYear();
		if (navigator.appName && (navigator.appName != "Microsoft Internet Explorer")) year = year + 1900; // Correct non-IE date bug
		dTime = date.getDate() + Months[date.getMonth()] + year;
	}
	document.write("Page last modified: " + dTime);
}

function docCopyright() {
	document.write("&copy; 2004 - 2009 St Mary the Virgin and All Saints Parochial Church Council");
}

function setCurrentPage(PageName) {
	// Set this page's menu tab
	try {
		document.getElementById(PageName).className = 'current';
	}
	catch (e) {} // Trap any errors but do nowt
}

function ChristianCounter() {
	// Christan Counter code
	var a = Math.random() + "";
	var r = a.charAt(5) + a.charAt(6) + a.charAt(7);
	var counter = '<\a href="http://www.christiansunite.com/hit/" target="_blank"\><img src="http://www.christiansunite.com/hit/count.cgi?account=milled00&amp;code=site&amp;count=1&amp;page=' + r;
	counter += '" border=0 width=96 height=40 alt="The Christian Counter"><\/a>';
	document.write(counter);
}

function dictionary() {
	// The Free Dictionary code
	if (navigator.appName != 'Microsoft Internet Explorer') {
		var t = document.getSelection();
		od(t);
	}
	else {
		var t = document.selection.createRange();
		if (document.selection.type == 'Text' && t.text>'') {
			document.selection.empty();
			od(t.text);
		}
	}
	
	function od(t) {
		while (t.substr(t.length-1, 1) == ' ') t = t.substr(0, t.length - 1)
		while (t.substr(0, 1) == ' ') t = t.substr(1)
		if (t) {
			try { // Try nice Web 2.0 window
				var dictWin = dhtmlwindow.open('dictWin', 'iframe', 'http://www.thefreedictionary.com/' + encodeURIComponent(t), 'Definition of "' + t + '"', 'width=700px,height=500px,left=10px,top=10px,resize=1,scrolling=1');
			}
			catch (e) { //Use new window if the above fails
				window.open('http://www.thefreedictionary.com/' + encodeURIComponent(t), 'dict', 'width=700,height=500,resizable=1,menubar=1,scrollbars=1,status=1,titlebar=1,toolbar=1,location=1,personalbar=1');
			}
		}
	}
}
document.ondblclick = dictionary // works for IE only. For NS add <body ondblclick="dictionary()">