



//praise and worship by the chorus girls

/*
qty		numbers	source
275		1-275	Jane Cain’s red book - Ivylyn and Paulina’s Pentecostal Bibleway chorus book
  2		298-299		MM
 13		300-312	From FTM 0211 ?
  5		322-326	from Jane Cain 030921
  4		403-438	Other printed choruses from the back of Ivylyn’s book.
  1		450		Ivylyn
 16		500-515	from Pamela Bailey 0307
 13		552-574	from Pamela Bailey's tatty sheets
  9		600-608	Mount Zion convention programme
 62		702-799	Rose of Sharon Chorus Book
103 	1003 - 1230 Alma's "Come Praise the Lord with us", Bibleway Church, Cambridge 1989
---
503
5		1301 - 1305	Alma
1		1306		Bernaneth
5		1307 - 1311 DEJAUN WILSON
9		1312 - 1320
----
523
 46	1401 - 1495 "The Inspirational Praise and Worship Choruses" July 2005
----
569
 37 1500 - 1563 "The Inspirational Praise and Worship Choruses" July 2005
---
606
 76 1601 - 1699 "The Inspirational Praise and Worship Choruses" July 2005
---
682
	2 1701 - 1702 2006 Mount Zion convention
	1 1703 Jane Cain
	1 1704 drct@socket.net linnshepherd@hotmail.com
	1 1705 drct@socket.net
	5 1706-10 Paula
	2 1711-12 Dionne Hunte Christiangal19@hotmail.com 
	6 1713-1718 Alma 080220
-------
700
	4 1719-1722 Alma 080220
	3 1723-1725 oaofiyebi@hotmail.com
	
	1 ~1803 secKaitlyn@aol.com 
	1 1726 gloryhousechurch@bellsouth.net
	1 1727 ejd65@msn.com
	3 1728-1730 pc11576@yahoo.com  songs.doc
	1 1731 bsparks@zenithbrokers.com
	1 1732 Babsmith16@aol.com
	1 1733 randy@adventrecovery.org
	2 1734-35 jocetwin1@yahoo.com 
-----
718


*/

var bshowwanted = false;
var optimisevalue;

var backgroundcolour;

function showwanted()	//toggle
{
window.location = "#wanted";
	//if (bshowwanted == false)
	//{
		document.getElementById("1346").style.display="";
		//bshowwanted = true;
	//}
	//else
	//{
	//	document.getElementById("1346").style.display="none";
	//	bshowwanted = false;
	//}
}

function afterpageloads()
{
	document.getElementById("spanplaytune").innerHTML = playtune2();
	//if ( (window.location + "").substring(0, 12) == "file:///C:/0")
	if ( ( (window.location + "").substring(0, 12) == "file:///C:/0") || ( (window.location + "").substring(0, 12) == "file:///C|/0") )
	{
		savethisfile("chorus3");
	}
	riptdzake();
	setsingleriptimeout(wtdzake, qtyripstep, "singleriptimeoutzake()");
//	ripstep += interworddelay;	//reset to start timeouts
	//riptdimport();
	//setsingleriptimeout(wtdimport, qtyripstep, "singleriptimeoutimport()");
	//riptdexport();
	//setsingleriptimeout(wtdexport, qtyripstep, "singleriptimeoutexport()");
	//playintro();
	ripstep = 0;	//reset to start timeouts
}

function onmouseoverlink(ref)	//can't use if sidebar goes to bottom of page
{
	backgroundcolour = document.getElementById(ref).style.backgroundColor;
	document.getElementById(ref).style.color = "#00CC00";	//AD3142
	document.getElementById(ref).style.backgroundColor="#FFFFFF";
	document.getElementById(ref).style.display="";
	document.getElementById(ref).style.visibility="visible";
}

function onmouseoutlink(ref)	//can't use if sidebar goes to bottom of page
{
	document.getElementById(ref).style.color = backgroundcolour;
	document.getElementById(ref).style.backgroundColor = backgroundcolour;
	document.getElementById(ref).style.display="none";
	document.getElementById(ref).style.visibility="hidden";
}

function showhidereference(ref)
{
	if ( eval(document.getElementById(ref).style.display=="none") )
		document.getElementById(ref).style.display="";
	else
		document.getElementById(ref).style.display="none";
}

function closeallspans()
{
	for (var n = 1; n <= 3; n++)
		document.getElementById("span" + n).style.display="none";
}

function showonespan(n)
{
//alert(n);
	closeallspans();
	document.getElementById("span" + n).style.display="";
}

//////////////// RIP RIGHT in head - START //////////////

var riparray = new Array();
var ripstep = 0;	//0-20 in first rip 21-40 in second ..?.cumulative
var qtyripstep = 20;	//5 is too jerky
var riptimeinterval = 30;
var ripelapsedtime = 200;	//start delay, was 200
var interworddelay = 500;

function setsingleriptimeout(pixelrange, qtyripstep, ripfunction)
{
	var pixelposition = 0;	//initial
	var pixelvelocity = 2*pixelrange/qtyripstep - pixelrange/qtyripstep/qtyripstep;	//initial
	var deceleration = 2*pixelrange/qtyripstep/qtyripstep;	//constant
	var ripstart = ripstep;	//continuing from previous
	//var ripstart = ripstep + interworddelay;	//continuing from previous
	var ripstepstop = ripstart + qtyripstep;
	for (ripstep = ripstart; ripstep <= ripstepstop; ripstep++ )	//ripstep is steps global reference
	{
		////loop to run in non-integer pixels, converted to integer pixels for array
		riparray[ripstep] = Math.floor(pixelposition);
		ripelapsedtime += riptimeinterval;
		setTimeout(ripfunction, ripelapsedtime );
		pixelposition += pixelvelocity;
		pixelvelocity -= deceleration;
	}
	ripelapsedtime += interworddelay;
}

//////////////// RIP RIGHT in head - END //////////////

function biblesearchpage()	//uses webdata.js   030304
{
	var s = "<br>";
	//var winloc = window.location + "";	//file:///C:/0our... IE  file:/C|/0our... NN  locks without + ""
	var localbiblesearchaddress = "file:///C:/0beebmartinchristian/biblesearch/biblesearch.htm";	//keep global
	var webbiblesearchaddress = "http://martinchristian.members.beeb.net/biblesearch/biblesearch.htm";
	//if (winloc.substring(0, 9) == "file:///C")	//local, IE or NN
	if ( ( (window.location + "").substring(0, 12) == "file:///C:/0") || ( (window.location + "").substring(0, 12) == "file:///C|/0") )
	{
		s += '<A HREF=' + localbiblesearchaddress + '>';
		s += '<span title=';
		s += " " + localbiblesearchaddress + " ";
	}
	else
	{
		s += '<A HREF=' + webbiblesearchaddress + '>';
		s += '<span title=';
		s += " " + webbiblesearchaddress + " ";
	}
	s += '>';

	//s += '<FONT COLOR="#0000FF">search</FONT></span></A> ';
	s += '<font face="Verdana, Arial, Helvetica, sans-serif" size=2><b>SEARCH the BIBLE</b></a></font>';

	document.write(s);
}

function playtune()	//050521
{
	var s = "";
	s += '<SPAN id="tdtune">';
	s += '</SPAN>';
	document.write(s);
	//choruspage();
	playtune2();
}

function playtune2()	//050521
{
	var cookiename = "zakesolutions";

	var midibase;
	var winloc = window.location + "";	//file:///C:/0our... IE  file:///C|/0our... NN  locks without + ""
	if (winloc.substring(0, 9) == "file:///C")	//local, IE or NN
		//midibase = "../../0beebour/beebmidi/";
		//midibase = "../../0portland/portlandmartin/christianmidi/";
		//midibase = "../../../0portland/martin/christianmidi/";
		midibase = "C:/0lycosmartincambridge/midi/";
	else //on WWW, IE or NN
		//midibase = "../mountzion/";
		//midibase = "../";
		//midibase = "http://www.martin.p5.org.uk/christianmidi/";
		midibase = "http://members.lycos.co.uk/martincambridge/midi/";
	//alert(midibase);

	var musictitle = new Array();
	var musicfile = new Array();

	musictitle[0] = "Days of Elijah";
	musicfile[0] = "Daysofelijah.mid";
	musictitle[1] = "I need Thee every hour";
	musicfile[1] = "ineedthe.mid";
	musictitle[2] = "What a Mighty God we serve";
	musicfile[2] = "WhatamightyGod.mid";
	musictitle[3] = "Knock Knock on Heaven's door";
	musicfile[3] = "knockon.mid";
	musictitle[4] = "The Royal Telephone";
	musicfile[4] = "Royal.mid";	
	musictitle[5] = "It is Mine";
	musicfile[5] = "Itismine.mid";	
	musictitle[6] = "Oh How I Love Jesus";
	musicfile[6] = "howilov.mid";	
	musictitle[7] = "The Power of Your Love";
	musicfile[7] = "Power_of_Your_love.mid";
	musictitle[8] = "Agnus Dei - Alleluia, Alleluia, for the Lord God Almighty reigns";
	musicfile[8] = "agnusdei.mid";
	musictitle[9] = "Up Where We Belong";
	musicfile[9] = "liftusup.mid";
	musictitle[10] = "On Eagle's Wings";
	musicfile[10] = "eagleswings.mid";
	musictitle[11] = 'I Believe I Can Fly';
	musicfile[11] = "ibelieveicanfly.mid";	
	musictitle[12] = "I dance like King David danced";
	musicfile[12] = "ASDAVIDDID.mid";
	musictitle[13] = "As the deer panteth for the water";	//Psa 42:1
	musicfile[13] = "asdeerO.mid";
	musictitle[14] = "Have Thine own way, Lord";
	musicfile[14] = "haveThineOwnWayLord.mid";
	musictitle[15] = "I want to praise you Lord";
	musicfile[15] = "iwanttopraiseyoulord.mid";
	musictitle[16] = "I Surrender All";
	musicfile[16] = "ISurrenderAll.mid";
	musictitle[17] = "Lord I Lift Your Name On High";
	musicfile[17] = "LordILiftYourNameOnHigh.mid";
	musictitle[18] = "I will enter in His gates with thanksgiving in my heart";
	musicfile[18] = "Me_glad.mid";
	musictitle[19] = "The Old Rugged Cross";
	musicfile[19] = "OldRuggedCross.mid";
	musictitle[20] = "Thou Art Worthy";
	musicfile[20] = "thouartworthy.mid";
	musictitle[21] = "We Bring Sacrifice Of Praise";
	musicfile[21] = "WeBringSacrificeOfPraise.mid";
	musictitle[22] = "Simply the Best - Tina Turner";
	musicfile[22] = "tinaturnersimplythebest.mid";
	musictitle[23] = "When the Saints Go Marching In - hymn 297";
	musicfile[23] = "saints.mid";	
	musictitle[24] = "Give Me That Old Time Religion";
	musicfile[24] = "GiveMeThatOldTimeReligion.mid";
	musictitle[25] = "This is the Day";
	musicfile[25] = "thisistheday.mid";
	musictitle[26] = "How Great Thou Art";
	musicfile[26] = "howgreatthouart10.mid";
	musictitle[27] = "It is Well with My Soul";
	musicfile[27] = "itiswellwithmysoul2.mid";
	musictitle[28] = "The Solid Rock";
	musicfile[28] = "thesolidrock.mid";
	musictitle[29] = "\'tis so Sweet";
	musicfile[29] = "tissosweet.mid";
	musictitle[30] = "A Closer Walk with Thee";
	musicfile[30] = "closerwalkwiththee.mid";

	//var numberoftunes = 30;	//0 - 29
	var numberoftunes = musictitle.length;
	//alert(numberoftunes);
	
	//i want to praise you lord.mid
	//thou-art-worthy.mid
	//this-is-the-day.mid	
	//how-great-thou-art-10.mid	
	//it-is-well-with-my-soul-2.mid
	//the-solid-rock.mid
	//tis-so-sweet.mid

	//musictitle[] = "";
	//musicfile[] = "";

	var tunenumber = getcookienumber(cookiename, numberoftunes) - 1;	//start at 0
	savenextnumbertocookie(cookiename, tunenumber + 1, numberoftunes);	//start at 1

	var s = "";

	s += '<SPAN TITLE=" Click for next tune ">';
	//s += '<A HREF="javascript:history.go(0)">';
	//s += '<A HREF="javascript:playtune2()">';
	s += '<A HREF="javascript:afterpageloads()">';
	s += 'Playing';
	s += '</A>';
	s += '</span>';
	s += ' tune - ';
s += '<SPAN TITLE=" Right mouse click to download music file ">';
	s += '<A HREF="';
	s += midibase;
	//s += '<A HREF="../';
	//s += '<A HREF="';
	s += musicfile[tunenumber];
	s += '">';
	s += musictitle[tunenumber];
	s += '</A></SPAN><BR>';

	//s += '<EMBED SRC="../../midi/';
	s += '<EMBED SRC="';
	//s += '<EMBED SRC="../';
	s += midibase;
	s += musicfile[tunenumber];	//no spaces in file name
	//s += "maryann.MID";	//no spaces in file name	//ok
	s += '" AUTOSTART="true" display="true" width=140 height=45>';
	//alert(s);
	//document.write(s);
	//document.getElementById("tdtune").innerHTML = s;
	return s;
}

var ie = false;
if(navigator.appName == "Microsoft Internet Explorer")
	ie = true;
//NN crashes with word "style"

function optimise(nn)
{
	//alert(nn);
	if (nn == 1)	//reading
	{
		document.getElementById("spanchorus").style.fontSize = "100%";
		document.getElementById("spanchorus").style.fontWeight = "normal";
	}
	if (nn == 3)	//singing
	{
		document.getElementById("spanchorus").style.fontSize = "300%";
		document.getElementById("spanchorus").style.fontWeight = "bold";
	}
	//optimisevalue = nn;
}

function beforeinsidepageloads()
{
	optimisevalue = getcookienumber("viewpagecookie", 3);
	//if (optimisevalue != 1 )
	//	ie = false;	//no spray text
	//else
	//	ie = true;
	initialcolours();
}

function whenleaveinsidepage()
{
	savenumbertocookie("viewpagecookie", optimisevalue);
}

var colour = new Array(20);
var organisationspraytext = new Array(10);	//can include spaces
organisationspraytext[1] = 'Over 600 Pentecostal Choruses';

function initialcolours()
{
	if (optimisevalue == 1 )
	{
		colour[2] = "FF0000";
		colour[4] = "FFFFDD";	//FFFFDD FFFFDD
		colour[8] = "CCCCCC";	//AAAAAA  CCCCCC
	}
	else
	{
		colour[2] = "000000";
		colour[4] = "FFFFFF";	//FFFFDD FFFFDD
		colour[8] = "CCCCCC";	//AAAAAA  CCCCCC
	}
}

function doDialogModeless()
{
  window.showModelessDialog("colordlg.htm", document,
                            "resizable:yes; status:no");
}

function redden(keyword)	//highlights every occurance, any case, does not clear next time
{
	//in "click to show or hide details" elements only
	document.getElementById("1346").style.display="";	//or error if find word and display="none"
	document.getElementById("1347").style.display="";	//or error if find word and display="none"

	var stopsearch = false;
	count = 0;
	var rng = document.body.createTextRange();
	//var rng = document.body.spanchorus.createTextRange();	//error
	//var rng = document.body."spanchorus".createTextRange();	//error
	//var rng = document.body.getElementById("spanchorus").createTextRange();	//error
	//var rng = document.spanchorus.createTextRange();	//error
	//var rng = document."spanchorus".createTextRange();	//error
	//var rng = document.getElementById("spanchorus").createTextRange();	//error
	for (var i = 0; rng.findText(keyword) != false; i++ )
	{
	//alert(keyword);
		rng.select();	//error when finds word in undisplayed span
		document.execCommand("ForeColor", "false", "red");	//when find next one
		rng.collapse(false);	//collapse means textRange length = 0
		var fromconfirm = confirm("Find next ?");	//ok = true
		if (!fromconfirm)
		{
			stopsearch = true;
			count++;
			rng.findText(keyword) == false;
			alert("Stopped after " + count + " found");
			//window.location = "#top";	//does not allow scroll to next line when found
			break;
		}
		count++;
	}
	if (!stopsearch)
	{
		alert("Finished search " + count + " found");
		//window.location = "#top";
		window.location = "#searchcall";
	}
	//document.location.href = "#top";

	//in "click to show or hide details" elements only
	document.getElementById("1346").style.display="none";	//or error if find word and display=""
	document.getElementById("1347").style.display="none";	//or error if find word and display=""
}

function find2()
{
	alert(document.find());
}

function getcookienumber(name, max)
	////returns number from cookie(name) or a random number, 1 - max
{
	var namestr = name + "=";
	var namelen = namestr.length;
	var cooklen = document.cookie.length;
	var string = null;
	var i = 0;
	while (i < cooklen)
	{
		var j = i + namelen;
		if (document.cookie.substring(i, j) == namestr)
		{
			endstr = document.cookie.indexOf(";",j);
			if (endstr == -1)
			{
				endstr = document.cookie.length;
			}
			string = unescape(document.cookie.substring(j, endstr));
		}
		i=document.cookie.indexOf(" ",i) + 1;
		if (i == 0) break;
	}
	if ( (string == "NaN") || (string == null) )
	{
		//number = parseInt(Math.floor(Math.random() * (max + 1) ) );	//1-max
		number = parseInt(Math.floor(Math.random() * (max + 1) ) );	//0 - max-1
	}
	else
	{
		number = parseInt(string);
	}
	return number;
}

function savenumbertocookie(name, number)
{
	var expdate = new Date();
	expdate.setTime(expdate.getTime() + (1*24*60*60*1000*365) );	//+1 year of milliseconds
	expdate = expdate.toGMTString();
	document.cookie=name+"="+escape(number)+";expires="+expdate+";"	//no spaces
}

function savenextnumbertocookie(name, number, max)
	//saves next in sequence 1 - max
{
	number = number%max;	//0 - (max-1)
	number++;
	var expdate = new Date();
	expdate.setTime(expdate.getTime() + (1*24*60*60*1000*365) );	//+1 year of milliseconds
	expdate = expdate.toGMTString();
	document.cookie=name+"="+escape(number)+";expires="+expdate+";"	//no spaces
}

