	var pages = new Object();
	pages["About-Us.html"] = new Object();
	pages["About-Us.html"]['title'] = "Our Vision";
	pages["About-Us.html"]['text'] = "Envoy Ministries: Our vision\nA trustworthy envoy brings healing\n&quot;We are therefore Christ’s ambassadors, as though God were making his appeal through us. We implore you on Christ's behalf: Be reconciled to God&quot; (2 Corinthians 5:20, NIV).\n\nMillions of believers are suffering in places like Vietnam, Laos, North Korea, Iran, Cambodia, Myanmar, Bhutan, China, Cuba, Somalia, Sudan and Ethiopia that are closed or hostile to the Gospel. But what is even worse is that millions still do not know about the hope and love of Jesus Christ.\n\nThey are waiting for us to bring the Good News.\n\nAt Envoy Ministries, we are Christ’s messengers of hope to the lost and His emissaries of encouragement to the persecuted. We are called to serve in His name... and we are commanded to share His Gospel.\n\nOur ministry impacts lives, communities and nations through Bible distribution, church planting and providing practical helps to suffering and persecuted believers.\n\nEnvoy Ministries International is called to be God’s trustworthy envoys of hope to those who are lost and hurting.\n\n&quot; . . a trustworthy envoy brings healing&quot; (Proverbs 13:17, NIV).\n\nWith the prayers and financial support of friends like you, we can be messengers of the love and hope of Jesus Christ.";
	pages["Church-Planting.html"] = new Object();
	pages["Church-Planting.html"]['title'] = "Church Planting";
	pages["Church-Planting.html"]['text'] = "Envoy supports and provides resources for dedicated church planters who often risk their lives to plant and nurture the Gospel and to raise up local bodies of believers around the world. In the areas in which we work, because of the poverty, without our financial assistance, they simply could not minister full-time. We stand with them and empower them to be God's messengers of hope and healing.\nReaching out with the message of Christ";
	pages["Bible-Distribution.html"] = new Object();
	pages["Bible-Distribution.html"]['title'] = "Bible Distribution";
	pages["Bible-Distribution.html"]['text'] = "Helping send God's word around the world\nBibles: Bible Distribution\nThrough our nation-wide, long-established networks of local believers, we are providing God's Word to believers who live in regions that are either closed to the Gospel or who have a great shortage of Bibles. By working through local leadership, those in greatest need are reached first and we have verified distribution. Our 30-year history of publishing allows us to use resources most effectively. For nearly 30 years, we have maintained a priority on the Word of God, understanding the truth that &quot;faith comes by hearing and hearing by the word of God.&quot; It is also imperative that a solid grounding in the Word takes place for spiritual growth and maturity but for that to take place, a Bible must be provided.";
	pages["Persecuted-Believers.html"] = new Object();
	pages["Persecuted-Believers.html"]['title'] = "Persecuted Believers";
	pages["Persecuted-Believers.html"]['text'] = "Serve God's persecuted church\nPersecution:\nIn places like China, Vietnam and other hostile regions, Envoy offers support, encouragement and practical help because we have a Biblical mandate from Romans 12:13 “Share with God’s people who are in need.” It is our responsibility and high honor to help the saints. We have told them, as they go out to preach the Gospel, facing the likelihood of imprisonment that, “as long as you are persecuted for the proclamation of the Gospel and are in need, we will stand with you and not only pray but help you and your families survive.";
	pages["Get-Involved.html"] = new Object();
	pages["Get-Involved.html"]['title'] = "Get Involved";
	pages["Get-Involved.html"]['text'] = "What you can do\nJoin Envoy as we watch what great things God will do!\nServing in His name . . . Sharing His Gospel\nHow will they know unless we tell them? How can they go unless we send them? At Envoy, our mission is to be God’s emissaries as messengers of the hope. Will you help by giving to support in one of these areas?\nBible Distribution\nChurch Planting\nSupport and encouragement for the persecuted and suffering\nWill you help us by giving generously today?\nWhatever you can share today will help send a light of hope around the world!  Please do your best to impact the lives of those who are persecuted, poverty-stricken and in desperate need of the Gospel.\nGive a secure, online ministry gift";
	pages["contact.html"] = new Object();
	pages["contact.html"]['title'] = "Contact Us";
	pages["contact.html"]['text'] = "Address: Envoy Ministries\nPO Box 250129\nPlano, TX 75025\nTelephone:  214-663-8844\n";
	pages["donate.php"] = new Object();
	pages["donate.php"]['title'] = "Donate Now";
	pages["donate.php"]['text'] = "\nWill you help us by giving generously today?\nWhatever you can share today will help send a light of hope around the world!  Please do your best to impact the lives of those who are persecuted, poverty-stricken and in desperate need of the Gospel.  Envoy Ministries is a 501 c 3 compliant non-profit organization.\n\nGeneral\nCurrent Strategic Needs  \n \nMyanmar (Burma)\nMost Important Story Ever Told (100,000) [ 1/Copy ]  \nDrowning man tracts (100,000) [ 0.33/Copy ]  \nNeedy Christian workers/pastors [ 20/Person ]  \n \nVietnam\nMIS and children’s evangelistic parties [ 30/10 Children ]  \nBibles [ 5/Copy ]  \n \nChina\nBibles [ 5/Copy ]  \nHelp for pastors in prison and their families [ 50/Family & Pastor ]  \n \nLaos\nMedicines [ Any ]  \n \nBhutan\nChurch planters (12) [ 100/Month ]  \nScriptures (Gospels/tracts) [ 5/15 ]  \n \nEgypt\nMIS for Cairo bookfair (100,000) [ 1/Copy ]  \n \nKurdistan/Iraq\nMIS (100,000) [ 1/Copy ]  \n \nCuba\nMIS (100,000) [ 1/Copy ]  \nShort-term practical helps for church planters [ 20/Worker ]  \n \nNorth Korea\nAssistance for refugees (clothing, food, shelter) [ 20/Person ]  \n \nEthiopia\nMIS (200,000) [ 1/Copy ]  \nHelp for needy pastors/workers (clothes, food, etc.) [ 20/Person ]  \n \nArabic World\nBibles [ 5/Copy ]  \nMIS [ 1/Copy ]  \n \nOther\nEnvoy launch, gift of any size [ Any ]  \n \nTotal:\nGoogle Checkout";
	pages["orderform.html"] = new Object();
	pages["orderform.html"]['title'] = "No Limitations";
	pages["orderform.html"]['text'] = "No Limitations\nMIS Publishing\nNo limitations (hard cover) is being offered until December 31st, 2007 for a gift of any size\nFeatured Book Description\nHe contemplated suicide ...was constantly hunted...arrested and beatenseverely, and still he continued on. Yet, that's just the beginning. Later hewas kidnapped by one of the most dangerous cults in the world. All becauseof his stand for Jesus Christ and his devotion to proclaim to others thepriceless message of the Gospel.\n\nThis is the true story of Brother Shen, one of the most significant Christianleaders in the world today. He is the head of China Gospel Fellowship, one ofChina's predominant underground house church movements. It is his story - inhis words.\n\nIt is rare for anyone in the underground church to share their story with&quot;out siders&quot;, but it is almost unheard of for anyone in active leadership todocument his account and then publish it. He had to make decision... torisk his life to publish the truth.\n\nThis story demonstrates that there is no limit as to what God can do in the lifeof a surrendered vessel.\n\nIt will challenge you to step into his shoes, shedding the blinding comfortthat we as part of the Western Church are accustomed to. Yet, it will alsoencouraqe you. And, our prayer is that, most of all, it will move you intoaction.\n\nDescription: Hardback, 159 pages, 26 pages of full color photos, MIS Publishing, 2006.\nFill out your form below to order your book now!\nEnvoy ministries does not sell or share contact information with any outside parties.\nMy total gift today\nThe cost of shipping and handling for each book is approximately $5\nThis form will take you to Google Checkout to complete your payment process.\nThank you for your order!\nYour Receipt and Order Number will be emailed to you within 48 hours of your order.";
	pages["Our-Founder.html"] = new Object();
	pages["Our-Founder.html"]['title'] = 'Our Founder';
	pages["Our-Founder.html"]['text'] = "Serving the persecuted church and sharing the Gospel in places like Vietnam, China, Cuba, Ethiopia and beyond.\nDr. David Hunt has been on the mission field since the age of 1. A child of missionaries, he grew up in Communist Vietnam and participated in ministry and Scripture distribution on Vietnamese military bases and training camps and hospitals. Thousands put their faith in Christ. As an adult, he has dedicated his life to serving the persecuted church and sharing the Gospel in places like Vietnam, China, Cuba, Ethiopia and beyond. He founded Envoy with the objective to be the most effective, dynamic international ministry, linking believers around the world who will pray and extend resources to our brothers and sisters on the frontlines. ";
	pages["Where-We-Serve.html"] = new Object();
	pages["Where-We-Serve.html"]['title'] = 'Where We Serve';
	pages["Where-We-Serve.html"]['text'] = "God's Emissaries - Commissioned to bring hope and help.\nWhere we serve\nCurrently in Vietnam Christians face many barriers in practicing their faith...\nMillions of believers in the underground church in China face the daily fear of arrest...\nWhile the Cuban people have religions freedom, they live in abject poverty...\nEthiopia\nIn this underdeveloped country, there is abject poverty evident everywhere and compounding the challenges facing this nation is the plague of AIDS...\nLearn more";
	pages["Vietnam.html"] = new Object();
	pages["Vietnam.html"]['title'] = 'Vietnam';
	pages["Vietnam.html"]['text'] = "After Vietnam fell to Communism in 1975, people of faith suffered from persecution and oppression. The government closed churches and jailed believers. Even so, the underground church grew. On October 9, 2007, Dr. Hunt was invited to be one of the keynote speakers when the Communist government of Vietnam recognized this formerly underground church to be fully legal. Although Dr. Hunt was unable to attend, he addressed the government officials and church leaders by letter. This marks a new day for the Gospel in Vietnam and the Christian leadership feel a great urgency to reach the nation with the Gospel with these newly given freedoms.\nShare The Most Important Story Ever Told with the children of Vietnam\nThe Most Important Story Ever Told is the most effective gospel booklet for children around the world today.  With exciting, full-color illustrations of the most powerful stories of the Bible, children come to know God’s plan in a way they can understand and relate to.  It not only features an invitation to salvation, but also challenges children to share their faith with others!\n\nAlready, more than 350,000 children have come to Christ in the past three years because of this powerfully and vividly illustrated book.  Many of the children who accept Jesus share The Most Important Story with their parents.  Entire families and communities are finding hope in Christ through this tool! You can help offer God’s comfort to the children of Vietnam with your best gift today.80% classified by the government as non-religious; 9% Buddhist; 7% Catholic; 3% Cao Dia/Hoa Hoa; 1% Protestant";
	pages["China.html"] = new Object();
	pages["China.html"]['title'] = 'China';
	pages["China.html"]['text'] = "Can you imagine the terror of living daily in fear?  Fear that officers will break down your door and arrest you . . . beat you . . . send you to prison . . . or worse.  What crime would cause such painful ramifications?  Faith in Jesus Christ.  Million of believers in the underground church of China live this nightmare.  They are targets of an anti-faith regime.  But through Envoy, these persecuted brothers and sisters are finding support and encouragement, desperately needed Bibles and help with church planting.Officially atheist, Daoist (Taoist), Buddhist, Christian 3-4%, Muslim 1-2%";
	pages["Cuba.html"] = new Object();
	pages["Cuba.html"]['title'] = 'Cuba';
	pages["Cuba.html"]['text'] = "Many of the people of Cuba are free to worship, but their lives are consumed with the daily struggle to survive.  With an average income of $15 USD (Source: BBC) per month, they fight for even the most basic of necessities.  Envoy works to bring the hope of Christ to these desperate people.  Through our efforts to plant churches, offer emergency assistance and provide Bibles and children's books, we are God's emissaries of love and compassion.nominally 85% Roman Catholic prior to Castro assuming power, Protestants, Jehovah's Witnesses, Jews and Santeria are also represented. Christian 60.8% (Orthodox 50.6%, Protestant 10.2%), Muslim 32.8%, traditional 4.6%, other 1.8%";
	pages["Ethiopia.html"] = new Object();
	pages["Ethiopia.html"]['title'] = 'Ethiopia';
	pages["Ethiopia.html"]['text'] = "In this underdeveloped country, there is abject poverty evident everywhere and compounding the challenges facing this nation is the plague of AIDS, which is reported to have the third highest rate of incidence in the world. Envoy Ministries is committed to empowering our Ethiopian brother and sisters in Christ to make a difference in their communities, reach them for Christ for Christ and help them in practical ways whenever possible.";


	function doSearch(homepad) {
		for(x in pages) {
			pages[x].score = 0;
		}
		var search = document.getElementById('search').value;
		if (!search) {
			alert("Unable to search at this time.");
			return;
		}
		if (search == "") {
			alert("Please enter a search term.");
			return;
		}
		var terms = search.split(" ");
		for(x in terms) {
			re = new RegExp(terms[x], "i");
			for(y in pages) {
				var str = pages[y].text + pages[y].title;
				while (re.test(str)) {
					pages[y].score++;
					str = str.replace(re, "");
				}
			}
		}
		var max = -1;
		var maxpos = '';

		var content = document.getElementById("contenttext");
		
		if(homepad == 'home'){
			content.innerHTML = '<div style="padding-left:20px; padding-top:10px;"><div><h1>Search Results</h1></div></div>';
		} else {
			content.innerHTML = '<div><h1>Search Results</h1></div>';
		}

		var found = false;

		for(x in pages) {
			for(y in pages) {
				if (pages[y].score > max) {
					max = pages[y].score;
					maxpos = y;
				}
			}
			if (max <= 0) {
				 break;
			} else {
				//alert(maxpos);
				//console.log(maxpos + ": " + max);
				if(homepad == 'home'){
				content.innerHTML += '<div style="padding-left:20px;"><li><a href="' + maxpos + '" class="redlink">' + pages[maxpos].title + '</a> - ' + max + ' matches</li></div>';
				} else {
				content.innerHTML += '<li><a href="' + maxpos + '" class="redlink">' + pages[maxpos].title + '</a> - ' + max + ' matches</li>';
				}
				pages[maxpos].score = -1;
				max = -1;
				maxpos = '';
				found = true;
			}
		}

		if (!found) {
			content.innerHTML += '<p>No results were found.</p>';
		}

		if(homepad == 'home'){
			content.innerHTML += '<p style="padding-left:20px;"><a href="' + window.location + '">back to content</a></p><br/><br/>';
		} else {
			content.innerHTML += '<p><a href="' + window.location + '">back to content</a></p><br/><br/>';
		}

	}