/* 
	the format of the tree definition file is simple,
	you can find specification in the Tigra Menu documentation at:
	
	http://www.softcomplex.com/products/tigra_menu/docs/items.html	
*/

var TREE_ITEMS =[
	['HOME', 'main.html', {'st':'1','hc':'noclose','sb':'HOME'},
		['PROJECT INFO', null, {'st':'1','sb':'PROJECT INFORMATION'},
			['Overview', 'info/overview.html', {'sb':'Project Overview and Description'}],
			['Participants', 'info/participants.html', {'sb':'Project Participants'}],
			['Objectives', 'info/futureobjectives.html', {'sb':'Future Objectives'}]
		],
		['PUBLICATIONS', null, {'st':'1','sb':'PUBLICATIONS'},
		    ['Papers', 'publications/papers.html', {'sb':'Papers'}],
		    ['Presentations', 'publications/presentations.html', {'sb':'Lectures and Presentations'}],
		    ['Outreach', 'publications/outreach.html', {'sb':'Outreach Activities'}],
		],
		['CASE STUDIES', null, {'st':'1','sb':'CASE STUDIES'},
			['WAREHOUSE', 'casestudy/WAREHOUSE/index.html', {'st':'0','sb':'WAREHOUSE case-study'},
				['Models', null, {'st':'0','sb':'Warehouse case-study models'},
					['As-built', null, {'st':'0','sb':'As-built models'},
						['Samples', 'casestudy/WAREHOUSE/models/as-built/index.html', {'sb':'Sample laser scanning models from Warehouse case-study'}],
					]
				]
			],
			['FACTORY', 'casestudy/FACTORY/index.html', {'st':'0','sb':'FACTORY case-study'},
				['Images', null, {'st':'0','sb':'Factory case-study images'},
					['06/20/2002', 'casestudy/FACTORY/images/062002/index.html', {'sb':'Images from July 20th, 2002'}],
					['09/13/2002', 'casestudy/FACTORY/images/091302/index.html', {'sb':'Images from September 13th, 2002'}],
					['11/01/2002', 'casestudy/FACTORY/images/110102/index.html', {'sb':'Images from November 1st, 2002'}],
					['11/11/2002', 'casestudy/FACTORY/images/111102/index.html', {'sb':'Images from November 11th, 2002'}],
					['02/13/2003', 'casestudy/FACTORY/images/021303/index.html', {'sb':'Images from February 13th, 2003'}],
				],
				['Movies', null, {'st':'0','sb':'Factory case-study movies'},
					['02/13/2003', 'casestudy/FACTORY/movies/021303/index.html', {'sb':'Movies from February 13th, 2003'}]
				],
				['Models', null, {'st':'0','sb':'Factory case-study models'},
					['As-designed', null, {'st':'0','sb':'As-designed models'},
						['10/11/2002', 'casestudy/FACTORY/models/as-designed/101102/index.html', {'sb':'VRML Models from October 11th, 2002'}],
						['11/11/2002', 'casestudy/FACTORY/models/as-designed/111102/index.html', {'sb':'VRML Models from November 11th, 2002'}],
						['12/09/2002', 'casestudy/FACTORY/models/as-designed/120902/index.html', {'sb':'VRML Models from December 9th, 2002'}],
					],
					['As-built', null, {'st':'0','sb':'As-built models'},
						['10/11/2002', 'casestudy/FACTORY/models/as-built/101102/index.html', {'sb':'Sample laser scanning images from Oct 11th, 2002'}],
						['Samples', 'casestudy/FACTORY/models/as-built/sample/index.html', {'sb':'Sample laser scanning models from Factory case-study'}],
					]
				]
			],
			['OFFICE', 'casestudy/OFFICE/index.html', {'st':'0','sb':'OFFICE case-study'},
				['Images', null, {'st':'0','sb':'Office case-study images'},
					['12/11/2003', 'casestudy/OFFICE/images/03-1211/index.html', {'sb':'Images from December 11th, 2003'}],
					['12/18/2003', 'casestudy/OFFICE/images/03-1218/index.html', {'sb':'Images from December 18th, 2003'}],
					['01/07/2004', 'casestudy/OFFICE/images/04-0107/index.html', {'sb':'Images from January 7th, 2004'}],
					['08/19/2004', 'casestudy/OFFICE/images/04-0819/index.html', {'sb':'Images from August 19th, 2004'}]
				],
				['Movies', null, {'st':'0','sb':'Office case-study movies'},
					['08/19/2004', 'casestudy/OFFICE/movies/04-0819/index.html', {'sb':'Movies from August 19th, 2004'}]
				],
				['Models', null, {'st':'0','sb':'Office case-study models'},
					['As-designed', null, {'st':'0','sb':'As-designed models'},
						['Target Area', 'casestudy/OFFICE/models/as-designed/target area/index.html', {'sb':'VRML Model of target area'}],
						['12/11/2003', 'casestudy/OFFICE/models/as-designed/121103/index.html', {'sb':'VRML Model from December 11th, 2003'}],
						['12/18/2003', 'casestudy/OFFICE/models/as-designed/121803/index.html', {'sb':'VRML Model from December 18th, 2003'}],
					],
					['As-built', null, {'st':'0','sb':'As-built models'},
						['12/11/2003', 'casestudy/OFFICE/models/as-built/121103/index.html', {'sb':'Sample laser scanning models from Dec 11th, 2003'}],
						['12/18/2003', 'casestudy/OFFICE/models/as-built/121803/index.html', {'sb':'Sample laser scanning models from Dec 18th, 2003'}],
					]
				]
			],
			['WELCOME CENTER', 'casestudy/WELCOMECENTER/index.html', {'st':'0','sb':'WELCOME CENTER case-study'},
				['Images', null, {'st':'0','sb':'Welcome Center case-study images'},
					['07/16/2004', 'casestudy/WELCOMECENTER/images/04-0716/index.html', {'sb':'Images from July 16th, 2004'}]
				],
				['Models', null, {'st':'0','sb':'Office case-study models'},
					['As-designed', null, {'st':'0','sb':'As-designed models'},
						['07/16/2004', 'casestudy/WELCOMECENTER/models/as-designed/04-0716/index.html', {'sb':'VRML Model of July 16th As-designed model'}],
						['completion', 'casestudy/WELCOMECENTER/models/as-designed/com/index.html',		{'sb':'VRML Model of completed As-designed model'}],
					]
				]
			],
		],
		['LINKS', 'links.html', {'sb':'RELATED LINKS'}],
	]
];
function noclose (o_item) {
	// set to true when debugging the application
	var B_DEBUG = false;

	// collect info about all item's parents
	var n_id = o_item.n_id,
		n_depth = o_item.n_depth,
		a_index = o_item.o_root.a_index,
		a_parents = [o_item];

	while (n_depth) {
		if (a_index[n_id].n_depth < n_depth) {
			a_parents[a_parents.length] = a_index[n_id];
			n_depth--;
		}
		n_id--;
	}
		
	// open all parents starting from root
	for (var i = a_parents.length-1; i >= 0; i--)
		// check if node or root
		if (a_parents[i].n_state & 48)
			a_parents[i].open();
		else
			return (B_DEBUG
				? alert("Item with caption '" + a_parents[i].a_config[0]
					+ "' is leaf.\nHierarchy will be opened to its parent node only.")
				: false
			);
}

