//Function to operate menu 
//Thanks to Brian A. Dempsey for the concept and coding.

function mOvr(src,clrOver) {
	if (!src.contains(event.fromElement)){
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
		src.children.tags('A')[0].style.color='#008000';
	}
}
function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = clrIn;
		src.children.tags('A')[0].style.color='#ffffff';
	}
}
function mClk(src) {
	if(event.srcElement.tagName=='TD') {
		src.children.tags('A')[0].click();
	}
}



//-------------------------------------------------------------------

//Function to display a random quote in the document
//Author: P Osmond 13.07.01

function displayQuotes() {

	var x = ""
	var y = ""
	var random = Math.floor(Math.random()*15)
	var a = new Array(14)

	a[0] = "God has made us a little lower than the angels. Sin has made us little better than devils. - <b>Thomas Watson</b>"
	a[1] = "He who prays as he ought will endeavour to live as he prays. - <b>John Owen</b>"
	a[2] = "A man may be theologically knowing and spiritually ignorant. - <b>Stephen Charnock</b>"
	a[3] = "Faith, without trouble or fighting, is a suspicious faith; for true faith is a fighting, wrestling faith. - <b>Ralph Erskine</b>"
	a[4] = "Repentance is a grace of God's Spirit whereby a sinner is inwardly humbled & visibly reformed. - <b>Thomas Watson</b>"
	a[5] = "By grace we are what we are in justification, and work what we work in sanctification. - <b>Richard Sibbs</b>"
	a[6] = "Some temptations come to the industrious, but all temptations attack the idle. - <b>Charles Spurgeon</b>"
	a[7] = "Till men have faith in Christ, their best services are but glorious sins. - <b>Thomas Brooks</b>"
	a[8] = "Knowledge without repentance will be but a torch to light men to hell. - <b>Thomas Watson</b>"
	a[9] = "It is truth alone that capacitates any soul to glorify God. - <b>John Owen</b>"
	a[10] = "First we practice sin, then defend it, then boast of it. - <b>Thomas Manton</b>"
	a[11] = "Nothing is more contrary to a heavenly hope than an earthly heart. - <b>William Gurnall</b>"
	a[12] = "What renders God amiable to Himself should render Him lovely to His creatures, Isa 42:21. - <b>Stephen Charnock</b>"
	a[13] = "Not only the worst of my sins, but the best of my duties speak me a child of Adam. - <b>William Beveridge</b>"
	a[14] = "The most tremendous judgment of God in this world is the hardening of the hearts of men. - <b>John Owen</b>"

	var q = x + a[random] + y
	document.write(q)
}

//-------------------------------------------------------------------

//Function to display the sermons
//Author: P Osmond 22.06.02

function sermonWindow(url) {
	var d = new Date();
	var rand = d.getHours() + d.getMinutes() + d.getSeconds() + d.getMilliseconds();
	window.open(url, rand, 'width=600, location=no, scrollbars=yes, toolbar=yes');
}