
//alert(document.cookie);
//var ny = new Date();
//ny.setFullYear(ny.getFullYear()+2);
//document.cookie="version="+navigator.appName.substring(0,8)+"; expires="+ny.toGMTString();
//document.cookie="dragon="+navigator.appName.substring(0,8)+"; expires="+ny.toGMTString();
//alert(document.cookie);
//alert(document.cookie.value);
//alert(document.cookie);

//Included Tripod function to remedy my problems with their popup window not appearing at all except in JA pages

function TripodShowPopup()
{
        // open the popup window
        var popupURL = "http://members.tripod.com/adm/popup/roadmap.shtml";
        var popup = window.open(popupURL,"TripodPopup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=575,height=105');
        // set the opener if it's not already set.  it's set automatically
        // in netscape 3.0+ and ie 3.0+.
        if( navigator.appName.substring(0,8) == "Netscape" )
        {
                popup.location = popupURL;
        }
}


//Paul's multi-doc java functions for my SPIDER WEB

//	******HEADERS******

function titler(lang, kari_bgname, kari_versioner, header, transpage, subheader, rotatetype){
//lang is E for English, J for Japanese


if (header != 0){
//only not exceuted on main page to fulfill my obligation to promote Tripod,
//but filtered off other pages to mimic the popup windows old behavior
	if ((location.href.substring(0,12)=="http://pbl1.")||(location.href.substring(0,12)=="http://membe"))
		{var other = window.open("null.html","TripodPopup",'width=100,height=100');
		other.close(); }
}

//Used to show Tripods popup on my main page
if (header == 0){
//only not exceuted on main page to fulfill my obligation to promote Tripod,
//but filtered off other pages to mimic the popup windows old behavior
	if ((location.href.substring(0,12)=="http://pbl1.")||(location.href.substring(0,12)=="http://membe"))
		{TripodShowPopup(); }
}



//Set font to be SJIS compatible even on English pages so that Japanese lang shortcut will come out properly
document.write("<META http-equiv=\"Content-Type\"content=\"text/html;charset=Shift_JIS\">");
document.write('<meta name="description" content="This is Paul Bryan Lester\'s Home Page.  It contains information and things I find useful, hence its use.  Its final mission is to express imagination, love, kindness, and truth.">');
document.write('<meta name="keywords" content="Christian Science, Love, Honor, justice, oracle, japan, japanese, Japanese, Nihongo, nihongo, ranma, music, tae kwon do, Tae Kwon Do, KCJS, HIF, Tanka, Clarinet, Paul, Paul Bryan Lester, JavaScript, Ultima III, Lester, CoCo, Particle Physics, Macintosh, PC, Commodore 64, Deep Space 9, Patrick Stewart"> ');
document.write("</HEAD>");

if (rotatetype=="NOROTATE"){BODYSELECT (kari_bgname, kari_versioner);}
else	{
	TIME_ASSIGN(rotatetype, lang, subheader);
	}

document.write("<A NAME=\"top\"></A>");

//Types of headers: 0- allow Tripod window too 1- Nothing 2- eps,bolt,trans 3- centered Eps over trans
// 4- Center image with E and bolt on outside (reversed for Japanese)
//5- Centered E with two bolts with trans  6- CS header

if (header==2){
switchpict('BOLT',lang);
switchpict('E',lang);
transbutton(transpage,lang);
}

if (header==3){
document.write("<CENTER>");
switchpict('E',lang)
document.writeln("<BR>")
transbutton(transpage,lang)
}

//if (header==4){
//Implement later if I feel like it, this is supposed to be the Martial Arts header
//}

if (header==5){
document.write("<CENTER>");
switchpict('BOLT',lang,'NOQUICK','1','DESTYES');
switchpict('E',lang);
switchpict('BOLT',lang,'NOQUICK','2','DESTYES');
document.write("<BR>");
transbutton(transpage,lang)
}

if (header==6){
	if(lang=="E"){
		document.write('<BR>');
document.write('<H1 ALIGN="CENTER">GOD IS LOVE<BR>');
document.write('<HR SIZE=1 WIDTH="59%" ALIGN="CENTER"></H1>');
document.write('<FONT SIZE=3><HR SIZE=2>');
document.write('<TABLE BORDER WIDTH="10%" ALIGN="LEFT" NOSAVE ><TR><TD COLSPAN=1 NOWRAP>Divine Love always has met<BR>and always will meet<BR>every human need.</TD></TR><TR><TD NOWRAP>-Mary Baker Eddy</TD></TR></TABLE>');
document.write('<TABLE BORDER ALIGN="RIGHT" WIDTH="15%" NOSAVE ><TR><TD COLSPAN=1 NOWRAP>Ye shall know the Truth<BR>and the Truth shall make you free.</TD></TR><TD NOWRAP>-Christ Jesus</TD></TR><TR></TABLE>');
document.write('<BR CLEAR="ALL">');
	}
	else {document.write('<CENTER><H1 ALIGN="CENTER">神は愛である。<BR>');
document.write('<HR SIZE=1 WIDTH="59%"><HR SIZE= 4></H1></CENTER>');
document.write('<FONT SIZE=3><HR SIZE=2>');
document.write('<TABLE BORDER WIDTH="10%" ALIGN="LEFT"><TR><TD COLSPAN=1 NOWRAP>神性の愛は人のあらゆる');
document.write('<BR>必要を常に満たしてきた<BR>そしてこれからも常に満たす。</TD></TR><TR><TD NOWRAP>メリー・ベーカー・エディ</TD></TR></TABLE>');
document.write('<TABLE BORDER ALIGN="RIGHT" WIDTH="15%"><TR><TD COLSPAN=1 NOWRAP>あなたがたは真理を知るであろう、<BR>');
document.write('そうして真理はあなたがたに<BR>自由を得させるであろう。</TD></TR><TR><TD NOWRAP>クリスト・イエス</TD></TR></TABLE>');
document.write('<BR CLEAR="ALL"><CENTER>');}
}

if (subheader=="MARQ"){
document.write('<CENTER><FONT SIZE=-1>');
TIME_ASSIGN('MARQUEE');
document.write('</FONT></CENTER>');}

if (subheader=="TKD") {

document.write('<CENTER><A HREF="tkd.html" TARGET="there" onmouseover="quack(\'tkd\')" onmouseout="oink(\'tkd\')"><IMG NAME="tkd" SRC="'+getPath()+'tkdt1" ALT="TAE KWON DO" BORDER=0></A></CENTER>');}

if (subheader=="YINYANG") {
document.write('<P ALIGN="CENTER"><IMG SRC="'+getPath()+'yin" ALT="YIN-YANG"></P>');}

if (subheader=="3YINYANGS") {
document.write('<P ALIGN="CENTER"><IMG SRC="'+getPath()+'yangb" ALT="Yin-Yang"><IMG SRC="'+getPath()+'yin" ALT="YIN-YANG"><IMG SRC="'+getPath()+'yangb" ALT="Yin-Yang"></P>');}

if (subheader=="BUDO") {}

//Disabled BG as subheader, implemented elsewhere

//if (subheader=="BGCHANGER") {}

}

function TIME_ASSIGN(WHATDO, lang, subheader) {
	NOW=new Date();
	DAY_OF_MONTH=NOW.getDate();

if (WHATDO=="TKD"){
		if(DAY_OF_MONTH>24){DAY_OF_MONTH=DAY_OF_MONTH-7;}
		if(DAY_OF_MONTH<18){while (DAY_OF_MONTH<18){DAY_OF_MONTH=DAY_OF_MONTH+7;}}
		}
else if (WHATDO=="DARK"){
		if(DAY_OF_MONTH<11){DAY_OF_MONTH=DAY_OF_MONTH+10;}
		if(DAY_OF_MONTH>16){while (DAY_OF_MONTH>16){DAY_OF_MONTH=DAY_OF_MONTH-6;}}
		}
else if (WHATDO=="LIGHT"){
		if (DAY_OF_MONTH>8)
			{while (DAY_OF_MONTH>8){DAY_OF_MONTH=DAY_OF_MONTH-7;}
			}}
//2 notes
//1.  The switch statement is not supported in old versions of JS, I may change this, it works in JS 1.2 and later
//As a result this is opera incompatible.
//2,  The usual &#XX; approach does not work to fix text in input windows. Also \' fails so I used the alternate single quote to solve that problem: `.  I must check this on English browsers.
	switch (DAY_OF_MONTH){
	case 1: MARQUEETEXT="Trust in the Lord with all thine heart; and lean not unto thine own understanding.  In all thy ways acknowledge him and he shall direct thy paths.  PROV 3:5-6";
		bgname="nadia";
		versioner="NA"; break;
	case 2: MARQUEETEXT="But now we are delivered from the law, that being dead wherein we were held; that we should serve in newness of spirit, and not in the oldness of the letter.  ROMANS 7:6";
		bgname="nadia";
		versioner="A"; break;
	case 3: MARQUEETEXT="Behold, I will send you Elijah the prophet before the coming of the great and dreadful day of the Lord:  And he shall turn the heart of the fathers to the children, and the children to their fathers...  Malachi 4:5,6 (to 2nd ,)";
		bgname="TKD";
		versioner="yin3.jpg"; break;
	case 4: MARQUEETEXT="And when he had spoken these things, while they beheld, he was taken up; and a cloud received him out of their sight.  And while they looked steadfastly toward heaven as he went up, behold, two men stood by them in white apparel;  Which also said, Ye men of Galilee, why stand ye gazing up into heaven?  this same Jesus, which is taken up from you into heaven, shall so come in like manner as ye have seen him go into heaven.  Acts 1: 9-11";
		bgname="nadia";
		versioner="B"; break;
	case 5: MARQUEETEXT="Whither shall I go from thy spirit? or whither shall I flee from thy presence?  If I ascend up into heaven, thou art there: if I make my bed in hell, behold thou art there.     Psalm 139: 7-8";
		bgname="MYYINYANG";
		versioner="NA"; break;
	case 6: MARQUEETEXT="Create in me a clean heart, O God; and renew a right spirit within me.  Cast me not away from thy presence; and take not thy holy spirit from me.  Restore unto me the joy of thy salvation; and uphold me with thy free spirit.   Psalms 51:10-12 {To the chief Musician, A Psalm of David, when Nathan the prophet came unto him, after he had gone in to Bath-sheba(The wife of Uriah who he sent to be killed in battle). } ";
		bgname="MYYINYANG";
		versioner="A"; break;
	case 7: MARQUEETEXT="And Deborah, a prophetess, the wife of Lapidoth, she judged Israel at that time.  And she dwelt under the palm tree of Deborah between Ramah and Beth-el in mount Ephraim: and the children of Israel came up to her for judgment.     Judges 4: 4-5.";
		bgname="WHITE";
		versioner="NA"; break;
	case 8: MARQUEETEXT="God is known in her palaces for a refuge.     Psalm 48:3.";
		bgname="TKD";
		versioner="yin3.jpg"; break;
	case 9: MARQUEETEXT="Bless the Lord, O my soul: and forget not all his benefits:  Who forgiveth all thine iniquities; who healeth all thy diseases; Who redeemeth thy life from destruction; who crowneth thee with lovingkindness and tender mercies; Who satisfieth thy mouth with good things; so that thy youth is renewed like the eagle`s.  The Lord executeth righteousness and judgement for all that are oppressed.    PSALMS 103: 1-6";
		bgname="PURPLE";
		versioner="A"; break;
	case 10: MARQUEETEXT="Judas then, having received a band of men and officers from the chief preists and Pharisees, cometh thither with lanterns and torches and weapons.  Jesus therefore, knowing all things that should come upon him, went forth, and said unto them, Whom seek ye?  They answered him, Jesus of Nazareth.  Jesus saith unto them, I am he.  And Judas also which betrayed him, stood with them.  As soon as he had said unto them, I am he, they went backward, and fell to the ground.  JOHN 18: 3-6.";
		bgname="PURPLE";
		versioner="B"; break;
	case 11: MARQUEETEXT="The Lord Jesus Christ be with thy spirit.  Grace be with you.  Amen.  II TIMOTHY 4:22";
		bgname="defiant";
		versioner="NA"; break;
	case 12: MARQUEETEXT="And as ye go, preach, saying, The kingdom of heaven is at hand.  Matthew 10:7";
		bgname="DARK";
		versioner="NA"; break;
	case 13: MARQUEETEXT="Heal the sick, cleanse the lepers, raise the dead, cast out devils: freely ye have received, freely give.  MATT 10:8";
		bgname="DARK";
		versioner="A"; break;
	case 14: MARQUEETEXT="Blessed are the poor in spirit: for theirs is the kingdom of heaven.  Matthew 5:3";
		bgname="DARK";
		versioner="B"; break;
	case 15: MARQUEETEXT="Question a friend; perhaps he did not do it; or if he did, so that he may not do it again.  Question a neighbor; perhaps he did not say it; or if he said it, so that he might not repeat it.  Question a friend, for often it is slander; so do not believe everything you hear.  A person may make a slip without intending it.  Who has not sinned with the tongue?  SIRACH 19:13-16";
		bgname="DARK";
		versioner="C"; break;
	case 16: MARQUEETEXT="Behold the Lord`s hand is not shortened, that it cannot save; neither his ear heavy, that it cannot hear:     Job 59:1";
		bgname="DARK";
		versioner="D"; break;
	case 17: MARQUEETEXT="";
		bgname="NONE";
		versioner="NA"; break;
	case 18: MARQUEETEXT="Blessed are they which hunger and thirst after righteousness: for they shall be filled.  Matthew 5:6";
		bgname="TKD";
		versioner="tkdt3"; break;
	case 19: MARQUEETEXT="";
		bgname="TKD";
		versioner="tkdt3A"; break;
	case 20: MARQUEETEXT="I know that whatsoever God doeth, it shall be forever: nothing can be put to it, nor anything taken from it:...    Ecclesiates 3:14 (to 2nd :)";
		bgname="TKD";
		versioner="tkdt3B"; break;
	case 21: MARQUEETEXT="";
		bgname="TKD";
		versioner="backgr.jpg"; break;
	case 22: MARQUEETEXT="From that time, Jesus began to preach, and to say, Repent: for the kingdom of heaven is at hand.   Matthew 4:17";
		bgname="TKD";
		versioner="yang.gif"; break;
	case 23: MARQUEETEXT="";
		bgname="TKD";
		versioner="yangA"; break;
	case 24: MARQUEETEXT="Then shall thy light break forth as the morning, and thine health shall spring forth speedily: and thy righteousness shall go before thee; the glory of the Lord shall be thy rereward.     Job 59: 8";
		bgname="TKD";
		versioner="yang"; break;
	case 25: MARQUEETEXT="When he giveth quietness, who then can make trouble?...      Job 34:29 (to 1st ?)";
		bgname="PURPLE";
		versioner="NA"; break;
	case 26: MARQUEETEXT="...in the resurrection they neither marry, nor are given in marriage, but are as the angels of God in heaven.  But as touching the resurrection of the dead, have ye not read that which was spoken unto you by God, saying, I am the God of Abraham, and the God of Issac, and the God of Jacob?  God is not the God of the dead, but of the living.  MATT 22:30-32 (starting with In)";
		bgname="MYYINYANG";
		versioner="NA"; break;
	case 27: MARQUEETEXT="Blessed are the peacemakers: for they shall be called the children of God. MATT 5:9";
		bgname="TKD";
		versioner="yin3.jpg"; break;
	case 28: MARQUEETEXT="Nebuchadnezzar the king, unto all people, nations, and languages, that dwell in all the earth; Peace be multiplied unto you.  DANIEL 4:1";
		bgname="MYYINYANG";
		versioner="A"; break;
	case 29: MARQUEETEXT="The Lord Jesus Christ be with thy spirit. Grace be with you. Amen.  II TIM 4:22";
		bgname="TKD";
		versioner="yang.gif"; break;
	case 30: MARQUEETEXT="He that loveth not knoweth not God; for God is love.  I JOHN 4:8";
		bgname="PURPLE";
		versioner="NA"; break;
	case 31: MARQUEETEXT="Now faith is the substance of things hoped for, the evidence of things not seen.  For by it the elders obtained a good report.  Through faith we understand that the worlds were framed by the word of God, so that things which are seen were not made of things which do appear.    HEBREWS 11:1-3";
		bgname="WHITE";
		versioner="NA"; break;
	default: MARQUEETEXT="By faith Enoch was translated that he should not see death; and was not found, because God had translated him: for before his translation he had this testimony, that he pleased God.  Hebrews 11:5";
		bgname="MYYINYANG";
		versioner="A"; break;
	}
if (WHATDO=="MARQUEE"){
	//	MARQUEETEXT=MARQUEETEXT+document.cookie
		if (MARQUEETEXT==""){MARQUEETEXT="Blessed are the merciful for they shall obtain mercy.  Blessed are the peacemakers: for they shall be called the children of God.    Matthew 5:8,9";}
		MARQUEETEXT="" + MARQUEETEXT;

		if(( navigator.appName.substring(0,8) == "Netscape" )&&(navigator.product != 'Gecko')){
			document.write('<form name=MARQ><input type=text name=MARQ2 size=100%></form>');
			scrollit_r2l(100,MARQUEETEXT);
		}
		else{document.write('<MARQUEE WIDTH=100% BEHAVIOR=SCROLL direction=left loop=infinite>'+MARQUEETEXT+'</MARQUEE>');}}

else { BODYSELECT (bgname, versioner);
		if((bgname=="DARK")&&(subheader!="MARQ")&&((versioner=="A")||(versioner=="C")))
		{	if (lang=='E'){	chgbr1='Change Background to White';
						chgbr2='Change Background Back';
			}
			else{			chgbr1='背景を白いへ';
						chgbr2='背景の元に戻る';
			}
document.write('<FORM><INPUT TYPE="button" value="'+chgbr1+'" ONCLICK="document.bgColor=\'white\'">');
document.write('<INPUT TYPE="button" value="'+chgbr2+'" ONCLICK="document.bgColor=\'444444\'"></FORM><BR>'); }}
}


function scrollit_r2l(seed,MARTEXT)
{

var msg= MARTEXT;
var out = " ";
var c = 1;
if (seed > 100) {
seed--;
var cmd="scrollit_r2l(" + seed + ",'"+MARTEXT+"')";
setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
var cmd="scrollit_r2l(" + seed + ",'"+MARTEXT+"')";
document.MARQ.MARQ2.value=out;
setTimeout(cmd,100); }
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
var cmd="scrollit_r2l(" + seed + ",'"+MARTEXT+"')";
document.MARQ.MARQ2.value=out;
setTimeout(cmd,100);
}
else {
document.MARQ.MARQ2.value=" ";
setTimeout("scrollit_r2l(100,'"+MARTEXT+"')",75);
}
}
}


function BODYSELECT (bgname, versioner){
_BG='';
_BGCOLOR='';
_ALINK='';
_LINK='';
if (bgname=="nadia"){
	_BG=getPath()+'nadiabr.jpg'; _VLINK='#000000'; _TEXT='#0000FF'; _ALINK='#FF00FF'; _LINK='#FF0000';
	if (versioner=="A"){ _TEXT='#000000'; _ALINK='#FF0000'; _LINK='#0000FF'; _VLINK='#FF00FF'; }
	else if (versioner=="B"){ _BGCOLOR='#444444'; }
	else{ _BGCOLOR='#FFFFFF'; }
}

else if (bgname=="DARK"){ _BGCOLOR='#444444'; _ALINK='#FF00FF'; _VLINK='#FF0000';
if (versioner=="A"){ _BGCOLOR='#666666'; _TEXT='#AA9988'; }
	else if (versioner=="B"){ _TEXT='#FFEFEE'; _LINK='#FFFF00'; }
	else if (versioner=="C"){ _TEXT='#010021'; _LINK='#FFFF00'; }
	else if (versioner=="D"){ _TEXT='#DDDDDD'; _LINK='#FFFF00'; }
	else			{ _TEXT='#FFFFFF'; _LINK='#FFFF00'; }
}

else if (bgname=='PURPLE'){ _BGCOLOR='#9900FF'; _TEXT='#FFFFFF'; _ALINK='#000000';
	if (versioner=="A"){ _LINK='#FFFF00'; _VLINK='#FFFF00'; }
	else if (versioner=="B") { _LINK='#FFFFFF'; _VLINK='#CCCCCC'; }
	else{ _LINK='#999999'; _VLINK='#999999'; }
	}

else if (bgname=='MYYINYANG'){ _BG=getPath()+'yinyang.jpg'; _BGCOLOR='#FFFFFF'; _TEXT='#0000FF'; _ALINK='#000000';
	_LINK='#FF0000'; _VLINK='#000000';
	if (versioner=="A"){ _ALINK='#FF00FF';}
	}

else if (bgname=='WHITE'){ _BGCOLOR='#FFFFFF'; _TEXT='#0000FF'; _ALINK='#FF00FF';
	_LINK='#FF0000'; _VLINK='#000000';
	}

else if (bgname=='defiant'){ _BGCOLOR='#000000'; _BG=getPath()+'defiant.gif'; _LINK='#FFFF00'; _TEXT='#FFFFFF'; _ALINK='#FF00FF'; _VLINK='#FF0000';
}

else if (bgname=='TKD'){ _BGCOLOR='#AAAAAA'; _TEXT='#FF0000';  _VLINK='#FF00FF'; _LINK='#0000FF';
	if (versioner=="tkdt3"){ _BG=getPath()+versioner; _ALINK='#FF0000'; }
		else if(versioner=="tkdt3A"){ _BG=getPath()+'tkdt3'; _TEXT='#000000'; _ALINK='#FF0000'; }
		else if(versioner=="tkdt3B"){ _BG=getPath()+'tkdt3'; _LINK='#000000'; _ALINK='#FF0000'; }
	else if(versioner=="backgr.jpg"){ _BG=getPath()+versioner; _TEXT='#F00000'; _ALINK='#F00000'; }
	else if(versioner=="yang.gif"){ _BG=getPath()+versioner; _TEXT='#000000'; _LINK='#004F4F'; _VLINK='#0000FF';}
	else if(versioner=="yin3.jpg"){ _BG=getPath()+versioner; _TEXT='#000000'; _BGCOLOR='#F1AFFF'; _LINK='#FF0000'; _VLINK='BROWN'; _ALINK='#FF00FF';}
	else if(versioner=="yang"){ _BG=getPath()+versioner; _TEXT='#00FFFF'; _ALINK='#FF0000';}
		else if(versioner=="yangA"){ _BG=getPath()+'yang'; _TEXT='#00FFFF'; _ALINK='#FF00FF'; _LINK='#FF0000'; VLINK='#000000'; }
}

if (bgname=='NONE'){
	document.write('<BODY>'); }
else if (bgname=='CUSTOM'){document.write(versioner);}
else{
document.write('<BODY BACKGROUND="' + _BG + '" BGCOLOR="' + _BGCOLOR +'" TEXT="'+ _TEXT +'" ALINK="'+ _ALINK +'" LINK="'+ _LINK +'" VLINK="'+ _VLINK +'">');
}
}

//////DATE FUNCTIONS

function ENGLastUpdate (dated,uptext){
lastchangeval = Date.parse(dated)
if(lastchangeval == 0){               // unknown date (or January 1,
                                    // 1970 GMT)
document.writeln(uptext,"December 16,1999.")//Change when updating page for Tripod Web Server
						//Otherwise it should work on most servers
   } else {
lastchange = new Date(dated)
month=new Array()
month[0]="January"
month[1]="Feburary"
month[2]="March"
month[3]="April"
month[4]="MAY"
month[5]="June"
month[6]="July"
month[7]="August"
month[8]="Septmeber"
month[9]="October"
month[10]="November"
month[11]="December"

if ((lastchange.getYear() > 70)&&(lastchange.getYear() <=99)){ cent="19";}
else {cent="20";}
			//Get Default value for this century

FinalYearOutput="2000";	//IF you get 1970 or something ridiculous

	if( (( navigator.appName.substring(0,8) == "Microsof" )&&(navigator.appVersion.substring(0,1).valueOf()>=5 ))||(( navigator.appName.substring(0,8) == "Netscape" )&&(navigator.appVersion.substring(0,1).valueOf()>=4 ))){
	FinalYearOutput = lastchange.getFullYear();
	//document.writeln("Micro 5 case");
	}
	//if(( navigator.appName.substring(0,8) == "Netscape" )&&(navigator.appVersion.substring(0,1).valueOf()>=4 )){
	//FinalYearOutput = lastchange.getFullYear();
	//document.writeln("Net4 case");
	//}
	else if (lastchange.getYear() >=2000) {
	FinalYearOutput=lastchange.getYear() ;
	//document.writeln("2000 getyear OK case");
	}
	else if (lastchange.getYear() <1900) {
		if (lastchange.getYear() >100) {
	FinalYearOutput=cent + (lastchange.getYear() - 100);
	//document.writeln(">100 getyear OK case");
		}
		else if (lastchange.getYear() < 30 ) {
			if (lastchange.getYear() < 10 ) {
				FinalYearOutput=cent + lastchange.getYear() + "0";}
			else{ FinalYearOutput=cent + lastchange.getYear();}
	//document.writeln("<30 case getyear OK case");
		}
	}

//document.writeln(navigator.appName + " PBL " + navigator.appVersion);

//Must make a case for when the browser interprets year 2000 as 101, and then
//use the cent="19" and "20" properly! use ,cent,lastchange.getYear(),


document.write(uptext,month[lastchange.getMonth()]," ",lastchange.getDate(),", ",FinalYearOutput,".")
}}

function NIHONLastUpdate (dated,uptext){
lastchangeval = Date.parse(dated)
if(lastchangeval == 0){               		// unknown date (or January 1, 1970 GMT)
document.writeln(uptext,"平成17年6月19日")	//Change when updating page for Tripod Web Server
						//Otherwise it should work on most servers
   } else {
lastchange = new Date(dated)
//1999 will make this usable for the next 2000 years backwards compatible to old browsers
//Kind of silly, but I'm doin it anyway
if(lastchange.getYear()<1999)
{hyyy=lastchange.getYear()-88;}
else {hyyy=lastchange.getYear()-1988;}
document.write(uptext,"平成",hyyy,"年",lastchange.getMonth()+1,"月",lastchange.getDate(),"日")
}}

//Need to tweek this one a lot, put it on ice for now
//Problem II is if time on computer doesn't match real time
//Can do, just need time to implement
//Mom- 1939 Dad- 1936
function AGE (now,birth){
lastchangeval = Date.parse(now)
if(lastchangeval == 0){
document.writeln(99-birth)	//put 99 for the year 2001=101 etc 2 digit 2000k prob resolution
   } else {
lastchange = new Date(now)
document.write(lastchange.getYear()-birth)
}}

//////ANIME FUNCTIONS//////

function paulanimate(hayasa)
{flipper=0
hayasa2=hayasa
imagelenn=paulanimate.arguments.length-1
IMAGE=new Array()
for (var i=0;i<paulanimate.arguments.length;i++){
	IMAGE[i]=new Image
	IMAGE[i].src=paulanimate.arguments[i+1]}
}

function paulanimate2()
{
document.pictname.src=IMAGE[flipper].src
flipper++
if (flipper==imagelenn){flipper=0}
setTimeout("paulanimate2()",hayasa2)
}

function rainbow_mover(no_rainbows,flag){
rainbowImage=new Array()
intorain=no_rainbows
int_flag=flag
if (flag=="null"){for (var javi=0;javi<=20;javi++){
		rainbowImage[javi]=new Image()
		rainbowImage[javi].src=getPath()+"img/rain"+(javi)+".gif"}
	current=0
} else {for (var javi=20;javi>=0;javi--){
		rainbowImage[javi]=new Image()
		rainbowImage[javi].src=getPath()+"img/rain"+(javi)+".gif"}
	current=20}
}

function rainform(){
	if (intorain==1){document.pic1.src=rainbowImage[current].src
} else if (intorain ==4){document.pic1.src=rainbowImage[current].src
document.pic2.src=rainbowImage[current].src
document.pic3.src=rainbowImage[current].src
document.pic4.src=rainbowImage[current].src}

if (int_flag=="null"){current ++
} else {current--}

if (current<0){current=0;flasher(); }
else if(current<11){setTimeout("rainform()",500-(current*40))}
else if (current<15){setTimeout("rainform()",-1000+(current*100))}
else if (current<21){setTimeout("rainform()",600)}
else if (current>=21){current=0}
}

////////LINK FUNCTION

function linko(linksaki){
document.write("<A HREF=\"");
if (linksaki=="TKANG"){document.write(getPath()+"tkd.html")}
else if (linksaki=="CJAS"){document.write("http://www.cjas.org/")}
else if (linksaki=="JHU"){document.write("http://www.jhu.edu/~tclub/")}
else if (linksaki=="NADIA"){document.write("http://en.wikipedia.org/wiki/Nadia:_The_Secret_of_Blue_Water")}
else if (linksaki=="KCJS"){document.write("http://www.ce.columbia.edu/overseas/about.cfm?PID=32")}
else if (linksaki=="JUSA"){document.write("http://rso.cornell.edu/jusa/")}
else if (linksaki=="KIT"){document.write("http://www.kanazawa-it.ac.jp/")}
else if (linksaki=="STUY"){document.write("http://www.shsaa.org/")}
else if (linksaki=="CORNELL"){document.write("http://www.cornell.edu/")}
else if (linksaki=="LINCMEDIA"){document.write("http://www.lincmedia.co.jp/")}
else if (linksaki=="THETA2"){document.write("http://myc.thetamusic.com/framesets/myc.html")}
else if (linksaki=="CHAKUMATIC"){document.write("http://www.chakumatic.com/")}
else if (linksaki=="DOMMUSIC"){document.write("http://www.dominicsmusic.com/")}
else if (linksaki=="JPORACLE"){document.write("http://www.oracle.co.jp/")}
else if (linksaki=="TM"){document.write("http://www.thetamusic.com/")}
else {document.write(getPath()+"signpost.html")}
document.write("\">")
}

//INFORMATION FUNCTION

function paulinfo(whatisit){
if (whatisit=="TEL"){document.write("1-347-244-1867")}
else if(whatisit=="JPTEL"){document.write("+81-80-3577-0300")}
else if(whatisit=="NIHONJPTEL"){document.write("080-3577-0300")}
else if(whatisit=="OFFICETEL"){document.write("秘密")}
else if(whatisit=="ADDRESS"){document.write("174 Bloomfield Avenue #311<BR>Nutley, NJ 07110<BR>USA<BR>")}
else if(whatisit=="JPADDRESS"){document.write("?<BR>?<BR>Koto-ku<BR>Tokyo-to XXX-XXXX<BR>Japan<BR>")}
else if(whatisit=="NIHONJPADDRESS"){document.write("〒XXX-XXXX東京都<BR>江東区<BR>東陽Ｘ−Ｘ−Ｘ<BR>?<BR>")}

else {document.write("JavaScript error, email Paul immediately")}
}

/////////////////Document Ender/////////////////

function docender(lang,endver,option,figures){
//Option 1 shrinks it down ofor the quick bar
//Option 2 changes it to the old style for coolness
//enver 1- GE--EG 2- GEB--BEG  3- GBE--EBG 4- GE   EG  5- GEG  6- GBEBG

bolt='\"Link to Spider Web Home\"'
epsilon='\"Link to The Signpost\"'
spider='\"'+getPath4("en")+'spider.html\"'
EIMG=getPath()+'epsilon.gif';
BIMG='gmasign.gif';
guardstart="<A HREF=\"S2.html\">";
if (figures=="giant"){guard='\"giant\"';}
else{	guard='\"guard\"';
	figures="guard";}
targeter='';

if (lang=='J'){
	spider='\"'+getPath4("ja")+'spider.html\"'
	bolt='\"雷\"'
	epsilon='\"E\"'
	guard='\"守衛\"';
		if (figures=="giant"){guard='\"おに\"';}}
if (option==1){tallness=30
		targeter="TARGET=\"there\""}
		else{tallness=60}
if (endver==4){imgfiller=" ALIGN=LEFT BORDER=0 HEIGHT="+tallness+">"}
else{imgfiller=" ALIGN=MIDDLE BORDER=0 HEIGHT="+tallness+">"}

if (option!=2) {
if ((guard=="\"guard\"")||(guard=="\"守衛\"")){guardstart="<A HREF=\""+getPath()+"jail.html\" onmouseover=\"flasher()\">";}
	_bolt="bolt";
	_eps="eps";}
	else{
	EIMG=getPath()+"epsilon2";
	BIMG="bolt";
	_bolt="BOLT";
	_eps="E";}


bolt1="<A HREF="+spider+" onmouseover=\"quack('"+_bolt+"1')\" onmouseout=\"oink('"+_bolt+"1')\" "+targeter+"><IMG NAME=\""+_bolt+"1\" SRC=\""+getPath()+BIMG+"\" ALT="+bolt+" "+imgfiller+"</A>"

bolt2="<A HREF="+spider+" onmouseover=\"quack('"+_bolt+"2')\" onmouseout=\"oink('"+_bolt+"2')\" "+targeter+"><IMG NAME=\""+_bolt+"2\" SRC=\""+getPath()+BIMG+"\" ALT="+bolt+" "+imgfiller+"</A>"

if (option!=2) {
document.write(guardstart+"<IMG NAME=\""+figures+"1\" SRC=\""+getPath()+"u"+figures+".gif\" ALT="+guard+""+imgfiller+"</A>");}

if ((endver==3)||(endver==6)){
document.write(bolt2)}

document.write("<A HREF=\""+getPath()+"signpost.html\" onmouseover=\"quack('"+_eps+"1')\" onmouseout=\"oink('"+_eps+"1')\" "+targeter+"><IMG NAME=\""+_eps+"1\" SRC=\""+EIMG+"\" ALT="+epsilon+" "+imgfiller+"</A>");

if ((endver==2)||(endver==6)){
document.write(bolt1)}

if(endver<4){document.write("<A HREF=\"mailto:pbl1@cornell.edu\" ><BLINK>pbl1@cornell.edu</BLINK></A>");}

if (endver==2){
document.write(bolt2)}

if (endver==4){imgfiller=" ALIGN=RIGHT BORDER=0 HEIGHT="+tallness+">"}

if(endver<5){
document.write("<A HREF=\""+getPath()+"signpost.html\" onmouseover=\"quack('"+_eps+"2')\" onmouseout=\"oink('"+_eps+"2')\" "+targeter+"><IMG NAME=\""+_eps+"2\" SRC=\""+EIMG+"\" ALT="+epsilon+" "+imgfiller+"</A>");}

if (endver==3){
document.write(bolt1)}

if (option!=2) {
document.write(guardstart+"<IMG NAME=\""+figures+"2\" SRC=\""+getPath()+"u"+figures+".gif\" ALT="+guard+" "+imgfiller+"</A>");
//document.write("<FORM NAME=\"frog\"><INPUT TYPE=\"TEXTAREA\" ROWS=\"2\" NAME=\"DISPLAY\" VALUE=\"\"></FORM>")
//if (figures=="guard"){
//guardmover=1
//guardform();
//}
//else{ultiform(0,"giant1","ugiant1.gif","ugiant2.gif");
//ultiform(1,"giant2","ugiant1.gif","ugiant2.gif");
//ultiform2();
//}
}

}

function ultiform(setupno, kihonname,srcname1,srcname2){
if (setupno==0){ultimover=1; upictname=new Array(); usrc1=new Array(); usrc2=new Array();}
upictname[setupno]=setupno; upictname[setupno]=kihonname; usrc1[setupno]=srcname1;
usrc2[setupno]=srcname2;
maxsetupno=setupno;
}

function ultiform2(){
for (var ucnt=0;ucnt<=maxsetupno;ucnt++){
	if (ultimover==1){
	document.images[upictname[ucnt]].src=usrc1[ucnt]}
else	{document.images[upictname[ucnt]].src=usrc2[ucnt]}}
if (ultimover==2){ultimover=0}
ultimover++
setTimeout("ultiform2()",1000)
}

/////Image Switcher

function quack(IMAGENAME){
//document.frog.DISPLAY.value=IMAGENAME.substring(0,4)
if (document.images[IMAGENAME]){
	if (IMAGENAME.substring(0,4)=="bolt"){document.images[IMAGENAME].src=getPath()+"gmasign2.gif"}
	else if (IMAGENAME.substring(0,4)=="BOLT"){document.images[IMAGENAME].src=getPath()+"newbolt.gif"}
	else if (IMAGENAME=="eng"){document.images[IMAGENAME].src=getPath()+"eng2.gif"}
	else if (IMAGENAME=="nihon"){document.images[IMAGENAME].src=getPath()+"nihon1.gif"}
	else if (IMAGENAME.substring(0,1)=="E"){document.images[IMAGENAME].src=getPath()+"sm_regularss.gif"}
	else if (IMAGENAME=="tkd"){document.images[IMAGENAME].src=getPath()+"tkdt2"}
	else {document.images[IMAGENAME].src=getPath()+"epsilon0.gif"}
}
}
function oink(IMAGENAME){
if (document.images[IMAGENAME]){
	if (IMAGENAME.substring(0,4)=="bolt"){document.images[IMAGENAME].src=getPath()+"gmasign.gif"}
else if (IMAGENAME.substring(0,4)=="BOLT"){document.images[IMAGENAME].src=getPath()+"bolt"}
	else if (IMAGENAME=="eng"){document.images[IMAGENAME].src=getPath()+"eng"}
	else if (IMAGENAME=="nihon"){document.images[IMAGENAME].src=getPath()+"nihon2.gif"}
	else if (IMAGENAME.substring(0,1)=="E"){document.images[IMAGENAME].src=getPath()+"epsilon2"}
	else if (IMAGENAME=="tkd"){document.images[IMAGENAME].src=getPath()+"tkdt1"}
	else {document.images[IMAGENAME].src=getPath()+"epsilon.gif"}
}
}

function flasher(time){
oldback=document.bgColor
for (var jav=0;jav<=5;jav++){
	document.bgColor='EEFFFF'
	document.bgColor='EEEEFF'
	document.bgColor='FFEEFF'
	document.bgColor='FFEEEE'
	document.bgColor='FFFFEE'
	document.bgColor='EEFFEE'
			}
if (time=='eternity'){setTimeout("flasher()",1)}
document.bgColor=oldback
}

function transbutton(place,lang){
if (lang=='E'){langin="nihon";
		lanalt="\"日本語の翻訳\""}
else {langin="eng";
	lanalt="\"ENGLISH\""}

document.write("<A HREF=\""+getPath3()+place+".html\" onmouseover=\"quack('"+langin+"')\" onmouseout=\"oink('"+langin+"')\">");
document.write("<IMG NAME=\""+langin+"\" SRC=\""+getPath()+langin+"\" ALT="+lanalt+" HEIGHT=35 WIDTH=176></A>");
}

function switchpict(imgtitle, lang, quickbar, multiadd, nodest, alignment){
if (imgtitle=='E'){place=getPath2()+"signpost"
		namo="E"
		alted="\"Link to Signpost\""
		sourcer="epsilon1";
			if (lang=='J'){alted="\"E\""}
		}
else if(imgtitle=='BOLT'){place=getPath4("en")+"spider"
		namo="BOLT"
		alted="BOLT"
		sourcer="bolt"
			if (lang=='J'){place=getPath4("ja")+"spider";
							alted="\"雷\"";}
		}
if (quickbar=='QUICK'){taradd="TARGET=\"there\"";
			addon="ALIGN=CENTER HEIGHT=30"}
else{taradd=""; addon="";}
if (multiadd>0){namo=imgtitle+multiadd.toString(10)}
if (nodest=='NODEST'){place=""}

document.write("<A HREF=\""+place+".html\" "+taradd+" onmouseover=\"quack('"+namo+"')\" onmouseout=\"oink('"+namo+"')\">");
document.write("<IMG NAME=\""+namo+"\" SRC=\""+getPath()+sourcer+"\" ALT="+alted+" "+addon+" ALIGN="+alignment+" BORDER=0></A>");
}

//To use this function Put in
//(HTMLsourcename1, page indicator1, HTMLsourcename2, page indicator2, ... HTMLsourcename:whereyouare)
//as the argument

function jumplist(){
	where=jumplist.arguments[jumplist.arguments.length-1]
	for (var i=0;i<Math.floor(jumplist.arguments.length/2);i++){
		if (where!=jumplist.arguments[i*2]){document.write("<A HREF=\""+jumplist.arguments[i*2]+".html\">"+jumplist.arguments[1+(i*2)]+"</A>")
			if ( (i<(Math.floor(jumplist.arguments.length/2)-2))||((where!=jumplist.arguments[jumplist.arguments.length-3])&&(where!=jumplist.arguments[jumplist.arguments.length-5]))&&(i!=(Math.floor(jumplist.arguments.length/2)-1))){document.write('*')}}
}
}

function ENGTKDender(where){
document.write("<HR SIZE=1 SHADE><B><FONT SIZE=-1><P ALIGN=\"CENTER\">");
jumplist('budo','Martial Arts','tkd','TKD Main', 'lbelts', 'TKD students', 'bbelts','TKD High Belts','rules', 'TKD Rules', 'tech', 'TKD tech', 'atkd', 'TKD addresses','tkdjapan','Japan Training', where);
document.write("</P><HR SIZE=1 SHADE>Onward to <A HREF=\"#top\">the top of this page</A>,Paul's <A HREF=\"paul.html\">Spider Text</A> or <A HREF=\"spider.html\">Spider Picture</A> Introduction Page</FONT SIZE><HR SIZE=4>")
/* No longer accesible
document.write("Go to ")
linko("TKANG")
document.write("T Kang TKD USA</A> web page.<BR>(Which is outside this web page)");
*/
document.write("</BODY><BR><ADDRESS><CENTER>Comments:<BR><BR>");
if (where=='budo'){docender('E',2)}
else if (where=='budo2'){docender('E',6)}
else {docender('E',1)}

document.write("<BR>")
ENGLastUpdate (document.lastModified,"This page was last revised on ")
document.write("(JST)<BR></ADDRESS></CENTER>");
}

function NIHONTKDender(where){
document.write("<HR SIZE=1 SHADE><B><FONT SIZE=-1><P ALIGN=\"CENTER\">");
jumplist('budo','武道','tkd','TKDの索引', 'lbelts', 'TKDの生徒', 'bbelts','TKDの先生','rules', 'TKDのおきて', 'tech', 'TKDの技', 'atkd', 'TKDの住所','tkdjapan','日本TKD',where);
document.write("</P><HR SIZE=1 SHADE>このページの<A HREF=\"#top\">上に</A>戻る、またはポールの<A HREF=\"paul.html\">自己紹介</A>または<A HREF=\"spider.html\">絵深い</A>蜘蛛の糸のメインページにおける。</FONT SIZE><HR SIZE=4>")

linko("TKANG")
//document.write("T Kang TKD USA</A>の英語のページへ<BR>(草の山外)");
document.write("</BODY><BR><ADDRESS><CENTER>コメント:<BR><BR>");
if (where=='budo'){docender('J',3)}
else if (where=='budo2'){docender('J',6)}
else {docender('J',1)}

document.write("<BR>")
NIHONLastUpdate (document.lastModified,"前の書き直した日々は")
document.write("(JST)<BR></ADDRESS></CENTER>");
}

function ENGimaginemenu(where){
document.write("<HR SIZE=1 SHADE><FONT SIZE=-1><P ALIGN=\"CENTER\">");
jumplist(getPath4("en")+'pict2','Picture Gallery',getPath4("en")+'ds9','Deep Space 9', getPath4("en")+'books', 'Books, TV, Movies, Computer Games',getPath4("en")+'manga','Japanese Manga and CDs',getPath4("en")+'poems','Japanese Tanka Poetry',getPath4("en")+'ceps','CEPS Physics',getPath4("en")+'clarinet','My Music',where);
document.write("</P><HR SIZE=1 SHADE>Paul's <A HREF=\"paul.html\">Spider Text</A> or <A HREF=\"spider.html\">Spider Picture</A> Introduction Page.</FONT SIZE><HR SIZE=4>");

if (where=='ds9'){document.write("Travel to the distant Defiant Home Page is impossible since I have lost contact with the wormhole while in Japan.<HR SIZE = 4>")}

document.write("</BODY><ADDRESS><P ALIGN=CENTER>")
ENGLastUpdate (document.lastModified,"Last Updated: ")
document.write("(JAPAN J.S.T.)<BR>")}

function NIHONimaginemenu(where){
document.write("<HR SIZE=1 SHADE><FONT SIZE=-1><P ALIGN=\"CENTER\">");
jumplist(getPath4("ja")+'pict2','写真集',getPath4("ja")+'ds9','Deep Space 9', getPath4("ja")+'books', 'Books, TV, Movies, Computer Games',getPath4("ja")+'manga','ＣＤと漫画',getPath4("ja")+'poems','短歌ページ',getPath4("ja")+'ceps','CEPSと物理',getPath4("ja")+'clarinet','僕の音楽',where);

document.write("</P><HR SIZE=1 SHADE>ポールの<A HREF=\""+getPath4("ja")+"paul.html\">自己紹介</A>／<A HREF=\""+getPath4("ja")+"spider.html\">絵深い</A>蜘蛛の糸のメインページにおける。</FONT SIZE><HR SIZE=4>");

if (where=='ds9'){document.write("Travel to the distant Defiant Home Page is impossible since I have lost contact with the wormhole while in Japan.<HR SIZE = 4>")}

document.write("</BODY><ADDRESS><P ALIGN=CENTER>")
NIHONLastUpdate (document.lastModified,"前の書き直した時は")
document.write("でございます。<BR>")}

	//where = which section we are  in
	//returns the beginning to the path we need for things in en and ja
      function getPath()
	  {
      	if( (location.href.indexOf ("/ja/") == -1) && (location.href.indexOf ("/en/") == -1) ) return "";
      	return "../";
      }

      function getPath2()  //returns the path when we go from a en or ja page
      //to a general page
	  {
      	if( (location.href.indexOf ("/ja/") == -1) || (location.href.indexOf ("/en/") == -1) ) return "../";
      	return "";
      }

      function getPath4(where)  //returns the path when we go to an en or ja page
      // if we are outside we need to tell it where to go
	  {
      	if( (location.href.indexOf ("/ja/") != -1) || (location.href.indexOf ("/en/") != -1) ) return "";
      	return where+"/";
      }


      function getPath3()  //switchs from en to ja and vice versa if translated
	  {
      	if( (location.href.indexOf ("/ja/") != -1) ) return "../en/";
      	else if( (location.href.indexOf ("/en/") != -1) ) return "../ja/";
      	return "";
      }
