<!--------------------------------------------------------------->

<!-- FUNCTION: XREF: crossreferences option for gospelcom call -->
<!--------------------------------------------------------------->


function XREF(){ work = choicexrf; if (choicexrf == "yes") work = "no";
 if (choicexrf == "no") work = "yes"; choicexrf = work ; return choicexrf;}



<!------------------------------------------------------->

<!-- FUNCTION: XN: footnotes option for gospelcom call -->

<!------------------------------------------------------->


function FN(){ work = choicefn; 
if (choicefn == "yes") work = "no"; 
if (choicefn == "no") work = "yes"; choicefn = work ; return choicefn;}



<!----------------------------------------------------------------------------------->

<!-- FUNCTION: NASB,NIV,KJV,ASV,  NKJV,YLT,DARBY: setup version for gospelcom call -->
<!----------------------------------------------------------------------------------->


function NASB()

   {trans= "NASB"; vers= trans+ "&showxref=" + choicexrf + "&showfn=" + choicefn + "&passage="; return vers; }


function NIV()

   {trans= "NIV";  vers= trans + "&showfn=" + choicefn + "&passage="; return vers; }


function KJV()

   {trans= "KJV";  vers= trans + "&passage="; return vers; }


function ASV() 

   {trans= "ASV";  vers= trans + "&passage="; return vers; }


function NKJV()

   {trans= "NKJV";  vers= trans + "&passage="; return vers; }


function DARBY()

   {trans= "DARBY";  vers= trans + "&passage="; return vers; }


function YLT()

   {trans= "YLT";  vers= trans + "&passage="; return vers; }
;


function ESV()

   {trans= "ESV";  vers= trans + "&passage="; return vers; } ;



<!------------------------------------------------------->

<!-- FUNCTION: CHKMANUAL: edit the manual date entry   -->

<!------------------------------------------------------->


function ChkManual() { abort = 0 ; ndx = manual; day = newday; 

if (day < 1) abort = 1; if (day > 31) abort = 1; 

if (ndx < 31) abort = 1; if (ndx > 1231) abort = 1; 

if (ndx == 230) abort = 1; 
if (ndx == 231) abort = 1; 

if (ndx == 431) abort = 1; if (ndx == 631) abort = 1; 

if (ndx == 931) abort = 1; if (ndx == 1131) abort = 1;

if (ndx == 229) day = 28;
if (ndx == 229) ndx = 228; 

if (abort == 1) alert(DateError() ); return ndx; }



<!----------------------------------------------------->

<!-- FUNCTION: DATEERROR: display date error message -->

<!----------------------------------------------------->


function DateError(){ theAnswer = separator + separator + Errmsg2; return (theAnswer); }



<!--------------------------------------------->

<!-- FUNCTION: CHANGE: apply manual to dates -->

<!--------------------------------------------->



function Change(firstnum) { abort = 0; manual = firstnum; 
newday = (manual-(Math.round(manual/100))*100); }



<!--------------------------------------------->

<!-- FUNCTION: TODAY: GET TODAY'S DATE       -->

<!--------------------------------------------->


function Today(){ today  = new Date();
 mo  = (((today.getMonth()) +1)*100); day=(today.getDate());

 ndx=mo+day; if (manual > 0) ndx = ChkManual(); return ndx; }






<!------------------------------------------------------------->

<!-- FUNCTION: FAMILY: open a window for the family passages -->
<!------------------------------------------------------------->


function Family() { ndx = Today(); verse= Family1()+";"+Family2(); 
if (abort == 0)

open(site+vers+verse,"Window2","menubar=yes,toolbar=no,resizable=yes,scrollbars=yes,status=yes"); }



<!------------------------------------------------------------->

<!-- FUNCTION: YESTFAMILY: open a window for the family passages -->
<!------------------------------------------------------------->


function YestFamily() { ndx = MinusOne(); verse=Family1()+";"+Family2();
 if (abort == 0)


open(site+vers+verse,"Window2","menubar=yes,toolbar=no,resizable=yes,scrollbars=yes,status=yes"); }



<!------------------------------------------------------------->

<!-- FUNCTION: SECRET: open a window for the secret passages -->
<!------------------------------------------------------------->


function Secret() { ndx = Today(); verse= Secret1()+";"+Secret2(); if (abort == 0)


open(site+vers+verse,"Window3","menubar=yes,toolbar=no,resizable=yes,scrollbars=yes,status=yes"); }



<!------------------------------------------------------------->

<!-- FUNCTION: YESTSECRET: open a window for the secret passages -->
<!------------------------------------------------------------->


function YestSecret() { ndx = MinusOne(); verse= Secret1()+";"+Secret2(); 

if (abort == 0)

open(site+vers+verse,"Window3","menubar=yes,toolbar=no,resizable=yes,scrollbars=yes,status=yes"); }



<!----------------------------------------------->

<!-- FUNCTION: MINUSONE: GET YESTERDAY'S DATE  -->

<!----------------------------------------------->


function MinusOne(){ndx = Today(); 


changemon= false;

day = day -1 ; 

if (day == 0) changemon = true; 

if (changemon) mo = mo - 1; 
if (mo == 0) mo = 12;

if (changemon) day = 31; 

if (changemon && ((mo==4) || (mo==6) || (mo==9) || (mo==11)) ) day = 30;

if (changemon && (mo==2)) day = 28;

ndx=mo+day; return ndx; }




