titlelist = Array(0, 1, 'The Last Days',
	-1, 2, 'Section 1: Types of the Last Days',
	1, 3, 'Chapter 1: The Flood as a Type of the Last Days',
	2, 3, 'Chapter 2: The Tower of Babel',
	3, 3, 'Chapter 3:  Sodom and the Last Days',
	4, 3, '3-1 Lot In Sodom',
	5, 3, 'Chapter 4: Jacob and Esau in the Last Days',
	6, 3, 'Chapter 5: Latter Day Passover and Exodus',
	7, 3, 'Chapter 6: Arab Invasions During the Time of the Judges',
	8, 3, '6-1. Chushan-Rishathaim (Jud. 3:5-10)',
	9, 3, '6-2. Eglon of Moab (Jud. 3:12-30)',
	10, 3, '6-3. Jabin and Sisera (Jud. 4 and 5)',
	11, 3, '6-4. Gideon and Midian (Jud. 6-8)',
	12, 3, '6-5. Jephthah and Ammon (Jud. 11)',
	13, 3, 'Chapter 7: Arab Invasions During the Time of the Kings',
	14, 3, '7-2 Jehoshaphat and the Last Days',
	15, 3, '8-1 The Assyrian and Babylonian Invasions: Introduction',
	16, 3, '8-2 Assyria and Gog',
	17, 3, '8-3 Tiglath-pileser and the Last Days',
	18, 3, '8-4 The Assyrian Invasion as a Type',
	19, 3, '8-5 Hezekiah\'s Reformation',
	20, 3, '8-6 Rabshakeh and the Last Days',
	21, 3, '8-7 Assyria and Daniel 11',
	22, 3, '8-8 Hezekiah\'s Prayer',
	23, 3, '8-9 A Rebuilt Temple in the Last Days?',
	24, 3, '8-10 The Latter Day Remnant',
	25, 3, '8-11 Leviathan and Assyria',
	26, 3, 'Digression 1: The Identity of Rosh',
	27, 3, 'Chapter 9: The Babylonian Invasions',
	28, 3, '9-2 The Judgment of Babylon',
	29, 3, 'Digression 2: The Revival of Babylon',
	30, 3, '2-2 Babylon as Capital of the Beast',
	31, 3, '2-3 Babylon and Antichrist',
	32, 3, '2-4 Latter Day Babylon',
	33, 3, '2-5 A Possible Latter Day Sequence of Events?',
	34, 3, 'Chapter 10: The first coming of Jesus',
	35, 3, 'Digression 3: The Earth - Land - Eretz',
	-1, 2, 'Section 2: The Holocaust to Come',
	36, 3, 'Chapter 11: The Tribulation in the Olivet Prophecy',
	37, 3, '11-2 Does The Olivet Prophecy Have a Break in Fulfillment?',
	38, 3, '11-3 An Exposition of the Olivet Prophecy',
	39, 3, '11-4 The Olivet Prophecy and 1 Thessalonians',
	40, 3, 'Digression 4: The Relevance of Revelation to AD70',
	41, 3, 'Chapter 12: The Tribulation in Daniel and Revelation',
	42, 3, '12-2 The Beast and the Little Horn',
	43, 3, '12-3 The Beast and the Man of Sin',
	44, 3, '12-4 Latter Day Persecution',
	45, 3, '12-5 The Seals',
	46, 3, '12-6 The Two Witnesses',
	47, 3, '12-7 The Dragon and the Child',
	48, 3, 'Digression 5: Do We Know the Day and Hour?',
	49, 3, 'Digression 6: A Possible Chronology of the Tribulation',
	50, 3, 'Digression 7: Hamas and the Palestinian Movement in Bible Prophecy',
	-1, 2, 'Section 3: The Repentance of Israel',
	51, 3, 'Chapter 13: The Marriage Supper Parable',
	52, 3, 'Chapter 14: The Fig Tree Parable',
	53, 3, 'Chapter 15: The Repentance of Israel',
	54, 3, 'Chapter 16-1 The Coming of Elijah',
	55, 3, '16-2 Malachi\'s \'Elijah\' Prophecy',
	-1, 2, 'Section 4: The Coming of the Lord and Judgment',
	56, 3, 'Chapter 17: The Coming of the Lord',
	57, 3, '17-2 Christ\'s Coming as a Thief',
	58, 3, 'Chapter 18: The Judgment Seat of Christ',
	59, 3, 'Chapter 19: Wise and foolish virgins',
	-1, 2, 'Section 5: The Ecclesia in the Last Days',
	60, 3, 'Chapter 20: "The Promise of his Coming" - A Study of 2 Peter 3',
	61, 3, '20-2 The Judgment of AD70',
	62, 3, '20-3 Is there a Delay in Christ\'s Return?',
	63, 3, 'Chapter 21: Wheat and Tares',
	64, 3, 'Chapter 22: Latter Day Apostacy?',
	65, 3, 'Chapter 23: The Man of Sin',
	66, 3, '23-1 The Antichrist in Daniel',
	67, 3, 'Chapter 24: Letters for the Last Days',
	68, 3, 'Chapter 25 Christ\'s Letters to the Churches',
	69, 3, 'Digression 8: Knowledge Shall be Increased',
	-1, 2, 'Section 6: The Kingdom',
	70, 3, 'Chapter 26: Types of the Kingdom of God',
	71, 3, 'Chapter 27 The Essence of the Kingdom of God',
	72, 3, 'Chapter 28 What will the Millennium be Like?',
	73, 3, 'Chapter 29: The Nations in the Millennium',
	74, 3, 'Chapter 30: The Natural Creation in the Kingdom of God',
	75, 3, 'Chapter 31: The Location of Eden',
	76, 3, 'Digression 9: The Seven Last Visions of Revelation',
	-1, 2, 'Appendices',
	77, 3, 'Appendix 1: "Are there Few that be Saved?"',
	78, 3, 'Appendix 2: Identifying the Beast',
	79, 3, 'Appendix 3: The Antichrist Principle',
	80, 3, 'Appendix 4: Loving Christ\'s Appearing',
	81, 3, 'Appendix 5: Protestant Phobia About Russia',
	82, 3, 'Appendix: Some Criticisms of Futurism Considered');

function _onchange(selobj) {
	var m = selobj.selectedIndex;
	var v = selobj.options[m].value;
	if (v == '0') {
		document.location.href="/doc/lastdays-en";
	} else if (v != '-1') {
		document.location.href="/doc/lastdays-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);