titlelist = Array(0, 1, 'Bible Basics for the Illiterate',
	-1, 2, 'Ideas',
	3, 3, 'Our Ideas',
	-1, 2, 'Responses',
	5, 3, 'A Bible Timeline',
	6, 3, 'Creation',
	7, 3, 'The Days of Creation',
	8, 3, 'God as Creator of the Universe',
	9, 3, 'Moral Issues',
	10, 3, 'The Unity of God',
	11, 3, 'The Throne of God',
	12, 3, 'The Kingdom of God (Isaiah 11:9)',
	13, 3, 'Abraham sees his seed',
	14, 3, 'The Resurrection of Christ',
	15, 3, 'The resurrection of Christ, Cartoon strip',
	16, 3, 'The crucifixion of Christ, Cartoon strip',
	17, 3, 'The Bible',
	18, 3, 'Daniel\'s prophecy',
	19, 3, 'The purpose of God',
	20, 3, 'The book of Revelation in pictures',
	21, 3, 'Bible timeline as a series of bookmarks');

function _onchange(selobj) {
	var m = selobj.selectedIndex;
	var v = selobj.options[m].value;
	if (v == '0') {
		document.location.href="/doc/bbillit-en";
	} else if (v != '-1') {
		document.location.href="/doc/bbillit-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);