<!--
var chaptercount = new Array(0, 50, 40, 27, 36, 34, 24, 21, 4, 31, 24, 22, 25, 29, 36, 10, 13, 10, 42, 150, 31, 12, 8, 66, 52, 5, 48, 12, 14, 3, 9, 1, 4, 7, 3, 3, 3, 2, 14, 4, 28, 16, 24, 21, 28, 16, 16, 13, 6, 6, 4, 4, 5, 3, 6, 4, 3, 1, 13, 5, 5, 3, 5, 1, 1, 1, 22)

var ua = navigator.userAgent
var ps = navigator.productSub
var dom = (document.getElementById)? 1:0
var ie4 = (document.all&&!dom)? 1:0
var ie5 = (document.all&&dom)? 1:0
var doc_root = ((ie5&&ua.indexOf("Opera")<0||ie4)&&document.compatMode=="CSS1Compat")? "document.documentElement":"document.body"

if(ie4||ie5||ps>=20020823) {
	var ww = "eval(doc_root).clientWidth"
	var wh = "eval(doc_root).clientHeight"
}
else {
	var ww = "window.innerWidth"
	var wh = "window.innerHeight"
}

function setSize() {
	w = eval(ww)
	h = eval(wh)
	hd = document.getElementById("header")
	hd.style.width = w
	mn = document.getElementById("main")
	mn.style.width = w - 200
	mn.style.height = h - 70
	lf = document.getElementById("left")
//	lf.style.height = h - 200
	tx = document.getElementById("upper")
	if (tx) {
		tx.style.height = (h - 70 - 20 - 60) * 4 / 5
	}
	nt = document.getElementById("lower")
	if (nt) {
		nt.style.height = (h - 70 - 20 - 60) / 5
	}
	nv = document.getElementById("navigate")
	if (nv) {
		nv.style.left = w - 100 - 200
	}
}

function selectBook(b, c, s) {
	s.options.length = 0
	for (i = 0; i < chaptercount[b]; i++) {
		o = new Option(i + 1, i + 1)
		s.options[i] = o
	}
	s.options[c-1].selected = true
}

function jumpVerseNote(a) {
	window.location = "#" + a
}

function jumpSearch(page, loc, lang, theme) {
	if (parseInt(navigator.appVersion)>=4)
		if (navigator.userAgent.indexOf("MSIE")>0) { //IE 4+
			var sel=document.selection.createRange();
			sel.expand("word");
			word = sel.text
			if (word != '') {
				page = page + "?search=" + escape(word)
				if (loc != "") {page = page + "&in=" + loc}
				if (lang != "") {page = page + "&lang=" + lang}
				if (theme != "") {page = page + "&theme=" + theme}
				window.location = page
			}
		}
		else {// NS4+
			word = document.getSelection()
			if (word != '') {
				page = page + "?search=" + escape(word)
				if (loc != "") {page = page + "&in=" + loc}
				if (lang != "") {page = page + "&lang=" + lang}
				if (theme != "") {page = page + "&theme=" + theme}
				window.location = page
			}
		}
}

var is_slide = 0
var is_hidden = 0

function startSlide() {
	is_slide = 1
}

function goSlide(event) {
	if (is_slide) {
		h = eval(wh)
		tx_height = event.clientY - 70 - 20 - 5
		nt_height = h - 60 - event.clientY + 5
		if ((tx_height > 0) && (nt_height > 0)) {
			tx = document.getElementById("upper")
			if (tx) {
				tx.style.height = tx_height
			}
			nt = document.getElementById("lower")
			if (nt) {
				nt.style.height = nt_height
			}
		}
	}
}

function stopSlide() {
	is_slide = 0
}

function slideLeft() {
	if (is_hidden) {
		is_hidden = 0
		window.setTimeout("doSlide(190)", 1)
	}
	else {
		is_hidden = 1
		window.setTimeout("doSlide(0)", 1)
	}
}

function doSlide(inc) {
	w = eval(ww)
	lf = document.getElementById("left")
	mn = document.getElementById("main")
	nv = document.getElementById("navigate")
	if (lf) {
		lf.style.left = - inc
	}
	if (mn) {
		mn.style.left = 200 - inc
		mn.style.width = w - 200 + inc
	}
	if (nv) {
		nv.style.left = w - 100 - 200 + inc
	}
	if (is_hidden && (inc < 190)) {
		inc += 10
		command = "doSlide(" + inc + ")"
		window.setTimeout(command, 1)
	}
	if (!is_hidden && (inc > 0)) {
		inc -= 10
		command = "doSlide(" + inc + ")"
		window.setTimeout(command, 1)
	}
}

function activateNB() {
	NB.style.display = 'block'
	NB_tab.style.backgroundColor = '#FFFFFF'
	KJV.style.display = 'none'
	KJV_tab.style.backgroundColor = '#E0E0E0'
	GRKHEB.style.display = 'none'
	GRKHEB_tab.style.backgroundColor = '#E0E0E0'
	XREF.style.display = 'none'
	XREF_tab.style.backgroundColor = '#E0E0E0'
	NAMES.style.display = 'none'
	NAMES_tab.style.backgroundColor = '#E0E0E0'
	TITLES.style.display = 'none'
	TITLES_tab.style.backgroundColor = '#E0E0E0'
	ARTICLES.style.display = 'none'
	ARTICLES_tab.style.backgroundColor = '#E0E0E0'
}

function activateKJV() {
	KJV.style.display = 'block'
	KJV_tab.style.backgroundColor = '#FFFFFF'
	NB.style.display = 'none'
	NB_tab.style.backgroundColor = '#E0E0E0'
	GRKHEB.style.display = 'none'
	GRKHEB_tab.style.backgroundColor = '#E0E0E0'
	XREF.style.display = 'none'
	XREF_tab.style.backgroundColor = '#E0E0E0'
	NAMES.style.display = 'none'
	NAMES_tab.style.backgroundColor = '#E0E0E0'
	TITLES.style.display = 'none'
	TITLES_tab.style.backgroundColor = '#E0E0E0'
	ARTICLES.style.display = 'none'
	ARTICLES_tab.style.backgroundColor = '#E0E0E0'
}

function activateGRKHEB() {
	GRKHEB.style.display = 'block'
	GRKHEB_tab.style.backgroundColor = '#FFFFFF'
	NB.style.display = 'none'
	NB_tab.style.backgroundColor = '#E0E0E0'
	KJV.style.display = 'none'
	KJV_tab.style.backgroundColor = '#E0E0E0'
	XREF.style.display = 'none'
	XREF_tab.style.backgroundColor = '#E0E0E0'
	NAMES.style.display = 'none'
	NAMES_tab.style.backgroundColor = '#E0E0E0'
	TITLES.style.display = 'none'
	TITLES_tab.style.backgroundColor = '#E0E0E0'
	ARTICLES.style.display = 'none'
	ARTICLES_tab.style.backgroundColor = '#E0E0E0'
}

function activateXREF() {
	XREF.style.display = 'block'
	XREF_tab.style.backgroundColor = '#FFFFFF'
	NB.style.display = 'none'
	NB_tab.style.backgroundColor = '#E0E0E0'
	KJV.style.display = 'none'
	KJV_tab.style.backgroundColor = '#E0E0E0'
	GRKHEB.style.display = 'none'
	GRKHEB_tab.style.backgroundColor = '#E0E0E0'
	NAMES.style.display = 'none'
	NAMES_tab.style.backgroundColor = '#E0E0E0'
	TITLES.style.display = 'none'
	TITLES_tab.style.backgroundColor = '#E0E0E0'
	ARTICLES.style.display = 'none'
	ARTICLES_tab.style.backgroundColor = '#E0E0E0'
}

function activateNAMES() {
	NAMES.style.display = 'block'
	NAMES_tab.style.backgroundColor = '#FFFFFF'
	NB.style.display = 'none'
	NB_tab.style.backgroundColor = '#E0E0E0'
	KJV.style.display = 'none'
	KJV_tab.style.backgroundColor = '#E0E0E0'
	GRKHEB.style.display = 'none'
	GRKHEB_tab.style.backgroundColor = '#E0E0E0'
	XREF.style.display = 'none'
	XREF_tab.style.backgroundColor = '#E0E0E0'
	TITLES.style.display = 'none'
	TITLES_tab.style.backgroundColor = '#E0E0E0'
	ARTICLES.style.display = 'none'
	ARTICLES_tab.style.backgroundColor = '#E0E0E0'
}

function activateTITLES() {
	TITLES.style.display = 'block'
	TITLES_tab.style.backgroundColor = '#FFFFFF'
	NB.style.display = 'none'
	NB_tab.style.backgroundColor = '#E0E0E0'
	KJV.style.display = 'none'
	KJV_tab.style.backgroundColor = '#E0E0E0'
	GRKHEB.style.display = 'none'
	GRKHEB_tab.style.backgroundColor = '#E0E0E0'
	XREF.style.display = 'none'
	XREF_tab.style.backgroundColor = '#E0E0E0'
	NAMES.style.display = 'none'
	NAMES_tab.style.backgroundColor = '#E0E0E0'
	ARTICLES.style.display = 'none'
	ARTICLES_tab.style.backgroundColor = '#E0E0E0'
}

function activateARTICLES() {
	ARTICLES.style.display = 'block'
	ARTICLES_tab.style.backgroundColor = '#FFFFFF'
	NB.style.display = 'none'
	NB_tab.style.backgroundColor = '#E0E0E0'
	KJV.style.display = 'none'
	KJV_tab.style.backgroundColor = '#E0E0E0'
	GRKHEB.style.display = 'none'
	GRKHEB_tab.style.backgroundColor = '#E0E0E0'
	XREF.style.display = 'none'
	XREF_tab.style.backgroundColor = '#E0E0E0'
	NAMES.style.display = 'none'
	NAMES_tab.style.backgroundColor = '#E0E0E0'
	TITLES.style.display = 'none'
	TITLES_tab.style.backgroundColor = '#E0E0E0'
}

function activateCompare() {
	COMPARE.style.display = 'block'
	COMPARE_tab.style.backgroundColor = '#FFFFFF'
	COMMENTARIES.style.display = 'none'
	COMMENTARIES_tab.style.backgroundColor = '#E0E0E0'
	ANALYSIS.style.display = 'none'
	ANALYSIS_tab.style.backgroundColor = '#E0E0E0'
}

function activateCommentaries() {
	COMMENTARIES.style.display = 'block'
	COMMENTARIES_tab.style.backgroundColor = '#FFFFFF'
	COMPARE.style.display = 'none'
	COMPARE_tab.style.backgroundColor = '#E0E0E0'
	ANALYSIS.style.display = 'none'
	ANALYSIS_tab.style.backgroundColor = '#E0E0E0'
}

function activateAnalysis() {
	ANALYSIS.style.display = 'block'
	ANALYSIS_tab.style.backgroundColor = '#FFFFFF'
	COMPARE.style.display = 'none'
	COMPARE_tab.style.backgroundColor = '#E0E0E0'
	COMMENTARIES.style.display = 'none'
	COMMENTARIES_tab.style.backgroundColor = '#E0E0E0'
}

//-->
