//******************************************************************** // nav.js compliments nearly every page on the BLB-CD by providing the // fundamental functions used to navigate the pages. It is severly // advised that nav.js be included just after basepath.js and before // any other .js included file. //******************************************************************** // Mostly used in the Header js included files, but can used // anywhere to get defaults initialized to some value. function setDefault(defVar, value) { try { if(eval(defVar) > 0) { // I'm changin this to return docwidth regardless of comparison to value return eval(defVar); if(eval(defVar) > value) { return eval(defVar); } else { return value; } } } catch(e) { return value; } } // Find and set the an item in a select input type to selected // selectDefault(this.form, 'someText'); // Best way to use this is right after the tag of which the select input type is used // inside a tag pair function selectDefault(selectField, text) { for (i=0; i=1;i--) if(BookChapters[BookOrder[i]] < cid) return BookOrder[i]; return null; } function cidToChapter(shortName, cid) { var i = 0; cid = parseInt(cid, 10); if(cid == '' || cid == 0) return 0; return cid - BookChapters[shortName]; return 0; } // Expected parameters // book: short name of book // chapt: non-padded chapter number // verse: non-padded verse to display // Optional parameters // multiVerse(book, chapt, start-verse[-|<',next-verse'>, <',next-verse'>, ...]) // examples: // multiVerse('Gen',6,1,7); <= Gen 6:1,7 // multiVerse('Gen',1,3,7 ); <= Gen 6:1,3,7 // multiVerse('Gen',6,'1-'); <= Gen 6:1-22 allows full chapter selecting - Preferred: saves one character // multiVerse('Gen',6,'all'); <= Gen 6:1-22 allows full chapter selecting // multiVerse('Gen',6,'5-17'); <= Gen 6:5-17 allows verse spans from x to z // multiVerse('Gen',6,'12-'); <= Gen 6:12-22 allows verse spans from x to the end of chapt // All that is being done is building a comma delimited list for Verse.js to process. function mV(book, chapt, verse) { var i, j, tempVerse; book = bookLookup(book); link = basePath + '/kjv/'+book+"/V_"+chapt+'.html?Verse='; for (i=2;i= 0) tempVerse += getVerseCount(book+pad(chapt)); verse = parseInt(tempVerse.toString().split('-')[0], 10); if(tempVerse.toString().split('-')[1]) { endVerse = parseInt(tempVerse.toString().split('-')[1], 10) for(j=verse;j<=endVerse;j++) link += j+","; } else { link += verse+","; } } // previous version replaced by above //changes multiVerse to mV throughout saves 8 characters with each call //function multiVerse(book, chapt, verse) { // var i, j, tempVerse; // book = bookLookup(book); // link = basePath + '/kjv/'+book+"/V_"+chapt+'.html?Verse='; // for (i=2;i= 0) tempVerse += getVerseCount(book+pad(chapt)); // verse = parseInt(tempVerse.toString().split('-')[0], 10); // if(tempVerse.toString().split('-')[1]) { // endVerse = parseInt(tempVerse.toString().split('-')[1], 10) // for(j=verse;j<=endVerse;j++) link += j+","; // } else { // link += verse+","; // } // } link = link.replace(/,$/, ''); kjvWindow=window.open(link,'kjvWindow','scrollbars=yes,resizable=yes,width=510,height=250'); window.setTimeout("kjvWindow.focus()",500); return false; } // General cookie manuveres function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var exp = new Date(); var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; exp.setTime (exp.getTime() + (expires*86400000)); // Every whole unit is one day document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + exp.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); return value; } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); // This cookie is history var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } // Make the parent of all windows go to a KJV Bible page function M(Book, Chapter, Verse) { var link = basePath + '/kjv/' + Book + '/' + Book+pad(parseInt(Chapter, 10)) + '.html#'+Verse; var i = 0; try { wopener = window.opener; while (wopener.opener) { if(i>10) { __BLB=window.open(link, '__BLB'); window.setTimeout("__BLB.focus()",500); return false; } i++; wopener = wopener.opener; } wopener.location = link; window.setTimeout("wopener.focus()",500); } catch(e) { newWindow=window.open(link, 'newWindow'); window.setTimeout("newWindow.focus()",500); } return false; } function detailed(word) { file = basePath + "/a/"+word.substr(0, 2).toLowerCase()+".html?Word="+word; detailedWindow=window.open(file,'detailedWindow','scrollbars=yes,resizable=yes,width=520,height=450,screenX=120,screenY=200,left=120,top=200'); return false; } function pad(shortNum) { myString = shortNum.toString(); for(i=myString.length;i<3;i++) { myString = "0"+myString; } return myString; } function findBook() { var ourLocation = new String(window.location); var locationArray = []; locationArray = ourLocation.split("\\"); if(locationArray.length <=1) { locationArray = ourLocation.split("/"); } if(locationArray.length <=1) { return 'Gen'; } return locationArray[locationArray.length-2]; } function findChapter() { var ourLocation = new String(window.location); var locationArray = []; locationArray = ourLocation.split("\\"); if(locationArray.length <=1) { locationArray = ourLocation.split("/"); } if(locationArray.length <=1) { return 1; } var chapterValue = parseInt(locationArray[locationArray.length-1].split('.')[0].replace(/(^\d)?\D/g, ""), 10); return chapterValue>0?chapterValue:1; } // From index.html, get me to a KJV Bible page function Navigate(formObj) { var bookindex = formObj.book.selectedIndex; var book = formObj.book.options[bookindex].value; var chapter = formObj.chapter.value; var verse = formObj.verse.value; // Not all calls to Navigate() use the two following fields try { var handref = formObj.handref.value; var buttonMenu = parseInt(formObj.buttonMenu.value, 10); } catch(e) { var handref = ''; var buttonMenu = 1; } if(handref != '' && buttonMenu == 0) return evalHandRef(handref); chapterMax = getVerseCount(book) chapter = (chapter10) { __BLB=window.open(link, '__BLB'); window.setTimeout("__BLB.focus()",500); return false; } i++; wopener = wopener.opener; } wopener.location = link; window.setTimeout("wopener.focus()",500); } catch(e) { newWindow=window.open(link, 'newWindow'); window.setTimeout("newWindow.focus()",500); } return false; } // Single verse pop-up function V(link) { Book = link.split("/")[0]; Chapt = link.split("/")[1]; Verse = link.split("/")[2]; // V() becomes obsolete because of multiVerse(), so we ought to forward the request // and find/change any calls to V(). // link = basePath + '/kjv/'+Book+"/V_"+Chapt+'.html?Verse='+Verse; // kjvWindow=window.open(link,'Kjv','scrollbars=yes,resizable=yes,width=510,height=250'); // window.setTimeout("kjvWindow.focus()",500); // return mV(Book, Chapt, Verse); return mV(Book, Chapt, Verse); } // Tense pop-up function T_Nav(tenseNum, newWindow) { XLocation = 160; YLocation = 390; link = basePath + "/t/index.html?tNum=" + tenseNum if (newWindow) { TnsWindow=window.open(link,'Tns','scrollbars=yes,resizable=yes,width=620,height=300,screenX='+XLocation+',screenY='+YLocation+',left='+XLocation+',top='+YLocation); TnsWindow.focus(); } else { Tns2Window=window.open(link,'Tns2','scrollbars=yes,resizable=yes,width=620,height=300,screenX='+XLocation+',screenY='+YLocation+',left='+XLocation+',top='+YLocation); window.setTimeout("Tns2Window.focus()",500); } return false; } // Strong's pop-up function S_Nav(strongs) { if(strongs.search(/^0\d/) >=0) { link = basePath + '/strongs_hebrew.html?strongs='+strongs+'&page=1'; } else if(strongs.search(/^[0-9]/) >=0) { link = basePath + '/strongs_greek.html?strongs='+strongs+'&page=1'; } strWindow=window.open(link,'strWindow','scrollbars=yes,resizable=yes,width=650,height=600'); return false; } // Concordence pop-up function C_Nav(book,chapt,verse) { chapter = pad(chapt); link = basePath + '/c/' + book+"/"+chapter+".html?Book=" + book + "&Chapter=" + chapt + "&Verse=" + verse; concWindow=window.open(link,'Conc','scrollbars=yes,resizable=yes,width=710,height=600,screenX=50,screenY=60,left=50,top=60'); concWindow.focus(); return true; } // Version pop-up function V_Nav(book, chapter, verse) { paddedChapter = pad(chapter); link = basePath + '/v/' + book+"/"+paddedChapter+".html?Book="+book+"&Chapter="+chapter+"&Verse="+verse; vrsnWindow=window.open(link,'Vrsn','scrollbars=yes,resizable=yes,width=650,height=700,screenX=0,screenY=120,left=0,top=120'); vrsnWindow.focus(); return true; } // Word/Phrase Search function W_Nav(words, strongs) { var show_strongs = 'V' words = words.replace(/^ +/, ""); if(strongs) { show_strongs = 'S'; } if(words.search(/^\#/) >= 0) { words = words.replace(/^\#/, "").split(" ")[0]; // In case there are multiple words; we don't search multiple Strong's numbers// if (words.search(/^0\d/) >= 0) { action = basePath + '/strongs_hebrew.html?word=' + words + '&show_strongs=' + show_strongs; } else { action = basePath + '/strongs_greek.html?word=' + words + '&show_strongs=' + show_strongs; } strWindow = window.open(action,'strWindow','scrollbars=yes,resizable=yes,width=650,height=600'); } else { action = basePath + '/phrase_search.html?word=' + words + '&show_strongs=' + show_strongs; wrdWindow = window.open(action,'wrdWindow','scrollbars=yes,resizable=yes,width=650,height=600'); } return false; } // TSK pop-up function T(book,chapt,verse) { chapter = pad(chapt); link = basePath + "/kjv/"+book+"/T_"+chapter+".html?Verse="+verse; tskWindow=window.open(link,'Tsk','scrollbars=yes,resizable=yes,width=650,height=550,screenX=30,screenY=280,left=30,top=280'); tskWindow.focus(); return true; } function Info_Nav(info) { link = basePath + info; InfoWindow=window.open(link,'Info','scrollbars=yes,resizable=yes,width=650,height=600'); InfoWindow.focus(); return false; } function do_sep_notes(book, chap, verse) { link = basePath + "/sep_notes/sep_notes.html?"+book+chap+":"+verse; SepWindow=window.open(link,'Info','scrollbars=yes,resizable=yes,width=600,height=200'); SepWindow.focus(); return false; } function imgTurnOn(imageName) { if (document.images) { document[imageName].src = eval(imageName + "on.src"); } } function imgTurnOff(imageName) { if (document.images) { document[imageName].src = eval(imageName + "off.src"); } } //Preps String to be used as an anchor function prepAnchor(title) { return title.substring(2).replace(/ |,/g, '').toLowerCase(); } function doDictLookup(DictItem) { var DictArray = new Array(); DictArray = DictItem.split(","); for(i=0;i= 1000){prefix = "000";} if(file < 1000 && file >= 100){prefix = "0000" ;} if(file == 50){prefix = "00000";} if(file == 0){prefix = "000000";} file = "T" + prefix + file; Dict = parseInt(Dict.substr(2, 7), 10); if (100 > Dict && Dict > 9){prefix = "00000";} Dict = "$$T" + prefix + Dict; link = dir + file + ".html?navesItem=" + Dict; navesWindow=window.open(link,'naves','scrollbars=yes,resizable=yes,width=650,height=550,screenX=40,screenY=250,left=40,top=250'); navesWindow.focus(); break; case "T" : dir = basePath + "/d/torreys/"; file = Math.floor(parseInt(Dict.substr(2, 7), 10) / 50) * 50; if(file >= 1000){prefix = "000";} if(file < 1000 && file >= 100){prefix = "0000" ;} if(file == 50){prefix = "00000";} if(file == 0){prefix = "000000";} file = "T" + prefix + file; Dict = parseInt(Dict.substr(2, 7), 10); if (100 > Dict && Dict > 9){prefix = "00000";} Dict = "$$T" + prefix + Dict; link = dir + file + ".html?torreysItem=" + Dict; torreysWindow=window.open(link,'torreys','scrollbars=yes,resizable=yes,width=650,height=550,screenX=40,screenY=250,left=40,top=250'); torreysWindow.focus(); break; case "E" : dir = basePath + "/d/easton/"; file = Math.floor(parseInt(Dict.substr(2, 7), 10) / 50) * 50; if(file >= 1000){prefix = "000";} if(file < 1000 && file >= 100){prefix = "0000" ;} if(file == 50){prefix = "00000";} if(file == 0){prefix = "000000";} file = "t" + prefix + file; Dict = parseInt(Dict.substr(2, 7), 10); if (100 > Dict && Dict > 9){prefix = "00000";} Dict = "$$T" + prefix + Dict; link = dir + file + ".html?eastonItem=" + Dict; eastonWindow=window.open(link,'easton','scrollbars=yes,resizable=yes,width=650,height=550,screenX=40,screenY=250,left=40,top=250'); eastonWindow.focus(); break; case "S" : dir = basePath + "/d/subject/"; file = Dict.substr(1) + ".html"; link = dir + file; subjectWindow=window.open(link,'subject','scrollbars=yes,resizable=yes,width=650,height=550,screenX=40,screenY=250,left=40,top=250'); subjectWindow.focus(); break; case "V" : dir = basepath + "/d/vines/"; file = Math.floor(parseInt(Dict.substr(2, 7), 10) / 50) * 50; if(file >= 1000){prefix = "000";} if(file < 1000 && file >= 100){prefix = "0000";} if(file == 50){prefix = "00000";} if(file == 0){prefix = "000000";} file = "t" + prefix + file; Dict = parseInt(Dict.substr(2, 7), 10); if (100 > Dict && Dict > 9){prefix = "00000";} Dict = "$$T" + prefix + Dict; link = dir + file + ".html?" + Dict; vinesWindow=window.open(link,'vines','scrollbars=yes,resizable=yes,width=650,height=550,screenX=40,screenY=250,left=40,top=250'); vinesWindow.focus(); break; case "H" : dir = basePath + "/d/hitchcock/"; file = "hitchcock.html"; word = Dict.substr(1); link = dir + file + "?Word=" + word; hitchcockWindow=window.open(link,'hitchcock','scrollbars=yes,resizable=yes,width=650,height=550,screenX=40,screenY=250,left=40,top=250'); hitchcockWindow.focus(); break; case "R" : dir = basePath + "/study/hta/"; file = "hta.html"; word = Dict.substr(1); link = dir + file + "#section=" + BibleID + '@' + word; location.href=link; break; default: alert("Please Choose a Dictionary Topic"); } } return false; } function doImgLookup(Dict) { Dict = basePath + Dict; ImgWindow=window.open(Dict,'ImgWindow','scrollbars=yes,resizable=yes,width=800,height=600,screenX=25,screenY=50,left=25,top=50'); return false; } function doCommLookup(Comm) { link = basePath + '/' + Comm; if (Comm){CommWindow=window.open(link,'CommWndw','scrollbars=yes,resizable=yes,width=650,height=550,screenX=100,screenY=150,left=100,top=150');} else {alert("Please choose a commentary to view.");} return false; } function adjustAnchors() { var searcher = new RegExp('/BLB/index.html#', 'i'); var replacer = '/BLB/'+localFile; var aIndexer = 0; if(cgi_vars) replacer += '?'+cgi_vars; replacer += '#'; var aColection = document.getElementsByTagName('A'); var aCollLength = aColection.length; for(aIndexer=0;aIndexer 0) return verseCount[Book]; } catch(e) { return undefined; } } // Given a generic possibility for a Bible book name, returns the 3 letter // equivilent of the true Bible book name. function bookLookup(Book) { var bookAbbrv = []; bookAbbrv["gen"] = 'Gen'; bookAbbrv["gene"] = 'Gen'; bookAbbrv["genes"] = 'Gen'; bookAbbrv["genesi"] = 'Gen'; bookAbbrv["genesis"] = 'Gen'; bookAbbrv["gns"] = 'Gen'; bookAbbrv["ex"] = 'Exd'; bookAbbrv["exd"] = 'Exd'; bookAbbrv["exds"] = 'Exd'; bookAbbrv["exo"] = 'Exd'; bookAbbrv["exod"] = 'Exd'; bookAbbrv["exodus"] = 'Exd'; bookAbbrv["lev"] = 'Lev'; bookAbbrv["levi"] = 'Lev'; bookAbbrv["levit"] = 'Lev'; bookAbbrv["levitic"] = 'Lev'; bookAbbrv["leviticus"] = 'Lev'; bookAbbrv["num"] = 'Num'; bookAbbrv["numb"] = 'Num'; bookAbbrv["number"] = 'Num'; bookAbbrv["numbers"] = 'Num'; bookAbbrv["deu"] = 'Deu'; bookAbbrv["deut"] = 'Deu'; bookAbbrv["deuter"] = 'Deu'; bookAbbrv["deutero"] = 'Deu'; bookAbbrv["deuteronomy"] = 'Deu'; bookAbbrv["jos"] = 'Jos'; bookAbbrv["josh"] = 'Jos'; bookAbbrv["joshua"] = 'Jos'; bookAbbrv["jsh"] = 'Jos'; bookAbbrv["jdg"] = 'Jdg'; bookAbbrv["jdgs"] = 'Jdg'; bookAbbrv["judg"] = 'Jdg'; bookAbbrv["judge"] = 'Jdg'; bookAbbrv["judges"] = 'Jdg'; bookAbbrv["rth"] = 'Rth'; bookAbbrv["rut"] = 'Rth'; bookAbbrv["ruth"] = 'Rth'; bookAbbrv["1 sa"] = '1Sa'; bookAbbrv["1 sam"] = '1Sa'; bookAbbrv["1 samuel"] = '1Sa'; bookAbbrv["1sa"] = '1Sa'; bookAbbrv["1sam"] = '1Sa'; bookAbbrv["1samuel"] = '1Sa'; bookAbbrv["2 sa"] = '2Sa'; bookAbbrv["2 sam"] = '2Sa'; bookAbbrv["2 samuel"] = '2Sa'; bookAbbrv["2sa"] = '2Sa'; bookAbbrv["2sam"] = '2Sa'; bookAbbrv["2samuel"] = '2Sa'; bookAbbrv["1 ki"] = '1Ki'; bookAbbrv["1 kgs"] = '1Ki'; bookAbbrv["1 king"] = '1Ki'; bookAbbrv["1 kings"] = '1Ki'; bookAbbrv["1 kngs"] = '1Ki'; bookAbbrv["1ki"] = '1Ki'; bookAbbrv["1kgs"] = '1Ki'; bookAbbrv["1king"] = '1Ki'; bookAbbrv["1kings"] = '1Ki'; bookAbbrv["1kngs"] = '1Ki'; bookAbbrv["2 ki"] = '2Ki'; bookAbbrv["2 kgs"] = '2Ki'; bookAbbrv["2 king"] = '2Ki'; bookAbbrv["2 kings"] = '2Ki'; bookAbbrv["2 kngs"] = '2Ki'; bookAbbrv["2ki"] = '2Ki'; bookAbbrv["2kgs"] = '2Ki'; bookAbbrv["2king"] = '2Ki'; bookAbbrv["2kings"] = '2Ki'; bookAbbrv["2kngs"] = '2Ki'; bookAbbrv["1 ch"] = '1Ch'; bookAbbrv["1 chr"] = '1Ch'; bookAbbrv["1 chro"] = '1Ch'; bookAbbrv["1 chron"] = '1Ch'; bookAbbrv["1 chronicles"] = '1Ch'; bookAbbrv["1ch"] = '1Ch'; bookAbbrv["1chr"] = '1Ch'; bookAbbrv["1chro"] = '1Ch'; bookAbbrv["1chron"] = '1Ch'; bookAbbrv["1chronicles"] = '1Ch'; bookAbbrv["2 ch"] = '2Ch'; bookAbbrv["2 chr"] = '2Ch'; bookAbbrv["2 chro"] = '2Ch'; bookAbbrv["2 chron"] = '2Ch'; bookAbbrv["2 chronicles"] = '2Ch'; bookAbbrv["2ch"] = '2Ch'; bookAbbrv["2chr"] = '2Ch'; bookAbbrv["2chro"] = '2Ch'; bookAbbrv["2chron"] = '2Ch'; bookAbbrv["2chronicles"] = '2Ch'; bookAbbrv["ezr"] = 'Ezr'; bookAbbrv["ezra"] = 'Ezr'; bookAbbrv["neh"] = 'Neh'; bookAbbrv["nehe"] = 'Neh'; bookAbbrv["nehem"] = 'Neh'; bookAbbrv["nehemiah"] = 'Neh'; bookAbbrv["es"] = 'Est'; bookAbbrv["est"] = 'Est'; bookAbbrv["ester"] = 'Est'; bookAbbrv["esth"] = 'Est'; bookAbbrv["esther"] = 'Est'; bookAbbrv["estr"] = 'Est'; bookAbbrv["jb"] = 'Job'; bookAbbrv["job"] = 'Job'; bookAbbrv["ps"] = 'Psa'; bookAbbrv["psa"] = 'Psa'; bookAbbrv["psal"] = 'Psa'; bookAbbrv["psalm"] = 'Psa'; bookAbbrv["psalms"] = 'Psa'; bookAbbrv["pss"] = 'Psa'; bookAbbrv["pr"] = 'Pro'; bookAbbrv["pro"] = 'Pro'; bookAbbrv["prv"] = 'Pro'; bookAbbrv["prov"] = 'Pro'; bookAbbrv["prvs"] = 'Pro'; bookAbbrv["proverb"] = 'Pro'; bookAbbrv["proverbs"] = 'Pro'; bookAbbrv["ec"] = 'Ecc'; bookAbbrv["ecc"] = 'Ecc'; bookAbbrv["ecs"] = 'Ecc'; bookAbbrv["eccl"] = 'Ecc'; bookAbbrv["ecls"] = 'Ecc'; bookAbbrv["eccle"] = 'Ecc'; bookAbbrv["eccles"] = 'Ecc'; bookAbbrv["ecclesiastes"] = 'Ecc'; bookAbbrv["cant"] = 'Sgs'; bookAbbrv["canticle"] = 'Sgs'; bookAbbrv["canticle canticles"] = 'Sgs'; bookAbbrv["canticles"] = 'Sgs'; bookAbbrv["solomon"] = 'Sgs'; bookAbbrv["song solomon"] = 'Sgs'; bookAbbrv["songs solomon"] = 'Sgs'; bookAbbrv["song songs"] = 'Sgs'; bookAbbrv["songofsolomon"] = 'Sgs'; bookAbbrv["song of solomon"] = 'Sgs'; bookAbbrv["so"] = 'Sgs'; bookAbbrv["sgs"] = 'Sgs'; bookAbbrv["sng"] = 'Sgs'; bookAbbrv["son"] = 'Sgs'; bookAbbrv["sos"] = 'Sgs'; bookAbbrv["song"] = 'Sgs'; bookAbbrv["sngs"] = 'Sgs'; bookAbbrv["songs"] = 'Sgs'; bookAbbrv["is"] = 'Isa'; bookAbbrv["isa"] = 'Isa'; bookAbbrv["isai"] = 'Isa'; bookAbbrv["isaia"] = 'Isa'; bookAbbrv["isaiah"] = 'Isa'; bookAbbrv["ish"] = 'Isa'; bookAbbrv["je"] = 'Jer'; bookAbbrv["jr"] = 'Jer'; bookAbbrv["jer"] = 'Jer'; bookAbbrv["jere"] = 'Jer'; bookAbbrv["jerem"] = 'Jer'; bookAbbrv["jeremiah"] = 'Jer'; bookAbbrv["la"] = 'Lam'; bookAbbrv["lam"] = 'Lam'; bookAbbrv["lame"] = 'Lam'; bookAbbrv["lamen"] = 'Lam'; bookAbbrv["lament"] = 'Lam'; bookAbbrv["lamentation"] = 'Lam'; bookAbbrv["lamentations"] = 'Lam'; bookAbbrv["eze"] = 'Eze'; bookAbbrv["ezek"] = 'Eze'; bookAbbrv["ezekiel"] = 'Eze'; bookAbbrv["da"] = 'Dan'; bookAbbrv["dan"] = 'Dan'; bookAbbrv["dnl"] = 'Dan'; bookAbbrv["dani"] = 'Dan'; bookAbbrv["daniel"] = 'Dan'; bookAbbrv["ho"] = 'Hsa'; bookAbbrv["hos"] = 'Hsa'; bookAbbrv["hsa"] = 'Hsa'; bookAbbrv["hose"] = 'Hsa'; bookAbbrv["hosea"] = 'Hsa'; bookAbbrv["jl"] = 'Joe'; bookAbbrv["joe"] = 'Joe'; bookAbbrv["joel"] = 'Joe'; bookAbbrv["am"] = 'Amo'; bookAbbrv["amo"] = 'Amo'; bookAbbrv["amos"] = 'Amo'; bookAbbrv["ams"] = 'Amo'; bookAbbrv["ob"] = 'Oba'; bookAbbrv["oba"] = 'Oba'; bookAbbrv["obad"] = 'Oba'; bookAbbrv["obadiah"] = 'Oba'; bookAbbrv["obd"] = 'Oba'; bookAbbrv["jon"] = 'Jon'; bookAbbrv["jona"] = 'Jon'; bookAbbrv["jonah"] = 'Jon'; bookAbbrv["mch"] = 'Mic'; bookAbbrv["mi"] = 'Mic'; bookAbbrv["mic"] = 'Mic'; bookAbbrv["mica"] = 'Mic'; bookAbbrv["micah"] = 'Mic'; bookAbbrv["na"] = 'Nah'; bookAbbrv["nah"] = 'Nah'; bookAbbrv["nahu"] = 'Nah'; bookAbbrv["nahum"] = 'Nah'; bookAbbrv["hab"] = 'Hab'; bookAbbrv["haba"] = 'Hab'; bookAbbrv["habak"] = 'Hab'; bookAbbrv["habakk"] = 'Hab'; bookAbbrv["habakkuk"] = 'Hab'; bookAbbrv["hbk"] = 'Hab'; bookAbbrv["zep"] = 'Zep'; bookAbbrv["zeph"] = 'Zep'; bookAbbrv["zepha"] = 'Zep'; bookAbbrv["zephan"] = 'Zep'; bookAbbrv["zephaniah"] = 'Zep'; bookAbbrv["zp"] = 'Zep'; bookAbbrv["zph"] = 'Zep'; bookAbbrv["hag"] = 'Hag'; bookAbbrv["hagai"] = 'Hag'; bookAbbrv["hagg"] = 'Hag'; bookAbbrv["haggai"] = 'Hag'; bookAbbrv["hga"] = 'Hag'; bookAbbrv["zc"] = 'Zec'; bookAbbrv["zec"] = 'Zec'; bookAbbrv["zech"] = 'Zec'; bookAbbrv["zecha"] = 'Zec'; bookAbbrv["zechar"] = 'Zec'; bookAbbrv["zechariah"] = 'Zec'; bookAbbrv["mal"] = 'Mal'; bookAbbrv["mala"] = 'Mal'; bookAbbrv["malac"] = 'Mal'; bookAbbrv["malach"] = 'Mal'; bookAbbrv["malachi"] = 'Mal'; bookAbbrv["malichi"] = 'Mal'; bookAbbrv["mlc"] = 'Mal'; bookAbbrv["mlci"] = 'Mal'; bookAbbrv["mat"] = 'Mat'; bookAbbrv["mathew"] = 'Mat'; bookAbbrv["matt"] = 'Mat'; bookAbbrv["matth"] = 'Mat'; bookAbbrv["matthe"] = 'Mat'; bookAbbrv["matthew"] = 'Mat'; bookAbbrv["mt"] = 'Mat'; bookAbbrv["mth"] = 'Mat'; bookAbbrv["mtthw"] = 'Mat'; bookAbbrv["mtw"] = 'Mat'; bookAbbrv["mar"] = 'Mar'; bookAbbrv["marc"] = 'Mar'; bookAbbrv["mark"] = 'Mar'; bookAbbrv["mk"] = 'Mar'; bookAbbrv["mrk"] = 'Mar'; bookAbbrv["lk"] = 'Luk'; bookAbbrv["lke"] = 'Luk'; bookAbbrv["luk"] = 'Luk'; bookAbbrv["luke"] = 'Luk'; bookAbbrv["jhn"] = 'Jhn'; bookAbbrv["jn"] = 'Jhn'; bookAbbrv["joh"] = 'Jhn'; bookAbbrv["john"] = 'Jhn'; bookAbbrv["ac"] = 'Act'; bookAbbrv["act"] = 'Act'; bookAbbrv["acts"] = 'Act'; bookAbbrv["rms"] = 'Rom'; bookAbbrv["ro"] = 'Rom'; bookAbbrv["rom"] = 'Rom'; bookAbbrv["roma"] = 'Rom'; bookAbbrv["roman"] = 'Rom'; bookAbbrv["romans"] = 'Rom'; bookAbbrv["1 co"] = '1Cr'; bookAbbrv["1 cr"] = '1Cr'; bookAbbrv["1 cor"] = '1Cr'; bookAbbrv["1 cori"] = '1Cr'; bookAbbrv["1 corint"] = '1Cr'; bookAbbrv["1 corinth"] = '1Cr'; bookAbbrv["1 corinthian"] = '1Cr'; bookAbbrv["1 corinthians"] = '1Cr'; bookAbbrv["1co"] = '1Cr'; bookAbbrv["1cr"] = '1Cr'; bookAbbrv["1cor"] = '1Cr'; bookAbbrv["1cori"] = '1Cr'; bookAbbrv["1corint"] = '1Cr'; bookAbbrv["1corinth"] = '1Cr'; bookAbbrv["1corinthian"] = '1Cr'; bookAbbrv["1corinthians"] = '1Cr'; bookAbbrv["2 co"] = '2Cr'; bookAbbrv["2 cr"] = '2Cr'; bookAbbrv["2 cor"] = '2Cr'; bookAbbrv["2 cori"] = '2Cr'; bookAbbrv["2 corint"] = '2Cr'; bookAbbrv["2 corinth"] = '2Cr'; bookAbbrv["2 corinthian"] = '2Cr'; bookAbbrv["2 corinthians"] = '2Cr'; bookAbbrv["2co"] = '2Cr'; bookAbbrv["2cr"] = '2Cr'; bookAbbrv["2cor"] = '2Cr'; bookAbbrv["2cori"] = '2Cr'; bookAbbrv["2corint"] = '2Cr'; bookAbbrv["2corinth"] = '2Cr'; bookAbbrv["2corinthian"] = '2Cr'; bookAbbrv["2corinthians"] = '2Cr'; bookAbbrv["gal"] = 'Gal'; bookAbbrv["gala"] = 'Gal'; bookAbbrv["galat"] = 'Gal'; bookAbbrv["galati"] = 'Gal'; bookAbbrv["galatians"] = 'Gal'; bookAbbrv["galations"] = 'Gal'; bookAbbrv["gals"] = 'Gal'; bookAbbrv["glts"] = 'Gal'; bookAbbrv["ep"] = 'Eph'; bookAbbrv["eph"] = 'Eph'; bookAbbrv["ephes"] = 'Eph'; bookAbbrv["ephesi"] = 'Eph'; bookAbbrv["ephesian"] = 'Eph'; bookAbbrv["ephesians"] = 'Eph'; bookAbbrv["ephesions"] = 'Eph'; bookAbbrv["ephsns"] = 'Eph'; bookAbbrv["phi"] = 'Phl'; bookAbbrv["phil"] = 'Phl'; bookAbbrv["phili"] = 'Phl'; bookAbbrv["philip"] = 'Phl'; bookAbbrv["philipians"] = 'Phl'; bookAbbrv["philipp"] = 'Phl'; bookAbbrv["philippi"] = 'Phl'; bookAbbrv["philippians"] = 'Phl'; bookAbbrv["philipppian"] = 'Phl'; bookAbbrv["philli"] = 'Phl'; bookAbbrv["phillip"] = 'Phl'; bookAbbrv["phillipp"] = 'Phl'; bookAbbrv["phillippi"] = 'Phl'; bookAbbrv["phillippian"] = 'Phl'; bookAbbrv["phillippians"] = 'Phl'; bookAbbrv["phl"] = 'Phl'; bookAbbrv["col"] = 'Col'; bookAbbrv["coll"] = 'Col'; bookAbbrv["collosians"] = 'Col'; bookAbbrv["collossians"] = 'Col'; bookAbbrv["colo"] = 'Col'; bookAbbrv["colos"] = 'Col'; bookAbbrv["coloss"] = 'Col'; bookAbbrv["colossi"] = 'Col'; bookAbbrv["colossian"] = 'Col'; bookAbbrv["colossians"] = 'Col'; bookAbbrv["colossions"] = 'Col'; bookAbbrv["1 th"] = '1Th'; bookAbbrv["1 the"] = '1Th'; bookAbbrv["1 thes"] = '1Th'; bookAbbrv["1 thess"] = '1Th'; bookAbbrv["1 thessa"] = '1Th'; bookAbbrv["1 thessal"] = '1Th'; bookAbbrv["1 thessalon"] = '1Th'; bookAbbrv["1 thessalonian"] = '1Th'; bookAbbrv["1 thessalonians"] = '1Th'; bookAbbrv["1 ths"] = '1Th'; bookAbbrv["1th"] = '1Th'; bookAbbrv["1the"] = '1Th'; bookAbbrv["1thes"] = '1Th'; bookAbbrv["1thess"] = '1Th'; bookAbbrv["1thessa"] = '1Th'; bookAbbrv["1thessal"] = '1Th'; bookAbbrv["1thessalon"] = '1Th'; bookAbbrv["1thessalonian"] = '1Th'; bookAbbrv["1thessalonians"] = '1Th'; bookAbbrv["1ths"] = '1Th'; bookAbbrv["2 th"] = '2Th'; bookAbbrv["2 the"] = '2Th'; bookAbbrv["2 thes"] = '2Th'; bookAbbrv["2 thess"] = '2Th'; bookAbbrv["2 thessa"] = '2Th'; bookAbbrv["2 thessal"] = '2Th'; bookAbbrv["2 thessalon"] = '2Th'; bookAbbrv["2 thessalonian"] = '2Th'; bookAbbrv["2 thessalonians"] = '2Th'; bookAbbrv["2 ths"] = '2Th'; bookAbbrv["2th"] = '2Th'; bookAbbrv["2the"] = '2Th'; bookAbbrv["2thes"] = '2Th'; bookAbbrv["2thess"] = '2Th'; bookAbbrv["2thessa"] = '2Th'; bookAbbrv["2thessal"] = '2Th'; bookAbbrv["2thessalon"] = '2Th'; bookAbbrv["2thessalonian"] = '2Th'; bookAbbrv["2thessalonians"] = '2Th'; bookAbbrv["2ths"] = '2Th'; bookAbbrv["1 ti"] = '1Ti'; bookAbbrv["1 tim"] = '1Ti'; bookAbbrv["1 timo"] = '1Ti'; bookAbbrv["1 timothy"] = '1Ti'; bookAbbrv["1ti"] = '1Ti'; bookAbbrv["1tim"] = '1Ti'; bookAbbrv["1timo"] = '1Ti'; bookAbbrv["1timothy"] = '1Ti'; bookAbbrv["2 ti"] = '2Ti'; bookAbbrv["2 tim"] = '2Ti'; bookAbbrv["2 timo"] = '2Ti'; bookAbbrv["2 timothy"] = '2Ti'; bookAbbrv["2ti"] = '2Ti'; bookAbbrv["2tim"] = '2Ti'; bookAbbrv["2timo"] = '2Ti'; bookAbbrv["2timothy"] = '2Ti'; bookAbbrv["tit"] = 'Tts'; bookAbbrv["titus"] = 'Tts'; bookAbbrv["tts"] = 'Tts'; bookAbbrv["phile"] = 'Phm'; bookAbbrv["philem"] = 'Phm'; bookAbbrv["philemon"] = 'Phm'; bookAbbrv["phm"] = 'Phm'; bookAbbrv["phn"] = 'Phm'; bookAbbrv["hbr"] = 'Hbr'; bookAbbrv["hbrs"] = 'Hbr'; bookAbbrv["heb"] = 'Hbr'; bookAbbrv["hebr"] = 'Hbr'; bookAbbrv["hebres"] = 'Hbr'; bookAbbrv["hebrew"] = 'Hbr'; bookAbbrv["hebrews"] = 'Hbr'; bookAbbrv["ja"] = 'Jam'; bookAbbrv["jam"] = 'Jam'; bookAbbrv["jame"] = 'Jam'; bookAbbrv["james"] = 'Jam'; bookAbbrv["jms"] = 'Jam'; bookAbbrv["1 pe"] = '1Pe'; bookAbbrv["1 pet"] = '1Pe'; bookAbbrv["1 pete"] = '1Pe'; bookAbbrv["1 peter"] = '1Pe'; bookAbbrv["1 pt"] = '1Pe'; bookAbbrv["1pe"] = '1Pe'; bookAbbrv["1pet"] = '1Pe'; bookAbbrv["1pete"] = '1Pe'; bookAbbrv["1peter"] = '1Pe'; bookAbbrv["1pt"] = '1Pe'; bookAbbrv["2 pe"] = '2Pe'; bookAbbrv["2 pet"] = '2Pe'; bookAbbrv["2 pete"] = '2Pe'; bookAbbrv["2 peter"] = '2Pe'; bookAbbrv["2 pt"] = '2Pe'; bookAbbrv["2pe"] = '2Pe'; bookAbbrv["2pet"] = '2Pe'; bookAbbrv["2pete"] = '2Pe'; bookAbbrv["2peter"] = '2Pe'; bookAbbrv["2pt"] = '2Pe'; bookAbbrv["1 jhn"] = '1Jo'; bookAbbrv["1 jn"] = '1Jo'; bookAbbrv["1 jo"] = '1Jo'; bookAbbrv["1 joh"] = '1Jo'; bookAbbrv["1 john"] = '1Jo'; bookAbbrv["1jhn"] = '1Jo'; bookAbbrv["1jn"] = '1Jo'; bookAbbrv["1jo"] = '1Jo'; bookAbbrv["1joh"] = '1Jo'; bookAbbrv["1john"] = '1Jo'; bookAbbrv["2 jhn"] = '2Jo'; bookAbbrv["2 jn"] = '2Jo'; bookAbbrv["2 jo"] = '2Jo'; bookAbbrv["2 joh"] = '2Jo'; bookAbbrv["2 john"] = '2Jo'; bookAbbrv["2jhn"] = '2Jo'; bookAbbrv["2jn"] = '2Jo'; bookAbbrv["2jo"] = '2Jo'; bookAbbrv["2joh"] = '2Jo'; bookAbbrv["2john"] = '2Jo'; bookAbbrv["3 jhn"] = '3Jo'; bookAbbrv["3 jn"] = '3Jo'; bookAbbrv["3 jo"] = '3Jo'; bookAbbrv["3 joh"] = '3Jo'; bookAbbrv["3 john"] = '3Jo'; bookAbbrv["3jhn"] = '3Jo'; bookAbbrv["3jn"] = '3Jo'; bookAbbrv["3jo"] = '3Jo'; bookAbbrv["3joh"] = '3Jo'; bookAbbrv["3john"] = '3Jo'; bookAbbrv["jde"] = 'Jud'; bookAbbrv["jud"] = 'Jud'; bookAbbrv["jude"] = 'Jud'; bookAbbrv["apo"] = 'Rev'; bookAbbrv["apoc"] = 'Rev'; bookAbbrv["apocalypse"] = 'Rev'; bookAbbrv["apocolypse"] = 'Rev'; bookAbbrv["rev"] = 'Rev'; bookAbbrv["reve"] = 'Rev'; bookAbbrv["revel"] = 'Rev'; bookAbbrv["revelat"] = 'Rev'; bookAbbrv["revelation"] = 'Rev'; bookAbbrv["revelations"] = 'Rev'; Book = Book.toLowerCase(); try { if(eval('bookAbbrv["' + Book + '"]')) return bookAbbrv[Book]; } catch(e) { return undefined; } } // Structure of Short Book Name to Long Book Name var BookLongName = []; var BookNames = BookLongName; BookLongName["Gen"] = "Genesis"; BookLongName["Exd"] = "Exodus"; BookLongName["Lev"] = "Leviticus"; BookLongName["Num"] = "Numbers"; BookLongName["Deu"] = "Deuteronomy"; BookLongName["Jos"] = "Joshua"; BookLongName["Jdg"] = "Judges"; BookLongName["Rth"] = "Ruth"; BookLongName["1Sa"] = "1 Samuel"; BookLongName["2Sa"] = "2 Samuel"; BookLongName["1Ki"] = "1 Kings"; BookLongName["2Ki"] = "2 Kings"; BookLongName["1Ch"] = "1 Chronicles"; BookLongName["2Ch"] = "2 Chronicles"; BookLongName["Ezr"] = "Ezra"; BookLongName["Neh"] = "Nehemiah"; BookLongName["Est"] = "Esther"; BookLongName["Job"] = "Job"; BookLongName["Psa"] = "Psalms"; BookLongName["Pro"] = "Proverbs"; BookLongName["Ecc"] = "Ecclesiastes"; BookLongName["Sgs"] = "Song of Songs"; BookLongName["Isa"] = "Isaiah"; BookLongName["Jer"] = "Jeremiah"; BookLongName["Lam"] = "Lamentations"; BookLongName["Eze"] = "Ezekiel"; BookLongName["Dan"] = "Daniel"; BookLongName["Hsa"] = "Hosea"; BookLongName["Joe"] = "Joel"; BookLongName["Amo"] = "Amos"; BookLongName["Oba"] = "Obadiah"; BookLongName["Jon"] = "Jonah"; BookLongName["Mic"] = "Micah"; BookLongName["Nah"] = "Nahum"; BookLongName["Hab"] = "Habakkuk"; BookLongName["Zep"] = "Zephaniah"; BookLongName["Hag"] = "Haggai"; BookLongName["Zec"] = "Zechariah"; BookLongName["Mal"] = "Malachi"; BookLongName["Mat"] = "Matthew"; BookLongName["Mar"] = "Mark"; BookLongName["Luk"] = "Luke"; BookLongName["Jhn"] = "John"; BookLongName["Act"] = "Acts"; BookLongName["Rom"] = "Romans"; BookLongName["1Cr"] = "1 Corinthians"; BookLongName["2Cr"] = "2 Corinthians"; BookLongName["Gal"] = "Galatians"; BookLongName["Eph"] = "Ephesians"; BookLongName["Phl"] = "Philippians"; BookLongName["Col"] = "Colossians"; BookLongName["1Th"] = "1 Thessalonians"; BookLongName["2Th"] = "2 Thessalonians"; BookLongName["1Ti"] = "1 Timothy"; BookLongName["2Ti"] = "2 Timothy"; BookLongName["Tts"] = "Titus"; BookLongName["Phm"] = "Philemon"; BookLongName["Hbr"] = "Hebrews"; BookLongName["Jam"] = "James"; BookLongName["1Pe"] = "1 Peter"; BookLongName["2Pe"] = "2 Peter"; BookLongName["1Jo"] = "1 John"; BookLongName["2Jo"] = "2 John"; BookLongName["3Jo"] = "3 John"; BookLongName["Jud"] = "Jude"; BookLongName["Rev"] = "Revelation"; var BookOrder = []; BookOrder["1"] = "Gen"; BookOrder["2"] = "Exd"; BookOrder["3"] = "Lev"; BookOrder["4"] = "Num"; BookOrder["5"] = "Deu"; BookOrder["6"] = "Jos"; BookOrder["7"] = "Jdg"; BookOrder["8"] = "Rth"; BookOrder["9"] = "1Sa"; BookOrder["10"] = "2Sa"; BookOrder["11"] = "1Ki"; BookOrder["12"] = "2Ki"; BookOrder["13"] = "1Ch"; BookOrder["14"] = "2Ch"; BookOrder["15"] = "Ezr"; BookOrder["16"] = "Neh"; BookOrder["17"] = "Est"; BookOrder["18"] = "Job"; BookOrder["19"] = "Psa"; BookOrder["20"] = "Pro"; BookOrder["21"] = "Ecc"; BookOrder["22"] = "Sgs"; BookOrder["23"] = "Isa"; BookOrder["24"] = "Jer"; BookOrder["25"] = "Lam"; BookOrder["26"] = "Eze"; BookOrder["27"] = "Dan"; BookOrder["28"] = "Hsa"; BookOrder["29"] = "Joe"; BookOrder["30"] = "Amo"; BookOrder["31"] = "Oba"; BookOrder["32"] = "Jon"; BookOrder["33"] = "Mic"; BookOrder["34"] = "Nah"; BookOrder["35"] = "Hab"; BookOrder["36"] = "Zep"; BookOrder["37"] = "Hag"; BookOrder["38"] = "Zec"; BookOrder["39"] = "Mal"; BookOrder["40"] = "Mat"; BookOrder["41"] = "Mar"; BookOrder["42"] = "Luk"; BookOrder["43"] = "Jhn"; BookOrder["44"] = "Act"; BookOrder["45"] = "Rom"; BookOrder["46"] = "1Cr"; BookOrder["47"] = "2Cr"; BookOrder["48"] = "Gal"; BookOrder["49"] = "Eph"; BookOrder["50"] = "Phl"; BookOrder["51"] = "Col"; BookOrder["52"] = "1Th"; BookOrder["53"] = "2Th"; BookOrder["54"] = "1Ti"; BookOrder["55"] = "2Ti"; BookOrder["56"] = "Tts"; BookOrder["57"] = "Phm"; BookOrder["58"] = "Hbr"; BookOrder["59"] = "Jam"; BookOrder["60"] = "1Pe"; BookOrder["61"] = "2Pe"; BookOrder["62"] = "1Jo"; BookOrder["63"] = "2Jo"; BookOrder["64"] = "3Jo"; BookOrder["65"] = "Jud"; BookOrder["66"] = "Rev"; BookOrder["Gen"] = 1; BookOrder["Exd"] = 2; BookOrder["Lev"] = 3; BookOrder["Num"] = 4; BookOrder["Deu"] = 5; BookOrder["Jos"] = 6; BookOrder["Jdg"] = 7; BookOrder["Rth"] = 8; BookOrder["1Sa"] = 9; BookOrder["2Sa"] = 10; BookOrder["1Ki"] = 11; BookOrder["2Ki"] = 12; BookOrder["1Ch"] = 13; BookOrder["2Ch"] = 14; BookOrder["Ezr"] = 15; BookOrder["Neh"] = 16; BookOrder["Est"] = 17; BookOrder["Job"] = 18; BookOrder["Psa"] = 19; BookOrder["Pro"] = 20; BookOrder["Ecc"] = 21; BookOrder["Sgs"] = 22; BookOrder["Isa"] = 23; BookOrder["Jer"] = 24; BookOrder["Lam"] = 25; BookOrder["Eze"] = 26; BookOrder["Dan"] = 27; BookOrder["Hsa"] = 28; BookOrder["Joe"] = 29; BookOrder["Amo"] = 30; BookOrder["Oba"] = 31; BookOrder["Jon"] = 32; BookOrder["Mic"] = 33; BookOrder["Nah"] = 34; BookOrder["Hab"] = 35; BookOrder["Zep"] = 36; BookOrder["Hag"] = 37; BookOrder["Zec"] = 38; BookOrder["Mal"] = 39; BookOrder["Mat"] = 40; BookOrder["Mar"] = 41; BookOrder["Luk"] = 42; BookOrder["Jhn"] = 43; BookOrder["Act"] = 44; BookOrder["Rom"] = 45; BookOrder["1Cr"] = 46; BookOrder["2Cr"] = 47; BookOrder["Gal"] = 48; BookOrder["Eph"] = 49; BookOrder["Phl"] = 50; BookOrder["Col"] = 51; BookOrder["1Th"] = 52; BookOrder["2Th"] = 53; BookOrder["1Ti"] = 54; BookOrder["2Ti"] = 55; BookOrder["Tts"] = 56; BookOrder["Phm"] = 57; BookOrder["Hbr"] = 58; BookOrder["Jam"] = 59; BookOrder["1Pe"] = 60; BookOrder["2Pe"] = 61; BookOrder["1Jo"] = 62; BookOrder["2Jo"] = 63; BookOrder["3Jo"] = 64; BookOrder["Jud"] = 65; BookOrder["Rev"] = 66; // This is the zero based chapter_ID of the first Chapter:Verse of the said book // Why? So we can predict the current Chapter_ID of something like Ecc 17:5 // It would be 659+17 var BookChapters = []; BookChapters["Gen"] = 0; BookChapters["Exd"] = 50; BookChapters["Lev"] = 90; BookChapters["Num"] = 117; BookChapters["Deu"] = 153; BookChapters["Jos"] = 187; BookChapters["Jdg"] = 211; BookChapters["Rth"] = 232; BookChapters["1Sa"] = 236; BookChapters["2Sa"] = 267; BookChapters["1Ki"] = 291; BookChapters["2Ki"] = 313; BookChapters["1Ch"] = 338; BookChapters["2Ch"] = 367; BookChapters["Ezr"] = 403; BookChapters["Neh"] = 413; BookChapters["Est"] = 426; BookChapters["Job"] = 436; BookChapters["Psa"] = 478; BookChapters["Pro"] = 628; BookChapters["Ecc"] = 659; BookChapters["Sgs"] = 671; BookChapters["Isa"] = 679; BookChapters["Jer"] = 745; BookChapters["Lam"] = 797; BookChapters["Eze"] = 802; BookChapters["Dan"] = 850; BookChapters["Hsa"] = 862; BookChapters["Joe"] = 876; BookChapters["Amo"] = 879; BookChapters["Oba"] = 888; BookChapters["Jon"] = 889; BookChapters["Mic"] = 893; BookChapters["Nah"] = 900; BookChapters["Hab"] = 903; BookChapters["Zep"] = 906; BookChapters["Hag"] = 909; BookChapters["Zec"] = 911; BookChapters["Mal"] = 925; BookChapters["Mat"] = 929; BookChapters["Mar"] = 957; BookChapters["Luk"] = 973; BookChapters["Jhn"] = 997; BookChapters["Act"] = 1018; BookChapters["Rom"] = 1046; BookChapters["1Cr"] = 1062; BookChapters["2Cr"] = 1078; BookChapters["Gal"] = 1091; BookChapters["Eph"] = 1097; BookChapters["Phl"] = 1103; BookChapters["Col"] = 1107; BookChapters["1Th"] = 1111; BookChapters["2Th"] = 1116; BookChapters["1Ti"] = 1119; BookChapters["2Ti"] = 1125; BookChapters["Tts"] = 1129; BookChapters["Phm"] = 1132; BookChapters["Hbr"] = 1133; BookChapters["Jam"] = 1146; BookChapters["1Pe"] = 1151; BookChapters["2Pe"] = 1156; BookChapters["1Jo"] = 1159; BookChapters["2Jo"] = 1164; BookChapters["3Jo"] = 1165; BookChapters["Jud"] = 1166; BookChapters["Rev"] = 1167;