

// The filenames of the button images, excluding "sn-" and ".gif":

imageNames=[
	'cat', //alogue
	'ort', //O.T.
	'order',  //Order
	'about',  //About
	'lynx',  //Links
	'nav',  //Map
	'help',   //Help
	'board' //Board
];

// To add a menu item, use the following syntax:
//     addMenuItem(level, 'title', 'link');
// The level indicates how many submenus deep it is.
// The title should end with a single space and a
// greater-than sign if it has a submenu.
// "Root-level" items like œÒ„‹Ì˘ÛÈÚ do not need
// anything except a "0".

// WARNING: Any slight failure to follow these
// instructions will militate against the satisfactory
// operation of the menus.

function addUpToNav(this_section){

addMenuItem(0); //Catalogue
if (this_section != 'catalogue') {
	addMenuItem(1, 'Forthcoming Publications', dds + 'forth/');
	addMenuItem(1, 'New Publications', dds + 'new/');
	addMenuItem(1, 'Historical Studies', dds + 'historical/');
	addMenuItem(1, 'Theological Studies and Apologetics', dds + 'theological/');
	addMenuItem(1, 'Liturgical Books', dds + 'liturgical/');
	addMenuItem(1, 'Patristic Translations', dds + 'patristic/');
	addMenuItem(1, 'Psychology of Religion/Pastoral Psychology', dds + 'psychology/');
	addMenuItem(1, 'Lives of Saints', dds + 'lives/');
	addMenuItem(1, 'Monasticism', dds + 'monastic/');
	addMenuItem(1, 'Spiritual Life', dds + 'spiritual/');
	addMenuItem(1, 'Contemporary Issues', dds + 'contemp/');
	addMenuItem(1, 'Ecumenism: Critiques', dds + 'ecumenism/');
	addMenuItem(1, 'The Old Calendar Movement', dds + 'oldcal/');
	addMenuItem(1, 'Calendars', dds + 'cal/');
	addMenuItem(1, 'Index of Titles', dds + 'catalogue/tindex.html');
}

addMenuItem(0); //O.T.

addMenuItem(0); //Order Form
/*
if (this_section != 'order') {
	addMenuItem(1, 'United States of America', dds + 'order/?ctry=us');
	addMenuItem(1, 'Other Countries', dds + 'order/?ctry=other');
}
*/

addMenuItem(0); //About the C.T.O.S.

addMenuItem(0); //Links
if (this_section != 'links') {
	addMenuItem(1, 'Convent of Saint Elizabeth', 'http://www.conventofsaintelizabeth.org/');
	addMenuItem(1, 'Holy Synod in Resistance', 'http://www.synodinresistance.org/');
}

addMenuItem(0); //Navigator

//addMenuItem(0); //C.T.O.S. Board

}

function entify(text)
{	return text.replace(/&/g,'&amp;').replace(/</g,"&lt;").replace(/>/g,"&gt;");}

function addAfterNav(do_site_map, dont_do_recent_search){

var recentarr = extractVar ('ctosrs', document.cookie, ';').split('|')
if (!dont_do_recent_search && recentarr.length > 1){
	addMenuItem(1, 'Recent Searches >', 'javascript:void(23)');
	var c=-1; while(++c < recentarr.length){
		if (recentarr[c])
		addMenuItem(2, entify(unescape(extractVar('q', recentarr[c])||extractVar('orig', recentarr[c]))), dds + 'search/?' + recentarr[c]);
	}
	addMenuItem(1, 'Site Map', dds + 'nav/');
}
else if(do_site_map) addMenuItem(1, 'Site Map', dds + 'nav/');

addMenuItem(0);
/*	addMenuItem(1, 'Isn’t >', 'javascript:alert(\'Why did you click that?\')');
	addMenuItem(2, 'it >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(3, 'nice >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(4, 'that >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(5, 'this >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(6, 'menu >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(7, 'has >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(8, 'so >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(9, 'many >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(10, 'submenus >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(11, 'that >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(12, 'they >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(13, 'extend >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(14, 'below >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(15, 'the >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(16, 'bottom >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(17, 'of >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(18, 'the >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(19, 'window >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(20, 'so >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(21, 'that >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(22, 'you >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(23, 'can’t >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(24, 'see >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(25, 'them, >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(26, 'however >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(27, 'hard >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(28, 'you >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(29, 'try, >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(30, 'whether >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(31, 'you >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(32, 'like >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(33, 'it >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(34, 'or >', dds + 'Links_en/Diasporaen.html');
	addMenuItem(35, 'not? >', dds + 'Links_en/Diasporaen.html');
*/
	writeMenus();
}
