/* $Header: /import/www/image/menu.js,v 1.36 2006-06-29 13:39:57+02 kimstp Exp $ */

root = {
	title: 'The Image Group',
	url: 'index.html'
}

nodes = {
	index: ["events", "research", "edu", 
		"publications", "people",
		"vacancies"/*, "funding"*/, "resources", "links"],
	events: {
		title: "Activities",
		add: "events/",
		url: "mainevents.html",
		subnodes: ["mainevents", "lunch", "conferences"],
		lunch: {
			title: "Group Meetings",
			url: "lunch.html"
		},
		mainevents: {
			title: "Events",
			url: "mainevents.html"
		},
		conferences: {
			title: "Conferences",
			url: "conferences.html"
		}
	},
	research: {
		title: "Research",
		url: 'oa/index.html',
		subnodes: [/*"theory",*/ "appl", "funded"],
	theory: {
		title: "Methodology",
		add: "theory/",
		subnodes: ["shape", "statistical", "pde"],
		showsub: true,
		shape: {
			title: "Shape",
			url: "shape.html"
		},
		statistical: {
			title: "Statistical",
			url: "statistical.html"
		},
		pde: {
			title: "<abbr title=\"Partial Differential Equations\">PDE</abbr>",
			url: "pde.html"
		}
	},
	appl: {
		title: "Applications",
		add: "appl/",
		subnodes: ["oa", "nablavision", "fertility"/*, "symmetry", "movie"*/, "interaction"],
		showsub: true,
		oa: {
			title: 'Osteo-Arthritis',
			add: '../oa/',
			url: 'index.html'
		},
		nablavision: {
			title: 'Nabla Vision',
			add: 'nablavision/',
			url: 'index.html'
		},
		fertility: {
			title: 'Fertility',
			add: 'fertility/',
			url: 'fertility.html'
		},
		symmetry: {
			title: 'Biological Symmetry'
		},
		movie: {
			title: 'Restauration of moving pictures'
		},
		interaction: {
			title: 'Eye Interaction',
			url: 'http://www.itu.dk/research/EyeGazeInteraction/',
			absurl: true
		}
	},
	funded: {
		title: "Funded Projects",
		subnodes: ["cia", "dsscv", "cns", "catia", "qsmbi", "vtrain","nisa"],
		showsub: true,
		cia: {
			title: '<acronym title="Clinical Image Analysis">CIA</acronym>',
			url: 'http://www.itu.dk/Internet/sw1940.asp',
			absurl: true
		},
		dsscv: {
			title: '<acronym title="Deep Structure, Singularities, and Computer Vision">DSSCV</acronym>',
			url: 'http://www.itu.dk/Internet/sw1953.asp',
			absurl: true
		},
		cns: {
			title: 'Natural Shape',
			url: 'http://www.diku.dk/forskning/image/research/NaturalShape/index.html',
			absurl: true
		},
		catia: {
			title: '<acronym title="Clinical Applications and Theory of Image Analysis">CATIA</acronym>',
			url: 'CATIA/index.html'
		},
		qsmbi: {
			title: '<acronym title="Quantitative Shape Modeling in Biomedical Imaging">QSMBI</acronym>',
			url: 'QSMBI/index.html'
		},
		vtrain: {
			title: '<acronym title="VISIONTRAIN">VISIONTRAIN</acronym>',
			url: 'http://visiontrain.inrialpes.fr/',
			absurl: true
		},
		nisa: {
			title: '<acronym title="Natural Image Sequence Analysis">NISA</acronym>',
			url: 'NISA/index.html'
		}
	}
	},
	edu: {
		title: "M.Sc./Ph.D. Education",
		add: "edu/",
		url: "phdcourses.html",
		subnodes: ["phdcourses", "courses", /*"studyplans",*/
		"phdprojects", "projects", "theses"],
		courses: {
			title: 'M.Sc. Courses',
			url: 'courses.html'
		},
		phdcourses: {
			title: 'Ph.D. Courses',
			url: 'phdcourses.html'
		},
		studyplans: {
			title: 'Proposed study plans',
			url: 'studyplans.html'
		},
		phdprojects: {
			title: 'Ph.D. Project Proposals',
			url: 'phdprojects.html'
		},
		projects: {
			title: 'M.Sc. Project Proposals',
			url: 'projects.html'
		},
		theses: {
			title: 'M.Sc. Theses',
			add: 'theses/',
			url: 'theses.html'
		}
	},
	resources: {
		title: 'Resources',
		add: 'resources/',
		url: 'index.html',
		subnodes: ['clusterguide', 'clustertech', 'pbs', 'software', 'bugs'],
		clusterguide: {
			title: 'Mosix cluster',
			url: 'clusterguide.html'
		},
        clustertech: {
        	title: 'Cluster Tech',
            url: 'clustertech.html'
        },
		pbs: {
			title: 'Batch system',
			url: 'pbs.html'
		},
		software: {
			title: 'Software',
			url: 'software.html'
		},
		bugs: {
			title: 'Bugs',
			url: 'bugs.html'
		}
	},
	links: {
		title: 'Links',
		add: 'links/',
		url: 'links.html',
		subnodes: ['research', 'commercial', 'free'],
		research: {
			title: 'Research',
			url: 'links.html#research'
		},
		commercial: {
			title: 'Commercial',
			url: 'links.html#commercial'
		},
		free: {
			title: 'Free',
			url: 'links.html#free'
		}
	},
	publications: {
		title: 'Publications',
		add: 'publications/',
		url: 'presentations.html',
		subnodes: ['presentations', 'dissertations',
			'ia', 'dsscv', 'cns', 'oa', 'cia', 'qsmbi', 'eye', 'search'],
		presentations: {
			title: 'Presentations',
			url: 'presentations.html'
		},
		dissertations: {
			title: 'PhD Diss.',
			url: 'dissertations.html'
		},
		ia: {
			title: 'Image Analysis',
			url: 'ia.html'
		},
		dsscv: {
			title: '<abbr title="Deep Structure, Singularities, and Computer Vision">DSSCV</abbr>',
			url: 'dsscv.html'
		},
		cns: {
			title: 'Computing Natural Shape',
			url: 'cns.html'
		},
		oa: {
			title: 'Osteo-Arthritis',
			url: 'oa.html'
		},
		cia: {
			title: '<abbr title="Clinical Image Analysis">CIA</abbr>',
			url: 'cia.html'
		},
		qsmbi: {
			title: '<acronym title="Quantitative Shape Modeling in Biomedical Imaging">QSMBI</acronym>',
			url: 'qsmbi.html'
		},
		eye: {
			title: 'Eye Tracking',
			url: 'eye.html'
		},
		search: {
			title: 'Search',
			url: 'http://www.itu.dk/docadm/main.html',
			absurl: true
		}
	},
	people: {
		title: "People",
		add: "people/",
		url: "faculty.html",
		subnodes: ['faculty', 'phd'/*, 'masters', 'guests'*/, 'former'],
		faculty: {
			title: 'Faculty',
			url: 'faculty.html'
		},
		phd: {
			title: 'Ph.D.',
			url: 'phd.html'
		},
		masters: {
			title: 'Masters',
			url: 'masters.html'
		},
		guests: {
			title: 'Guests',
			url: 'guests.html'
		},
		former: {
			title: 'Affiliated',
			url: 'former.html'
		}
	},
	vacancies: {
		title: "Vacancies",
//		url: "http://www.itu.dk/English/vacancies/",
		url: "http://www.itu.dk/Internet/sw487.asp",
		absurl: true
	},
	funding: {
		title: "Partners and Funding"
	}
}

globaladd = ''

function writemenuitems(menuobj, enclosing, add)
{
	if (menuobj.add != undefined)
		add += menuobj.add
	document.write("<tr><td")
	if (menuobj.myplace) document.write(" class=myplace")
	document.write(">")
	if (menuobj.url != undefined) {
		document.write("<" + enclosing + ">")
		if (menuobj.absurl)
			document.write('<a href="' + menuobj.url + '">')
		else document.write('<a href="' + add + menuobj.url + '">')
	}
	else document.write("<h4>")
	document.write(menuobj.title)
	if (menuobj.url != undefined) {
		document.write('</a>')
		document.write("</" + enclosing + "></td></tr>\n")
	}
	else document.write("</h4>")
	if (menuobj.showsub && menuobj.subnodes != undefined)
		for (var i = 0; i < menuobj.subnodes.length; i++)
			writemenuitems(menuobj[menuobj.subnodes[i]], 'p', add)
}

function writemenu(menuobj, add)
{
	document.write('<table class="dir" align=left width=163 border=0 '
		+ 'cellspacing=0 cellpadding=0>\n')
	document.write('<tr><td class="first" height=26>'
		+ '<center><i></i></center></td></tr>\n')
	for (var i = 0; i < menuobj.index.length; i++)
		writemenuitems(menuobj[menuobj.index[i]], 'h3', add)
	document.write('<tr><td class="last" height=26>'
		+ '<center><i></i></center></td></tr>\n')
	document.write('</table>\n')
}

function getmodificationdate()
{
	var modified = new Date(document.lastModified)
	var year = modified.getFullYear()
	var month = modified.getMonth() + 1
	var date = modified.getDate()
	var datestring = '' + year
	datestring += ((month < 10) ? '-0' : '-') + month
	datestring += ((date < 10) ? '-0' : '-') + date
	return datestring
}

function writeheader(title, add)
{
//	Body composed of one table:
//	IA logo	| Site title	| ITU logo
//	------------------------|
//	Map	| Content	|
//		|		|
//
	globaladd = add
	document.write('<table id=page cellspacing=0>\n')
	document.write('<tr>\n')
	document.writeln('<td class=jumpback>')
	document.write('<a href="http://www.itu.dk" title="Back to the IT University of Copenhagen">')
//	document.write('<img src="http://www.itu.dk/img/www/inter_icon2top.gif"'
//		+ ' alt="To top">')
	document.write('<img src="' + globaladd + 'inter_big-short_logo.gif" ' +
		'alt="The IT University of Copenhagen">\n')
	document.writeln('</a>')
	document.writeln('</td>')
	document.write('<td class=title>\n')
	document.write('<H1 id=top>' + title + '</H1>\n')
	document.write('</td>\n')
//	document.write('<td></td>')
	document.write('</tr>\n')
	document.write('\n')
	document.write('<tr>\n')
	document.write('<td class=menu')
//	document.write('<td width=163 class=logo')
	if (root.myplace)
		document.write('myplace')
	document.write('><p class=logo><a href="' + add + root.url + '">' + root.title +
		'</a></p>\n')
//	document.write('</td>\n')
// Left navigation bar
	writemenu(nodes, globaladd)
// End left navigation bar
	document.write('</td>\n')
	document.write('\n')
	document.write('<td class=body>\n')
// Here comes the contents of this particular page
}

function writefooter()
{
// End the table that we started in the header
	document.write('</td>\n')
//	document.write('<td class=rightlogo rowspan=2>\n')
//	document.write('<a href="http://www.itu.dk">')
//	document.write('<img src="' + globaladd + 'inter_big_logo_rotr.gif" ' +
//		'alt="IT University of Copenhagen">\n')
//	document.write('</a>\n')
//	document.write('</td>\n')
	document.write('</tr>\n')
//	document.writeln('<tr>')
//	document.writeln('</tr>')
	document.writeln('<tr><td class=footer colspan=2>')
    document.writeln('<table style="margin: 0pt; padding: 0pt; width=100%">')
    document.writeln('<tr><td width="50%">')
	document.writeln('<p>Last modified ' + getmodificationdate() + '.</p>')
    document.writeln('</td><td width="49%"></td><td width="1%">')
	document.writeln('<p><a href="' + globaladd + 'about.html">[About]</a></p>')
	document.writeln('</td></tr></table>')
    document.writeln('</td></tr>')
	document.write('</table>\n')
}

