// toolbox.js

// Note: there is also a toolbox.js in wwwroot/media/ !!!
//       you'll need to change it too.

var navURLs  = new Array('x2/', 'bureau.htm', 'united.htm', 'local.htm', 'library.htm', 'contact.htm', 'subject.html', 'htmlbible/index.htm', 'audio/hymns.htm');

var linkText = new Array('Main', 'News Bureau', 'About Us', 'Local Info', 'Library', 'Contact Us', 'Subject Index', 'HTML Bible', 'Hymns');

var endSpace = ('<font face="arial" size=1>&nbsp;&nbsp;&nbsp;&nbsp;</font>');



/*
// ***************************************************
// Deactivate Right Mouse ****************************


var message="Function Disabled";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

// End Right Mouse ***********************************
// ***************************************************
*/




// Dynamic navigational list links
function linenav() {
	var navStr= '';
	for (var i = 0; i < navURLs.length; i++) {
		if (location.href.indexOf(navURLs[i]) == -1) {
		navStr += '<font face="arial" size="1"><b><A HREF="' + navURLs[i] + '">' + linkText[i] + '</A></b><font size="1"> \&\#149; </font></font>'; 
			}
		}
	document.writeln('<center>' + navStr);
	document.writeln('<font face="arial" size="1"><b><a href="javascript:history.go(-1);">Back</a></b></font> <font size="1">\&\#149;</font> <font face="arial" size="1"><b><a href="javascript:history.go(1);">Forward</a></b><br></font></center>');
	}



// Dynamic navigational bar links
function navbar() {
	var navStr= '';
	for (var i = 0; i < navURLs.length; i++) {
		if (location.href.indexOf(navURLs[i]) == -1) {
			navStr += '<td bgcolor="#ddffff"><nobr><font size="1" face="arial">&nbsp;<b><i><A HREF="' + navURLs[i] + '">' + linkText[i] + '</a></i></b>&nbsp;</font></nobr></td>'; 
			}
		}

	document.writeln('<table cellpadding="0" cellspacing="0"><tr><td><a href="javascript:history.go(-1);"><font face="arial" size="1"><b>Back</b></font></a>\&nbsp;</td><td bgcolor="#6699ff"><table bgcolor="teal" cellpadding="1" cellspacing="1"><tr align="center">');
	document.writeln('<td>' + endSpace + '</td><td align=\"center\">');
	document.writeln('<table bgcolor=\"lightblue\" bordercolor=\"\#ffffff\" border=\"1\" cellspacing=\"2\" cellpadding=\"0\"><tr>');
	document.writeln(navStr);
	document.writeln('</tr></table></td>');
	document.writeln('</td><td valign=\"middle\">' + endSpace + '</td>');
	document.writeln('</tr></table></td><td>\&nbsp;<a href=\"javascript:history.go(1);\"><font face=\"arial\" size=\"1\"><b>Forward</b></font></a></td></tr></table>');
	}



// Historical navigational bar
function histbar() {
	document.writeln('<center><font face="arial" size="2"><br><b><a href="javascript:history.go(-1);">Back</a></b></font> <font size="1">|</font> <font face="arial" size="2"><b><a href="javascript:history.go(1);">Forward</a></b><br></font></center>');
	}

// **************************************************


/* DYNAMIC DIGIAL CLOCK USING STYLE SHEETS STARTS HERE

	**CODE THAT NEEDS TO BE INSTALL, ON EACH WEBPAGE WHERE THE CLOCK IS DESIRED**
			Body tag needs to contain following:
				<body onload="liveClock()">

			Install this where the clock is desired on the page
						(format fonts as needed):
				<span id=clock style="position:relative;"></span>
*/
function MakeArrayday(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}

function MakeArraymonth(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}

function liveClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = hours + ":" + minutes + ":" + seconds + " " + dn;
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("liveClock()", 1000)
}

// CODE FOR DIGITAL CLOCK ENDS HERE
// **************************************************




/* DATE STRING FUNCTION STARTS HERE

	**CODE THAT NEEDS TO BE INSTALL, ON EACH WEBPAGE WHERE THE DATE IS DESIRED**

				<script language="JavaScript1.1">
				<!--
				DateString();
				//-->
				</script>
*/
function DateString() {

	var today = new Date(); 
	var weekday = today.getDay();

		document.write('<nobr>'); 

			if (weekday == 6) document.write('Saturday');
			if (weekday == 0) document.write('Sunday');
			if (weekday == 1) document.write('Monday');
			if (weekday == 2) document.write('Tuesday');
			if (weekday == 3) document.write('Wednesday');
			if (weekday == 4) document.write('Thursday');
			if (weekday == 5) document.write('Friday');

			document.write(', '); 

	var month = today.getMonth();
			if (month == 0) document.write('January');
			if (month == 1) document.write('Febuary');
			if (month == 2) document.write('March');
			if (month == 3) document.write('April');
			if (month == 4) document.write('May');
			if (month == 5) document.write('June');
			if (month == 6) document.write('July');
			if (month == 7) document.write('August');
			if (month == 8) document.write('September');
			if (month == 9) document.write('October');
			if (month == 10) document.write('November');
			if (month == 11) document.write('December');

	var date = today.getDate(); 
	var year=today.getYear();

			document.write (' ', date, ' ', year+1900, '</nobr>');

}

// CODE FOR DATE STRING FUNCTION ENDS HERE
// **************************************************


// ROTATING BOOKLET ADVERTISER STARTS HERE

function bookad() {
document.write('<font face=\"times\" size=\"3\" color=\"red\"><b><i>Free Booklet Offer\!</i></b></font>');

var adnum = 9;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % adnum;
var url="http://www.ucgstp.org/litrouter.htm";
ad +=1;


if (ad==1) {
var txt="What Does The Bible Teach? It does not say the righteous will receive heaven as their reward. It reveals that God has something else in mind &#151; something far different and far superior to most people's concepts about heaven.";
var title="\"Heaven & Hell\"";
var alt="Order FREE - 'Heaven & Hell'";
var banner="img_lit/heavenhell.gif";
var width="81";
var height="111";
}

if (ad==2) {
var txt="The Book of Revelation: is it relevant today? Is it possible to understand it? Can we know to whom it was written &#151; and why? What are the meanings of its mysterious symbols?";
var title="\"The Book of Revelation Unveiled\"";
var alt="Order FREE - 'The Book of Revelation Unveiled'";
var banner="img_lit/revelation.gif";
var width="81";
var height="111";
}

if (ad==3) {
var txt="Does It Really Matter What You Believe? If God created man we have no right to ignore Him. If man created God we can easily ignore Him. Which is the myth, God or evolution?";
var title="\"Creation Or Evolution\"";
var alt="Order FREE - 'Creation Or Evolution'";
var banner="img_lit/evolution.gif";
var width="81";
var height="111";
}

if (ad==4) {
var txt="If we look into the inspired writings of the Old Testament prophets and Jesus Christ's apostles, we find many prophecies that refer to the time of the end. Should we take them seriously? Should they mean anything to us? Are we approaching Armageddon?";
var title="\"Are We Living in the Time of the End?\"";
var alt="Order FREE - 'Are We Living in the Time of the End?'";
var banner="img_lit/endtime.gif";
var width="81";
var height="111";
}


if (ad==5) {
var txt="Thousands of years ago, King David looked up into the heavens and wondered, \"What is man that You are mindful of him, what is the son of man that You visit him?\" David wondered about the purpose of man just as we do today. Every one of us was creaded for a purpose, but very few understand what that great purpose is.";
var title="\"What Is Your Destiny?\"";
var alt="Order FREE - 'What Is Your Destiny?'";
var banner="img_lit/destinys.gif";
var width="81";
var height="111";
}

if (ad==6) {
var txt="Like the Philippian jailer in the Book of Acts, many of us have wondered at some time: What must I do to be saved? The beliefs and practices of various churches differ greatly on this important question, even though most claim their authority from the bible. What does the Bible say? The Road To Eternal Life will help you understand the biblical truth. Then you can start your journey on The Road To Eternal Life!";
var title="\"The Road To Eternal Life\"";
var alt="Order FREE - 'The Road To Eternal Life'";
var banner="img_lit/eternals.gif";
var width="81";
var height="111";
}

if (ad==7) {
var txt="\"Remember the Sabbath day, to keep it Holy,\" begins the Fourth Commandment. Why did God consider the Sabbath so important that He included it in the Ten Commandments? Today the Sabbath command is almost universally ignored, considered irrelevant in modern society. But is it irrelevant? Discover the vital inportance of God's Sabbath to Christians today!";
var title="\"Sunset to Sunset - God's Sabbath Rest\"";
var alt="Order FREE - 'Sunset to Sunset - God's Sabbath Rest'";
var banner="img_lit/sabbats.gif";
var width="72";
var height="111";
}

if (ad==8) {
var txt="Today's headlines are filled with bad news of war, famine, natural disasters, new and baffling diseases, environmental catastrophes, governmental scandals and corruption. In the 20th century, more than 150 million people have been killed in war alone. Well over 100 million more have died from diseases, pandemics and natural disasters. With all this bad news, is there any hope for the future of humanity?";
var title="\"The Gospel of the Kingdom\"";
var alt="Order FREE - 'The Gospel of the Kingdom'";
var banner="img_lit/gospel.gif";
var width="72";
var height="111";
}

if (ad==9) {
var txt="Why does humanity exist? Is there a purpose for human life, or are we only the result of some evolutionary process, the product of a series of cosmic accidents? What is the fate of humanity? Are we destined to kill ourselves off? Or will we see a utopia of peace and prosperity for all?";
var title="\"God's Holy Day Plan: The Promise of Hope for All Mankind\"";
var alt="Order FREE - 'God's Holy Day Plan: The Promise of Hope for All Mankind'";
var banner="img_lit/holyday.gif";
var width="72";
var height="101";
}

document.write('<center><font size=\"4\" face=\"times\" color=\"blue\"><b>' + title + '</b></font></center>');
document.write('<a href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0 align=\"left\"></a>');
document.write('<small>' + txt + '</small></br>');
document.write('<div align=\"center\"><font face=\"times\" color=\"red\" size=\"2\"><i><b><a target=\"_top\" href=\"http://www.ucgstp.org/litrouter.htm">Order Here</a> \&\#151; FREE\!</b></i></font><br><font face=\"arial\" color=\"red\" size=\"1\">(No charge or obligation of any kind. Published as an educational service in the public interest.)</font></div>');
}
// ROTATING BOOKLET ADVERTISER ENDS HERE
// **************************************************


// ROTATING NEWS ADVERTISER STARTS HERE

function newsad() {

var newsnum = 1;
var now = new Date()
var sec = now.getSeconds()
var news = sec % newsnum;
news +=1;


if (news==1) {
var newstxt="The United Church of God provides World News and Prophecy \(WNP\) as a free educational service for interested persons. The purpose of WNP is to help readers discern the times and increase their awareness and understanding of current events in the light of Bible prophecy. Although the staff strives for truth and accuracy in its reporting, analysis, and Bible commentary, WNP is not a doctrinal publication. Articles do undergo both an editorial and a review process.";
var newstitle="World News \& Prophecy";
var newsalt="Today\'s News In Perspective";
var newsimg="img/wnp-s.gif";
var newswidth="189";
var newsheight="67";
var newsurl="http://www.ucg.org/wnp/index.htm";
}
// cpw: www.ucg.org/wnp/index.htm was bureau/wnp-indx.htm

if (news==2) {
var newstxt="Shallow, selective and bias reporting along with ignorance, misinformation and propaganda in the main-stream creative-news, slanted by the media-jackels, have been the major contributing factors clouding understanding of the real issues and important news in the Middle East. Join us each week as Kathy Hoffart digests and commentates Middle-East news from the internet, not normally reported to the general public. If the Middle East is of interest and important to you, join us during our next post-Sabbath webcast for an astute and authoritive report, which is simply not available from the prima donnas in their yellow journalism.";
var newstitle="Middle-East Report";
var newsalt="The Middle-East in Perspective";
var newsimg="img/MidEastByLine-s.gif";
var newswidth="100";
var newsheight="85";
var newsurl="media/cybercast.htm\#post";
}

if (news==3) {
var newstxt="Shallow, selective and bias reporting along with ignorance, misinformation and propaganda in the main-stream creative-news, slanted by the media-jackels, have been the major contributing factors clouding understanding of the real issues and important news in the World. Join us each week as Steve Holz digests and commentates world news from the internet, not normally reported to the general public. If world news is of interest and important to you, join us during our next post-Sabbath webcast for an astute and authoritive report, which is simply not available from the prima donnas in their yellow journalism.";
var newstitle="Europe & Far-East Report";
var newsalt="News Behind the Headlines\!";
var newsimg="img/Holz.gif";
var newswidth="100";
var newsheight="120";
var newsurl="media/cybercast.htm\#post";
}

/*
if (news==2) {
var newstxt="Feugifacilisi. Duis autem dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsam et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugat nulla facilisi. Ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Feugifacilisi.";
var newstitle="\"TITLE GOES HERE\"";
var newsalt="IMAGE ALT GOES HERE";
var newsimg="IMAGE URL GOES HERE";
var newswidth="81";
var newsheight="111";
var newsurl="PAGE URL GOES HERE";
}
*/

document.write('<a href=\"' + newsurl + '\" target=\"_top\">');
document.write('<font face=\"times\" color=\"blue\"><b>' + newstitle + '</b></font>');
document.write('<img src=\"' + newsimg + '\" width=')
document.write(newswidth + ' height=' + newsheight + ' ');
document.write('alt=\"' + newsalt + '\" border=0 align=\"right\"></a><br>');
document.write('<small>' + newstxt + '</small></br>');
}
// ROTATING NEWS ADVERTISER ENDS HERE
// **************************************************


// ROTATING FEATURED PUBLICATION STARTS HERE

function featured() {

var featnum = 5;
var now = new Date()
var sec = now.getSeconds()
var feat = sec % featnum;
feat +=1;


if (feat==1) {
var feattxt="This is one of the great questions of life: What happens when we die? Is death the end of human existence and consciousness, or do we continue on in some other place or state of being? Do we go to a place of everlasting reward or eternal torment? Are we destined to be reincarnated, coming to life again in a different body in a seemingly endless cycle of living and dying? Will we ever see deceased loved ones again? Is there somewhere you can go to find the answers?<p>In spite of centuries of research, science cannot tell us when, where or how life began. The Bible tells us exactly what happens after death. It tells us what happens to those who have done right and wrong and reveals the fate of the billions of people who have never known God and His way of life. Most churches claim to teach what the Bible says but what does it really say?</p>You need to discover the answers yourself. You'll be shocked when you find out what the Bible really teaches about <i>What Happens After Death\?</i>";
var feattitle="What Happens After Death\?";
var featalt="You need to know\!";
var featimg="img_lit/death.gif";
var featwidth="90";
var featheight="138";
var featurl="http://www.ucg.org/booklets/AD/index.htm";
}

if (feat==2) {
var feattxt="Today\'s headlines are filled with troubling news\&\#151\;war, famine, natural disasters, new and baffling diseases, environmental catastrophes and governmental scandals. The litany of suffering, tragedies and bad news is relentless. Where is the world headed\? Does Bible prophecy give us any answers\?<p>In <i>You Can Understand Bible Prophecy,</i> you\'ll discover what the Bible says about where the world is headed. Learn the major themes of Bible prophecy and God\'s overall plan for humanity. Find out why the world is in the condition it\'s in\&\#151\;and what it means for you.</p>You need to know the answers\!";
var feattitle="Where Is the World Headed\?";
var featalt="Where is the world headed\?";
var featimg="img_lit/unproph.gif";
var featwidth="108";
var featheight="134";
var featurl="http://www.ucg.org/booklets/UP/index.htm";
}

if (feat==3) {
var feattxt="For thousands of years people have been fascinated with predictions of the end of the world. If we look into the inspired writings of the biblical prophets and apostles, we find many prophecies that refer to the time of the end. Should we take them seriously\? Are world conditions such that the predictions could be fulfilled in our day\?<p>Jesus Christ Himself talked of a future time so horrendous that no human being would be spared \"unless those days were shortened\" \(Matthew 24:22\). Did He have our time in mind\?</p>Many prophecies leave us in doubt that increasingly cataclysmic events will occur before God\'s direct intervention in human affairs. These terrifying prophecies will see their fulfillment at some future time. The crucial question is <i>when</i>.";
var feattitle="What Does Bible Prophecy Tell Us About the Time of the End\?";
var featalt="Did Jesus have our time in mind\?";
var featimg="img_lit/endtime.gif";
var featwidth="108";
var featheight="133";
var featurl="http://www.ucg.org/booklets/ET/index.htm";
}

if (feat==4) {
var feattxt="Never has the creation-evolution debate been more heated than it is now. And never has there been such misinformation and confusion on this crucial subject. Have you been confused about the facts\? Take this short true-or-false quiz to asess your knowledge.<p><i><b>TorF</b></i>\&\#150\;Fossil discoveries over the last century have proven Darwin\'s theory of evolution to be true. <i><b>TorF</b></i>\&\#150\;Most astronomers believe the universe has always existed, so there is no need for a Creator. <i><b>TorF</b></i>\&\#150\;The fossil record shows simple life-forms evolving over time into more-complex creatures. <i><b>TorF</b></i>\&\#150\;All animals and plants and relationships among them can easily be explained by the theory of evolution. <i><b>TorF</b></i>\&\#150\;The Bible plainly teaches that the earth was created about 6,000 years ago, so it is impossible to reconcile the Bible and science.</p>The correct answer to all of the above questions is <i>false</i>. If you missed some, don\'t be surprised. After all, we are routinely led to believe that most or all of these are \"facts\" proven by science. The truth, however, is far different\!";
var feattitle="Evolution or Creation\&\#151\;What\'s the Truth\?";
var featalt="Does God really exist\?";
var featimg="img_lit/evolution.gif";
var featwidth="108";
var featheight="136";
var featurl="http://www.ucg.org/booklets/EV/index.htm";
}

if (feat==5) {
var feattxt="Did God give us the 10 suggestions\&\#151\;or the Ten Commandments\? It\'s a crucial question. Never has our world had such a critical need for moral guidance and direction. Never have so many people lost their moral bearings and desperately needed help.<p>Plenty of people think of these 10 principles as good suggestions. They may even make some attempt to practice them, at least when it\'s convenient.</p>But how many people view these commands for what they are\: our Creator\'s blueprint for a peaceful and prosperous world\? There\'s much more to God\'s commands than meets the eye. They are not just God\'s way of preventing us from enjoying a good time. They\'re designed to protect us, our families, our communities. They\'re a guide to transform the way we think, what we do and how we live.";
var feattitle="The Ten Suggestions\?";
var featalt="Are the Ten Commandments valid for today\?";
var featimg="img_lit/ten.gif";
var featwidth="100";
var featheight="140";
var featurl="http://www.ucg.org/booklets/TC/index.htm";
}

/*
if (feat==3) {
var feattxt="Feugifacilisi. Duis autem dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsam et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugat nulla facilisi. Ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Feugifacilisi.";
var feattitle="\"TITLE GOES HERE\"";
var featalt="IMAGE ALT GOES HERE";
var featimg="IMAGE URL GOES HERE";
var featwidth="81";
var featheight="111";
var featurl="PAGE URL GOES HERE";
}
*/

document.write('<a href=\"' + featurl + '\" target=\"_top\">');
document.write('<font face=\"times\" color=\"blue\"><b>' + feattitle + '</b></font>');
document.write('<img src=\"' + featimg + '\" width=')
document.write(featwidth + ' height=' + featheight + ' ');
document.write('alt=\"' + featalt + '\" border=0 align=\"right\"></a><br>');
document.write('<small>' + feattxt + '</small></br>');
}
// ROTATING FEATURED PUBLICATION ENDS HERE
// **************************************************




// JUMP-BOX FUNCTION STARTS HERE

/*	Put this code on each page where Jump-Box is desired
			<script language="javascript">
			<!--
			Jump_Box();
			//-->
			</script>
*/

// The following two arrays produce the jump-list.
// Array #1
     var siteopt = new MakeArray("Destinations...",
"Main",
"Site Map",
"St. Paul Webcast",
"Sermon archive",
"Literature",
"Literature Subject Index",
"Literature Topic Index",
"Literature Scripture Index",
"Literature Search",
"Good News Magazine",
"Virtual Christian Magazine",
"World News & Prophecy",
"Bible Reading text",
"Bible Study",
"WikiBible",
"Holy Days",
"Sunset Tables",
"Young Adults",
"HTML Bible",
"Misc.");

// cpw: replaced "http://www.ucgstp.org/lit/sermons.htm", for sermons
// Array #2
     var urljump = new MakeArray("",
"http://st-paul.ucg.org/",
"http://www.ucgstp.org/links/links.htm",
"http://media.ucgstp.org/media/cybercast1.asp",
"http://www.ucgstp.org/archive.php",
"http://www.ucg.org/litlibrary/index.htm",
"http://www.ucgstp.org/subject.html",
"http://www.ucgstp.org/lit/gn/gnindex.htm",
"http://www.ucgstp.org/cgi-bin/scriptures.pl",
"http://www.ucgstp.org/cgi-bin/fluffy/fluffysearch.pl",
"http://www.gnmagazine.org/",
"http://www.vcmagazine.org",
"http://www.wnponline.org/wnp/index.htm",
"http://www.ucgstp.org/bible/brp/default.htm",
"http://www.ucgstp.org/lit/studies.htm",
"http://www.ucgstp.org/cgi-bin/wikibible",
"http://www.ucgstp.org/holydays.htm",
"http://www.ucgstp.org/sunset.htm",
"http://www.yacog.org",
"http://www.ucgstp.org/htmlbible/index.htm",
"http://www.ucgstp.org/misc.htm");

     function MakeArray()
       {
          this.length = MakeArray.arguments.length
          for (var v = 0; v < this.length; v++)
          this[v+1] = MakeArray.arguments[v]
       }

     function JumpPage(form)
       {
          var w = form.SelectMenu.selectedIndex;
          if (w == 0) return;
// stay in the same window for references to ucgstp.org
// but open another window for other sites
// indexOf returns -1 for not found
          urlstring = urljump[w+1];
          var i = urlstring.indexOf("ucgstp.org");
//        document.writeln("<BR>index of ucgstp.org in " + urlstring + " is " + i + "<BR>");
          if (i >= 0) {
           parent.location.href = urljump[w+1];
          } else {
           window.open(urljump[w+1]);
          }
       }

function Jump_Box() {

         document.writeln('<font size=\"2\"><select name=\"SelectMenu\" onChange=\"JumpPage(this.form)\" \"TARGET=_blank\">');
         var tot = siteopt.length;
             for (var y = 1; y <= tot; y++)

         document.write('<option>' +siteopt[y]);
         document.writeln('</select>');

         if (navigator.userAgent.indexOf("Mozilla/2") != -1)
         document.writeln('<input type=buttom value="Jump!">');

         document.writeln('</font>');

}

// JUMP-BOX FUNCTION ENDS HERE
// **************************************************


// BANNER-ADS BEGIN HERE

	function banner_Ad() {
	var how_many_ads = 1;
	var now = new Date()
	var sec = now.getSeconds()
	var ad = sec % how_many_ads;
	ad +=1;

		//  Add the following section for each add with its information. 
		//  Then increase "how_many_adds" by one for each add added.

	if (ad==1) {
	txt="Order Your FREE Subscription!";
	url="http://www.ucgstp.org/litrouter.htm";
	alt="FREE - Good News Magazine Subscription";
	banner="img/GNAd.gif";
	width="360";
	height="60";
	}

	if (ad==2) {
	txt="Order Your FREE Booklet!";
	url="http://www.ucgstp.org/litrouter.htm";
	alt="FREE Booklet";
	banner="img/ad4.gif";
	width="360";
	height="60";
	}

//	if (ad==1) {
//	txt="Register Now To Reserve Your Seat!\&nbsp\;\&nbsp\;";
//	url="ABCSampler/ABCSampler.htm";
//	alt="FREE Booklet";
//	banner="img/abc_anim.gif";
//	width="360";
//	height="60";
//	}

	document.write('<a href=\"' + url + '\" target=\"_top\">');
	document.write('<img src=\"' + banner + '\" width=')
	document.write(width + ' height=' + height + ' ');
	document.write('alt=\"' + alt + '\" border=0><br>');
	document.write('<small>' + txt + '</small></a>');
}

// BANNER-ADS ENDS HERE
// **************************************************



// LAST MODIFIED START HERE

function last_modified() {

var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";

var dateObj = new Date(document.lastModified);
var lmonth = months[dateObj.getMonth() + 1];
var date = dateObj.getDate();


document.write("This page last modified:" + " " + lmonth + " " + date + ", 2001")

}

// LAST MODIFIED ENDS HERE
// **************************************************


// SITE-SEARCH ENGINE BEGIN HERE


function check(txt)
 { t=txt.value; n=t.indexOf("  ");
   while(n>=0)
    { t=t.substring(0,n)+t.substring(n+1,t.length);
      n=t.indexOf("  "); };
   txt.value=t; return true; };


function Site_Search() {

//  cpw: make this call the Perl search engine
 	document.writeln('<TABLE BORDER="2"><TR><TD>');
 	document.writeln('<A href="http://www.ucgstp.org/cgi-bin/fluffy/fluffysearch.pl" target="search">');
 	document.writeln('Search the Literature</A>');
 	document.writeln('</TD></TR></TABLE>');

//	var engine = "engine.htm"
//
//	document.writeln('<input type=\"text\" size=18 name=\"srchtxt\"><br>');
//	document.writeln('<select name=\"srchlst\">');
//
//	document.writeln('<option value=\"ucg.js\" >About This Site');
//	document.writeln('<option value=\"lit.js\" selected>On-Line Literature');
//
//	document.writeln('</select><br><input type=\"submit\" value=\"Search\">');
//	document.writeln('<input type=\"reset\" value=\"Clear\">');
//	document.writeln('<input type=\"button\" value=\"\?\" onclick=\"window.open(\'srchhlp.htm\',\'sh\',\'width=425, height=450, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=1\'\)\;\">');
//	document.writeln('<input type=\"hidden\" name=\"linkto\" value=\"_top\">');
//	document.writeln('<input type=\"hidden\" name=\"pageof\" value=\"0\">');

}

// SITE-SEARCH ENGINE FUNCTION ENDS HERE
// **************************************************




// **************************************************
//  ****** HEADER BEGINS ******

function header2() {

	document.writeln('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ');
	document.writeln('width=\"100\%\">');
	document.writeln('<tbody><tr align=\"left\" valign=\"top\"><td valign=\"top\">');
	document.writeln('<a href=\"http://www.ucgstp.org/\" target=\"_top\">');
	document.writeln('<img src=\"img/header.gif\" width=\"366\" height=\"70\" ');
	document.writeln('border=\"0\" alt=\"\"></a><center>');
	document.writeln('<font face=\"arial\" size=\"1\" color=\"red\"><b><i>');
	document.writeln('Affiliated with the United Church of God ');
	document.writeln('- an International Association');
	document.writeln('</nobr></i></b></font></center></td>');
	document.writeln('<td align=\"right\" valign=\"middle\">\&nbsp\;\&nbsp\;\&nbsp\;');

	linenav();
	document.writeln('\&nbsp\;\&nbsp\;\&nbsp\;</td></tr><tr>');
	document.writeln('<td colspan=\"2\" align=\"center\">');
	document.writeln('<hr size=\"1\" width=\"45\%\" color=\"red\">');
	document.writeln('</td></tr></tbody></table>');


}

//  ****** HEADER ENDS ******
// **************************************************




// **************************************************
//  ****** SIDEBAR BEGINS ******

function sidebar2() {

	document.writeln('<table align=\"left\" border=\"0\" cellpadding=\"0\" ');
	document.writeln('cellspacing=\"0\" background=\"img/water2.jpg\" ');
	document.writeln('bgcolor=\"\#aaccff\">');
	document.writeln('<tr><td colspan=\"2\"><br></td></tr>');
	document.writeln('<tr><td width=\"5\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"5\" height=\"1\"></td>');
	document.writeln('<td valign=\"top\" width=\"150\"><form>');
	document.writeln('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ');
	document.writeln('width=\"100\%\"><tbody><tr>');
	document.writeln('<td bgcolor=\"\#99cccc\" height=\"1\" width=\"10\%\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"1\"></td>');
	document.writeln('<td height=\"21\" rowspan=\"3\"><img alt=\"TOC\" height=\"21\" ');
	document.writeln('src=\"img/tab_rght.gif\" width=\"10\"></td>');
	document.writeln('<td align=\"right\" rowspan=\"3\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"1\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#006699\" height=\"1\" width=\"10\%\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"5\" height=\"1\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#000066\" nowrap width=\"10\%\">');
	document.writeln('\&nbsp;<font color=\"\#ffff99\" face=\"arial\" size=\"-1\">');
	document.writeln('<B>Table of Contents</B></font></td></tr>');
	document.writeln('<tr><td bgcolor=\"\#ff9966\" colspan=\"3\" height=\"3\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"3\"></td>');
	document.writeln('</tr></tbody></table>');

	document.writeln('<table bgcolor=\"\#ffffcc\" border=\"0\" cellpadding=\"0\"');
	document.writeln('cellspacing=\"0\" width=\"100\%\"><tbody><tr>');
	document.writeln('<td bgcolor=\"\#ffffcc\" height=\"8\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"8\"></td>');
	document.writeln('</tr><tr><td align=\"middle\" bgcolor=\"\#ffffcc\">');

	Jump_Box();
	document.writeln('</td></tr><tr><td height="2">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"2\"></td>');
	document.writeln('</tr><tr><td height=8>');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"8\"></td>');
	document.writeln('</tr><tr><td bgcolor=\#\ff9966 height=\"1\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"20\" height=\"1\"></td>');
	document.writeln('</tr></tbody></table></form><br>');

	document.writeln('<form action=\"engine.htm\" id=\"form1\" method=\"get\" ');
	document.writeln('name=\"srchfrm\" onsubmit=\"check(this.srchtxt);\">');
	document.writeln('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ');
	document.writeln('width=\"100\%\"><tbody><tr>');
	document.writeln('<td bgcolor=\"\#99cccc\" height=\"1\" width=\"10\%\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"1\"></td>');
	document.writeln('<td height=\"21\" rowspan=\"3\">');
	document.writeln('<img alt=\"Search\" height=\"21\" src=\"img/tab_rght.gif\" ');
	document.writeln('width=\"10\"></td><td align=\"right\" rowspan=\"3\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"1\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#006699\" height=\"1\" width=\"10\%\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"5\" height=\"1\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#000066\" nowrap width=\"10\%\">');
	document.writeln('\&nbsp\;<font color=\"\#ffff99\" face=\"arial\" size=\"-1\">');
	document.writeln('<B>Search Site</B></font></td></tr><tr>');
	document.writeln('<td bgcolor=\"\#ff9966\" colspan=\"3\" height=\"3\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"3\"></td>');
	document.writeln('</tr></tbody></table>');
	document.writeln('<table bgcolor=\"\#ffffcc\" border=\"0\" cellpadding=\"0\" ');
	document.writeln('cellspacing=\"0\" width=\"100\%\"><tbody><tr>');
	document.writeln('<td bgcolor=\"\#ffffcc\" height=\"8\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"8\"></td>');
	document.writeln('</tr><tr><td align=\"middle\" bgcolor=\"\#ffffcc\">');

	Site_Search();
	document.writeln('</td></tr><tr><td height=\"2\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"2\"></td>');
	document.writeln('</tr><tr><td height=8>');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"8\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#ff9966\" height=\"1\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"20\" height=\"1\"></td>');
	document.writeln('</tr></tbody></table></form><br>');


	document.writeln('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ');
	document.writeln('width=\"100\%\"><tbody><tr>');
	document.writeln('<td bgcolor=\"\#99cccc\" height=\"1\" width=\"10\%\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"5\" height=\"1\"></td>');
	document.writeln('<td height=\"21\" rowspan=\"3\">');
	document.writeln('<img alt=\"Notices\" height=\"21\" src=\"img/tab_rght.gif\" ');
	document.writeln('width=\"10\"></td><td align=\"right\" rowspan=\"3\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"1\" height=\"1\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#006699\" height=\"1\" width=\"10\%\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"5\" height=\"1\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#000066\" noWrap width=\"10\%\">');
	document.writeln('&nbsp;<font color=\"\#ffff99\" face=\"arial\" size=\"-1\">');
	document.writeln('<b>Notices</b></font></td></tr><tr>');
	document.writeln('<td bgcolor=\"\#ff9966\" colspan=\"3\" height=\"3\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"20\" height=\"3\"></td>');
	document.writeln('</tr></tbody></table>');

	document.writeln('<table bgcolor=\"\#ffffcc\" border=\"0\" cellpadding=\"0\" ');
	document.writeln('cellspacing=\"0\" width=\"150\"><tbody><tr>');
	document.writeln('<td bgcolor=\"\#ffffcc\" height=\"3\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"20\" height=\"3\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#ffffcc\" align=\"center\">');
	document.writeln('<font face=\"arial\" size=\"2\"><a href=\"copyright.htm\">');
	document.writeln('Copyrights</a>\&nbsp\;\&\#149; <a href=\"legal.htm\">');
	document.writeln('Legal</a>\&nbsp\;\&\#149; <a href=\"privacy.htm\">');
	document.writeln('Privacy Policy</a></font></td></tr></tbody></table>');

	document.writeln('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ');
	document.writeln('width=\"100\%\"><tbody><tr><td bgcolor=\"\#ffffcc\" height=\"7\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"20\" height=\"7\"></td>');
	document.writeln('</tr><tr><td bgcolor=\"\#ff9966\" height=\"1\">');
	document.writeln('<img src=\"img/empty.gif\" width=\"20\" height=\"1\"></td>');
	document.writeln('</tr></tbody></table><br><br>');

	document.writeln('<table align=\"center\" border=\"0\" cellpadding=\"2\" ');
	document.writeln('width=\"150\" valign=\"bottom\"><tbody><tr><td align=\"middle\">');
	document.writeln('<a href=\"copyright.htm\"><img alt=\"Copyright United Church of ');
	document.writeln('God-St. Paul\" border=\"0\" src=\"img/logo.gif\" width=\"80\" ');
	document.writeln('height=\"93\"></a><br><font face=\"times\" size=\"1\">');
	document.writeln('United Church of God-St. Paul<br>');
	document.writeln('<a href=\"copyright.htm\">Copyright</a> \&copy\;1997-2009<br>');
	document.writeln('All rights reserved.</font></td></tr></tbody></table><br></td>');
	document.writeln('<td width=\"5\"><img src=\"img/empty.gif\" width=\"5\" ');
	document.writeln('height=\"1\"></td></tr></table>');
}

//  ****** SIDEBAR ENDS ******
// **************************************************




//  ****** FOOTER BEGINS *******

function footer2() {

	document.writeln('<br><center>');
	document.writeln('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">');
	document.writeln('<tbody><tr><td align=\"center\"><font face=\"arial\" size=\"1\">');
	document.writeln('<a href=\"../x2/\">Main</a>\&nbsp\;\&\#149\;');
	document.writeln('<a href=\"../united.htm\">About United</a>\&nbsp\;\&\#149\;');
	document.writeln('<a href=\"../local.htm\">Local Church Info</a>\&nbsp\;\&\#149\;');
	document.writeln('<a href=\"http://www.ucgstp.org/litrouter.htm">Literature Request</a>\&nbsp\;\&\#149\;');
	document.writeln('<a href=\"../contact.htm\">How to Contact Us</a>\&nbsp\;\&\#149\;');
	document.writeln('<a href=\"../library.htm\">Library</a>\&nbsp\;\&\#149\;');
	document.writeln('<a href=\"../lit/sermons.htm\">Sermon Archives</a>');
	document.writeln('</font></td></tr></tbody></table></center>');

	document.writeln('<hr width=\"70\%\" color=\"red\" align=\"center\" noshade>');

	document.writeln('<table cellpadding=\"5\" cellspading=\"5\" border=\"0\" width=\"100\%\">');
	document.writeln('<tr><td valign=\"top\"><font face=\"arial\" size=\"1\">');
	document.writeln('<nobr><a href=\"../copyright.htm\">Copyright</a>');
	document.writeln(' \&\#169; 1997-2009 <a href=\"http://www.ucgstp.org/\">');
	document.writeln('United Church of God - St. Paul</a>. All rights reserved.');
	document.writeln('</nobr><br><nobr> Please send comments/changes to: ');
	document.writeln('<a href=\"mailto:webmaster\@ucgstp.org\">webmaster\@ucgstp.org</a>');
	document.writeln('</nobr><br>');
	document.writeln('<a href=\"../legal.htm\">Legal Notices</a> \| ');
	document.writeln('<a href=\"../privacy.htm\">Privacy Policy</a>.<br></font></td>');
	document.writeln('<td align=\"left\" valign=\"top\" colspan=\"2\"><center>');
	document.writeln('<font face=\"arial\" size=\"1\">This page downloaded:');
	document.writeln('</font></center>');

	var Daytoday=new Date()
	document.write('<font face=\"Arial\" size=\"1\">');
	document.write('<div align=\"right\">'+Daytoday.toString());
	document.write('<br>' + window.location + '</div></font>');

	document.writeln('</td></tr><tr><td colspan=\"3\" align=\"left\" valign=\"top\">');
	document.writeln('<font face=\"arial\" size=\"1\">');

	last_modified();
	document.writeln('</font></td></tr></table>');
}

//  ******* FOOTER ENDS ********
// **************************************************
