titlelist = Array(0, 1, 'The Revelation of Jesus Christ',
	1, 3, 'Introduction to the study of Revelation: 1.1 HERMENEUTICAL PRINCIPLES OF REVELATION',
	2, 3, '1.2 THE BREACH PRINCIPLE IN REVELATION',
	3, 3, '1.3 THE CASE FOR AN EARLY DATE OF REVELATION',
	4, 3, '1.4 THE STRUCTURE OF REVELATION',
	5, 3, 'Chapter 1',
	6, 3, 'Prelude to Chapters 2  3',
	7, 3, 'Smyrna',
	8, 3, 'Thyatira',
	9, 3, 'Laodicea',
	10, 3, 'Ephesus',
	11, 3, 'Philadelphia',
	12, 3, 'Pergamos',
	13, 3, 'Sardis',
	14, 3, 'Chapter 4',
	15, 3, 'Chapter 5',
	16, 3, '5.1 The Scroll',
	17, 3, 'Chapter 6',
	18, 3, 'Chapter 7',
	19, 3, 'Chapters 8  9',
	20, 3, '8.1 Two Babylons',
	21, 3, '8.2 Burden of Babylon',
	22, 3, '8.3 Birds of prey',
	23, 3, 'Chapter 10',
	24, 3, 'Chapter 11',
	25, 3, '11.1 Time periods and witnessing',
	26, 3, '11.2 Time periods and the little horn',
	27, 3, 'Chapter 12',
	28, 3, '12.1 Jerusalem vs. Rome',
	29, 3, '12.2 Heaven and earth',
	30, 3, '12.3 The devil and his angels',
	31, 3, '12.4 Establishment of iniquity on her base',
	32, 3, 'Chapter 13 - The Beast of the Sea',
	33, 3, 'Chapter 14',
	34, 3, 'Chapter 15',
	35, 3, 'Prelude to Chapter 16',
	36, 3, 'Chapter 16',
	37, 3, 'Chapter 17',
	38, 3, 'Chapter 18',
	39, 3, 'Chapter 19',
	40, 3, 'Chapters 20-22');

function _onchange(selobj) {
	var m = selobj.selectedIndex;
	var v = selobj.options[m].value;
	if (v == '0') {
		document.location.href="/doc/revelation-en";
	} else if (v != '-1') {
		document.location.href="/doc/revelation-en/" + v;
	}
}

function AttachList(selobj) {
  selobj.options.length = 0;
  var cv = MM_findObj('current');
  if (cv) cv = cv.value;
  var m, j;
  var k=0;
  for(var i=0;i<titlelist.length;i+=3) {
  	m = titlelist[i+2];
  	for(j=1;j<titlelist[i+1];j++) {
  		m = '  ' + m;
  	}
  	selobj.options[k] = new Option(m, titlelist[i]);
  	selobj.options[k].className = 'sel' + titlelist[i+1];
  	if (cv == titlelist[i]) selobj.selectedIndex = k;
  	k++;
  }
}

function attachnavigation() {
  var sel = MM_findObj('topnav');
  if (sel) AttachList(sel);
  sel = MM_findObj('lownav');
  if (sel) AttachList(sel);
}

addLoadEvent(attachnavigation);