<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ino="http://namespaces.softwareag.com/tamino/response2" xmlns:xql="http://metalab.unc.edu/xql/" xmlns:exslt="http://exslt.org/common" exclude-result-prefixes="ino xql exslt">

	<!--
		(C) 2011, 2012, 2013 Technische Fakultät, Institut für Informatik
			 Created by Dr. Christoph Hermann <info@drhermann.de> http://drhermann.de
	-->

	<!-- Version of the stylesheet -->
	<xsl:variable name="version_information">
		<xsl:text>forschdb_utf8_chermann.xsl version $Id: forschdb_utf8_chermann.xsl 130 2014-07-08 21:02:33Z hermann $</xsl:text>
	</xsl:variable>
	
	<!-- Debug parameter, if enabled a html and body element is outputted, can be either 'true' or 'false', defaults to 'false' -->
	<xsl:param name="debug_xsl" select="'false'" />

	<!-- General Remarks:
		- Employees without a "Funktion" element won't be selected in the grouped views, Employees with an empty "Funktion" element will be listed as "Other"
		- Javascript click-filtering for divisions is not provided
		- Phone numbers should be provided in the form "1234" without! any other prefixes, spaces, characters, ... do NOT fill in the full number as in "+ 49 (0) 761 203 / 1234" or "2031234" 
	-->
	
	<!--
	
		Contributors:
		
		CH Dr. Christoph Hermann <info@drhermann.de> (original author)
		WP Wolfgang Paulat <paulat@informatik.uni-freiburg.de>
	
		Changes:
		
		2014-05-04 NEW CH Added PDF link for publications in case they are available. Displays a small pdf or file icon in front. Parameter enable_pdfurl_display controls displaying this link, set it to false to remove the link (default true).
		2012-09-11 BUG CH Fixed problem with image-floating, that margin was not appropriate when floating right or left
		2012-09-11 NEW CH Added parameter link_project_leader, default false, allowing the project leader name to be linked to the project url (true) or not (false)
		2012-09-11 BUG CH Fixed problem with image anchors not working because of the space contained in the anchor names, see Ticket https://otrs.tf.uni-freiburg.de/otrs/index.pl?Action=AgentTicketZoom;TicketID=31733 and Example page at https://p3test3.uni-freiburg.de/institut/mitarbeiter/Mitarbeiter gruppiert (disable javascript)
		2012-09-11 NEW CH Added new parameters: display_column_name, display_column_phone, display_column_fax, display_column_chair, display_column_function, display_column_email, display_column_room to disable/enable outputting certain columns with = 'false' default is 'true' for all of them
		2012-09-25 NEW CH Added language selection for URL in employee_item_url (new feature of the FDB, does not honor the @Sprache attribute, instead uses URL[1], URL[2], ... wtf O_o)
		2012-09-25 CHG CH Changed display_phone_fax_prefix_number: removed (0), /, XXX added ...
		2012-09-25 NEW CH Added parameter division_name and division_fax in division_id_to_name and division_id_to_fax, in case division-id is not known. Also added division 1075: „Reinraum Service Center“ / „Clean Room Service Center“
		2012-09-26 NEW CH Added parameter link_project_contactperson, default false, allowing the project contact person name to be linked to the project url (true) or not (false)
		2012-09-26 CHG CH Projects now list Project e-mail, telephone, etc. under the contact_person instead of the project leader
		2012-09-26 NEW CH Added parameter indent_project_details for indenting/no indenting project details
		2012-09-26 NEW CH Added parameter display_project_enable_financing_type to enable/disable displaying the type of financee, default false to not display it
		2012-10-22 CHG CH function is now displayed for "alphabetical_chair" listing
		2012-10-22 BUG CH function is now displayed in the translated language in alphabetical listings
		2013-07-30 NEW WP Added chair names and fax numbers for cs institute
		2013-08-02 NEW CH Added stylesheet for inventions
		2013-08-02 BUG CH Fixed displaying cooperation partners in project details with white-space:pre-line
		2013-08-02 NEW CH Added stylesheet for thesis, with filtering and abstract (hide/show)
		2013-08-05 NEW CH Added Type grouping for thesis list
		2013-08-27 BUG CH If image url starts with http, then its a full URL, don't concat it with the imageurl-prefix
		2013-08-29 NEW CH Added possibilty to switch between a grouped list and a normal list for thesis with the parameter thesis_listing ('thesis_grouped', 'thesis_list') and added the possiblity to turn off the year headings with parameter disable_year_header ('true', 'false')
		2013-08-29 NEW CH Added function visiting professors for employees listing (grouped type)
	-->
	
	<!-- Output-Encoding: UTF-8 oder ISO-8859-1 (depends on the encoding of the stylesheet!) -->
	<!-- If you need a doctype, uncomment this -->
	<!--<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />-->
	<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" />

	<!-- language: "D" (german) oder "E" (english); Default is english -->
	<xsl:param name="language" select="'E'"/>
	
	<!-- Enables Javascript enhancements, can be one of 'true' or 'false', defaults to 'true' -->
	<xsl:param name="enable_javascript" select="'true'" />
	
	<!-- defaults to 'false' -->
	<!--<xsl:param name="enable_type_headings" select="'true'" />-->
	<xsl:param name="enable_type_headings" select="'false'" />

	<!-- Display the phone/fax prefix before the list of employees -->	
	<xsl:param name="display_phone_fax_prefix" select="'true'" />
	
	<!-- Display the corresponding columns in alphabetical view (true) or not (false), defaults to 'true' for all of them -->
	<xsl:param name="display_column_name" select="'true'" />
	<xsl:param name="display_column_phone" select="'true'" />
	<xsl:param name="display_column_fax" select="'true'" />
	<xsl:param name="display_column_chair" select="'true'" />
	<xsl:param name="display_column_function" select="'true'" />
	<xsl:param name="display_column_email" select="'true'" />
	<xsl:param name="display_column_room" select="'true'" />
	
	<!-- Display the financing type before the financee? (true: yes, false: no) -->
	<xsl:param name="display_project_enable_financing_type" select="'false'" />
	
	<!-- One of 'publications_grouped_type', 'publications_list_alltypes', 'publications_grouped_keywords' -->
	<!--<xsl:param name="publications_listing" select="'publications_list_alltypes'" />-->
	<xsl:param name="publications_listing" select="'publications_grouped_type'" />
	<!--<xsl:param name="publications_listing" select="'publications_grouped_keywords'" />-->
	
	<!-- Link the publication title to the file: true, if not: false -->
	<xsl:param name="enable_publications_link_title" select="'true'" />
	
	<!-- Display a link to download the PDF in case it is available: true, false (link won't be displayed) -->
	<xsl:param name="enable_pdfurl_display" select="'true'" />
	
	<!-- One of 'thesis_grouped', 'thesis_list' -->
	<xsl:param name="thesis_listing" select="'thesis_grouped'" />
	
	<!-- Disables the year header in the thesis listing -->
	<!-- 'false' or 'true' -->
	<xsl:param name="disable_year_header" select="'false'" />

	<!-- Enables a toc for all functions, enable for grouped_function, see below -->
	<xsl:param name="enable_toc" select="'true'" />
	
	<!-- Display a "back to the top" link below headings -->
	<xsl:param name="enable_totop_backlink" select="'false'" />
	
	<!-- Can be one of "alphabetical (for institutes),alphabetical_chair (for chairs), grouped_function, grouped_chair_function" -->
	<!--<xsl:param name="employees_listing" select="'alphabetical'" />-->
	<!--<xsl:param name="employees_listing" select="'alphabetical_chair'" />-->
	<xsl:param name="employees_listing" select="'grouped_function'" />
	<!--<xsl:param name="employees_listing" select="'grouped_chair_function'" />-->
	
	<!--<xsl:param name="employees_image" select="'false'" />-->
	<xsl:param name="employees_image" select="'true'" />
	
	<!-- Display consultation hours in the employee list when image is enabled? true/false -->
	<xsl:param name="consultation_hours" select="'true'" />
	<!--<xsl:param name="consultation_hours" select="'false'" />-->
	
	<!-- one of 'right' or 'left' makes the image appear on the left or on the right in the listings, defaults to left -->
	<!-- <xsl:param name="image_float" select="'right'" /> -->
	<xsl:param name="image_float" select="'left'" />

	<!-- Image width in px, defaults to '150' -->
	<xsl:param name="image_width_project" select="150" />
	<!-- Image width in px, defaults to '75' -->
	<xsl:param name="image_width_employee" select="75" />
	
	<!-- Link the name of the project leader with the project url (true) or not (false) -->
	<xsl:param name="link_project_leader" select="'false'" />
	<!-- Link the name of the project contact person with the project url (true) or not (false) -->
	<xsl:param name="link_project_contactperson" select="'false'" />
	<!-- indent project details or not? Default no: false -->
	<xsl:param name="indent_project_details" select="'false'" />
	
	
	<!-- Parameter to specify the division name, if not in the list of known divisions -->
	<xsl:param name="division_name" select="''" />
	<!-- Parameter to specify the division fax, if not in the list of known divisions -->
	<xsl:param name="division_fax" select="''" />
	
	<!-- Url for images -->
	<xsl:param name="image_url" select="/Forschungsbericht/ImageUrl[1]" />

	<!-- Keys -->
	<xsl:key name="division_ids" match="/Forschungsbericht/Mitarbeiter" use="@AbteilungsID"/>

	<!-- global variables -->
	<!-- for use in the translate() function -->
	<xsl:variable name="lowerabc" select="'abcdefghijklmnopqrstuvwxyz'" />
	<xsl:variable name="upperabc" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

	
	<!-- store functions in the order to display as well as a translated heading -->
	<xsl:variable name="functions_list">
		<root>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_director" /></employee_header>
				<employee_function>Leitung (m/w)</employee_function>
				<employee_position>1</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_secretary" /></employee_header>
				<employee_function>Sekretariat (m/w)</employee_function>
				<employee_position>3</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_administration" /></employee_header>
				<employee_function>Administration / Verwaltung (m/w)</employee_function>
				<employee_position>17</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_marketing" /></employee_header>
				<employee_function>Marketing/PR (m/w)</employee_function>
				<employee_position>16</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_senior_scientist" /></employee_header>
				<employee_function>Leitender wissenschaftlicher Mitarbeiter (m/w)</employee_function>
				<employee_position>2</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_group_leader" /></employee_header>
				<employee_function>Assistent / Gruppenleiter (m/w)</employee_function>
				<employee_position>4</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_postdoc" /></employee_header>
				<employee_function>Postdoc (m/w)</employee_function>
				<employee_position>5</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_scientific_staff" /></employee_header>
				<employee_function>Wissenschaftlicher Mitarbeiter (m/w)</employee_function>
				<employee_position>6</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_visiting_professor"/></employee_header>
				<employee_function>Gastprofessor (m/w)</employee_function>
				<employee_position>22</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_visiting_researcher" /></employee_header>
				<employee_function>Gastwissenschaftler (m/w)</employee_function>
				<employee_position>15</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_technical_staff" /></employee_header>
				<employee_function>Technischer Mitarbeiter (m/w)</employee_function>
				<employee_position>9</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_phd_student" /></employee_header>
				<employee_function>Doktorand (m/w)</employee_function>
				<employee_position>7</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_external_phd_student" /></employee_header>
				<employee_function>Externer Doktorand (m/w)</employee_function>
				<employee_position>8</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_master_student" /></employee_header>
				<employee_function>Master-Student (m/w)</employee_function>
				<employee_position>12</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_bachelor_student" /></employee_header>
				<employee_function>Bachelor-Student (m/w)</employee_function>
				<employee_position>11</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_student_assistant" /></employee_header>
				<employee_function>HiWi (m/w)</employee_function>
				<employee_position>10</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_other_student" /></employee_header>
				<employee_function>Sonstiger Student (m/w)</employee_function>
				<employee_position>13</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_service" /></employee_header>
				<employee_function>Service (m/w)</employee_function>
				<employee_position>18</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_it" /></employee_header>
				<employee_function>EDV (m/w)</employee_function>
				<employee_position>19</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_intern" /></employee_header>
				<employee_function>Azubi / Praktikant (m/w)</employee_function>
				<employee_position>20</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_past_staff_members" /></employee_header>
				<employee_function>Ehemalige Mitarbeiter (m/w)</employee_function>
				<employee_position>14</employee_position>
			</item>
			<item>
				<employee_header><xsl:call-template name="i18n_employee_function_other" /></employee_header>
				<employee_function></employee_function>
				<employee_position></employee_position>
			</item>
		</root>
	</xsl:variable>





	
	<!-- template calls, overrides default template -->
	<xsl:template match="/">
		<!-- Start debug output -->
		<xsl:choose>
			<!-- Output complete HTML page, if debug_xsl = 'true' -->
			<xsl:when test="$debug_xsl='true'">
				<html xml:lang="de" lang="de">
					<head>
						<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
						<meta name="generator" content="Plone - http://plone.org" />
						<!-- Internet Explorer fix, forces IE8 into newest possible rendering
						engine even if it's on an intranet. This has to be defined before any
						script/style tags. -->
						<meta http-equiv="X-UA-Compatible" content="IE=edge" />
						
						<script type="text/javascript" src="resources/jquery-1.4.4.min-cachekey5662.js">
						</script>
						<script type="text/javascript" src="resources/cssQuery-cachekey8484.js">
						</script>
						<script type="text/javascript" src="resources/fckeditor-cachekey0101.js">
						</script>
						<script type="text/javascript" src="resources/unitheme-cachekey3059.js">
						</script>
						<script type="text/javascript" src="resources/uniThemeTFCustom-cachekey6090.js">
						</script>
					
						<style type="text/css">
							<xsl:text disable-output-escaping="yes">
							<![CDATA[@import url(resources/base-cachekey1236.css);]]>
						</xsl:text>
						</style>
					
						<style type="text/css">
							<xsl:text disable-output-escaping="yes">
							<![CDATA[@import url(resources/flyoutnav-cachekey4249.css);]]>
						</xsl:text>
						</style>
					
						<style type="text/css" media="all">
							<xsl:text disable-output-escaping="yes">
							<![CDATA[@import url(resources/ploneCustom-cachekey8196.css);]]>
						</xsl:text>
						</style>
						<link rel="kinetic-stylesheet" type="text/css" href="http://www.tf.uni-freiburg.de/portal_kss/UniFreiburg/at-cachekey1133.kss" />
						<link rel="kss-base-url" href="http://www.tf.uni-freiburg.de/kollektion_test" />
						<title>Testausgabe des XSL-Transformation</title>
						<xsl:text disable-output-escaping="yes">
							<![CDATA[
					<!-- Internet Explorer Fixes -->
					<!--[if IE]>
					<style type="text/css" media="all">@import url(http://www.tf.uni-freiburg.de/IEFixes.css);</style>
					<style type="text/css" media="all">@import url(http://www.tf.uni-freiburg.de/IE.css);</style>
					
					<script type="text/javascript"
						src="http://www.tf.uni-freiburg.de/iefixes.js">
					</script>
					
					
				    <![endif]-->
					<!--[if IE 6]><link rel="stylesheet" type="text/css" href="IE6.css" media="all" /><![endif]-->
					<!--[if IE 7]><link rel="stylesheet" type="text/css" href="IE7.css" media="all" /><![endif]-->
					]]>
					</xsl:text>
						<link rel="author" href="http://www.tf.uni-freiburg.de/author/cmsadmin" title="Autoreninformation" />
						<link rel="shortcut icon" type="image/x-icon" href="http://www.tf.uni-freiburg.de/favicon.ico" />
						<link rel="home" href="http://www.tf.uni-freiburg.de/" title="Startseite" />
						<link rel="contents" href="http://www.tf.uni-freiburg.de/sitemap" title="Uebersicht" />
						<link rel="alternate" href="http://www.tf.uni-freiburg.de/kollektion_test/RSS" title="RSS 1.0" type="application/rss+xml" />
						<link rel="search" href="http://www.tf.uni-freiburg.de/search_form" title="Search this site" />
						<!-- Disable IE6 image toolbar -->
						<meta http-equiv="imagetoolbar" content="no" />
						<link rel="icon" href="http://www.tf.uni-freiburg.de/kollektion_test/favicon.ico" type="image/x-icon" />
					</head>
					<body class="section-kollektion_test template-folder_summary_view" dir="ltr">
						<a id="top" name="top"></a> <!-- start wrapper -->
						<div id="wrapper"><!-- start wrapperTable -->
							<table id="wrapperTable">
								<tbody>
									<tr><!-- start leftwrapperTable -->
										<td id="leftwrapperTable"><!-- start leftcolumnWrapper -->
											<div id="leftcolumnWrapper">
												<div id="leftTopSpace">&#160;</div>
												<div id="leftGreyBar">&#160;</div>
												<div id="leftUpperSpace"></div>
												<div id="navWrapper">
													<div id="portal-searchbox">
														<form style="white-space: nowrap;" id="livesearch0" name="livesearch0" action="http://www.tf.uni-freiburg.de/search">
															<label for="searchGadget" class="hiddenStructure">Website durchsuchen</label>
															<div class="LSBox">
																<input value="Website durchsuchen" name="SearchableText" size="18" title="Website durchsuchen" accesskey="4" class="inputLabelActive" id="searchGadget" type="text" />
																<input class="searchButton" value="" type="submit" />
																<div class="searchSection">
																	<input id="searchbox_currentfolder_only" class="noborder" name="path" value="/tf" type="checkbox" />
																	<label for="searchbox_currentfolder_only" style="cursor: pointer">nur im aktuellen Bereich</label>
																</div>
																<div class="LSResult" id="LSResult" style="">
																	<div class="LSShadow" id="LSShadow"></div>
																</div>
															</div>
														</form>
														<div id="portal-advanced-search" class="hiddenStructure">
															<a href="http://www.tf.uni-freiburg.de/search_form" accesskey="5">Erweiterte Suche</a>
														</div>
													</div>
													<div class="clear"></div>
													<div id="home">
														<a href="http://www.tf.uni-freiburg.de/" id="startseite" class="navTreeCurrentItem" name="startseite">
															<span>Startseite</span>
														</a>
													</div>
													<div class="clear"></div>
													<div id="flyoutNav"><!-- start flyoutNav -->
														<ul id="topLevel">
															<li>
																<a href="#" id="schnellzugriff" name="schnellzugriff">
																	<span>Schnellzugriff</span> <!--[if gte IE 7]><!-->
																</a>
															</li>
														</ul>
													<!-- end flyoutNav -->
													</div>
													<div class="clear"></div>
													<div class="clear"></div>
												</div>
												<!-- end navWrapper -->
												<div class="clear"></div>
												<div id="portletwrapper-706c6f6e652e6c656674636f6c756d6e0a636f6e746578740a2f74660a6e617669676174696f6e" class="portletWrapper kssattr-portlethash-706c6f6e652e6c656674636f6c756d6e0a636f6e746578740a2f74660a6e617669676174696f6e">
													<dl class="portletNavigationTree">
														<dd>
															<ul class="navTree navTreeLevel0">
																<li class="navTreeItem visualNoMarker navTreeFolderish">
																	<div>
																		<a href="http://www.tf.uni-freiburg.de/fakultaet" class="state-published navTreeFolderish" title="">
																			<span>Die Fakultät</span>
																		</a>
																	</div>
																</li>
																<li class="navTreeItem visualNoMarker navTreeFolderish">
																	<div>
																		<a href="http://www.tf.uni-freiburg.de/studium" class="state-published navTreeFolderish" title="">
																			<span>Studium</span>
																		</a>
																	</div>
																</li>
																<li class="navTreeItem visualNoMarker navTreeFolderish">
																	<div>
																		<a href="http://www.tf.uni-freiburg.de/forschung" class="state-published navTreeFolderish" title="">
																			<span>Forschung</span>
																		</a>
																	</div>
																</li>
																<li class="navTreeItem visualNoMarker navTreeFolderish navTreeLastItem">
																	<div>
																		<a href="http://www.tf.uni-freiburg.de/kontakt" class="state-published navTreeFolderish" title="">
																			<span>Kontakt</span>
																		</a>
																	</div>
																</li>
															</ul>
														</dd>
													</dl>
												</div>
											</div>
											<!-- end leftcolumnWrapper -->
										</td>
										<!-- start logowrapperTable -->
										<td id="logowrapperTable">
											<div id="logocolumnWrapper"><!-- start logo -->
												<div id="logoWrapper">
													<a target="_blank" href="http://www.uni-freiburg.de/" title="Albert-Ludwigs-Universität Freiburg">
														<img src="resources/unilogo-200x66.gif" alt="Uni-Logo" />
													</a>
												</div>
												<!-- end logo -->
											</div>
										</td>
										<!-- end logowrapperTable -->
										<!-- start rightwrapperTable -->
										<td id="rightwrapperTable"><!-- start rightcolumnWrapper -->
											<div id="rightcolumnWrapper"><!-- start portaltop -->
												<div id="portal-header">
													<div id="logo-resource" class="fr">
														<a accesskey="1" href="http://www.tf.uni-freiburg.de/" title="Testausgabe XSLT">
															<img src="resources/sub-logo.gif" alt="Sublogo" />
														</a>
													</div>
													<!-- availables ist neu definiert -->
													<ul id="portal-languageselector">
														<li class="">
															<a href="http://www.tf.uni-freiburg.de/kollektion_test-en?set_language=en" title="English">English</a>
														</li>
														<li class="currentlanguage">
															<a href="http://www.tf.uni-freiburg.de/kollektion_test?set_language=de" title="Deutsch">Deutsch</a>
														</li>
													</ul>
													<h5 class="hiddenStructure">Sektionen</h5>
													<ul id="portal-globalnav">
														<li class="plain">
															<a href="http://www.tf.uni-freiburg.de/quicklinks-de/studieninteressierte" title="">Studieninteressierte</a>
														</li>
														<li class="plain">
															<a href="http://www.tf.uni-freiburg.de/quicklinks-de/studierende" title="">Studierende</a>
														</li>
														<li class="plain">
															<a href="http://www.tf.uni-freiburg.de/quicklinks-de/presse" title="">Presse</a>
														</li>
														<li class="plain">
															<a href="http://www.tf.uni-freiburg.de/quicklinks-de/wirtschaft" title="">Wirtschaft</a>
														</li>
													</ul>
													<div id="title-resource">
														<table border="0" cellpadding="0" cellspacing="0">
															<tbody>
																<tr>
																	<td valign="bottom">
																		<a accesskey="1" href="http://www.tf.uni-freiburg.de/" class="resource" title="Testausgabe XSLT">Testausgabe XSLT</a>
																	</td>
																</tr>
															</tbody>
														</table>
													</div>
													<div id="title-uni">
														<a target="_blank" href="http://www.uni-freiburg.de/" title="Albert-Ludwigs-Universität Freiburg">Albert-Ludwigs-Universität Freiburg</a>
													</div>
												</div>
												<div id="red-bar"></div>
												<div id="sections-breadcrumbs-documentActions">
													<div id="sections-breadcrumbs">
														<h5 class="hiddenStructure">Sektionen</h5>
														<ul class="navTree sections">
															<li id="portaltab-studieninteressierte" class="plain">
																<div>
																	<a href="http://www.tf.uni-freiburg.de/quicklinks-de/studieninteressierte" title="">Studieninteressierte</a>
																	<span class="sectionSeparator">|</span>
																</div>
															</li>
															<li id="portaltab-studierende" class="plain">
																<div>
																	<a href="http://www.tf.uni-freiburg.de/quicklinks-de/studierende" title="">Studierende</a>
																	<span class="sectionSeparator">|</span>
																</div>
															</li>
															<li id="portaltab-presse" class="plain">
																<div>
																	<a href="http://www.tf.uni-freiburg.de/quicklinks-de/presse" title="">Presse</a>
																	<span class="sectionSeparator">|</span>
																</div>
															</li>
															<li id="portaltab-wirtschaft" class="plain">
																<div>
																	<a href="http://www.tf.uni-freiburg.de/quicklinks-de/wirtschaft" title="">Wirtschaft</a>
																</div>
															</li>
														</ul>
														<div id="portal-breadcrumbs">
															<span id="breadcrumbs-you-are-here">Sie sind hier:</span>
															<a href="http://www.tf.uni-freiburg.de/">Startseite</a>
														</div>
													</div>
													<div class="documentActions">
														<h5 class="hiddenStructure">Artikelaktionen</h5>
														<ul>
															<li id="document-action-rss">
																<a href="http://www.tf.uni-freiburg.de/kollektion_test/RSS" title="">
																	<span>RSS-Feed</span>
																</a>
															</li>
															<li id="document-action-sendto">
																<a href="http://www.tf.uni-freiburg.de/kollektion_test/sendto_form" title="">
																	<span>Versenden</span>
																</a>
															</li>
															<li id="document-action-print">
																<a href="javascript:this.print();" title="">
																	<span>Drucken</span>
																</a>
															</li>
														</ul>
													</div>
												</div>
												<div class="clear"></div>
												<!-- end portaltop -->
												<!-- start abovecontent -->
												<div id="viewlet-above-content"></div>
												<!-- end abovecontent -->
												<!-- start contentWrapper -->
												<div id="contentWrapper">
													<table id="portal-columns">
														<tbody>
															<tr>
																<td id="portal-column-content"><!-- start slot content -->
																	<div class=""><!-- start region-content -->
																		<div id="region-content" class="documentContent"><!-- start portal_message -->
																			<dl class="portalMessage info" id="kssPortalMessage" style="display:none">
																				<dt>Info</dt>
																			</dl>
																			<!-- end portal_message -->
																			<div class="clear"></div>
																			<!-- start content -->
																			<div id="content">
											    
																			  <!-- CONTENT HERE -->
																			  
																			  	<!-- call main templates -->
																				<xsl:call-template name="main" />
											
																			</div>
																			<!-- end content -->
																			<span id="contentBottomLeft"></span>
																			<span id="contentBottomRight"></span>
																		</div>
																		<!-- end region-content -->
																	</div>
																	<!-- end slot content -->
																	<div class="clear"></div>
																</td>
															</tr>
														</tbody>
													</table>
												</div>
												<div class="clear"></div>
												<!-- end contentWrapper -->
												<!-- belowcontent: auskommentiert vom CMS-Team, 23.02.2010 -->
												<!--
												<div tal:replace="structure provider:plone.belowcontent" />
												-->
												<!-- belowcontent -->
											</div>
											<!-- end rightcolumnWrapper -->
											<div class="clear"></div>
										</td>
										<!-- end rightwrapperTable -->
									</tr>
									<tr>
										<td></td>
										<td></td>
										<td id="rightwrapperTableFooter"><!-- start portalfooter -->
											<div id="portal-footer">
												<h6 class="cover">Start Footer</h6>
												<div id="footer">
													<ul id="portal-siteactions">
														<li id="siteaction-sitemap">
															<a href="http://www.tf.uni-freiburg.de/sitemap" accesskey="3" title="Uebersicht">Uebersicht</a>
														</li>
														<li id="siteaction-contact">
															<a href="http://www.tf.uni-freiburg.de/contact-info" accesskey="9" title="Webmaster">Webmaster</a>
														</li>
														<li id="siteaction-impressum">
															<a href="http://www.tf.uni-freiburg.de/impressum" accesskey="" title="Impressum">Impressum</a>
														</li>
													</ul>
													<div id="userSupport">
														<a title="Small Text" href="javascript:setBaseFontSize('smallText',1);" class="fontSmall">A</a>
														<a title="Normal Text" href="javascript:setBaseFontSize('',1);" class="fontNormal">A</a>
														<a title="Large Text" href="javascript:setBaseFontSize('largeText',1);" class="fontBig">A</a>
													</div>
													<div class="copyright">
														Copyright 2011 <span>Universität Freiburg</span>
													</div>
													<div class="clear"></div>
												</div>
											</div>
											<div id="portal-personaltools-wrapper">
												<h5 class="hiddenStructure">Benutzerspezifische Werkzeuge</h5>
												<ul id="portal-personaltools" class="visualInline">
													<li>
														<a href="http://www.tf.uni-freiburg.de/login_form">Anmelden</a>
													</li>
												</ul>
											</div>
											<!-- end portalfooter -->
										</td>
									</tr>
								</tbody>
							</table>
							<div class="clear"></div>
						</div>
						<!-- end wrapper -->
					</body>
				</html>
			</xsl:when>
			<xsl:otherwise>
				<!-- call main templates, just output main content -->
				<xsl:call-template name="main" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
	<xsl:template name="main">
		<!-- make sure the output is always valid xml to prevent having a forest instead of a tree: create root element -->
		<div>
			<!-- Do not remove these! -->
			<!-- Output Copyright notice and script version information -->
			<xsl:call-template name="copyright_notice" />
			<xsl:call-template name="version_information" />
			
			<!-- include css, even if this is broken html, this might be moved to an external css file -->
			<xsl:call-template name="css_main" />

			<xsl:choose>
				<xsl:when test="$publications_listing = 'publications_grouped_type'">
					<xsl:call-template name="publications_grouped_type" />
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="publications_list_alltypes" />
				</xsl:otherwise>
			</xsl:choose>
			
			<!-- projects template: display projects if available -->
			<xsl:call-template name="projects" />
			
			<!-- employees template: display employees list -->
			<xsl:if test="count(/Forschungsbericht/Mitarbeiter) > 0">
				<!-- Can be one of "alphabetical, grouped_function, grouped_chair_function" -->
				<xsl:choose>
					<!-- alphabetical sorting -->
					<xsl:when test="$employees_listing = 'alphabetical'">
						<xsl:call-template name="employees_list_alphabetic" />
					</xsl:when>
					<!-- alphabetical for chairs -->
					<xsl:when test="$employees_listing = 'alphabetical_chair'">
						<xsl:call-template name="employees_list_alphabetic" />
					</xsl:when>
					<!-- display employees grouped by function -->
					<xsl:when test="$employees_listing = 'grouped_function'">
						<xsl:call-template name="employees_list_grouped_function" />
					</xsl:when>
					<!-- display employees grouped by chair and then by function -->
					<xsl:when test="$employees_listing = 'grouped_chair_function'">
						<xsl:call-template name="employees_list_grouped_chair_function" />
					</xsl:when>
					<xsl:otherwise>
						<!-- default is the alphabetic list -->
						<xsl:call-template name="employees_list_alphabetic" />
					</xsl:otherwise>
				</xsl:choose>
			</xsl:if>
			
			<!-- patents, inventions -->
			<xsl:if test="count(/Forschungsbericht/Erfindung) > 0">
				<xsl:call-template name="inventions_list_year" />
			</xsl:if>
			
			<!-- phd, diploma, master thesis, etc. -->
			<xsl:if test="count(/Forschungsbericht/Arbeit) > 0">
				<xsl:choose>
					<xsl:when test="$thesis_listing = 'thesis_list'">
						<xsl:call-template name="thesis_by_year_list" />
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="thesis_list_grouped_by_year" />
					</xsl:otherwise>
				</xsl:choose>
			</xsl:if>
		</div>
	</xsl:template>
	
	<!-- display thesis list, ordered by year TODO -->
	<xsl:template name="thesis_by_year_list">
		<!-- backlink to the top of the page -->
		<a id="thesis_top" name="thesis_top">
			<xsl:text> </xsl:text>
		</a>
		
		<!-- Output javascript if available -->
		<xsl:if test="$enable_javascript = 'true'">
			<xsl:call-template name="js_filter_text" />
			
			<xsl:call-template name="js_filter_index_key" />
			
			<xsl:call-template name="js_toggle" />
		</xsl:if>
		
		<!-- Type Header: Display a Header in case the full 'Forschungsbericht' is displayed -->
		<xsl:if test="$enable_type_headings = 'true'">
			<h2>
				<xsl:call-template name="i18n_thesis" />
			</h2>
		</xsl:if>
		
		<xsl:call-template name="thesis_list_type">
			<xsl:with-param name="list_type">
				<xsl:value-of select="'all'" />
			</xsl:with-param>
			<xsl:with-param name="thesis_list_items">
				<items>
					<xsl:for-each select="Forschungsbericht/Arbeit">
						<xsl:sort select="Datum/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Titel" />
						<xsl:sort select="Author" />
						
						<xsl:copy-of select="." />
					</xsl:for-each>
				</items>
			</xsl:with-param>
			<xsl:with-param name="anchor_top">
				<xsl:text>#thesis_top</xsl:text>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- display thesis list, grouped by year -->
	<xsl:template name="thesis_list_grouped_by_year">
		<!-- backlink to the top of the page -->
		<a id="thesis_top" name="thesis_top">
			<xsl:text> </xsl:text>
		</a>
		
		<!-- Output javascript if available -->
		<xsl:if test="$enable_javascript = 'true'">
			<xsl:call-template name="js_filter_text" />
			
			<xsl:call-template name="js_filter_index_key" />
			
			<xsl:call-template name="js_toggle" />
		</xsl:if>
		
		<!-- Type Header: Display a Header in case the full 'Forschungsbericht' is displayed -->
		<xsl:if test="$enable_type_headings = 'true'">
			<h2>
				<xsl:call-template name="i18n_thesis" />
			</h2>
		</xsl:if>
		
		<xsl:variable name="types">
			<types>
				<type>APL-Professur</type>
				<type>Habilitation</type>
				<type>Promotion</type>
				<type>Master</type>
				<type>Bachelor</type>
				<type>Diplomarbeit</type>
				<type>Magisterarbeit</type>
				<type>Staatsexamen</type>
			</types>
		</xsl:variable>
		
		<xsl:variable name="complete_thesis_list">
			<root>
				<xsl:for-each select="Forschungsbericht/Arbeit">
					<xsl:copy-of select="." />
				</xsl:for-each>
			</root>
		</xsl:variable>
		
		<!-- output jumplist for different thesis types -->
		<ul>
			<xsl:for-each select="exslt:node-set($types)/types/type">
				<xsl:variable name="current_type">
					<xsl:value-of select="." />
				</xsl:variable>
				
				<xsl:if test="count(exslt:node-set($complete_thesis_list)/root/Arbeit[@Typ = $current_type]) > 0">
					<li style="width: 250px; margin-right: 6em; float: left;">
						<div style="width: 250px; display: block;">
							<a>
								<xsl:attribute name="href">
									<xsl:text>#thesis_</xsl:text>
									<xsl:value-of select="translate($current_type,$upperabc,$lowerabc)" />
								</xsl:attribute>
								<!-- i18n -->
								<xsl:call-template name="i18n_thesis_type">
									<xsl:with-param name="type">
										<xsl:value-of select="$current_type" />
									</xsl:with-param>
								</xsl:call-template>
							</a>
							<xsl:text> </xsl:text>
						</div>
					</li>
				</xsl:if>
			</xsl:for-each>
		</ul>
		<br clear="all" />
		
		<!-- iterate over different types and output list -->
		<xsl:for-each select="exslt:node-set($types)/types/type">
			<xsl:variable name="current_type">
				<xsl:value-of select="." />
			</xsl:variable>
		
			<xsl:call-template name="thesis_list_type">
				<xsl:with-param name="list_type">
					<xsl:value-of select="$current_type" />
				</xsl:with-param>
				<xsl:with-param name="thesis_list_items">
					<items>
						<xsl:for-each select="exslt:node-set($complete_thesis_list)/root/Arbeit[@Typ = $current_type]">
							<xsl:sort select="Datum/Jahr" data-type="number" order="descending" />
							<xsl:sort select="Titel" />
							<xsl:sort select="Author" />
							
							<xsl:copy-of select="." />
						</xsl:for-each>
					</items>
				</xsl:with-param>
				<xsl:with-param name="anchor_top">
					<xsl:text>#thesis_top</xsl:text>
				</xsl:with-param>
			</xsl:call-template>
		</xsl:for-each>
		
	</xsl:template>
	
	<xsl:template name="thesis_list_type">
		<xsl:param name="list_type" />
		<xsl:param name="thesis_list_items" />
		<xsl:param name="anchor_top" />
		
		<xsl:if test="count(exslt:node-set($thesis_list_items)/items/Arbeit) > 0">
		
			<xsl:if test="$list_type != ''">
				<!-- Type Header: Display a Header -->
				<a>
					<xsl:attribute name="name">
						<xsl:text>thesis_</xsl:text>
						<xsl:value-of select="translate($list_type,$upperabc,$lowerabc)" />
					</xsl:attribute>
				</a>
				<h3>
					<!-- i18n -->
					<xsl:call-template name="i18n_thesis_type">
						<xsl:with-param name="type">
							<xsl:value-of select="$list_type" />
						</xsl:with-param>
					</xsl:call-template>
				</h3>
				
				<!-- backlink -->
				<xsl:if test="$enable_totop_backlink = 'true'">
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="$anchor_top" />
						</xsl:attribute>
						<xsl:call-template name="icon_top" />
						<xsl:call-template name="i18n_totop" />
					</a>
					<br clear="all" />
				</xsl:if>
			</xsl:if>
			
			<xsl:if test="$disable_year_header != 'true'">
				<xsl:call-template name="list_of_thesis_years">
					<xsl:with-param name="items">
						<xsl:copy-of select="exslt:node-set($thesis_list_items)" />
					</xsl:with-param>
					<xsl:with-param name="type">
						<xsl:text>thesis_</xsl:text>
						<xsl:value-of select="translate($list_type,$upperabc,$lowerabc)" />
						<xsl:text>_</xsl:text>
					</xsl:with-param>
					<xsl:with-param name="anchor_prefix">
						<xsl:text>thesis_</xsl:text>
						<xsl:value-of select="translate($list_type,$upperabc,$lowerabc)" />
						<xsl:text>_</xsl:text>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:if>
			
			<!-- start list output -->
			<ul class="thesis_list indexKeyContents">
			
				<xsl:for-each select="exslt:node-set($thesis_list_items)/items/Arbeit">
					<xsl:if test="not(Datum/Jahr = preceding-sibling::*[1]/Datum/Jahr) and $disable_year_header != 'true'">
						<!-- Ugly hack -->
						<!-- if previous year is different, close list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[</ul>]]></xsl:text>
						<!-- display year header -->
						<xsl:call-template name="list_heading_year">
							<xsl:with-param name="type">
								<xsl:value-of select="concat('thesis_',translate($list_type,$upperabc,$lowerabc), '_')" />
							</xsl:with-param>
							<xsl:with-param name="year">
								<xsl:value-of select="Datum/Jahr" />
							</xsl:with-param>
							<xsl:with-param name="anchor_top">
								<xsl:text>#thesis_</xsl:text>
								<xsl:value-of select="translate($list_type,$upperabc,$lowerabc)" />
							</xsl:with-param>
						</xsl:call-template>
						<!-- start new list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[<ul class="thesis_list indexKeyContents">]]></xsl:text>
					</xsl:if>
					
					<xsl:call-template name="thesis_item" />
				</xsl:for-each>
			</ul>
		</xsl:if>
	</xsl:template>
	
	<!-- Output for a single thesis item -->
	<xsl:template name="thesis_item">
		<li class="filterable">
			<p>
				<span class="thesis_title">
					<b><xsl:value-of select="Titel" /></b>
				</span>
				<br />
				<span class="thesis_date">
					<xsl:value-of select="Datum/Jahr" />
				</span>
				<xsl:text>, </xsl:text>
				<span class="thesis_author">
					<i>
						<xsl:value-of select="Autor" />
					</i>
				</span>
				<br />
				<xsl:if test="count(Erstgutachter/text()) > 0">
					<xsl:call-template name="i18n_first_reviewer" />
					<xsl:text>: </xsl:text>
					<xsl:value-of select="Erstgutachter" />
					<xsl:if test="count(ErstgutachterInstitut) > 0">
						<xsl:text>, </xsl:text>
						<xsl:value-of select="ErstgutachterInstitut" />
					</xsl:if>
					<br />
				</xsl:if>
				<xsl:if test="count(Zweitgutachter/text()) > 0">
					<xsl:call-template name="i18n_second_reviewer" />
					<xsl:text>: </xsl:text>
					<xsl:value-of select="Zweitgutachter" />
					<xsl:if test="count(ZweitgutachterInstitut) > 0">
						<xsl:text>, </xsl:text>
						<xsl:value-of select="ZweitgutachterInstitut" />
					</xsl:if>
					<br />
				</xsl:if>
				<xsl:if test="count(Abstract) > 0">
					<div class="abstract">
						<span>
							<span class="mehr expandableButton">
								<span class="toggleElementButtons" style="display:none;">
									<span class="openElement">
										<xsl:call-template name="i18n_open_abstract" />
									</span>
									<span class="closeElement" style="display: none;">
										<xsl:call-template name="i18n_close_abstract" />
									</span>
								</span>
							</span>
						</span>
						<span class="expandable">
							<fieldset>
								<legend>
									<xsl:call-template name="i18n_abstract" />
								</legend>
								<xsl:value-of select="Abstract" />
							</fieldset>
						</span>
					</div>
				</xsl:if>
			</p>
		</li>
	</xsl:template>
	
	<!-- displays patents, inventions, ordered by year -->
	<xsl:template name="inventions_list_year">
		<!-- backlink to the top of the page -->
		<a id="inventions_top" name="inventions_top">
			<xsl:text> </xsl:text>
		</a>
		
		<!-- Output javascript if available -->
		<xsl:if test="$enable_javascript = 'true'">
			<xsl:call-template name="js_filter_text" />
		</xsl:if>
		
		<!-- Type Header: Display a Header in case the full 'Forschungsbericht' is displayed -->
		<xsl:if test="$enable_type_headings = 'true'">
			<h2>
				<xsl:call-template name="i18n_inventions" />
			</h2>
		</xsl:if>
		<!-- start list output -->
		<ul>
			<xsl:for-each select="/Forschungsbericht/Erfindung">
				<xsl:sort select="Datum/Jahr" data-type="number" order="descending" />
				<xsl:sort select="Datum/Monat" data-type="number" order="descending" />
				<xsl:sort select="Datum/Tag" data-type="number" order="descending" />
				
				<xsl:call-template name="inventions_item" />
			</xsl:for-each>
		</ul>
	</xsl:template>
	
	<!-- Single invention item element -->
	<xsl:template name="inventions_item">
		<li class="filterable">
			<b>
				<xsl:value-of select="Titel" />
			</b>
			<br />
			<span class="invention_names">
				<xsl:for-each select="Name">
					<span class="invention_name"><xsl:value-of select="." /></span>
					<xsl:if test="position() != last()">
						<xsl:text>, </xsl:text>
					</xsl:if>
				</xsl:for-each>
			</span>
			<br />
			<xsl:for-each select="Patent">
				<xsl:if test="count(./AnmeldeNr) > 0">
					<span class="invention_details">
						<span class="invention_no">
							<xsl:value-of select="./AnmeldeNr" />
						</span>
						<xsl:text>, </xsl:text>
						<span class="invention_date">
							<xsl:choose>
								<xsl:when test="$language = 'E'">
									<xsl:value-of select="./Datum/Monat"/>
									<xsl:text>/</xsl:text>
									<xsl:value-of select="./Datum/Tag" />
									<xsl:text>/</xsl:text>
									<xsl:value-of select="./Datum/Jahr"/>
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="./Datum/Tag"/>
									<xsl:text>.</xsl:text>
									<xsl:value-of select="./Datum/Monat"/>
									<xsl:text>.</xsl:text>
									<xsl:value-of select="./Datum/Jahr" />
								</xsl:otherwise>
							</xsl:choose>
						</span>
					</span>
				</xsl:if>
			</xsl:for-each>
		</li>
	</xsl:template>
	
	<!-- display employees grouped by function -->
	<xsl:template name="employees_list_grouped_function">
		<!-- backlink to the top of the page -->
		<a id="employees_top" name="employees_top">
			<xsl:text> </xsl:text>
		</a>
		<!-- Type Header: Display a Header in case the full 'Forschungsbericht' is displayed -->
		<xsl:if test="$enable_type_headings = 'true'">
			<h2>
				<xsl:call-template name="i18n_employees" />
			</h2>
		</xsl:if>
		
		<!-- If Javascript is enabled output library code and filter functions --> 
		<xsl:if test="$enable_javascript = 'true'">
			<xsl:call-template name="js_filter_index_key" />
		
			<xsl:call-template name="js_filter_text" />
		</xsl:if>
		
		<!-- save the complete list of employees for later processing -->
		<xsl:variable name="employees_list">
			<xsl:for-each select="/Forschungsbericht/Mitarbeiter">
				<xsl:copy-of select="." />
			</xsl:for-each>
		</xsl:variable>
		
		<!-- call the template to display a grouped list, using the stored variable above -->
		<xsl:call-template name="employees_list_grouped">
			<xsl:with-param name="employees_list">
				<xsl:copy-of select="$employees_list" />
			</xsl:with-param>
			<xsl:with-param name="enable_toc">
				<xsl:value-of select="$enable_toc" />
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- display employees grouped by chair and by function -->
	<xsl:template name="employees_list_grouped_chair_function">
		<!-- Backlink to the top of the page -->
		<a id="employees_top" name="employees_top">
			<xsl:text> </xsl:text>
		</a>
		
		<!-- Type Header: Display a Header in case the full 'Forschungsbericht' is displayed -->
		<xsl:if test="$enable_type_headings = 'true'">
			<h2>
				<xsl:call-template name="i18n_employees" />
			</h2>
		</xsl:if>
		
		<!-- If Javascript is enabled output library code and filter functions -->
		<xsl:if test="$enable_javascript = 'true'">
			<xsl:call-template name="js_filter_index_key" />
		
			<xsl:call-template name="js_filter_text" />
		</xsl:if>
		
		<!-- create a list of employees grouped by their chair -->
		<xsl:variable name="grouped_chair_employees">
			<root>
				<!-- generate a unique list -->
				<xsl:for-each select="/Forschungsbericht/Mitarbeiter[generate-id() = generate-id(key('division_ids',@AbteilungsID)[1])]">
					<xsl:sort select="@AbteilungsID" />
					<xsl:variable name="current_division_id" select="@AbteilungsID" />
					<item>
						<id>
							<xsl:value-of select="@AbteilungsID"/>
						</id>
						<employees>
							<xsl:for-each select="/Forschungsbericht/Mitarbeiter[@AbteilungsID = $current_division_id]">
								<xsl:copy-of select="." />
							</xsl:for-each>
						</employees>
					</item>
				</xsl:for-each>
			</root>
		</xsl:variable>
		
		<!--
		Debug code
		<xsl:copy-of select="$grouped_chair_employees" />
		-->
		
		<!-- Output a jumplist of chairs --> 
		<ul>
			<xsl:for-each select="exslt:node-set($grouped_chair_employees)/root/item">
				<xsl:if test="count(employees/Mitarbeiter) > 0">
					<li style="width: 250px; margin-right: 6em; float: left;">
						<div style="width: 250px; display: block;">
							<a>
								<xsl:attribute name="href">
									<xsl:text>#division_</xsl:text><xsl:value-of select="id" />
								</xsl:attribute>
								<xsl:call-template name="division_id_to_name">
									<xsl:with-param name="division_id">
										<xsl:value-of select="id" />
									</xsl:with-param>
								</xsl:call-template>
							</a>
						</div>
					</li>
				</xsl:if>
			</xsl:for-each>
		</ul>
		
		<!-- clear html to prevent display errors -->
		<div style="margin-bottom:2em; display: block;">
			<br clear="all" />
		</div>
		
		<!-- duplicate code, removed
		<xsl:if test="$enable_javascript">
			<xsl:call-template name="js_filter_index_key" />
		</xsl:if>
		-->
		
		<!-- for every chair, display a list of employees -->
		<xsl:for-each select="exslt:node-set($grouped_chair_employees)/root/item">
			<h1 class="division_header" style="margin-top: 2em;">
				<a>
					<xsl:attribute name="name">
						<xsl:text>division_</xsl:text><xsl:value-of select="id" />
					</xsl:attribute>
					<xsl:attribute name="id">
						<xsl:text>division_</xsl:text><xsl:value-of select="id" />
					</xsl:attribute>
				</a>
				<xsl:call-template name="division_id_to_name">
					<xsl:with-param name="division_id">
						<xsl:value-of select="id" />
					</xsl:with-param>
				</xsl:call-template>
			</h1>
			<div class="division_contents">
				<!-- remember employees for the current chair -->
				<xsl:variable name="employees_list">
					<xsl:for-each select="employees/Mitarbeiter">
						<xsl:copy-of select="." />
					</xsl:for-each>
				</xsl:variable>
				
				<!-- call grouped templates (grouped by function) -->
				<xsl:call-template name="employees_list_grouped">
					<xsl:with-param name="employees_list">
						<xsl:copy-of select="$employees_list" />
					</xsl:with-param>
					<xsl:with-param name="enable_toc">
						<xsl:value-of select="$enable_toc" />
					</xsl:with-param>
				</xsl:call-template>
			</div>
		</xsl:for-each>
	</xsl:template>
	
	<!-- inner template used to display the grouped list of employees grouped by function
		Needs two parameters: 
			employees_list: 	list of employees
			enable_toc:		chooses whether to display a short toc (jump/filtermenu of functions)
	-->
	<xsl:template name="employees_list_grouped">
		<xsl:param name="employees_list" />
		<xsl:param name="enable_toc" />
	
		<!-- display a function toc? -->
		<xsl:if test="$enable_toc = 'true'">
			<ul>
				<xsl:for-each select="exslt:node-set($functions_list)/root/item">
					<!-- remember current function (makes code more readable) -->
					<xsl:variable name="employee_function">
						<xsl:value-of select="employee_function" />
					</xsl:variable>
					<xsl:if test="count(exslt:node-set($employees_list)/Mitarbeiter[Name/Funktion = $employee_function]) > 0">
						<!-- with this css-style the list is output inline in several rows -->
						<li style="width: 300px; float: left;">
							<a>
								<xsl:attribute name="class">
									<xsl:text>indexKey</xsl:text>
								</xsl:attribute>
								<xsl:attribute name="href">
									<xsl:text>#employees_grouped_</xsl:text>
									<xsl:call-template name="urlencode">
										<xsl:with-param name="text">
											<xsl:value-of select="employee_header" />
										</xsl:with-param>
									</xsl:call-template>
								</xsl:attribute>
								<xsl:value-of select="employee_header" />
							</a>
						</li>
					</xsl:if>
				</xsl:for-each>
				
				<!-- output show all link for filter list -->
				<xsl:if test="$enable_javascript = 'true'">
					<xsl:variable name="the_id" select="generate-id()" />
					<li style="display: none; width: 300px; float: left;" class="indexKeyAll">
						<xsl:attribute name="id">
							<xsl:text>js_indexKey_showAll_</xsl:text>
							<xsl:value-of select="$the_id" />
						</xsl:attribute>
						<a href="#" class="showAllindexKey gray">
							<xsl:call-template name="i18n_show_all" />
						</a>
					</li>
					<script type="text/javascript">
						<xsl:text disable-output-escaping="yes">
							<![CDATA[
							jQuery(document).ready(function() {
								var foo = jQuery('#js_indexKey_showAll_]]></xsl:text><xsl:value-of select="$the_id" /><xsl:text disable-output-escaping="yes"><![CDATA[');
								foo.show();
							});
							]]>
						</xsl:text>
					</script>
				</xsl:if>
			</ul>
			
			<!-- clear html -->
			<div style="margin-bottom:2em; display: block;">
				<br clear="all" />
			</div>
		</xsl:if>
		
		<!-- Display phone/fax prefix before the list of employees -->
		<xsl:if test="$display_phone_fax_prefix = 'true'">
			<xsl:call-template name="display_phone_fax_prefix_number" />
		</xsl:if>
		
		<!-- output list of employees with header -->
		<xsl:for-each select="exslt:node-set($functions_list)/root/item">
			<xsl:call-template name="employees_list_group">
				<xsl:with-param name="employee_header">
					<xsl:value-of select="employee_header" />
				</xsl:with-param>
				<xsl:with-param name="employee_function">
					<xsl:value-of select="employee_function" />
				</xsl:with-param>
				<xsl:with-param name="employee_position">
					<xsl:value-of select="employee_position" />
				</xsl:with-param>
				<xsl:with-param name="employees_list">
					<xsl:copy-of select="$employees_list" />
				</xsl:with-param>
			</xsl:call-template>
		</xsl:for-each>
	</xsl:template>
	
	<!-- inner template used to display a list of employees with a header and the list of related employees below -->
	<xsl:template name="employees_list_group">
		<xsl:param name="employee_header" />
		<xsl:param name="employee_function" />
		<xsl:param name="employee_position" />
		<xsl:param name="employees_list" />
		
		<!-- check if data is available to display, else skip processing -->
		<xsl:if test="count(exslt:node-set($employees_list)/Mitarbeiter[Name/Funktion = $employee_function]) > 0">
		
			<!-- output header -->
			<xsl:call-template name="list_heading_function">
				<xsl:with-param name="type">
					<xsl:value-of select="'employees_grouped'" />
				</xsl:with-param>
				<xsl:with-param name="function">
					<xsl:value-of select="$employee_header" />
				</xsl:with-param>
				<xsl:with-param name="anchor_top">
					<xsl:value-of select="'#employees_top'" />
				</xsl:with-param>
			</xsl:call-template>
			
			<!-- output list of employees with classes for javascript filtering -->
			<div class="employees indexKeyContents">
				<!-- Display Column Headers -->
				<xsl:call-template name="employees_list_short_column_headers" />
			
				<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
				<xsl:variable name="sorted_employees">
					<xsl:for-each select="exslt:node-set($employees_list)/Mitarbeiter[Name/Funktion = $employee_function]">
						<xsl:sort select="Name/Nachname" />
						<xsl:copy-of select="." />
					</xsl:for-each>
				</xsl:variable>
				
				<!-- Iterate over the sorted set -->
				<xsl:for-each select="exslt:node-set($sorted_employees)/*">
					<xsl:variable name="firstLetter" select="substring(Name/Nachname,1,1)" />
					<div>
						<xsl:attribute name="class">
							<xsl:text>employee filterable</xsl:text>
							<xsl:text> </xsl:text>
							<xsl:choose>
								<xsl:when test="position() mod 2 = 0">
									<xsl:text>even</xsl:text>
								</xsl:when>
								<xsl:otherwise>
									<xsl:text>odd</xsl:text>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:attribute>
						<xsl:choose>
							<xsl:when test="$employees_image = 'true'">
								<xsl:call-template name="employee_short_image" />
							</xsl:when>
							<xsl:otherwise>
								<xsl:call-template name="employee_short" />
							</xsl:otherwise>
						</xsl:choose>
					</div>
				</xsl:for-each>
			</div>
		</xsl:if>
		
	</xsl:template>
	
	<!-- Display a list of employees sorted alphabetically -->
	<xsl:template name="employees_list_alphabetic">
		<xsl:if test="count(/Forschungsbericht/Mitarbeiter) > 0">
			<!-- Anchor to get back to the top of the publications -->
			<a id="employees_top" name="employees_top">
				<xsl:text> </xsl:text>
			</a>
			<!-- type header -->
			<xsl:if test="$enable_type_headings = 'true'">
				<h2>
					<xsl:call-template name="i18n_employees" />
				</h2>
			</xsl:if>
			
			<!-- Create a list of characters A-Z to jump to the corresponding sections -->
			<xsl:if test="$enable_javascript = 'true'">
				<xsl:call-template name="js_filter_index_key" />
			</xsl:if>
			
			<br />
			
			<!-- display a jumplist from A to Z -->
			<xsl:call-template name="list_of_employees_chars" />
			
			<br /><br />
			
			<!-- Output javascript if available -->
			<xsl:if test="$enable_javascript = 'true'">
				<xsl:call-template name="js_filter_text" />
			</xsl:if>

			<br />
			
			<!-- Output phone/fax prefix -->
			<xsl:if test="$display_phone_fax_prefix = 'true'">
				<xsl:call-template name="display_phone_fax_prefix_number" />
			</xsl:if>
		
			<!-- this first div element will be immediatly closed, but is needed to have correct xml output -->
			<div class="employees indexKeyContents">
				<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
				<xsl:variable name="sorted_employees">
					<xsl:for-each select="/Forschungsbericht/Mitarbeiter">
						<xsl:sort select="Name/Nachname"/>
						<xsl:copy-of select="." />
					</xsl:for-each>
				</xsl:variable>
				<!-- Iterate over the sorted set -->
				<xsl:for-each select="exslt:node-set($sorted_employees)/*">
					<xsl:variable name="firstLetter" select="substring(Name/Nachname,1,1)" />
					<xsl:if test="not($firstLetter = substring(preceding-sibling::*[1]/Name/Nachname,1,1))">
						<!-- close current header list if the first letter of the last name is different and display the next header and reopen the list.
							This is an ugly hack. 
						-->
						<!-- close current list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
						<!-- output new header -->
						<xsl:call-template name="list_heading_function">
							<xsl:with-param name="type">
								<xsl:value-of select="concat('employees_',$firstLetter)" />
							</xsl:with-param>
							<xsl:with-param name="function">
								<xsl:value-of select="$firstLetter" />
							</xsl:with-param>
							<xsl:with-param name="anchor_top">
								<xsl:value-of select="'#employees_top'" />
							</xsl:with-param>
						</xsl:call-template>
						<!-- restart the list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[<div class="employees indexKeyContents">]]></xsl:text>
						
						<!-- Display Column Headers to make the list appear like a table -->
						<xsl:call-template name="employees_list_short_column_headers" />
					</xsl:if>
					<!-- display the current employees list -->
					<div>
						<xsl:attribute name="class">
							<xsl:text>employee filterable</xsl:text>
							<xsl:text> </xsl:text>
							<xsl:choose>
								<xsl:when test="count(preceding-sibling::*/Name[substring(./Nachname,1,1) = $firstLetter]) mod 2 = 0">
									<xsl:text>even</xsl:text>
								</xsl:when>
								<xsl:otherwise>
									<xsl:text>odd</xsl:text>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:attribute>
						<!-- display list with or without images -->
						<xsl:choose>
							<xsl:when test="$employees_image = 'true'">
								<xsl:call-template name="employee_short_image" />
							</xsl:when>
							<xsl:otherwise>
								<xsl:call-template name="employee_short" />
							</xsl:otherwise>
						</xsl:choose>
					</div>
				</xsl:for-each>
			</div>
		</xsl:if>
	</xsl:template>
	
	<!-- inner template to display one employee with an image -->
	<xsl:template name="employee_short_image">
		<!-- output a blocking 100% div to be able to have clearable floating inner divs -->
		<div style="margin-bottom: 1em; display: block; width: 100%;">
		        <xsl:if test="count(Name/Bild) > 0 and count(Name/Bild/text()) > 0 and Name/Bild/text() != ''">
			  <!-- output image if available -->
			  <div class="image">
			    <xsl:attribute name="style">
			      <!-- depending on parameters at the beginning of this script image is made floating left of right -->
			      <xsl:call-template name="attr_image_float" />
			      <xsl:choose>
			      	<xsl:when test="$image_float = 'right'">
			      		<xsl:text> margin-left: 1em; </xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text> margin-right: 1em; </xsl:text>
				</xsl:otherwise>
			      </xsl:choose>
			      <xsl:text>border: 1px solid gray;</xsl:text>
			    </xsl:attribute>
			    <xsl:call-template name="employee_item_image" />
			  </div>
			</xsl:if>
			<div style="float: left;">
			        <!-- output name -->
				<div class="name" style="min-width: 300px;">
					<h2>
					<xsl:call-template name="employee_item_lastname">
						<xsl:with-param name="content_post">
							<xsl:text>, </xsl:text>
						</xsl:with-param>
					</xsl:call-template>
					<xsl:call-template name="employee_item_title">
						<xsl:with-param name="content_post">
							<xsl:text> </xsl:text>
						</xsl:with-param>
					</xsl:call-template>
					<xsl:call-template name="employee_item_firstname">
						<xsl:with-param name="content_post">
							<xsl:text> </xsl:text>
						</xsl:with-param>
					</xsl:call-template>
					<xsl:call-template name="employee_item_middlename" />
					</h2>
				</div>
				<!-- output email if available -->
				<xsl:if test="count(Administration/Email) > 0 and count(Administration/Email/text()) > 0 and Administration/Email/text() != ''">
					<div class="email">
						<b>
							<xsl:call-template name="i18n_label_email" />
							<xsl:text>: </xsl:text>
						</b>
						<xsl:call-template name="employee_item_administration_email" />
					</div>
				</xsl:if>
				<!-- output phone -->
				<xsl:if test="count(Administration/Telefon) > 0 and count(Administration/Telefon/text()) > 0 and Administration/Telefon/text() != ''">
					<div class="phone">
						<xsl:attribute name="title">
							<xsl:call-template name="i18n_attr_phone" />
							<xsl:text>: </xsl:text>
							<xsl:call-template name="employee_item_administration_phone" />
							<xsl:text>, </xsl:text>
							<xsl:call-template name="i18n_attr_phone_uni_prefix" />
							<xsl:text>: +49 (0) 761 / 203 -</xsl:text>
						</xsl:attribute>
						<b>
							<xsl:call-template name="i18n_label_phone" />
							<xsl:text>: </xsl:text>
						</b>
						<xsl:call-template name="employee_item_administration_phone" />
					</div>
				</xsl:if>
				<!-- Output administration room etc. -->
				<xsl:if test="count(Administration/RaumNr) > 0 and count(Administration/RaumNr/text()) > 0 and Administration/RaumNr/text() != ''">
					<div class="room">
						<b>
							<xsl:call-template name="i18n_label_room" />
							<xsl:text>: </xsl:text>
						</b>
						<xsl:call-template name="employee_item_administration_room" />
					</div>
				</xsl:if>
				<!-- output URL -->
				<xsl:if test="count(URL) > 0 and count(URL/text()) > 0 and URL/text() != ''">
					<div class="url" style="min-width: 150px;">
						<b>
							<xsl:call-template name="i18n_label_url" />
							<xsl:text>: </xsl:text>
						</b>
						<xsl:call-template name="employee_item_url" />
					</div>
				</xsl:if>
				<!-- Output consultation hours -->
				<xsl:if test="$consultation_hours = 'true'">
					<!-- consultation hours -->
					<xsl:if test="count(Sprechstunde/InVorlesungszeit/text()) > 0 or count(Sprechstunde/AusserhalbVorlesungszeit/text()) > 0">
						<div class="consultation_hours">
							<h3>
								<xsl:call-template name="i18n_consultation_hours" />
							</h3>
							<b>
								<xsl:call-template name="i18n_label_consultation_hours_semester" />
								<xsl:text>: </xsl:text>
							</b>
							<xsl:call-template name="employee_item_consultation_hours_semester" />
							<br />
							<b>
								<xsl:call-template name="i18n_label_consultation_hours_semester_break" />
								<xsl:text>: </xsl:text>
							</b>
							<xsl:call-template name="employee_item_consultation_hours_semester_break" />
						</div>
					</xsl:if>
				</xsl:if>
			</div>
		</div>
		<!-- clear all divs -->
		<br clear="all" />
	</xsl:template>
	
	<!-- inner template template: display one employee without an image 
		Parameters:
			content_pre: Content that is displayed before an element
			content_post: Content that is displayed after an element
			
			If other paramters (name, phone, chair, ...) are not filled in these are ouput as a column header
	-->
	<xsl:template name="employee_short_template">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:param name="name">
			<b>
				<xsl:call-template name="i18n_label_name" />
			</b>
		</xsl:param>
		<xsl:param name="phone">
			<b>
				<xsl:call-template name="i18n_label_phone" />
			</b>
		</xsl:param>
		<xsl:param name="chair">
			<b>
				<xsl:call-template name="i18n_label_chair" />
			</b>
		</xsl:param>
		<xsl:param name="function">
			<b>
				<xsl:call-template name="i18n_label_function" />
			</b>
		</xsl:param>
		<xsl:param name="email">
			<b>
				<xsl:call-template name="i18n_label_email" />
			</b>
		</xsl:param>
		<xsl:param name="room">
			<b>
				<xsl:call-template name="i18n_label_room" />
			</b>
		</xsl:param>
		<xsl:param name="fax">
			<b>
				<xsl:call-template name="i18n_label_fax" />
			</b>
		</xsl:param>
		
		<xsl:copy-of select="exslt:node-set($content_pre)" />

		<!-- Output col: name -->		
		<xsl:if test="$display_column_name = 'true'">
			<div style="width:170px; float: left" class="name">
				<xsl:copy-of select="$name" />
			</div>
		</xsl:if>
		<!-- Output col: phone -->
		<xsl:if test="$display_column_phone = 'true'">
			<xsl:choose>
				<xsl:when test="$employees_listing = 'alphabetical'">
					<div style="width:60px; overflow: auto; margin-left: 1em; float: left" class="phone">
						<xsl:copy-of select="$phone" />
					</div>
				</xsl:when>
				<xsl:otherwise>
					<div style="width:80px; overflow: auto; margin-left: 1em; float: left" class="phone">
						<xsl:copy-of select="$phone" />
					</div>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
		<!-- Output col: fax 
			Only if listing is grouped
		-->
		<xsl:if test="$display_column_fax = 'true'">
			<xsl:if test="$employees_listing = 'grouped_function'">
				<div style="width:80px; overflow: auto; margin-left: 1em; float: left" class="fax">
					<xsl:copy-of select="$fax" />
				</div>
			</xsl:if>
		</xsl:if>
		<!-- Output col: chair
			Only if listing is alphabetical
		-->
		<xsl:if test="$display_column_chair = 'true'">
			<xsl:choose>
				<xsl:when test="$employees_listing = 'alphabetical'">
					<div style="width:140px; margin-left: 1em; float:left" class="chair">
						<xsl:copy-of select="$chair" />
					</div>
				</xsl:when>
				<xsl:otherwise>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
		<!-- Output col: function
			Only if listing is alphabetical
		-->
		<xsl:if test="$display_column_function = 'true'">
			<xsl:choose>
				<xsl:when test="$employees_listing = 'alphabetical' or $employees_listing = 'alphabetical_chair'">
					<div style="width:100px; margin-left: 1em; float:left" class="function">
						<xsl:choose>
							<xsl:when test="count(exslt:node-set($functions_list)/root/item[employee_function/text()=$function]/employee_header) > 0">
								<xsl:value-of select="exslt:node-set($functions_list)/root/item[employee_function/text()=$function]/employee_header" />
							</xsl:when>
							<xsl:otherwise>
								<xsl:copy-of select="$function" />
							</xsl:otherwise>
						</xsl:choose>
					</div>
				</xsl:when>
				<xsl:otherwise>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
		<!-- Output col: email
			Different display depending on the list type. Either just the string "E-Mail" or the full E-Mail Adress of the person
		-->
		<xsl:if test="$display_column_email = 'true'">
			<xsl:choose>
				<xsl:when test="$employees_listing = 'alphabetical'">
					<div style="width:60px; overflow: auto; margin-left: 1em; height: 1.3em; float: left" class="email">
						<xsl:copy-of select="$email" />
					</div>
				</xsl:when>
				<xsl:when test="$employees_listing = 'grouped_chair_function'">
					<div style="width:350px; overflow: auto; margin-left: 1em; height: 1.3em; float: left" class="email">
						<xsl:copy-of select="$email" />
					</div>
				</xsl:when>
				<xsl:when test="$employees_listing = 'alphabetical_chair'">
					<div style="width:250px; overflow: auto; margin-left: 1em; height: 1.3em; float: left" class="email">
						<xsl:copy-of select="$email" />
					</div>
				</xsl:when>
				<xsl:otherwise>
					<div style="width:250px; overflow: auto; margin-left: 1em; height: 1.3em; float: left" class="email">
						<xsl:copy-of select="$email" />
					</div>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>

		<!-- Output col: room -->
		<xsl:if test="$display_column_room = 'true'">
			<div style="width:65px; overflow: auto; margin-left: 1em; float: left" class="room">
				<xsl:copy-of select="$room" />
			</div>
		</xsl:if>
		
		<!-- Output post-element content -->
		<xsl:copy-of select="exslt:node-set($content_post)" />
		
	</xsl:template>
	
	<!-- inner template to display one employee without an image as a table list item.
		This template basically just calls employee_short_template with parameters. 
		This is used to clean up the code to make it more readable 
	-->
	<xsl:template name="employee_short">
		<xsl:call-template name="employee_short_template">
			<xsl:with-param name="content_post">
				<br clear="all" />
			</xsl:with-param>
			<!-- fill parameters -->		
			<xsl:with-param name="name">
				<xsl:choose>
					<xsl:when test="count(URL) > 0 and count(URL/text()) > 0 and URL/text() != ''">
						<a>
							<xsl:attribute name="href">
								<xsl:value-of select="URL" />
							</xsl:attribute>
							<xsl:call-template name="employee_item_full_name" />
						</a>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="employee_item_full_name" />		
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="phone">
				<xsl:choose>
					<xsl:when test="count(Administration/Telefon) > 0 and count(Administration/Telefon/text()) > 0 and Administration/Telefon/text() != ''">
						<span>
							<xsl:attribute name="title">
								<xsl:call-template name="i18n_attr_phone" />
								<xsl:text>: </xsl:text>
								<xsl:call-template name="employee_item_administration_phone" />
								<xsl:text>, </xsl:text>
								<xsl:call-template name="i18n_attr_phone_uni_prefix" />
								<xsl:text>: +49 (0) 761 / 203 -</xsl:text>
							</xsl:attribute>
							<xsl:call-template name="employee_item_administration_phone" />
						</span>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>&#160;</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="chair">
				<xsl:call-template name="division_id_to_name">
					<xsl:with-param name="division_id" select="@AbteilungsID" />
				</xsl:call-template>
			</xsl:with-param>
			<xsl:with-param name="function">
				<xsl:choose>
					<xsl:when test="count(Name/Funktion) > 0 and count(Name/Funktion/text()) > 0 and Name/Funktion/text() != ''">
					  <xsl:value-of select="Name/Funktion" />
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>&#160;</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="email">
				<xsl:choose>
					<xsl:when test="count(Administration/Email) > 0 and count(Administration/Email/text()) > 0 and Administration/Email/text() != ''">
						<xsl:call-template name="employee_item_administration_email" />
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>&#160;</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="room">
				<xsl:choose>
					<xsl:when test="count(Administration/RaumNr) > 0 and count(Administration/RaumNr/text()) > 0 and Administration/RaumNr/text() != ''">
						<xsl:call-template name="employee_item_administration_room" />
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>&#160;</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
			<xsl:with-param name="fax">
				<xsl:variable name="faxno">
					<xsl:call-template name="division_id_to_fax">
						<xsl:with-param name="division_id" select="@AbteilungsID" />
					</xsl:call-template>
				</xsl:variable>
				
				<xsl:choose>
					<xsl:when test="substring($faxno,1,1) = '-'">
						<span>
							<xsl:attribute name="title">
								<xsl:text>+49 (0) 761 / 203 </xsl:text>
								<xsl:value-of select="$faxno" />
							</xsl:attribute>
							<xsl:value-of select="$faxno" />
						</span>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$faxno" />
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_title">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Name/AkadGrad) > 0 and count(Name/AkadGrad/text()) > 0 and Name/AkadGrad/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Name/AkadGrad" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_firstname">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Name/Vorname) > 0 and count(Name/Vorname/text()) > 0 and Name/Vorname/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Name/Vorname" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_middlename">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Name/Namenszusatz) > 0 and count(Name/Namenszusatz/text()) > 0 and string-length(Name/Namenszusatz/text()) > 0 and Name/Namenszusatz/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Name/Namenszusatz" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_lastname">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Name/Nachname) > 0 and count(Name/Nachname/text()) > 0 and Name/Nachname/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Name/Nachname" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_full_name">
		<xsl:call-template name="employee_item_lastname">
			<xsl:with-param name="content_post">
				<xsl:text>, </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="employee_item_title">
			<xsl:with-param name="content_post">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="employee_item_firstname">
			<xsl:with-param name="content_post">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="employee_item_middlename" />
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_additional_info">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Name/Zusatzinfo) > 0 and count(Name/Zusatzinfo/text()) > 0 and Name/Zusatzinfo/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Name/Zusatzinfo" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_administration_phone">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Administration/Telefon) > 0 and count(Administration/Telefon/text()) > 0 and Administration/Telefon/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Administration/Telefon" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_administration_email">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Administration/Email) > 0 and count(Administration/Email/text()) > 0 and Administration/Email/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<a>
				<!-- BUG: this only seems to work with a newer jquery-min version, the cached version from unicms is broken here -->
				<xsl:attribute name="href"><xsl:text>mailto:</xsl:text><xsl:value-of select="Administration/Email" /></xsl:attribute>
				<xsl:attribute name="title">
					<xsl:call-template name="i18n_attr_sendmail_to" />
					<xsl:text>: </xsl:text>
					<xsl:if test="count(Name/Vorname) > 0 and count(Name/Vorname/text()) > 0 and Name/Vorname/text() != ''">
						<xsl:value-of select="Name/Vorname" />
						<xsl:text> </xsl:text>
					</xsl:if>
					<xsl:if test="count(Name/Nachname) > 0 and count(Name/Nachname/text()) > 0 and Name/Nachname/text() != ''">
						<xsl:value-of select="Name/Nachname" />
						<xsl:text> </xsl:text>
					</xsl:if>
					<xsl:text>(</xsl:text>
					<xsl:value-of select="Administration/Email" />
					<xsl:text>)</xsl:text>
				</xsl:attribute>
				<xsl:choose>
					<xsl:when test="$employees_listing = 'alphabetical'">
						<xsl:call-template name="i18n_label_email" />
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="Administration/Email" />
					</xsl:otherwise>
				</xsl:choose>
				
			</a>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_administration_room">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Administration/RaumNr) > 0 and count(Administration/RaumNr/text()) > 0 and Administration/RaumNr/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<span class="room">
				<xsl:attribute name="title">
					<xsl:call-template name="i18n_attr_room" />
				</xsl:attribute>
				<xsl:value-of select="Administration/RaumNr" />
			</span>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_url">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(URL) > 0 and count(URL/text()) > 0 and URL/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<span class="url">
				<xsl:attribute name="title">
					<xsl:call-template name="i18n_attr_url" />
				</xsl:attribute>
				<a>
					<xsl:attribute name="href">
						<xsl:choose>
							<!-- if URL in the chosen language is available and not empty -->
							<xsl:when test="$language != 'D' and count(URL[2]) > 0 and count(URL[2]/text()) > 0 and URL[2]/text() != ''">
								<xsl:value-of select="URL[2]" />
							</xsl:when>
							<!-- else select first URL element (german language) -->
							<xsl:otherwise>
								<xsl:value-of select="URL[1]" />
							</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
                                        <xsl:call-template name="i18n_employee_personal_website" />
				</a>
			</span>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_consultation_hours_semester_break">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Sprechstunde/AusserhalbVorlesungszeit) > 0 and count(Sprechstunde/AusserhalbVorlesungszeit/text()) > 0 and Sprechstunde/AusserhalbVorlesungszeit/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<span class="consultation_hours_semester_break">
				<xsl:attribute name="title">
					<xsl:call-template name="i18n_attr_consultation_hours_semester_break" />
				</xsl:attribute>
				<xsl:value-of select="Sprechstunde/AusserhalbVorlesungszeit" />
			</span>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_consultation_hours_semester">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Sprechstunde/InVorlesungszeit) > 0 and count(Sprechstunde/InVorlesungszeit/text()) > 0 and Sprechstunde/InVorlesungszeit/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<span class="consultation_hours_semester">
				<xsl:attribute name="title">
					<xsl:call-template name="i18n_attr_consultation_hours_semester" />
				</xsl:attribute>
				<xsl:value-of select="Sprechstunde/InVorlesungszeit" />
			</span>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	<!-- Templates to select parts of an employee to display, all prefixed with 'employee_item_' -->
	<xsl:template name="employee_item_image">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(Name/Bild) > 0 and count(Name/Bild/text()) > 0 and Name/Bild/text() != ''">
			<div class="employee_image">
				<img>
					<xsl:attribute name="width">
						<xsl:value-of select="$image_width_employee" />
					</xsl:attribute>
					<xsl:attribute name="src">
						<xsl:choose>
							<xsl:when test="starts-with(Name/Bild,'http')">
								<xsl:value-of select="Name/Bild"/>
							</xsl:when>
							<xsl:otherwise>
								<xsl:value-of select="concat($image_url,Name/Bild)"/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
					<xsl:attribute name="alt">
						<xsl:value-of select="Name/Vorname"/>
						<xsl:text> </xsl:text>
						<xsl:value-of select="Name/Nachname"/>
					</xsl:attribute>
				</img>
				<xsl:copy-of select="exslt:node-set($content_post)" />
			</div>
		</xsl:if>
	</xsl:template>
	
	
	<!-- 
		Template do display wither a list of projects or a detailed view if only one project is available
		This can be used together with a TAL DynamicDocument to display a list with links the the detail view
		Same code has to be implemented in other languages, like php
		
		If a parameter projectId=123 is given in the URL the XML should be filtered to only contain this single entry
	-->
	<xsl:template name="projects">
		<xsl:if test="count(/Forschungsbericht/Projekt) > 0">
			<xsl:choose>
				<!-- there is only one project -->
				<xsl:when test="count(/Forschungsbericht/Projekt) = 1">
					<xsl:for-each select="/Forschungsbericht/Projekt">
						<xsl:call-template name="project_details" />
					</xsl:for-each>
				</xsl:when>
				<!-- there is more than one project -->
				<xsl:otherwise>
					<!-- Anchor to get back to the top of the publications -->
					<a id="projects_top" name="projects_top">
						<xsl:text> </xsl:text>
					</a>
					<!-- Display a header in case the full 'Forschungsbericht' is displayed -->
					<xsl:if test="$enable_type_headings = 'true'">
						<h2>
							<xsl:call-template name="i18n_projects" />
						</h2>
					</xsl:if>
					
					<!-- Javascript filtering -->
					<xsl:if test="$enable_javascript">
						<xsl:call-template name="js_filter_index_key" />
					
						<xsl:call-template name="js_filter_text" />
					</xsl:if>
				
					<!-- display a list of years to jump to -->
					<xsl:call-template name="list_of_project_years" />
					
					<!-- start list of projects, same approach as with the gouped list of employees, sort by year, display a header for every year and a list of projects below -->
					<div class="projects indexKeyContents">
						<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
						<xsl:variable name="sorted_projects">
							<xsl:for-each select="/Forschungsbericht/Projekt">
								<xsl:sort select="Laufzeit/VonDatum/Jahr" data-type="number" order="descending" />
								<xsl:sort select="Laufzeit/VonDatum/Monat" data-type="number" order="descending" />
								<xsl:sort select="Laufzeit/VonDatum/Tag" data-type="number" order="descending" />
								<xsl:sort select="Laufzeit/BisDatum/Jahr" data-type="number" order="descending" />
								<xsl:sort select="Laufzeit/BisDatum/Monat" data-type="number" order="descending" />
								<xsl:sort select="Laufzeit/BisDatum/Tag" data-type="number" order="descending" />
								<xsl:sort select="Titel" />
								<xsl:copy-of select="." />
							</xsl:for-each>
						</xsl:variable>
						<!-- Iterate over the sorted set -->
						<xsl:for-each select="exslt:node-set($sorted_projects)/*">
							<xsl:variable name="type">
								<xsl:text>project</xsl:text>
							</xsl:variable>
							
							<!-- If the year changes close the previous list, output header, start new list -->
							<xsl:if test="not(Laufzeit/VonDatum/Jahr = preceding-sibling::*[1]/Laufzeit/VonDatum/Jahr)">
								<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
								<xsl:call-template name="list_heading_year">
									<xsl:with-param name="type">
										<xsl:value-of select="$type" />
									</xsl:with-param>
									<xsl:with-param name="year">
										<xsl:value-of select="Laufzeit/VonDatum/Jahr" />
									</xsl:with-param>
									<xsl:with-param name="anchor_top">
										<xsl:value-of select="'#projects_top'" />
									</xsl:with-param>
								</xsl:call-template>
								<xsl:text disable-output-escaping="yes"><![CDATA[<div class="projects indexKeyContents">]]></xsl:text>
							</xsl:if>
							<!-- display single project -->
							<div class="project filterable">
								<xsl:call-template name="project_short" />
							</div>
						</xsl:for-each>
					</div>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template: Detailed project_display -->
	<xsl:template name="project_details">
		<xsl:call-template name="project_title">
			<xsl:with-param name="header_type">
				<xsl:value-of select="'h2'" />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="project_image">
			<xsl:with-param name="div_style">
				<xsl:text> margin: 1em; </xsl:text>
				<xsl:choose>
					<xsl:when test="$image_float = 'right'">
						<xsl:text>margin-right: 0px; </xsl:text>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>margin-left: 0px; </xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="project_description" />
		<xsl:call-template name="project_timespan" />
		<xsl:call-template name="project_leader" />
		<xsl:call-template name="project_contactperson" />
		<xsl:call-template name="project_telephone" />
		<xsl:call-template name="project_email" />
		<xsl:call-template name="project_url" />
		<xsl:call-template name="project_cooperation" />
		<xsl:call-template name="project_financing" />
		<xsl:call-template name="project_keywords" />
	</xsl:template>
	
	<!-- Inner Template: for displaying a list of projects, image and a small list of important attributes -->
	<xsl:template name="project_short">
		<xsl:call-template name="project_image">
			<xsl:with-param name="div_style">
				<xsl:text> margin-right: 1em; margin-left: 1em;</xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="project_title">
			<xsl:with-param name="header_type">
				<xsl:value-of select="'h4'" />
			</xsl:with-param>
		</xsl:call-template>
		<ul class="project_properties">
			<xsl:if test="$image_float = 'left' and count(Bild) > 0 and count(Bild/text()) > 0 and Bild/text() != ''">
				<xsl:attribute name="style">
					<xsl:text>margin-left: </xsl:text><xsl:value-of select="$image_width_project + 50" /><xsl:text>px</xsl:text>
				</xsl:attribute>
			</xsl:if>
			<!-- project leader -->
			<li class="project_leader">
				<b>
					<xsl:call-template name="i18n_project_leader" />:</b>
				<xsl:text> </xsl:text>
				<xsl:value-of select="Administration/Leiter" />
			</li>
			<!-- project timespan -->
			<li class="project_timespan">
				<b>
					<xsl:call-template name="i18n_project_timespan" />:</b>
				<xsl:text> </xsl:text>
				<xsl:choose>
					<xsl:when test="Laufzeit/BisDatum/Jahr != '3000'">
						<xsl:value-of select="Laufzeit/VonDatum/Tag"/>.<xsl:value-of select="Laufzeit/VonDatum/Monat"/>.<xsl:value-of select="Laufzeit/VonDatum/Jahr"/>
						<xsl:text> </xsl:text>
						<xsl:call-template name="i18n_until" />
						<xsl:text> </xsl:text>
						<xsl:value-of select="Laufzeit/BisDatum/Tag"/>.<xsl:value-of select="Laufzeit/BisDatum/Monat"/>.<xsl:value-of select="Laufzeit/BisDatum/Jahr"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text> </xsl:text>
						<xsl:call-template name="i18n_since" />
						<xsl:text> </xsl:text>
						<xsl:value-of select="Laufzeit/VonDatum/Tag"/>.<xsl:value-of select="Laufzeit/VonDatum/Monat"/>.<xsl:value-of select="Laufzeit/VonDatum/Jahr"/>
						<xsl:text> (</xsl:text>
						<xsl:call-template name="i18n_unlimited" />
						<xsl:text>)</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</li>
			<!-- link to details page -->
			<li>
				<a>
					<xsl:attribute name="href">
						<xsl:text>?projectId=</xsl:text>
						<xsl:value-of select="@Lfdnr" />
					</xsl:attribute>
					<xsl:call-template name="i18n_link_project_details" />
				</a>
			</li>
		</ul>
		<br clear="all" />
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_description">
		<div class="project_description">
			<h4>
				<xsl:call-template name="i18n_project_description" />
			</h4>
			<div>
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="$indent_project_details = 'true'">
							<xsl:text>project_description_text indent</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>project_description_text</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<xsl:choose>
					<!-- if title in the chosen language is available and not empty -->
					<xsl:when test="count(Beschreibung[@Sprache = $language]) > 0 and Beschreibung[@Sprache = $language] != ''">
						<xsl:value-of select="Beschreibung[@Sprache = $language]" />
					</xsl:when>
					<!-- else select first Title element -->
					<xsl:otherwise>
						<xsl:value-of select="Beschreibung[1]" />
					</xsl:otherwise>
				</xsl:choose>
			</div>
		</div>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_leader">
		<xsl:if test="count(Administration/Leiter) > 0 and count(Administration/Leiter/text()) > 0 and Administration/Leiter/text() != ''">
			<div class="project_leader">
				<!-- contactperson -->
				<h4>
					<xsl:call-template name="i18n_project_leader" />
				</h4>
				<div>
					<xsl:attribute name="class">
						<xsl:choose>
							<xsl:when test="$indent_project_details = 'true'">
								<xsl:text>indent</xsl:text>
							</xsl:when>
							<xsl:otherwise>
								<xsl:text>noindent</xsl:text>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
					<xsl:if test="count(Administration/Leiter) > 0 and count(Administration/Leiter/text()) > 0 and Administration/Leiter/text() != ''">
						<xsl:choose>
							<!-- if link available, link it -->
							<xsl:when test="$link_project_leader = 'true' and count(Administration/Url) > 0 and count(Administration/Url/text()) > 0">
								<a>
									<xsl:attribute name="href">
										<xsl:choose>
											<!-- if Url for the chosen language is available and not empty -->
											<xsl:when test="count(Administration/Url[@Sprache = $language]) > 0 and Administration/Url[@Sprache = $language] != ''">
												<xsl:value-of select="Administration/Url[@Sprache = $language]" />
											</xsl:when>
											<!-- else select first Url element -->
											<xsl:otherwise>
												<xsl:value-of select="Administration/Url[1]" />
											</xsl:otherwise>
										</xsl:choose>
									</xsl:attribute>
									<xsl:value-of select="Administration/Leiter" />
								</a>
							</xsl:when>
							<!-- else just display the name -->
							<xsl:otherwise>
								<xsl:value-of select="Administration/Leiter" />
							</xsl:otherwise>
						</xsl:choose>
						<br />
					</xsl:if>
				</div>
			</div>
		</xsl:if>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_telephone">
		<xsl:if test="count(Administration/Telefon) > 0 and count(Administration/Telefon/text()) > 0 and Administration/Telefon/text() != ''">
			<div>
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="$indent_project_details = 'true'">
							<xsl:text>indent</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>noindent</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<!-- phone -->
				<span class="label phone">
					<xsl:call-template name="i18n_project_phone" />:</span>
				<span class="value phone">
					<xsl:value-of select="Administration/Telefon" />
				</span>
				<br />
			</div>
		</xsl:if>
	</xsl:template>
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_email">
		<xsl:if test="count(Administration/Email) > 0 and count(Administration/Email/text()) > 0 and Administration/Email/text() != ''">
			<div>
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="$indent_project_details = 'true'">
							<xsl:text>indent</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>noindent</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<!-- email -->
				<span class="label email">
					<xsl:call-template name="i18n_project_email" />:</span>
				<span class="value email">
					<xsl:value-of select="Administration/Email" />
				</span>
				<br />
			</div>
		</xsl:if>
	</xsl:template>
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_url">
		<xsl:if test="count(Administration/Url) > 0 and count(Administration/Url/text()) > 0 and Administration/Url/text() != ''">
			<div>
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="$indent_project_details = 'true'">
							<xsl:text>indent</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>noindent</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<!-- URL -->
				<span class="label url">
					<xsl:call-template name="i18n_project_url" />: </span>
				<span class="value url">
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="Administration/Url" />
						</xsl:attribute>
						<xsl:value-of select="Administration/Url" />
					</a>
				</span>
				<br />
			</div>
		</xsl:if>
	</xsl:template>
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_contactperson">
		<div class="project_contactperson">
			<!-- contactperson -->
			<xsl:if test="count(Administration/Ansprechpartner) > 0 and count(Administration/Ansprechpartner/text()) > 0 and Administration/Ansprechpartner/text() != ''">
				<h4>
					<xsl:call-template name="i18n_project_contactperson" />
				</h4>
				<div>
					<xsl:attribute name="class">
						<xsl:choose>
							<xsl:when test="$indent_project_details = 'true'">
								<xsl:text>indent</xsl:text>
							</xsl:when>
							<xsl:otherwise>
								<xsl:text>noindent</xsl:text>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
					<xsl:choose>
						<!-- if link available, link it -->
						<xsl:when test="$link_project_contactperson = 'true' and count(Administration/Url) > 0 and count(Administration/Url/text()) > 0">
							<a>
								<xsl:attribute name="href">
									<xsl:choose>
										<!-- if Url for the chosen language is available and not empty -->
										<xsl:when test="count(Administration/Url[@Sprache = $language]) > 0 and Administration/Url[@Sprache = $language] != ''">
											<xsl:value-of select="Administration/Url[@Sprache = $language]" />
										</xsl:when>
										<!-- else select first Url element -->
										<xsl:otherwise>
											<xsl:value-of select="Administration/Url[1]" />
										</xsl:otherwise>
									</xsl:choose>
								</xsl:attribute>
								<xsl:value-of select="Administration/Ansprechpartner" />
							</a>
						</xsl:when>
						<!-- else just display the name -->
						<xsl:otherwise>
							<xsl:value-of select="Administration/Ansprechpartner" />
						</xsl:otherwise>
					</xsl:choose>
				</div>
			</xsl:if>
		</div>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_timespan">
		<h4 class="project_timespan">
			<xsl:call-template name="i18n_project_timespan" />
		</h4>
		<div>
			<xsl:attribute name="class">
				<xsl:choose>
					<xsl:when test="$indent_project_details = 'true'">
						<xsl:text>value project_timespan indent</xsl:text>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>value project_timespan noindent</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:attribute>
			<xsl:choose>
				<xsl:when test="Laufzeit/BisDatum/Jahr != '3000'">
					<xsl:value-of select="Laufzeit/VonDatum/Tag"/>.<xsl:value-of select="Laufzeit/VonDatum/Monat"/>.<xsl:value-of select="Laufzeit/VonDatum/Jahr"/>
					<xsl:text> </xsl:text>
					<xsl:call-template name="i18n_until" />
					<xsl:text> </xsl:text>
					<xsl:value-of select="Laufzeit/BisDatum/Tag"/>.<xsl:value-of select="Laufzeit/BisDatum/Monat"/>.<xsl:value-of select="Laufzeit/BisDatum/Jahr"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:text> </xsl:text>
					<xsl:call-template name="i18n_since" />
					<xsl:text> </xsl:text>
					<xsl:value-of select="Laufzeit/VonDatum/Tag"/>.<xsl:value-of select="Laufzeit/VonDatum/Monat"/>.<xsl:value-of select="Laufzeit/VonDatum/Jahr"/>
					<xsl:text> (</xsl:text>
					<xsl:call-template name="i18n_unlimited" />
					<xsl:text>)</xsl:text>
				</xsl:otherwise>
			</xsl:choose>
		</div>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_cooperation">
		<xsl:if test="count(Kooperation) > 0 and count(Kooperation/text()) > 0">
			<h4>
				<xsl:call-template name="i18n_project_cooperation" />
			</h4>
			<div>
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="$indent_project_details = 'true'">
							<xsl:text>value project_cooperation indent</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>value project_cooperation noindent</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<xsl:attribute name="style">
					<xsl:text>white-space:pre-line</xsl:text>
				</xsl:attribute>
				<xsl:value-of select="Kooperation/text()" />
			</div>
		</xsl:if>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_financing">
		<xsl:if test="count(Drittmittel) > 0">
			<h4>
				<xsl:call-template name="i18n_project_financing" />
			</h4>
			<div>
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="$indent_project_details = 'true'">
							<xsl:text>value project_financing indent</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>value project_financing noindent</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<xsl:if test="$display_project_enable_financing_type = 'true'">
					<span class="project_financing_type">
						<xsl:value-of select="Drittmittel/@Typ" /><!-- FIXME Translation problem "Firma" -->
					</span>
				</xsl:if>
				<span class="project_financing_source">
					<xsl:value-of select="Drittmittel/Mittelgeber" />
				</span>
				<span class="project_financing_reference">
					<xsl:value-of select="Drittmittel/Aktenzeichen" />
				</span>
			</div>
		</xsl:if>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_keywords">
		<xsl:if test="count(Stichwort) > 0">
			<h4>
				<xsl:call-template name="i18n_keywords" />
			</h4>
			<div>
				<xsl:attribute name="class">
					<xsl:choose>
						<xsl:when test="$indent_project_details = 'true'">
							<xsl:text>value project_keywords indent</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text>value project_keywords noindent</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>
				<xsl:for-each select="Stichwort">
					<xsl:value-of select="." />
					<xsl:if test="position() != last()">
						<xsl:text>, </xsl:text>
					</xsl:if>
				</xsl:for-each>
			</div>
		</xsl:if>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_image">
		<xsl:param name="div_style" />
		
		<xsl:if test="count(Bild) > 0 and count(Bild/text()) > 0 and Bild/text() != ''">
			<div class="project_image">
				<xsl:attribute name="style">
					<xsl:call-template name="attr_image_float" />
					<xsl:value-of select="$div_style" />
				</xsl:attribute>
				<img style="border: 1px solid gray;">
					<xsl:attribute name="width">
						<xsl:value-of select="$image_width_project" />
					</xsl:attribute>
					<xsl:attribute name="src">
						<xsl:choose>
							<xsl:when test="starts-with(Bild,'http')">
								<xsl:value-of select="Bild"/>
							</xsl:when>
							<xsl:otherwise>
								<xsl:value-of select="concat($image_url,Bild)"/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
					<xsl:attribute name="alt">
						<xsl:text>Projektbild</xsl:text>
					</xsl:attribute>
				</img>
			</div>
		</xsl:if>
	</xsl:template>
	
	<!-- Templates for displaying single project properties, all prefixed with 'project_' -->
	<xsl:template name="project_title">
		<xsl:param name="header_type" />
		
		<xsl:element name="{$header_type}">
			<xsl:attribute name="class">
				<xsl:text>project_title</xsl:text>
			</xsl:attribute>
			<xsl:choose>
				<!-- if title in the chosen language is available and not empty -->
				<xsl:when test="count(Titel[@Sprache = $language]) > 0 and Titel[@Sprache = $language] != ''">
					<xsl:value-of select="Titel[@Sprache = $language]" />
				</xsl:when>
				<!-- else select first Title element -->
				<xsl:otherwise>
					<xsl:value-of select="Titel[1]" />
				</xsl:otherwise>
			</xsl:choose>
		</xsl:element>
	</xsl:template>
	
	<!-- Template to display a list of grouped publications -->
	<xsl:template name="publications_grouped_type">
		<xsl:if test="count(/Forschungsbericht/Publikation) > 0">
			<!-- Anchor to get back to the top of the publications -->
			<a id="publications_top" name="publications_top">
				<xsl:text> </xsl:text>
			</a>

			<!-- Output required css to display icons -->			
			<xsl:if test="$enable_pdfurl_display = 'true'">
				<xsl:call-template name="css_icons" />
			</xsl:if>
			
			<!-- Type Header -->
			<xsl:if test="$enable_type_headings = 'true'">
				<h2>
					<xsl:call-template name="i18n_publications" />
				</h2>
			</xsl:if>
			
			<!-- javascript filters and jumplists -->
			<xsl:if test="$enable_javascript = 'true'">
				<xsl:call-template name="js_toggle" />
				
				<xsl:call-template name="js_filter_text" />
				
				<xsl:call-template name="js_filter_index_key" />
			</xsl:if>
			
			<!-- Type order: "Artikel", "Review", "Rezension", "Monographie", "Buchbeitrag", "Fallbeispiel", "Kurzbeitrag", "Vortrag", "Konferenzbeitrag", "Festschrift", "Sonstiges" -->
			<xsl:call-template name="publications_toc" />
			
			<!-- Display all Articles -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Artikel'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_articles" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Reviews -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Review'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_reviews" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Rezension -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Rezension'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_bookreviews" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Monographie -->
			<xsl:call-template name="publications_type_books">
				<xsl:with-param name="type">
					<xsl:value-of select="'Monographie'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_books" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Buchbeitrag -->
			<xsl:call-template name="publications_type_book_chapters">
				<xsl:with-param name="type">
					<xsl:value-of select="'Buchbeitrag'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_book_chapters" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Fallbeispiel -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Fallbeispiel'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_case_studies" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Kurzbeitrag -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Kurzbeitrag'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_short_communications" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Vortrag -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Vortrag'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_talks" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Konferenzbeitrag -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Konferenzbeitrag'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_conference_papers" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Festschrift -->
			<xsl:call-template name="publications_type_article">
				<xsl:with-param name="type">
					<xsl:value-of select="'Festschrift'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_festschrift" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			<!-- Display all Sonstiges -->
			<xsl:call-template name="publications_type_other">
				<xsl:with-param name="type">
					<xsl:value-of select="'Sonstiges'" />
				</xsl:with-param>
				<xsl:with-param name="header">
					<xsl:call-template name="i18n_publications_other" />
				</xsl:with-param>
				<xsl:with-param name="content_pre">
					<div style="margin-bottom:2em; display: block;">
						<br clear="all" />
					</div>
				</xsl:with-param>
			</xsl:call-template>
			
			<!-- Output required css to display icons -->			
			<xsl:if test="$enable_pdfurl_display = 'true'">
				<xsl:call-template name="famfamfamicons_attribution" />
			</xsl:if>
			
		</xsl:if>
	</xsl:template>
	
	<!-- Displays a non-grouped list of all publications -->
	<xsl:template name="publications_list_alltypes">
		<xsl:variable name="type" select="'all'" />
		
		<xsl:if test="count(/Forschungsbericht/Publikation) > 0">
			<!-- Javascript filters/jumplists -->
			<xsl:if test="$enable_javascript = 'true'">
				<xsl:call-template name="js_toggle" />
			
				<xsl:call-template name="js_filter_index_key" />
				
				<xsl:call-template name="js_filter_text" />
			</xsl:if>
			
			<!-- Output required css to display icons -->
			<xsl:if test="$enable_pdfurl_display = 'true'">
				<xsl:call-template name="css_icons" />
			</xsl:if>
			
			<!-- Display a header per type? -->
			<xsl:if test="$enable_type_headings ='true'">
				<h2>
					<xsl:call-template name="i18n_publications" />
				</h2>
			</xsl:if>
			<!-- link back to the list -->
			<a>
				<xsl:attribute name="name">
					<xsl:value-of select="concat($type,'_publications_top')" />
				</xsl:attribute>
				<xsl:text> </xsl:text>
			</a>
			
			<!-- display a list of years to jump to -->
			<xsl:call-template name="list_of_publication_years">
				<xsl:with-param name="type">
					<xsl:value-of select="$type" />
				</xsl:with-param>
				<xsl:with-param name="anchor_prefix">
					<xsl:value-of select="concat($type,'_')" />
				</xsl:with-param>
			</xsl:call-template>
			
			<!-- list of publications, sorted by year -->
			<ul class="publications indexKeyContents">
			
				<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
				<xsl:variable name="sorted_publications">
					<xsl:for-each select="/Forschungsbericht/Publikation">
						<!-- sort descending by date, then by title -->
						<xsl:sort select="Erscheinung/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Monat" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Tag" data-type="number" order="descending" />
						<xsl:sort select="Titel/PubTitel" />
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>
				
				<!-- Iterate over the sorted set -->
				<xsl:for-each select="exslt:node-set($sorted_publications)/*">
					<xsl:if test="not(Erscheinung/Jahr = preceding-sibling::*[1]/Erscheinung/Jahr)">
						<!-- Ugly hack -->
						<!-- if previous year is different, close list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[</ul>]]></xsl:text>
						<!-- display year header -->
						<xsl:call-template name="list_heading_year">
							<xsl:with-param name="type">
								<xsl:value-of select="$type" />
							</xsl:with-param>
							<xsl:with-param name="year">
								<xsl:value-of select="Erscheinung/Jahr" />
							</xsl:with-param>
							<xsl:with-param name="anchor_top">
								<xsl:value-of select="concat('#',$type,'_publications_top')" />
							</xsl:with-param>
						</xsl:call-template>
						<!-- start new list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[<ul class="publications indexKeyContents">]]></xsl:text>
					</xsl:if>
					<!-- List of publications for the current year -->
					<li class="publication filterable">
					<!-- Type order: "Artikel", "Review", "Rezension", "Monographie", "Buchbeitrag", "Fallbeispiel", "Kurzbeitrag", "Vortrag", "Konferenzbeitrag", "Festschrift", "Sonstiges" -->
						<xsl:choose>
							<xsl:when test="@Typ = 'Artikel'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Review'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Rezension'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Monographie'">
								<xsl:call-template name="publication_book" />
							</xsl:when>
							<xsl:when test="@Typ = 'Buchbeitrag'">
								<xsl:call-template name="publication_book_chapter" />
							</xsl:when>
							<xsl:when test="@Typ = 'Fallbeispiel'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Kurzbeitrag'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Vortrag'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Konferenzbeitrag'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Festschrift'">
								<xsl:call-template name="publication_article" />
							</xsl:when>
							<xsl:when test="@Typ = 'Sonstiges'">
								<xsl:call-template name="publication_other" />
							</xsl:when>
							<xsl:otherwise>
								<xsl:call-template name="publication_article" />
							</xsl:otherwise>
						</xsl:choose>
				
					</li>
				</xsl:for-each>
			</ul>
			
			<!-- Output required css to display icons -->			
			<xsl:if test="$enable_pdfurl_display = 'true'">
				<xsl:call-template name="famfamfamicons_attribution" />
			</xsl:if>
		</xsl:if>
		<!-- End if publikation -->
	</xsl:template>
	
	<!-- Inner template for displaying a publication of type article -->
	<xsl:template name="publications_type_article">
		<!-- type parameter, may be article, monographie, etc. -->
		<xsl:param name="type" />
		<!-- internaionalized header -->
		<xsl:param name="header" />
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<!-- Start if article type -->
		<xsl:if test="count(/Forschungsbericht/Publikation[@Typ=$type]) > 0">
			<xsl:copy-of select="$content_pre" />
			<!-- back to list link -->
			<a>
				<xsl:attribute name="name">
					<xsl:value-of select="concat($type,'_publications_top')" />
				</xsl:attribute>
				<xsl:text> </xsl:text>
			</a>
			<!-- output header -->
			<h2>
				<xsl:value-of select="$header" />
			</h2>
			
			<!-- display a list of years to jump to -->
			<xsl:call-template name="list_of_publication_years">
				<xsl:with-param name="type">
					<xsl:value-of select="$type" />
				</xsl:with-param>
				<xsl:with-param name="anchor_prefix">
					<xsl:value-of select="concat($type,'_')" />
				</xsl:with-param>
			</xsl:call-template>
			<xsl:call-template name="link_publications_top" />
			<ul class="publications indexKeyContents">
			
			<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
				<xsl:variable name="sorted_publications">
					<xsl:for-each select="/Forschungsbericht/Publikation[@Typ=$type]">
				<!-- sort descending by year, then by title -->
						<xsl:sort select="Erscheinung/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Monat" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Tag" data-type="number" order="descending" />
						<xsl:sort select="Titel/PubTitel" />
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>
			<!-- Iterate over the sorted set -->
				<xsl:for-each select="exslt:node-set($sorted_publications)/*">
					<xsl:if test="not(Erscheinung/Jahr = preceding-sibling::*[1]/Erscheinung/Jahr)">
						<!-- Ugly hack. -->
						<!-- close current list if year changes -->
						<xsl:text disable-output-escaping="yes"><![CDATA[</ul>]]></xsl:text>
						<!-- output header -->
						<xsl:call-template name="list_heading_year">
							<xsl:with-param name="type">
								<xsl:value-of select="$type" />
							</xsl:with-param>
							<xsl:with-param name="year">
								<xsl:value-of select="Erscheinung/Jahr" />
							</xsl:with-param>
							<xsl:with-param name="anchor_top">
								<xsl:value-of select="concat('#',$type,'_publications_top')" />
							</xsl:with-param>
						</xsl:call-template>
						<!-- start new list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[<ul class="publications indexKeyContents">]]></xsl:text>
					</xsl:if>
					<!-- output list of publications for current year -->
					<li class="publication filterable">
						<xsl:call-template name="publication_article" />
					</li>
				</xsl:for-each>
			</ul>
			<xsl:copy-of select="$content_post" />
		</xsl:if>
		<!-- End if article type -->
	</xsl:template>
	
	<!-- Creates a list of Books -->
	<xsl:template name="publications_type_books">
		<xsl:param name="type" />
		<xsl:param name="header" />
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<!-- Start if Monografie type -->
		<xsl:if test="count(/Forschungsbericht/Publikation[@Typ=$type]) > 0">
			<xsl:copy-of select="$content_pre" />
			<h2>
				<xsl:value-of select="$header" />
				<a>
					<xsl:attribute name="name">
						<xsl:value-of select="concat($type,'_publications_top')" />
					</xsl:attribute>
					<xsl:text> </xsl:text>
				</a>
			</h2>
			<!-- display a list of years to jump to -->
			<xsl:call-template name="list_of_publication_years">
				<xsl:with-param name="type">
					<xsl:value-of select="$type" />
				</xsl:with-param>
				<xsl:with-param name="anchor_prefix">
					<xsl:value-of select="concat($type,'_')" />
				</xsl:with-param>
			</xsl:call-template>
			
			<xsl:call-template name="link_publications_top" />
			
			<ul class="publications indexKeyContents">
			<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
				<xsl:variable name="sorted_publications">
					<xsl:for-each select="/Forschungsbericht/Publikation[@Typ=$type]">
				<!-- sort descending by year, then by title -->
						<xsl:sort select="Erscheinung/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Monat" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Tag" data-type="number" order="descending" />
						<xsl:sort select="Titel/PubTitel" />
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>
			<!-- Iterate over the sorted set -->
				<xsl:for-each select="exslt:node-set($sorted_publications)/*">
					<xsl:if test="not(Erscheinung/Jahr = preceding-sibling::*[1]/Erscheinung/Jahr)">
						<!-- Ugly Hack -->
						<!-- end current list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[</ul>]]></xsl:text>
						<!-- output heading -->
						<xsl:call-template name="list_heading_year">
							<xsl:with-param name="type">
								<xsl:value-of select="$type" />
							</xsl:with-param>
							<xsl:with-param name="year">
								<xsl:value-of select="Erscheinung/Jahr" />
							</xsl:with-param>
							<xsl:with-param name="anchor_top">
								<xsl:value-of select="concat('#',$type,'_publications_top')" />
							</xsl:with-param>
						</xsl:call-template>
						<!-- start new list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[<ul class="publications indexKeyContents">]]></xsl:text>
					</xsl:if>
					<!-- output list of entries -->
					<li class="publication filterable">
						<xsl:call-template name="publication_book" />
					</li>
				</xsl:for-each>
			</ul>
			<xsl:copy-of select="$content_post" />
		</xsl:if>
		<!-- End if Monografie type -->
	</xsl:template>
	
	
	<!-- Creates a list of Buchbeitrag -->
	<xsl:template name="publications_type_book_chapters">
		<xsl:param name="type" />
		<xsl:param name="header" />
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<!-- Start if Buchbeitrag type -->
		<xsl:if test="count(/Forschungsbericht/Publikation[@Typ=$type]) > 0">
			<xsl:copy-of select="$content_pre" />
			<!-- Header -->
			<h2>
				<xsl:value-of select="$header" />
				<a>
					<xsl:attribute name="name">
						<xsl:value-of select="concat($type,'_publications_top')" />
					</xsl:attribute>
					<xsl:text> </xsl:text>
				</a>
			</h2>
			
			<!-- display a list of years to jump to -->
			<xsl:call-template name="list_of_publication_years">
				<xsl:with-param name="type">
					<xsl:value-of select="$type" />
				</xsl:with-param>
				<xsl:with-param name="anchor_prefix">
					<xsl:value-of select="concat($type,'_')" />
				</xsl:with-param>
			</xsl:call-template>
			
			<xsl:call-template name="link_publications_top" />
			
			<ul class="publications indexKeyContents">
				<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
				<xsl:variable name="sorted_publications">
					<xsl:for-each select="/Forschungsbericht/Publikation[@Typ=$type]">
						<!-- sort descending by year, then by title -->
						<xsl:sort select="Erscheinung/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Monat" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Tag" data-type="number" order="descending" />
						<xsl:sort select="Titel/PubTitel" />
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>
				<!-- Iterate over the sorted set -->
				<xsl:for-each select="exslt:node-set($sorted_publications)/*">
					<xsl:if test="not(Erscheinung/Jahr = preceding-sibling::*[1]/Erscheinung/Jahr)">
						<!-- Ugly hack -->
						<!-- end current list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[</ul>]]></xsl:text>
						<!-- Output heading -->
						<xsl:call-template name="list_heading_year">
							<xsl:with-param name="type">
								<xsl:value-of select="$type" />
							</xsl:with-param>
							<xsl:with-param name="year">
								<xsl:value-of select="Erscheinung/Jahr" />
							</xsl:with-param>
							<xsl:with-param name="anchor_top">
								<xsl:value-of select="concat('#',$type,'_publications_top')" />
							</xsl:with-param>
						</xsl:call-template>
						<!-- start new list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[<ul class="publications indexKeyContents">]]></xsl:text>
					</xsl:if>
					<!-- list of entries -->
					<li class="publication filterable">
						<xsl:call-template name="publication_book_chapter" />
					</li>
				</xsl:for-each>
			</ul>
			<xsl:copy-of select="$content_post" />
		</xsl:if>
		<!-- End if Buchbeitrag type -->
	</xsl:template>
	
	<!-- Creates a list of Sonstiges -->
	<xsl:template name="publications_type_other">
		<xsl:param name="type" />
		<xsl:param name="header" />
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<!-- Start if Sonstiges type -->
		<xsl:if test="count(/Forschungsbericht/Publikation[@Typ=$type]) > 0">
			<xsl:copy-of select="$content_pre" />
			
			<!-- header -->
			<h2>
				<xsl:value-of select="$header" />
				<a>
					<xsl:attribute name="name">
						<xsl:value-of select="concat($type,'_publications_top')" />
					</xsl:attribute>
					<xsl:text> </xsl:text>
				</a>
			</h2>
			
			<!-- display a list of years to jump to -->
			<xsl:call-template name="list_of_publication_years">
				<xsl:with-param name="type">
					<xsl:value-of select="$type" />
				</xsl:with-param>
				<xsl:with-param name="anchor_prefix">
					<xsl:value-of select="concat($type,'_')" />
				</xsl:with-param>
			</xsl:call-template>
			
			<!-- bachlink -->
			<xsl:call-template name="link_publications_top" />
			
			
			<ul class="publications indexKeyContents">
				<!-- we first make a "copy" to be able to use preceeding-sibling on the sorted result -->
				<xsl:variable name="sorted_publications">
					<xsl:for-each select="/Forschungsbericht/Publikation[@Typ=$type]">
						<!-- sort descending by year, then by title -->
						<xsl:sort select="Erscheinung/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Monat" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Tag" data-type="number" order="descending" />
						<xsl:sort select="Titel/PubTitel" />
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>
				<!-- Iterate over the sorted set -->
				<xsl:for-each select="exslt:node-set($sorted_publications)/*">
					<xsl:if test="not(Erscheinung/Jahr = preceding-sibling::*[1]/Erscheinung/Jahr)">
						<!-- Ugly hack -->
						<!-- end current list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[</ul>]]></xsl:text>
						<!-- output heading -->
						<xsl:call-template name="list_heading_year">
							<xsl:with-param name="type">
								<xsl:value-of select="$type" />
							</xsl:with-param>
							<xsl:with-param name="year">
								<xsl:value-of select="Erscheinung/Jahr" />
							</xsl:with-param>
							<xsl:with-param name="anchor_top">
								<xsl:value-of select="concat('#',$type,'_publications_top')" />
							</xsl:with-param>
						</xsl:call-template>
						<!-- start new list -->
						<xsl:text disable-output-escaping="yes"><![CDATA[<ul class="publications indexKeyContents">]]></xsl:text>
					</xsl:if>
					<!-- list of entries -->
					<li class="publication filterable">
						<xsl:call-template name="publication_other" />
					</li>
				</xsl:for-each>
			</ul>
			<xsl:copy-of select="$content_post" />
		</xsl:if>
		<!-- End if Sonstiges type -->
	</xsl:template>
	
	<!-- Inner template: Displays a function, for example in the list of all employees this displays a function "section" heading -->
	<xsl:template name="list_heading_function">
		<!-- Be aware that when changing this code, you also need to adjust the corresponding jquery code in js_filter_index_key -->
		<xsl:param name="type" />
		<xsl:param name="function" />
		<xsl:param name="anchor_top" />
		
		<!-- header -->
		<h2>
			<xsl:attribute name="class">
				<xsl:text>index_heading</xsl:text>
			</xsl:attribute>
			<xsl:attribute name="style">
				<xsl:text>margin-top: 2em; margin-bottom: -1em;</xsl:text>
			</xsl:attribute>
			<xsl:attribute name="id">
				<xsl:text>index_heading_</xsl:text>
				<xsl:value-of select="$type" />
			</xsl:attribute>
			<a>
				<xsl:attribute name="name">
					<xsl:value-of select="$type" />
					<xsl:text>_</xsl:text>
					<xsl:call-template name="urlencode">
						<xsl:with-param name="text">
							<xsl:value-of select="$function" />
						</xsl:with-param>
					</xsl:call-template>
				</xsl:attribute>
				<xsl:attribute name="id">
					<xsl:value-of select="$type" />
					<xsl:text>_</xsl:text>
					<xsl:call-template name="urlencode">
						<xsl:with-param name="text">
							<xsl:value-of select="$function" />
						</xsl:with-param>
					</xsl:call-template>
				</xsl:attribute>
				<xsl:value-of select="$function" />
			</a>
		</h2>
		
		<!-- backlink -->
		<xsl:if test="$enable_totop_backlink = 'true'">
			<a>
				<xsl:attribute name="href">
					<xsl:value-of select="$anchor_top" />
				</xsl:attribute>
				<xsl:call-template name="icon_top" />
				<xsl:call-template name="i18n_totop" />
			</a>
		</xsl:if>
		<br clear="all" />
	</xsl:template>
	
	<!-- Inner template: Displays a year, for example in the list of all publications this displays a year "section" heading -->
	<xsl:template name="list_heading_year">
		<xsl:param name="type" />
		<xsl:param name="year" />
		<xsl:param name="anchor_top" />
		
		<!-- header -->
		<h2>
			<xsl:attribute name="class">
				<xsl:text>index_heading</xsl:text>
			</xsl:attribute>
			<xsl:attribute name="id">
				<xsl:text>heading_</xsl:text>
				<xsl:value-of select="$type" />
				<xsl:text>_year-</xsl:text>
				<xsl:value-of select="$year" />
			</xsl:attribute>
			<a>
				<xsl:attribute name="name">
					<xsl:value-of select="$type" />
					<xsl:text>_year-</xsl:text>
					<xsl:value-of select="$year" />
				</xsl:attribute>
				<xsl:attribute name="id">
					<xsl:value-of select="$type" />
					<xsl:text>_year-</xsl:text>
					<xsl:value-of select="$year" />
				</xsl:attribute>
				<xsl:value-of select="$year" />
			</a>
		</h2>
		<xsl:if test="$enable_totop_backlink = 'true'">
			<a>
				<xsl:attribute name="href">
					<xsl:value-of select="$anchor_top" />
				</xsl:attribute>
				<xsl:call-template name="icon_top" />
				<xsl:call-template name="i18n_to_year_overview" />
			</a>
		</xsl:if>
		<br />
	</xsl:template>
	
	<!-- Inner template: Displays a link to the absolute top of the publications -->
	<xsl:template name="link_publications_top">
		<a href="#publications_top">
			<xsl:call-template name="icon_top" />
			<xsl:call-template name="i18n_to_publications_top" />
		</a>
		<br clear="all" />
	</xsl:template>
	
	<!-- Inner template: Displays the table of contents for the publication output, to be able to jump to the different sections -->
	<xsl:template name="publications_toc">
		<!-- Type order: "Artikel", "Review", "Rezension", "Monographie", "Buchbeitrag", "Fallbeispiel", "Kurzbeitrag", "Vortrag", "Konferenzbeitrag", "Festschrift", "Sonstiges" -->
		<ul>
			<!-- Artikel -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Artikel</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_articles" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Review -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Review</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_reviews" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Rezension -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Rezension</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_bookreviews" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Monographie -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Monographie</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_books" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Buchbeitrag -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Buchbeitrag</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_book_chapters" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Fallbeispiel -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Fallbeispiel</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_case_studies" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Kurzbeitrag -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Kurzbeitrag</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_short_communications" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Vortrag -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Vortrag</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_talks" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Konferenzbeitrag -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Konferenzbeitrag</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_conference_papers" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Festschrift -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Festschrift</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_festschrift" />
				</xsl:with-param>
			</xsl:call-template>
			<!-- Sonstiges -->
			<xsl:call-template name="publications_toc_link">
				<xsl:with-param name="type">
					<xsl:text>Sonstiges</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="i18n_text">
					<xsl:call-template name="i18n_publications_other" />
				</xsl:with-param>
			</xsl:call-template>
		
		</ul>
	</xsl:template>
	
	<!-- Inner template: list item for publications toc -->
	<xsl:template name="publications_toc_link">
		<xsl:param name="type" />
		<xsl:param name="i18n_text" />
		
		<xsl:if test="count(/Forschungsbericht/Publikation[@Typ=$type]) > 0">
			<li style="width: 150px; margin-right: 6em; float: left;">
				<div style="width: 150px; display: block;">
					<a>
						<xsl:attribute name="href">
							<xsl:text>#</xsl:text>
							<xsl:value-of select="$type" />
							<xsl:text>_publications_top</xsl:text>
						</xsl:attribute>
						<xsl:value-of select="$i18n_text" />
					</a>
				</div>
			</li>
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: template for displaying a publication of type Article -->
	<xsl:template name="publication_article">
		<xsl:call-template name="publication_item_author">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_title">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_year">
			<xsl:with-param name="content_post">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_appearance_name">
			<xsl:with-param name="content_pre">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_pages" />
		<xsl:call-template name="publication_item_abstract">
			<xsl:with-param name="content_pre">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_urlpdf">
			<xsl:with-param name="content_pre">
				<br />
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- Inner template for publications: type Monografie -->
	<xsl:template name="publication_book">
		<xsl:call-template name="publication_item_editor" />
		<xsl:call-template name="publication_item_appearance_name">
			<xsl:with-param name="content_pre">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_pages" />
		<xsl:call-template name="publication_item_title">
			<xsl:with-param name="content_pre">
				<br />
			</xsl:with-param>
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_booktitle">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_isbn">
			<xsl:with-param name="content_pre">
				<xsl:text> </xsl:text>
			</xsl:with-param>
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_author" />
		<xsl:call-template name="publication_item_abstract">
			<xsl:with-param name="content_pre">
				<br />
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- Inner template for publications: type Buchbeitrag -->
	<xsl:template name="publication_book_chapter">
		<xsl:call-template name="publication_item_author">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_title">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_booktitle">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_year">
			<xsl:with-param name="content_post">
				<xsl:text>, </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_appearance_name">
			<xsl:with-param name="content_pre">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_pages">
			<xsl:with-param name="content_post">
				<xsl:text>, </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_editor">
			<xsl:with-param name="content_post">
				<xsl:text>, </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_isbn">
			<xsl:with-param name="content_pre">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_abstract">
			<xsl:with-param name="content_pre">
				<br />
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- Inner template for publications: type Sonstiges -->
	<xsl:template name="publication_other">
		<xsl:call-template name="publication_item_author">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_title">
			<xsl:with-param name="content_post">
				<br />
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_appearance_name">
			<xsl:with-param name="content_pre">
				<xsl:text> </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_pages">
			<xsl:with-param name="content_post">
				<xsl:text>, </xsl:text>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:call-template name="publication_item_year" />
		<xsl:call-template name="publication_item_abstract">
			<xsl:with-param name="content_pre">
				<br />
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' --> 
	<xsl:template name="publication_item_author">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(Autor) > 0 and count(Autor/text()) > 0 and Autor/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:for-each select="Autor">
				<xsl:value-of select="." />
				<xsl:if test="not(position() = last())">
					<xsl:text>, </xsl:text>
				</xsl:if>
			</xsl:for-each>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_editor">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(Erscheinung/Herausgeber) > 0 and count(Erscheinung/Herausgeber/text()) > 0 and Erscheinung/Herausgeber/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Erscheinung/Herausgeber" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_year">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(Erscheinung/Jahr) > 0 and count(Erscheinung/Jahr/text()) > 0 and Erscheinung/Jahr/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:value-of select="Erscheinung/Jahr" />
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_title">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(Titel/PubTitel) > 0 and count(Titel/PubTitel/text()) > 0 and Titel/PubTitel/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:choose>
				<xsl:when test="$enable_publications_link_title = 'true' and count(Url) > 0 and count(Url/text()) > 0 and Url/text() != ''">
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="Url" />
						</xsl:attribute>
						<xsl:choose>
							<xsl:when test="count(Titel/PubTitel) > 0 and count(Titel/PubTitel/text()) > 0 and Titel/PubTitel/text() != ''">
								<b>
									<xsl:value-of select="Titel/PubTitel" />
								</b>
							</xsl:when>
							<xsl:otherwise>
								<xsl:text> </xsl:text>
							</xsl:otherwise>
						</xsl:choose>
					</a>
				</xsl:when>
				<xsl:otherwise>
					<b>
						<xsl:value-of select="Titel/PubTitel" />
					</b>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_booktitle">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(Titel/Buchtitel) > 0 and count(Titel/Buchtitel/text()) > 0 and Titel/Buchtitel/text() != ''">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:choose>
				<xsl:when test="$enable_publications_link_title = 'true' and count(Url) > 0 and count(Url/text()) > 0 and Url/text() != ''">
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="Url" />
						</xsl:attribute>
						<i><xsl:call-template name="i18n_appears_in" /><xsl:text>: </xsl:text><xsl:value-of select="Titel/Buchtitel" /></i>
					</a>
				</xsl:when>
				<xsl:otherwise>
					<i><xsl:call-template name="i18n_appears_in" /><xsl:text>: </xsl:text><xsl:value-of select="Titel/Buchtitel" /></i>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_appearance_name">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<!-- Konferenzname angeben, wenn vorhanden, damit es in Article-Type dargestellt wird -->
		<xsl:if test="count(TagungsName) > 0 and count(TagungsName/text()) > 0 and TagungsName/text() != ''">
			<span class="fdb-tagungsname">
				<xsl:value-of select="TagungsName" />
			</span>
		</xsl:if>
		
		<xsl:copy-of select="exslt:node-set($content_pre)" />
		<xsl:if test="count(Erscheinung/Name) > 0 and count(Erscheinung/Name/text()) > 0 and Erscheinung/Name/text() != ''">
			<i>
				<!-- Verlag -->
				<xsl:value-of select="Erscheinung/Name" />
			</i>
		</xsl:if>
		
		<xsl:if test="count(Erscheinung/Name) > 0 and count(Erscheinung/Name/text()) > 0 and Erscheinung/Name/text() != '' and count(Erscheinung/Herausgeber) > 0 and count(Erscheinung/Herausgeber/text()) > 0 and Erscheinung/Herausgeber/text() != ''">
			<xsl:text>, </xsl:text>
		</xsl:if>
		
		<!-- Herausgeber -->
		<xsl:if test="count(Erscheinung/Herausgeber) > 0 and count(Erscheinung/Herausgeber/text()) > 0 and Erscheinung/Herausgeber/text() != ''">
			<xsl:value-of select="Erscheinung/Herausgeber" />
		</xsl:if>

		<xsl:copy-of select="exslt:node-set($content_post)" />
	</xsl:template>                 
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_pages">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		
		<xsl:if test="count(Band) > 0">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:if test="count(Band/Volume/text()) > 0">
				<xsl:text>, </xsl:text>
				<xsl:call-template name="i18n_volume" />
				<xsl:text>: </xsl:text>
				<xsl:value-of select="Band/Volume" />
			</xsl:if>
			<xsl:if test="count(Band/Issue/text()) > 0">
				<xsl:text>, </xsl:text>
				<xsl:call-template name="i18n_issue" />
				<xsl:text>: </xsl:text>
				<xsl:value-of select="Band/Issue" />
			</xsl:if>
			<xsl:if test="count(Band/Supplement/text()) > 0">
				<xsl:text>, </xsl:text>
				<xsl:call-template name="i18n_supplement" />
				<xsl:text>: </xsl:text>
				<xsl:value-of select="Band/Supplement" />
			</xsl:if>
			<!-- Pages -->
			<xsl:choose>
				<xsl:when test="count(Band/SeiteVon/text()) > 0 and count(Band/SeiteBis/text()) > 0">
					<xsl:text>, </xsl:text>
					<xsl:call-template name="i18n_pages" />
					<xsl:text>: </xsl:text>
					<xsl:value-of select="Band/SeiteVon" />
					<xsl:text> - </xsl:text>
					<xsl:value-of select="Band/SeiteBis" />
				</xsl:when>
				<xsl:when test="count(Band/SeiteVon/text()) > 0">
					<xsl:text>, </xsl:text>
					<xsl:call-template name="i18n_page" />
					<xsl:text>: </xsl:text>
					<xsl:value-of select="Band/SeiteVon" />
				</xsl:when>
				<!-- foolproof -->
				<xsl:when test="count(Band/SeiteBis/text()) > 0">
					<xsl:text>, </xsl:text>
					<xsl:call-template name="i18n_page" />
					<xsl:text>: </xsl:text>
					<xsl:value-of select="Band/SeiteBis" />
				</xsl:when>
				<xsl:otherwise />
			</xsl:choose>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_isbn">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(StandardNummer) > 0">
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<xsl:if test="count(StandardNummer/Issn) > 0 and count(StandardNummer/Issn/text()) > 0 and StandardNummer/Issn/text() != ''">
				<xsl:call-template name="i18n_issn" />
				<xsl:text>: </xsl:text>
				<xsl:value-of select="StandardNummer/Issn" />
			</xsl:if>
			<xsl:if test="count(StandardNummer/Isbn) > 0 and count(StandardNummer/Isbn/text()) > 0 and StandardNummer/Isbn/text() != ''">
				<xsl:call-template name="i18n_isbn" />
				<xsl:text>: </xsl:text>
				<xsl:value-of select="StandardNummer/Isbn" />
			</xsl:if>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<!-- Displays the abstract with toggle buttons (if available) -->
	<xsl:template name="publication_item_abstract">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(./Abstract/text()) > 0">
			<xsl:if test="not(./Abstract/text() = '')">
				<xsl:copy-of select="exslt:node-set($content_pre)" />
				<span>
					<span class="mehr expandableButton">
						<span class="toggleElementButtons" style="display:none;">
							<span class="openElement">
								<xsl:call-template name="i18n_open_abstract" />
							</span>
							<span class="closeElement" style="display: none;">
								<xsl:call-template name="i18n_close_abstract" />
							</span>
						</span>
					</span>
				</span>
				<span class="expandable">
					<fieldset>
						<legend>
							<xsl:call-template name="i18n_abstract" />
						</legend>
						<xsl:value-of select="Abstract" />
					</fieldset>
				</span>
				<xsl:copy-of select="exslt:node-set($content_post)" />
			</xsl:if>
		</xsl:if>
	</xsl:template>
	
	
	<!-- Inner template for publications: item elements, all prefixed with 'publication_item_' -->
	<xsl:template name="publication_item_urlpdf">
		<xsl:param name="content_pre" />
		<xsl:param name="content_post" />
		<xsl:if test="count(Urlpdf) > 0 and count(Urlpdf/text()) > 0 and Urlpdf/text() != '' and $enable_pdfurl_display = 'true'">
			
			<!-- get extension -->
			<xsl:variable name="extension">
				<xsl:call-template name="get-file-extension">
					<xsl:with-param name="path" select="translate(Urlpdf,$upperabc,$lowerabc)" />
				</xsl:call-template>
			</xsl:variable>
			
			<xsl:copy-of select="exslt:node-set($content_pre)" />
			<a>
				<xsl:attribute name="href">
					<xsl:value-of select="Urlpdf" />
				</xsl:attribute>
				<xsl:choose>
					<xsl:when test="$extension = 'pdf' or $extension = 'ppt' or $extension = 'doc'">
						<!-- pdf image -->			
						<div>
						  <xsl:attribute name="class">
						      <xsl:text>icon-file-</xsl:text>
						      <xsl:value-of select="$extension" />
						  </xsl:attribute>
						  <xsl:text>&#160;</xsl:text>
						</div>
						<xsl:call-template name="i18n_download_ext">
						    <xsl:with-param name="extension" select="translate($extension,$lowerabc,$upperabc)" />
						</xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<!-- file image -->
						<div class="icon-file"><xsl:text>&#160;</xsl:text></div>
						<xsl:call-template name="i18n_download_file" />
					</xsl:otherwise>
			</xsl:choose>
			</a>
			<xsl:copy-of select="exslt:node-set($content_post)" />
		</xsl:if>
	</xsl:template>
	
	<!-- ############ List templates ################ -->
	<!-- List of publications years -->
	<xsl:template name="list_of_publication_years">
		<xsl:param name="type" />
		<xsl:param name="anchor_prefix" />
		<xsl:call-template name="i18n_years" />
		
		<!-- remember years sorted vy publicationtype or all -->
		<xsl:variable name="sorted_yearlist_pubtype">
			<xsl:choose>
				<xsl:when test="$type = 'all'">
					<xsl:for-each select="//Publikation">
						<xsl:sort select="Erscheinung/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Monat" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Tag" data-type="number" order="descending" />
						<xsl:sort select="Titel/PubTitel" />
						<xsl:copy-of select="." />
					</xsl:for-each>
				</xsl:when>
				<xsl:otherwise>
					<xsl:for-each select="//Publikation[@Typ=$type]">
						<xsl:sort select="Erscheinung/Jahr" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Monat" data-type="number" order="descending" />
						<xsl:sort select="Erscheinung/Tag" data-type="number" order="descending" />
						<xsl:sort select="Titel/PubTitel" />
						<xsl:copy-of select="." />
					</xsl:for-each>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		
		<!-- iterate over stored list -->
		<!-- display a year jumplist -->
		<xsl:for-each select="exslt:node-set($sorted_yearlist_pubtype)/*">
			<xsl:if test="not(Erscheinung/Jahr/text() = preceding-sibling::*[1]/Erscheinung/Jahr/text())">
				<a>
					<xsl:attribute name="class">
						<xsl:text>indexKey</xsl:text>
					</xsl:attribute>
					<xsl:attribute name="href">
						<xsl:text>#</xsl:text>
						<xsl:value-of select="$anchor_prefix" />
						<xsl:text>year-</xsl:text>
						<xsl:value-of select="Erscheinung/Jahr" />
					</xsl:attribute>
					<xsl:value-of select="Erscheinung/Jahr" />
				</a>
				<xsl:variable name="currentYear">
					<xsl:value-of select="Erscheinung/Jahr" />
				</xsl:variable>
				<xsl:if test="count(following-sibling::*/Erscheinung/Jahr[text() != $currentYear]) > 0">
					<xsl:text> | </xsl:text>
				</xsl:if>
			</xsl:if>
		</xsl:for-each>
		
		<!-- display 'show all' link with javascript -->
		<xsl:if test="$enable_javascript = 'true'">
			<span style="display: none" class="indexKeyAll">
				<xsl:attribute name="id">
					<xsl:text>js_indexKey_showAll_</xsl:text>
					<xsl:value-of select="$type" />
				</xsl:attribute>
				<xsl:text> | </xsl:text>
				<a href="#" class="showAllindexKey gray">
					<xsl:call-template name="i18n_show_all" />
				</a>
			</span>
			<script type="text/javascript">
				<xsl:text disable-output-escaping="yes">
					<![CDATA[
					jQuery(document).ready(function() {
						var foo = jQuery('#js_indexKey_showAll_]]></xsl:text><xsl:value-of select="$type" /><xsl:text disable-output-escaping="yes"><![CDATA[');
						foo.show();
					});
					]]>
				</xsl:text>
			</script>
		</xsl:if>
		<br />
	</xsl:template>
	
	<!-- Inner template: List of project years -->
	<xsl:template name="list_of_project_years">
		<xsl:call-template name="i18n_years" />
		
		<!-- store years, sorted -->
		<xsl:variable name="years_sorted">
			<xsl:for-each select="/Forschungsbericht/Projekt">
				<xsl:sort select="Laufzeit/VonDatum/Jahr" data-type="number" order="descending" />
				<year>
					<xsl:value-of select="Laufzeit/VonDatum/Jahr" />
				</year>
			</xsl:for-each>
		</xsl:variable>
		
		<!-- display jumplist -->
		<xsl:for-each select="exslt:node-set($years_sorted)//year">
			<xsl:if test="not(./text() = following-sibling::*/text())">
				<a>
					<xsl:attribute name="class">
						<xsl:text>indexKey</xsl:text>
					</xsl:attribute>
					<xsl:attribute name="href">
						<xsl:text>#project_year-</xsl:text>
						<xsl:value-of select="." />
					</xsl:attribute>
					<xsl:value-of select="." />
				</a>
				<xsl:if test="not(position() = last())">
					<xsl:text> | </xsl:text>
				</xsl:if>
			</xsl:if>
		</xsl:for-each>
		
		<!-- with javascript, display 'show all' link -->
		<xsl:if test="$enable_javascript = 'true'">
			<span style="display: none" class="indexKeyAll">
				<xsl:attribute name="id">
					<xsl:text>js_indexKey_showAll</xsl:text>
				</xsl:attribute>
				<xsl:text> | </xsl:text>
				<a href="#" class="showAllindexKey gray">
					<xsl:call-template name="i18n_show_all" />
				</a>
			</span>
			<script type="text/javascript">
				<xsl:text disable-output-escaping="yes">
					<![CDATA[
					jQuery(document).ready(function() {
						var foo = jQuery('#js_indexKey_showAll');
						foo.show();
					});
					]]>
				</xsl:text>
			</script>
		</xsl:if>
	</xsl:template>
	
	<xsl:template name="list_of_thesis_years">
		<xsl:param name="items" />
		<xsl:param name="type" />
		<xsl:param name="anchor_prefix" />
		<xsl:call-template name="i18n_years" />
		
		<!-- iterate over stored list -->
		<!-- display a year jumplist -->
		<xsl:for-each select="exslt:node-set($items)/items/Arbeit">
			<xsl:if test="not(Datum/Jahr/text() = preceding-sibling::*[1]/Datum/Jahr/text())">
				<a>
					<xsl:attribute name="class">
						<xsl:text>indexKey</xsl:text>
					</xsl:attribute>
					<xsl:attribute name="href">
						<xsl:text>#</xsl:text>
						<xsl:value-of select="$anchor_prefix" />
						<xsl:text>year-</xsl:text>
						<xsl:value-of select="Datum/Jahr" />
					</xsl:attribute>
					<xsl:value-of select="Datum/Jahr" />
				</a>
				<xsl:variable name="currentYear">
					<xsl:value-of select="Datum/Jahr" />
				</xsl:variable>
				<xsl:if test="count(following-sibling::*/Datum/Jahr[text() != $currentYear]) > 0">
					<xsl:text> | </xsl:text>
				</xsl:if>
			</xsl:if>
		</xsl:for-each>
		
		<!-- display 'show all' link with javascript -->
		<xsl:if test="$enable_javascript = 'true'">
			<span style="display: none" class="indexKeyAll">
				<xsl:attribute name="id">
					<xsl:text>js_indexKey_showAll_</xsl:text>
					<xsl:value-of select="$type" />
				</xsl:attribute>
				<xsl:text> | </xsl:text>
				<a href="#" class="showAllindexKey gray">
					<xsl:call-template name="i18n_show_all" />
				</a>
			</span>
			<script type="text/javascript">
				<xsl:text disable-output-escaping="yes">
					<![CDATA[
					jQuery(document).ready(function() {
						var foo = jQuery('#js_indexKey_showAll_]]></xsl:text><xsl:value-of select="$type" /><xsl:text disable-output-escaping="yes"><![CDATA[');
						foo.show();
					});
					]]>
				</xsl:text>
			</script>
		</xsl:if>
		<br />
	</xsl:template>
	
	<!-- Jumplist for alphabetical employee list A | B | C | ... | Z | all -->
	<xsl:template name="list_of_employees_chars">
		<!-- Be aware that when changing this code, you also need to adjust the corresponding jquery code in js_filter_index_key -->
		<!-- remember names -->
		<xsl:variable name="mitarbeiter_sorted">
			<xsl:for-each select="/Forschungsbericht/Mitarbeiter">
				<xsl:sort select="substring(Name/Nachname,1,1)" />
				<letter>
					<xsl:value-of select="substring(Name/Nachname,1,1)" />
				</letter>
			</xsl:for-each>
		</xsl:variable>
		<!-- create unique jumplist -->
		<xsl:for-each select="exslt:node-set($mitarbeiter_sorted)//letter">
			<xsl:variable name="firstLetter" select="normalize-space(.)" />
			<xsl:if test="not($firstLetter = normalize-space(following-sibling::*//text()))">
				<a>
					<xsl:attribute name="class">
						<xsl:text>indexKey</xsl:text>
					</xsl:attribute>
					<xsl:attribute name="href">
						<xsl:text>#employees_</xsl:text>
						<xsl:value-of select="$firstLetter" />
						<xsl:text>_</xsl:text>
						<xsl:value-of select="$firstLetter" />
					</xsl:attribute>
					<xsl:value-of select="$firstLetter" />
				</a>
				<xsl:if test="not(position() = last())">
					<xsl:text> | </xsl:text>
				</xsl:if>
			</xsl:if>
		</xsl:for-each>
		<!-- displayjavascript show all link -->
		<xsl:if test="$enable_javascript = 'true'">
			<span style="display: none" class="indexKeyAll">
				<xsl:attribute name="id">
					<xsl:text>js_indexKey_showAll</xsl:text>
				</xsl:attribute>
				<xsl:text> | </xsl:text>
				<a href="#" class="showAllindexKey gray">
					<xsl:call-template name="i18n_show_all" />
				</a>
			</span>
			<script type="text/javascript">
				<xsl:text disable-output-escaping="yes">
					<![CDATA[
					jQuery(document).ready(function() {
						var foo = jQuery('#js_indexKey_showAll');
						foo.show();
					});
					]]>
				</xsl:text>
			</script>
		</xsl:if>
	</xsl:template>
	
	<!-- #################### ICONS #################### --> 
	<!-- Icons -->
	<xsl:template name="icon_top">
		<img src="http://www.zuv.uni-freiburg.de/service/wsg/webresources/icons/top.gif" width="8" height="8" alt="Icon: top"/>
		<xsl:text>&#160;</xsl:text>
	</xsl:template>
	
	<xsl:template name="icon_email">
		<img src="http://www.zuv.uni-freiburg.de/service/wsg/webresources/icons/mail_icon.gif" width="8" height="8" alt="Icon: E-Mail" />
	</xsl:template>
	
	<!-- #################### Javascript templates #################### -->
	<!-- Javascripts, dont' change them if you don't know what you are doing! -->
	
	<!-- Javascript for filtering by indey_key, i.e. alphabetical of function jumplists -->
	<xsl:template name="js_filter_index_key">
		<!-- this matches the code in list_of_employees_chars -->
		<script type="text/javascript">
			<xsl:text disable-output-escaping="yes">
			<![CDATA[
			/* <![CDATA[ */
				function showAllIndexKeys() {
					jQuery('.index_heading').show();
					]]></xsl:text>
					<xsl:choose>
						<xsl:when test="$enable_totop_backlink = 'true'">
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery('.index_heading').next('a').show();
							jQuery('.index_heading').next('a').next('br').show();
							jQuery('.index_heading').next('a').next('br').next('.indexKeyContents').show();]]>
							</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery('.index_heading').next('br').show();
							jQuery('.index_heading').next('br').next('.indexKeyContents').show();]]>
							</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:text disable-output-escaping="yes">
					<![CDATA[
					jQuery('.indexKeyAll').children('a').addClass('gray');
					jQuery('a.indexKey').removeClass('gray');
				}
				
				function hideAllIndexKeys() {
					jQuery('.index_heading').hide();
					]]></xsl:text>
					<xsl:choose>
						<xsl:when test="$enable_totop_backlink = 'true'">
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery('.index_heading').next('a').hide();
					jQuery('.index_heading').next('a').next('br').hide();
					jQuery('.index_heading').next('a').next('br').next('.indexKeyContents').hide();]]>
							</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery('.index_heading').next('br').hide();
					jQuery('.index_heading').next('br').next('.indexKeyContents').hide();]]>
							</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:text disable-output-escaping="yes">
					<![CDATA[
					
				}
				
				function showOnlyIndexKey(key) {
					hideAllIndexKeys();
					jQuery('.index_heading').each(function() {
						var thisKey = jQuery(this).children('a').html();
						if (key == thisKey) {
							jQuery(this).show();
							]]></xsl:text>
							<xsl:choose>
								<xsl:when test="$enable_totop_backlink = 'true'">
									<xsl:text disable-output-escaping="yes">
										<![CDATA[jQuery(this).next('a').show();
							jQuery(this).next('a').next('br').show();
							jQuery(this).next('a').next('br').next('.indexKeyContents').show();]]>
									</xsl:text>
								</xsl:when>
								<xsl:otherwise>
									<xsl:text disable-output-escaping="yes">
										<![CDATA[jQuery(this).next('br').show();
							jQuery(this).next('br').next('.indexKeyContents').show();]]>
									</xsl:text>
								</xsl:otherwise>
							</xsl:choose>
							<xsl:text disable-output-escaping="yes">
							<![CDATA[
						}
					});
					jQuery('a.indexKey').each(function() {
						var thisKey = jQuery(this).html();
						if (key != thisKey) {
							jQuery(this).addClass('gray');
						} else {
							jQuery(this).removeClass('gray');
						}
					});
					jQuery('.indexKeyAll').children('a').removeClass('gray');
					return false;
				}
				
				jQuery(document).ready(function() {
					jQuery('.indexKey').click(function(event){
					    event.preventDefault();
					    showOnlyIndexKey(jQuery(this).html());
					});
					
					jQuery('.showAllindexKey').click(function(event){
					    event.preventDefault();
					    showAllIndexKeys();
					});
				});
			]]>
			</xsl:text>
			<xsl:text disable-output-escaping="yes">/* ]]</xsl:text><xsl:text disable-output-escaping="yes">> */</xsl:text>
		</script>
	</xsl:template>
	
	<!-- "Search" filter function -->
	<xsl:template name="js_filter_text">
		<span id="js_filter_text" style="display: none">
			<label for="js_filter_text_input">
				<xsl:call-template name="i18n_js_filter_label" />
				<xsl:text>: </xsl:text>
			</label>
			<input type="text" name="js_filter_text_input" value="" id="js_filter_text_input" />
			<input type="button" name="js_filter_text_clear" id="js_filter_text_clear">
				<xsl:attribute name="value">
					<xsl:call-template name="i18n_attr_js_publications_filter_clear" />
				</xsl:attribute>
			</input>
		</span>
		<br />
		<script type="text/javascript">
			<xsl:text disable-output-escaping="yes">
				<![CDATA[
				/* <![CDATA[ */
				// show all Headers
				function showAllHeadings() {
					jQuery('.index_heading').each(function() {
						jQuery(this).show();
						]]></xsl:text>
					<xsl:choose>
						<xsl:when test="$enable_totop_backlink = 'true'">
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery(this).next('a').show();
						jQuery(this).next('a').next('br').show();]]>
							</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery(this).next('br').show();]]>
							</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:text disable-output-escaping="yes">
					<![CDATA[
					});
				}
				
				// Check if all elements of a header are hidden, if so hide header too
				function hideHeadersIfAllHidden(selector) {
					jQuery('.index_heading').each(function(){
						var allHidden = true;
						]]></xsl:text>
					<xsl:choose>
						<xsl:when test="$enable_totop_backlink = 'true'">
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery(this).next('a').next('br').next('.indexKeyContents').children(selector).each(function() {]]>
							</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery(this).next('br').next('.indexKeyContents').children(selector).each(function() {]]>
							</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:text disable-output-escaping="yes">
					<![CDATA[
							if ((jQuery(this).is(':visible'))) {
								allHidden = false;
							}
						});
						if (allHidden) {
						]]></xsl:text>
					<xsl:choose>
						<xsl:when test="$enable_totop_backlink = 'true'">
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery(this).next('a').hide();
							jQuery(this).next('a').next('br').hide();
							jQuery(this).hide();]]>
							</xsl:text>
						</xsl:when>
						<xsl:otherwise>
							<xsl:text disable-output-escaping="yes">
								<![CDATA[jQuery(this).next('br').hide();
							jQuery(this).hide();]]>
							</xsl:text>
						</xsl:otherwise>
					</xsl:choose>
					<xsl:text disable-output-escaping="yes">
					<![CDATA[
							
						}
					});
				}
				
				// text filter function
				function js_publications_filter(selector, query) {
					// trim white space
					query	= jQuery.trim(query);
					// add OR for regex query
					query = query.replace(/ /gi, '|'); 
				
					// apply regex filter on elements
					jQuery(selector).each(function() {
						if  (!(jQuery(this).text().search(new RegExp(query, "i")) >= 0)) {
							jQuery(this).hide();
						} else {
							jQuery(this).show();
						}
					});
				  
					// check Headings after filtering
					hideHeadersIfAllHidden(selector);
				}
				
				// initialize the filter
				jQuery(document).ready(function() {
					var foo = jQuery('#js_filter_text');
					foo.show();
					
					//default each row to visible
					jQuery('.filterable:hidden').show();
					
					// act on keypress
					jQuery('#js_filter_text_input').keyup(function(event) {
						// if backspace is pressed or delete is pressed reset filters
						if (event.keyCode == 8 || event.keyCode == 46) {
							jQuery('.filterable:hidden').show();
							showAllHeadings();
							// search will be performed afterwards, see else below
						}
					
						//if esc is pressed or nothing is entered
						if (event.keyCode == 27 || jQuery(this).val() == '') {
							// if esc is pressed we want to clear the value of search box
							jQuery(this).val('');
							
							//we want each row to be visible because if nothing
							//is entered then all rows are matched.
							jQuery('.filterable:hidden').show();
							showAllHeadings();
						}
					
						// if there is text, lets filter
						else {
							js_publications_filter('.filterable:visible', jQuery(this).val());
						}
					});
					
					// register listener on clear button
					jQuery('#js_filter_text_clear').click(function(event){
					    event.preventDefault();
					    
					    // clear filter text
					    jQuery('#js_filter_text_input').val('');
					    
					    // show all entries
					    jQuery('.filterable:hidden').show();
					    
					    // show all Headings
					    showAllHeadings();
					});
					
				});
				]]>
			</xsl:text>
			<xsl:text disable-output-escaping="yes">/* ]]</xsl:text><xsl:text disable-output-escaping="yes">> */</xsl:text>
		</script>
	</xsl:template>
	
	<!-- Javascript toggle functions, i.e. for abstract toggling -->
	<xsl:template name="js_toggle">
		<script type="text/javascript">
			<xsl:text disable-output-escaping="yes">
				<![CDATA[
				/* <![CDATA[ */
				jQuery(document).ready(function() {
				    // hide content on load if js enabled
				    jQuery(".expandable").hide();
				    // show buttons on load if js enabled
				    jQuery(".toggleElementButtons").show();
				    jQuery(".expandableButton").addClass('collapse').removeClass('expanded');
		
				    jQuery(".expandableButton").click(function() {
					var curElement = jQuery(this);
					var expandElement = curElement.parent().next(".expandable");
					if (curElement.hasClass('collapse')) {
					    expandElement.show();
					    jQuery(".openElement", this).hide();
					    jQuery(".closeElement", this).show();
					    curElement.removeClass('collapse').addClass('expanded');
					    expandElement.removeClass('collapse').addClass('expanded');
					} else {
					    expandElement.hide();
					    jQuery(".openElement", this).show();
					    jQuery(".closeElement", this).hide();
					    curElement.removeClass('expanded').addClass('collapse');
					    expandElement.removeClass('collapse').addClass('expanded');
					}
				    });
				});
				]]>
			</xsl:text>
			<xsl:text disable-output-escaping="yes">/* ]]</xsl:text><xsl:text disable-output-escaping="yes">> */</xsl:text>
		</script>
	</xsl:template>
	
	<!-- ############# Other templates ############# --> 
	<!-- transform a string to something linkable -->
	<xsl:template name="urlencode">
		<xsl:param name="text" />
		<xsl:value-of select="translate(normalize-space($text),' ','_')" />
	</xsl:template>
	
	<!-- Inner template: add float attribute depending on the parameter of the xslt -->
	<xsl:template name="attr_image_float">
		<xsl:choose>
			<xsl:when test="$image_float = 'right'">
				<xsl:text>float: right;</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:text>float: left;</xsl:text>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
	<!-- Display the fax prefix -->
	<xsl:template name="display_phone_fax_prefix_number">
		<div style="display: block; width: 100%; margin-bottom: -2em;">
			<div style="float:right; margin-right:5em; font-style: italic;">
					<xsl:call-template name="i18n_label_phone_fax_prefix" />
					<xsl:text>: </xsl:text>
					<xsl:text>+49 761 203 - ...</xsl:text>
			</div>
			<br clear="all" />
		</div>
	</xsl:template>
	
	<!-- employees list, table headers, re-use the employee_short_template with default paramters (outputs the header) -->
	<xsl:template name="employees_list_short_column_headers">
		<xsl:if test="not($employees_image = 'true')">
			<!-- add filterable for javascript text filter -->
			<div class="filterable">
				<xsl:call-template name="employee_short_template">
					<xsl:with-param name="content_pre">
						<br clear="all" />
					</xsl:with-param>
					<xsl:with-param name="content_post">
						<br clear="all" />
						<div style="display: block; border-bottom: 1px solid #C9CAC8; font-size: 1pt;">
							&#160;
						</div>
					</xsl:with-param>
				</xsl:call-template>
			</div>
		</xsl:if>
	</xsl:template>
	
	
	<!-- ############# Internals ############# --> 
	<xsl:template name="copyright_notice">
		<xsl:text disable-output-escaping="yes">&lt;!-- Generated with an XSLT Stylesheet created by Dr. Christoph Hermann &lt;info@drhermann.de&gt; --&gt;</xsl:text>
	</xsl:template>
	<xsl:template name="version_information">
		<xsl:text disable-output-escaping="yes">&lt;!-- Stylesheet: </xsl:text>
		<xsl:value-of select="$version_information" />
		<xsl:text disable-output-escaping="yes"> --&gt;</xsl:text>
	</xsl:template>
	
	
	<!-- ############# CSS templates, these creates invalid but usually parseable HTML ############# -->
	<xsl:template name="css_main">
		<style type="text/css">
			<xsl:text>
				<![CDATA[.gray {
						color: #CCC;
					 }]]>
			</xsl:text>
		</style>
	</xsl:template>
	
	
	
	
	
	<!-- ################ I18N Templates ##################### -->
	<!-- i18n templates: we surround all i18n text elements with a span, because it doesn't hurt and eases finding the text from the source code in the xsl stylesheet -->
	<xsl:template name="i18n_totop">
		<span class="i18n_totop">
			<xsl:choose>
				<xsl:when test="$language='E'">back to the top</xsl:when>
				<xsl:otherwise>nach oben</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_to_year_overview">
		<span class="i18n_to_year_overview">
			<xsl:choose>
				<xsl:when test="$language='E'">back to the year overview</xsl:when>
				<xsl:otherwise>nach oben zur Jahresübersicht</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_to_publications_top">
		<span class="i18n_to_publications_top">
			<xsl:choose>
				<xsl:when test="$language='E'">back to the top of all publications</xsl:when>
				<xsl:otherwise>zurück zur Übersicht aller Publikationen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_to_employees_top">
		<span class="i18n_to_employees_top">
			<xsl:choose>
				<xsl:when test="$language='E'">back to the top of all employees</xsl:when>
				<xsl:otherwise>zurück zur Übersicht aller Mitarbeiter</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_years">
		<span class="i18n_years">
			<xsl:choose>
				<xsl:when test="$language='E'">Years</xsl:when>
				<xsl:otherwise>Jahre</xsl:otherwise>
			</xsl:choose>
			<xsl:text>: </xsl:text>
		</span>
	</xsl:template>
	<xsl:template name="i18n_all_years">
		<span class="i18n_all_years">
			<xsl:choose>
				<xsl:when test="$language='E'">show all years</xsl:when>
				<xsl:otherwise>alle Jahre anzeigen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_show_all">
		<span class="i18n_show_all">
			<xsl:choose>
				<xsl:when test="$language='E'">show all</xsl:when>
				<xsl:otherwise>alle anzeigen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications">
		<span class="i18n_publications">
			<xsl:choose>
				<xsl:when test="$language='E'">Publications</xsl:when>
				<xsl:otherwise>Publikationen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_projects">
		<span class="i18n_projects">
			<xsl:choose>
				<xsl:when test="$language='E'">Scientific and Research Projects</xsl:when>
				<xsl:otherwise>Wissenschaftliche Projekte und Forschungsvorhaben</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_articles">
		<span class="i18n_publications_articles">
			<xsl:choose>
				<xsl:when test="$language='E'">Journal Articles</xsl:when>
				<xsl:otherwise>Originalarbeiten in wissenschaftlichen Fachzeitschriften</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_reviews">
		<span class="i18n_publications_reviews">
			<xsl:choose>
				<xsl:when test="$language='E'">Reviews</xsl:when>
				<xsl:otherwise>Reviews/Übersichtsartikel in wissenschaftlichen Fachzeitschriften</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_bookreviews">
		<span class="i18n_publications_bookreviews">
			<xsl:choose>
				<xsl:when test="$language='E'">Book reviews</xsl:when>
				<xsl:otherwise>Rezensionen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_books">
		<span class="i18n_publications_books">
			<xsl:choose>
				<xsl:when test="$language='E'">Books</xsl:when>
				<xsl:otherwise>Monographien</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_book_chapters">
		<span class="i18n_publications_book_chapters">
			<xsl:choose>
				<xsl:when test="$language='E'">Book chapters</xsl:when>
				<xsl:otherwise>Buchbeiträge</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_case_studies">
		<span class="i18n_publications_case_studies">
			<xsl:choose>
				<xsl:when test="$language='E'">Case studies</xsl:when>
				<xsl:otherwise>Fallbeispiele</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_short_communications">
		<span class="i18n_publications_short_communications">
			<xsl:choose>
				<xsl:when test="$language='E'">Short communications</xsl:when>
				<xsl:otherwise>Kurzbeiträge</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_talks">
		<span class="i18n_publications_talks">
			<xsl:choose>
				<xsl:when test="$language='E'">Talks</xsl:when>
				<xsl:otherwise>Vorträge</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_conference_papers">
		<span class="i18n_publications_conference_papers">
			<xsl:choose>
				<xsl:when test="$language='E'">Conference papers</xsl:when>
				<xsl:otherwise>Konferenzbeiträge</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_festschrift">
		<span class="i18n_publications_festschrift">
			<xsl:choose>
				<xsl:when test="$language='E'">Festschriften</xsl:when>
				<xsl:otherwise>Festschriften</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_publications_other">
		<span class="i18n_publications_other">
			<xsl:choose>
				<xsl:when test="$language='E'">Other publications</xsl:when>
				<xsl:otherwise>Sonstige Publikationen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_first_reviewer">
		<span class="i18n_first_reviewer">
			<xsl:choose>
				<xsl:when test="$language='E'">First reviewer</xsl:when>
				<xsl:otherwise>Erstgutachter</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_second_reviewer">
		<span class="i18n_second_reviewer">
			<xsl:choose>
				<xsl:when test="$language='E'">Second reviewer</xsl:when>
				<xsl:otherwise>Zweitgutachter</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_abstract">
		<span class="i18n_abstract">
			<xsl:choose>
				<xsl:when test="$language='E'">Abstract</xsl:when>
				<xsl:otherwise>Kurzfassung</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_open_abstract">
		<span class="i18n_open_abstract">
			<xsl:text>» </xsl:text>
			<xsl:choose>
				<xsl:when test="$language='E'">show abstract</xsl:when>
				<xsl:otherwise>Kurzfassung anzeigen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_close_abstract">
		<span class="i18n_close_abstract">
			<xsl:text>« </xsl:text>
			<xsl:choose>
				<xsl:when test="$language='E'">hide abstract</xsl:when>
				<xsl:otherwise>Kurzfassung verbergen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_leader">
		<span class="i18n_project_leader">
			<xsl:choose>
				<xsl:when test="$language='E'">Project manager</xsl:when>
				<xsl:otherwise>Projektleitung</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_timespan">
		<span class="i18n_project_timespan">
			<xsl:choose>
				<xsl:when test="$language='E'">Start/End of project</xsl:when>
				<xsl:otherwise>Laufzeit</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_until">
		<span class="i18n_until">
			<xsl:choose>
				<xsl:when test="$language='E'">until</xsl:when>
				<xsl:otherwise>bis</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_since">
		<span class="i18n_since">
			<xsl:choose>
				<xsl:when test="$language='E'">since</xsl:when>
				<xsl:otherwise>Von</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_unlimited">
		<span class="i18n_unlimited">
			<xsl:choose>
				<xsl:when test="$language='E'">unlimited</xsl:when>
				<xsl:otherwise>unbegrenzt</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_link_project_details">
		<span class="i18n_link_project_details">
			<xsl:choose>
				<xsl:when test="$language='E'">Project details</xsl:when>
				<xsl:otherwise>Details zum Projekt</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_contactperson">
		<span class="i18n_project_contactperson">
			<xsl:choose>
				<xsl:when test="$language='E'">Contact person</xsl:when>
				<xsl:otherwise>Ansprechpartner/in</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_description">
		<span class="i18n_project_description">
			<xsl:choose>
				<xsl:when test="$language='E'">Project description</xsl:when>
				<xsl:otherwise>Projektbeschreibung</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_phone">
		<span class="i18n_project_phone">
			<xsl:choose>
				<xsl:when test="$language='E'">Phone</xsl:when>
				<xsl:otherwise>Telefon</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_email">
		<span class="i18n_project_email">
			<xsl:choose>
				<xsl:when test="$language='E'">Email</xsl:when>
				<xsl:otherwise>E-Mail</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_url">
		<span class="i18n_project_url">
			<xsl:choose>
				<xsl:when test="$language='E'">Web</xsl:when>
				<xsl:otherwise>WWW</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_cooperation">
		<span class="i18n_project_cooperation">
			<xsl:choose>
				<xsl:when test="$language='E'">Partners</xsl:when>
				<xsl:otherwise>Kooperationspartner</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_project_financing">
		<span class="i18n_project_financing">
			<xsl:choose>
				<xsl:when test="$language='E'">Funding</xsl:when>
				<xsl:otherwise>Finanzierung</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_keywords">
		<span class="i18n_keywords">
			<xsl:choose>
				<xsl:when test="$language='E'">Keywords</xsl:when>
				<xsl:otherwise>Schlagworte</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_appears_in">
		<span class="i18n_appears_in">
			<xsl:choose>
				<xsl:when test="$language='E'">In</xsl:when>
				<xsl:otherwise>In</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_appears_series">
		<span class="i18n_appears_series">
			<xsl:choose>
				<xsl:when test="$language='E'">series</xsl:when>
				<xsl:otherwise>Reihe</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_inventions">
		<span class="i18n_inventions">
			<xsl:choose>
				<xsl:when test="$language='E'">Inventions</xsl:when>
				<xsl:otherwise>Erfindungen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employees">
		<span class="i18n_employees">
			<xsl:choose>
				<xsl:when test="$language='E'">Employees</xsl:when>
				<xsl:otherwise>Mitarbeiter/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_consultation_hours">
		<span class="i18n_consultation_hours">
			<xsl:choose>
				<xsl:when test="$language='E'">Consultation hours</xsl:when>
				<xsl:otherwise>Sprechstunden</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_js_filter_label">
		<span class="i18n_js_filter_label">
			<xsl:choose>
				<xsl:when test="$language='E'">filter list</xsl:when>
				<xsl:otherwise>Liste filtern</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_name">
		<span class="i18n_label_name">
			<xsl:choose>
				<xsl:when test="$language='E'">Name</xsl:when>
				<xsl:otherwise>Name</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_chair">
		<span class="i18n_label_chair">
			<xsl:choose>
				<xsl:when test="$language='E'">Chair</xsl:when>
				<xsl:otherwise>Professur</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_function">
		<span class="i18n_label_function">
			<xsl:choose>
				<xsl:when test="$language='E'">Function</xsl:when>
				<xsl:otherwise>Funktion</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_phone">
		<span class="i18n_label_phone">
			<xsl:choose>
				<xsl:when test="$language='E'">Phone number</xsl:when>
				<xsl:otherwise>Telefon</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_phone_fax_prefix">
		<span class="i18n_label_phone_fax_prefix">
			<xsl:choose>
				<xsl:when test="$language='E'">Phone/Fax number prefix</xsl:when>
				<xsl:otherwise>Telefon-/Faxnummer-Vorwahl</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_email">
		<span class="i18n_label_email">
			<xsl:choose>
				<xsl:when test="$language='E'">Email</xsl:when>
				<xsl:otherwise>E-Mail</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_room">
		<span class="i18n_label_room">
			<xsl:choose>
				<xsl:when test="$language='E'">Office</xsl:when>
				<xsl:otherwise>Büro</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_fax">
		<span class="i18n_label_fax">
			<xsl:choose>
				<xsl:when test="$language='E'">Fax number</xsl:when>
				<xsl:otherwise>Faxnummer</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_url">
		<span class="i18n_label_url">
			<xsl:choose>
				<xsl:when test="$language='E'">Url</xsl:when>
				<xsl:otherwise>Webseite</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_consultation_hours_semester">
		<span class="i18n_label_consultation_hours_semester">
			<xsl:choose>
				<xsl:when test="$language='E'">During the semester</xsl:when>
				<xsl:otherwise>Während des Semesters</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_label_consultation_hours_semester_break">
		<span class="i18n_label_consultation_hours_semester_break">
			<xsl:choose>
				<xsl:when test="$language='E'">During the semester break</xsl:when>
				<xsl:otherwise>Während der vorlesungsfreien Zeit</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_director">
		<span class="i18n_employee_function_director">
			<xsl:choose>
				<xsl:when test="$language='E'">Director</xsl:when>
				<xsl:otherwise>Leiter/in</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_secretary">
		<span class="i18n_employee_function_secretary">
			<xsl:choose>
				<xsl:when test="$language='E'">Secretary</xsl:when>
				<xsl:otherwise>Sekretariat</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_administration">
		<span class="i18n_employee_function_administration">
			<xsl:choose>
				<xsl:when test="$language='E'">Administration</xsl:when>
				<xsl:otherwise>Administration/Verwaltung</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_marketing">
		<span class="i18n_employee_function_marketing">
			<xsl:choose>
				<xsl:when test="$language='E'">Marketing</xsl:when>
				<xsl:otherwise>Marketing/PR</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_senior_scientist">
		<span class="i18n_employee_function_senior_scientist">
			<xsl:choose>
				<xsl:when test="$language='E'">Senior scientists</xsl:when>
				<xsl:otherwise>Leitende/r wissenschaftliche/r Mitarbeiter/in</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_group_leader">
		<span class="i18n_employee_function_group_leader">
			<xsl:choose>
				<xsl:when test="$language='E'">Group leaders</xsl:when>
				<xsl:otherwise>Assistent/innen / Gruppenleiter/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_postdoc">
		<span class="i18n_employee_function_postdoc">
			<xsl:choose>
				<xsl:when test="$language='E'">Postdocs</xsl:when>
				<xsl:otherwise>Postdocs</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_scientific_staff">
		<span class="i18n_employee_function_scientific_staff">
			<xsl:choose>
				<xsl:when test="$language='E'">Scientific staff</xsl:when>
				<xsl:otherwise>Wissenschaftliche Mitarbeiter/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_visiting_researcher">
		<span class="i18n_employee_function_visiting_researcher">
			<xsl:choose>
				<xsl:when test="$language='E'">Visiting researchers</xsl:when>
				<xsl:otherwise>Gastwissenschaftler/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_visiting_professor">
		<span class="i18n_employee_function_visiting_professor">
			<xsl:choose>
				<xsl:when test="$language='E'">Visiting professors</xsl:when>
				<xsl:otherwise>Gastprofessor/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_technical_staff">
		<span class="i18n_employee_function_technical_staff">
			<xsl:choose>
				<xsl:when test="$language='E'">Technical staff</xsl:when>
				<xsl:otherwise>Technische Mitarbeiter/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_phd_student">
		<span class="i18n_employee_function_phd_student">
			<xsl:choose>
				<xsl:when test="$language='E'">PhD students</xsl:when>
				<xsl:otherwise>Doktorand/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_external_phd_student">
		<span class="i18n_employee_function_external_phd_student">
			<xsl:choose>
				<xsl:when test="$language='E'">External PhD students</xsl:when>
				<xsl:otherwise>Externe Doktorand/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_master_student">
		<span class="i18n_employee_function_master_student">
			<xsl:choose>
				<xsl:when test="$language='E'">Master students</xsl:when>
				<xsl:otherwise>Master-Studierende</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_bachelor_student">
		<span class="i18n_employee_function_bachelor_student">
			<xsl:choose>
				<xsl:when test="$language='E'">Bachelor students</xsl:when>
				<xsl:otherwise>Bachelor-Studierende</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_student_assistant">
		<span class="i18n_employee_function_student_assistant">
			<xsl:choose>
				<xsl:when test="$language='E'">Student assistants</xsl:when>
				<xsl:otherwise>Wissenschaftliche Hilfskräfte</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_other_student">
		<span class="i18n_employee_function_other_student">
			<xsl:choose>
				<xsl:when test="$language='E'">Other students</xsl:when>
				<xsl:otherwise>Sonstige Studierende</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_service">
		<span class="i18n_employee_function_service">
			<xsl:choose>
				<xsl:when test="$language='E'">Service</xsl:when>
				<xsl:otherwise>Service</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_it">
		<span class="i18n_employee_function_it">
			<xsl:choose>
				<xsl:when test="$language='E'">IT</xsl:when>
				<xsl:otherwise>EDV</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_intern">
		<span class="i18n_employee_function_intern">
			<xsl:choose>
				<xsl:when test="$language='E'">Interns</xsl:when>
				<xsl:otherwise>Azubis / Praktikanten/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_past_staff_members">
		<span class="i18n_employee_function_past_staff_members">
			<xsl:choose>
				<xsl:when test="$language='E'">Past members of staff</xsl:when>
				<xsl:otherwise>Ehemalige Mitarbeiter/innen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_function_other">
		<span class="i18n_employee_function_other">
			<xsl:choose>
				<xsl:when test="$language='E'">Other people</xsl:when>
				<xsl:otherwise>Weitere Mitarbeiter/innen und Personen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_employee_personal_website">
                <span class="i18n_employee_personal_website">
                        <xsl:choose>
                                <xsl:when test="$language='E'">Personal website</xsl:when>
                                <xsl:otherwise>Persönliche Webseite</xsl:otherwise>
                        </xsl:choose>
                </span>
	</xsl:template>
	<xsl:template name="i18n_volume">
		<span class="i18n_volume">
			<xsl:choose>
				<xsl:when test="$language='E'">volume</xsl:when>
				<xsl:otherwise>Band</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_issue">
		<span class="i18n_issue">
			<xsl:choose>
				<xsl:when test="$language='E'">issue</xsl:when>
				<xsl:otherwise>Nummer</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_supplement">
		<span class="i18n_supplement">
			<xsl:choose>
				<xsl:when test="$language='E'">supplement</xsl:when>
				<xsl:otherwise>Ergänzungsband</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_pages">
		<span class="i18n_pages">
			<xsl:choose>
				<xsl:when test="$language='E'">pages</xsl:when>
				<xsl:otherwise>Seiten</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_page">
		<span class="i18n_page">
			<xsl:choose>
				<xsl:when test="$language='E'">page</xsl:when>
				<xsl:otherwise>Seite</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_isbn">
		<span class="i18n_isbn">
			<xsl:choose>
				<xsl:when test="$language='E'">ISBN</xsl:when>
				<xsl:otherwise>ISBN</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_issn">
		<span class="i18n_issn">
			<xsl:choose>
				<xsl:when test="$language='E'">ISSN</xsl:when>
				<xsl:otherwise>ISSN</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_booktitle">
		<span class="i18n_booktitle">
			<xsl:choose>
				<xsl:when test="$language='E'">Booktitle</xsl:when>
				<xsl:otherwise>Buchtitel</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_download_ext">
		<xsl:param name="extension" />
		<span class="i18n_download_ext">
			<xsl:choose>
				<xsl:when test="$language='E'">Download file as <xsl:value-of select="$extension" /></xsl:when>
				<xsl:otherwise><xsl:value-of select="$extension" />-Datei herunterladen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	<xsl:template name="i18n_download_file">
		<span class="i18n_download_file">
			<xsl:choose>
				<xsl:when test="$language='E'">Download file</xsl:when>
				<xsl:otherwise>Datei herunterladen</xsl:otherwise>
			</xsl:choose>
		</span>
	</xsl:template>
	
	
	<!-- ##################### i18n Attribute labels ##################### -->
	<!-- 
		These templates cannot have the span, since its used in an attribute!
		Just display a on-line text!
	-->
	
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_phone">
		<xsl:choose>
			<xsl:when test="$language='E'">Phone number</xsl:when>
			<xsl:otherwise>Telefon</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_phone_uni_prefix">
		<xsl:choose>
			<xsl:when test="$language='E'">University of Freiburg phone prefix</xsl:when>
			<xsl:otherwise>Vorwahl der Universität Freiburg</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_js_publications_filter_clear">
		<xsl:choose>
			<xsl:when test="$language='E'">clear filter</xsl:when>
			<xsl:otherwise>Filter löschen</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_sendmail_to">
		<xsl:choose>
			<xsl:when test="$language='E'">send an email to</xsl:when>
			<xsl:otherwise>E-Mail schreiben an</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_room">
		<xsl:choose>
			<xsl:when test="$language='E'">Building and room</xsl:when>
			<xsl:otherwise>Gebäude und Raum</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_url">
		<xsl:choose>
			<xsl:when test="$language='E'">Url</xsl:when>
			<xsl:otherwise>Webseite</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_consultation_hours_semester">
		<xsl:choose>
			<xsl:when test="$language='E'">Consultation hours during the semester</xsl:when>
			<xsl:otherwise>Sprechstunden während des Semesters</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- This template cannot have the span, since its used in an attribute! -->
	<xsl:template name="i18n_attr_consultation_hours_semester_break">
		<xsl:choose>
			<xsl:when test="$language='E'">Consultation hours during the semester break</xsl:when>
			<xsl:otherwise>Sprechstunden während der vorlesungsfreien Zeit</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!-- translate thesis types -->
	<xsl:template name="i18n_thesis_type">
		<xsl:param name="type" />
		<xsl:choose>
			<xsl:when test="$type = 'APL-Professur'">
				<xsl:choose>
					<xsl:when test="$language='E'">APL professorship</xsl:when>
					<xsl:otherwise>APL-Professur</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'Habilitation'">
				<xsl:choose>
					<xsl:when test="$language='E'">Habilitation</xsl:when>
					<xsl:otherwise>Habilitation</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'Promotion'">
				<xsl:choose>
					<xsl:when test="$language='E'">Phd thesis</xsl:when>
					<xsl:otherwise>Promotion</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'Master'">
				<xsl:choose>
					<xsl:when test="$language='E'">Master thesis</xsl:when>
					<xsl:otherwise>Master-Arbeit</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'Bachelor'">
				<xsl:choose>
					<xsl:when test="$language='E'">Bachelor thesis</xsl:when>
					<xsl:otherwise>Bachelor-Arbeit</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'Diplomarbeit'">
				<xsl:choose>
					<xsl:when test="$language='E'">Diploma thesis</xsl:when>
					<xsl:otherwise>Diplomarbeit</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'Magisterarbeit'">
				<xsl:choose>
					<xsl:when test="$language='E'">Magister thesis</xsl:when>
					<xsl:otherwise>Magisterarbeit</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'Staatsexamen'">
				<xsl:choose>
					<xsl:when test="$language='E'">state examination</xsl:when>
					<xsl:otherwise>Staatsexamen</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:when test="$type = 'all'">
				<xsl:choose>
					<xsl:when test="$language='E'">All thesis</xsl:when>
					<xsl:otherwise>Alle Abschlussarbeiten</xsl:otherwise>
				</xsl:choose>  
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$type" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
	<!-- #################### Translations between division_id and Name (english, german, ...) #################### -->
	
	<!-- make sure when inserting values here, to also add the fax number below -->
	<xsl:template name="division_id_to_name">
		<xsl:param name="division_id" />
		
		<xsl:choose>
			<xsl:when test="$division_id = '0384'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Department of Microsystems Engineering</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Institut für Mikrosystemtechnik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0421'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Simulation</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Simulation</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0423'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Design of Microsystems</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Konstruktion von Mikrosystemen</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0424' or $division_id = '424'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Fritz Huettinger Chair of Microelectronics</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Fritz-Hüttinger-Professur für Mikroelektronik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0425'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>MEMS Applications</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Anwendungsentwicklung</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0427'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Microsystem Materials</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Materialien der Mikrosystemtechnik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0428'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Chemistry and Physics of Interfaces</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Chemie und Physik von Grenzflächen</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0430'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Materials Processing Technology</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Werkstoffprozesstechnik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0431'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Sensors</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Sensoren</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0433'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Micro-optics</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Mikrooptik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0434'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Process Technology </xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Prozesstechnologie</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0435'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Assembly and Packaging Technology</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Aufbau- und Verbindungstechnik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0426'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Nanotechnology</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Nanotechnologie</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0429'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Biomedical Microtechnology</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Biomedizinische Mikrotechnik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0437'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Bio- and Nanophotonics</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Bio- und Nano-Photonik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0436'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Electrical Instrumentation</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Elektrische Mess- und Prüfverfahren</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0432'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Microactuators</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Mikroaktorik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0438'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Biomicrotechnology</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Biomikrotechnik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '998'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Compound Semiconductor Microsystems</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Verbindungshalbleiter Mikrosysteme</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '1060'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Thin-film Gas Sensors</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Gassensoren</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '1047'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Optical Systems</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Optische Systeme</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '1068'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Optoelectronics</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Optoelektronik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '1075'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Clean Room Service Center</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Reinraum Service Center</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!-- Ergaenzung Informatik W. Paulat 29.7.2013 -->
			<xsl:when test="$division_id = '0408'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Algorithms and Datastructures</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Algorithmen und Datenstrukturen</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0409'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Algorithms and Complexity</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Algorithmen und Komplexität</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0410'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Computer Architecture</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Rechnerarchitektur</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0411'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Operating Systems</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Betriebssysteme</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0412'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Programming Languages</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Programmiersprachen</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0413'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Software Engineering</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Softwaretechnik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0414'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Foundations of AI</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Grundlagen der Künstliche Intelligenz</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0415'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Machine Learning</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Maschinelles Lernen</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0416'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Autonomous Intelligent Systems</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Autonome Intelligente Systeme</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0417'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Graphics Data Processing</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Graphische Datenverarbeitung</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0418'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Pattern Recognition and Image Processing</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text> Mustererkennung und Bildverarbeitung</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0419'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Databases and Information Systems</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Datenbanken und Informationssysteme</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '0420'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Networks and Telematics</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Rechnernetze und Telematik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '955'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Bioinformatics</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Bioinformatik</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '956'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Humanoid Robots</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Humanoide Roboter</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$division_id = '1100'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Social Robotics and Human-Robot Interaction</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Soziale Robotik und Mensch-Roboter Interaktion</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
	                <xsl:when test="$division_id = '1069'">
				<xsl:choose>
					<xsl:when test="$language='E'"><xsl:text>Web Science</xsl:text></xsl:when>
					<xsl:otherwise><xsl:text>Web Science</xsl:text></xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!-- Ende Ergaenzung Informatik -->
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="$division_name != ''">
						<xsl:value-of select="$division_name" />
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>Division: N/A, </xsl:text>
						<xsl:value-of select="$division_id" />
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
	<!-- make sure when inserting values here, to also add the name number above73299 -->
	<xsl:template name="division_id_to_fax">
		<xsl:param name="division_id" />
		
		<xsl:choose>
			<xsl:when test="$division_id = '0384'">
				<xsl:text>73299</xsl:text>
			</xsl:when>
			<!-- Ergaenzung Informatik W. Paulat 29.7.2013 -->
			<xsl:when test="$division_id = '0408'">
				<xsl:text>8162</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0409'">
				<xsl:text>67411</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0410'">
				<xsl:text>8142</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0411'">
				<xsl:text>8178</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0412'">
				<xsl:text>8052</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0413'">
				<xsl:text>8242</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0414'">
				<xsl:text>8222</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0415'">
				<xsl:text>8007</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0416'">
				<xsl:text>8007</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0417'">
				<xsl:text>8262</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0418'">
				<xsl:text>8262</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0419'">
				<xsl:text>8122</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0420'">
				<xsl:text>8182</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '955'">
				<xsl:text>7462</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '956'">
				<xsl:text>97957</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '1100'">
				<xsl:text>7520</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '1069'">
				<xsl:text>8122</xsl:text>
			</xsl:when>
			<!-- Ende Ergaenzung Informatik -->
			<xsl:when test="$division_id = '0421'">
				<xsl:text>7437</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0423'">
				<xsl:text>7492</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0424'">
				<xsl:text>7592</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0425'">
				<xsl:text>73299</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0427'">
				<xsl:text>7192</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0428'">
				<xsl:text>7162</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0430'">
				<xsl:text>7552</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0431'">
				<xsl:text>7262</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0433'">
				<xsl:text>7562</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0434'">
				<xsl:text>7352</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0435'">
				<xsl:text>7292</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0426'">
				<xsl:text>7422</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0429'">
				<xsl:text>7472</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0437'">
				<xsl:text>7537</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0436'">
				<xsl:text>7222</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0432'">
				<xsl:text>7439</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '0438'">
				<xsl:text>2860</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '998'">
				<xsl:text>+49 761 5159-300</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '1060'">
				<xsl:text>+49 761 8857-234</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '1047'">
				<xsl:text>7442</xsl:text>
			</xsl:when>
			<xsl:when test="$division_id = '1068'">
				<xsl:text>0761/5159-71513</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="$division_fax != ''">
						<xsl:value-of select="$division_fax" />
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>Division-Fax: N/A, </xsl:text>
						<xsl:value-of select="$division_id" />
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
	<xsl:template name="css_icons">
		<style type="text/css">
			<xsl:text>
			<![CDATA[
			.icon-file-pdf {
				width: 16px;
				height: 16px;
				display: inline-block;
				margin-right: 2px;
				position: relative;
				top: 2px;
				background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHhSURBVDjLjZPLSxtRFIfVZRdWi0oFBf+BrhRx5dKVYKG4tLhRqlgXPmIVJQiC60JCCZYqFHQh7rrQlUK7aVUUfCBRG5RkJpNkkswrM5NEf73n6gxpHujAB/fOvefjnHM5VQCqCPa1MNoZnU/Qxqhx4woE7ZZlpXO53F0+n0c52Dl8Pt/nQkmhoJOCdUWBsvQJ2u4ODMOAwvapVAqSJHGJKIrw+/2uxAmuJgFdMDUVincSxvEBTNOEpmlIp9OIxWJckMlkoOs6AoHAg6RYYNs2kp4RqOvfuIACVFVFPB4vKYn3pFjAykDSOwVta52vqW6nlEQiwTMRBKGygIh9GEDCMwZH6EgoE+qHLMuVBdbfKwjv3yE6Ogjz/PQ/CZVDPSFRRYE4/RHy1y8wry8RGWGSqyC/nM1meX9IQpQV2JKIUH8vrEgYmeAFwuPDCHa9QehtD26HBhCZnYC8ucGzKSsIL8wgsjiH1PYPxL+vQvm5B/3sBMLyIm7GhhCe90BaWykV/Gp+VR9oqPVe9vfBTsruM1HtBKVPmFIUNusBrV3B4ev6bsbyXlPdkbr/u+StHUkxruBPY+0KY8f38oWX/byvNAdluHNLeOxDB+uyQQfPCWZ3NT69BYJWkjxjnB1o9Fv/ASQ5s+ABz8i2AAAAAElFTkSuQmCC');
			}
			.icon-file-ppt {
				width: 16px;
				height: 16px;
				display: inline-block;
				margin-right: 2px;
				position: relative;
				top: 2px;
				background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHeSURBVDjLjZO/i1NBEMc/u+/lBYxiLkgU7vRstLEUDyxtxV68ykIMWlocaGHrD1DxSAqxNf4t115jo6DYhCRCEsk733s7u2PxkuiRoBkYdmGZz3xndsaoKgDGmC3gLBDxbxsA31U1AKCqzCBXsywbO+e8iOgqz7JM2+32W+AiYFX1GGDHOeen06mmabrwyWSio9FI+/2+ioj2ej3tdDoLiJm+bimAhgBeUe9RmbkrT5wgT97RaDQoioIQAt1ud7/Var1h+uq+/s9+PLilw+FwqSRgJ1YpexHSKenHF4DFf/uC3b7CydsPsafraO5IkoTxeEwIARGh2WwCYNUJAOmHZ5y4eY/a7h4hPcIdHvDz/fMSnjviOCZJEiqVCtVqdfEl8RygHkz9DLZWQzOHisd9OizfckcURRhjMMbMm14CQlEC/NfPjPd2CSJQCEEEDWYBsNZijFkaCqu5Ky+blwl5geaOUDg0c8TnNssSClkER1GEtXYZcOruI6ILl1AJqATirW02Hr8sFThBVZfklyXMFdQbbDzdXzm78z4Bx7KXTcwdgzs3yizuzxAhHvVh4avqBzAzaQa4JiIHgGE9C3EcX7ezhVIgeO9/AWGdYO/9EeDNX+t8frbOdk0FHhj8BvUsfP0TH5dOAAAAAElFTkSuQmCC');
			}
			.icon-file-doc {
				width: 16px;
				height: 16px;
				display: inline-block;
				margin-right: 2px;
				position: relative;
				top: 2px;
				background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIdSURBVDjLjZO7a5RREMV/9/F9yaLBzQY3CC7EpBGxU2O0EBG0sxHBUitTWYitYCsiiJL0NvlfgoWSRpGA4IMsm43ZXchmv8e9MxZZN1GD5MCBW8yce4aZY1QVAGPMaWAacPwfm8A3VRUAVJWhyIUsy7plWcYQgh7GLMt0aWnpNTADWFX9Q2C+LMu4s7Oj/X5/xF6vp51OR1utloYQtNls6vLy8kjE3Huz9qPIQjcUg/GZenVOokIEiSBBCKUSQ+TFwwa1Wo2iKBARVlZW3iwuLr7izssPnwZ50DLIoWz9zPT+s/fabrf/GQmY97GIIXGWp28/08si5+oV1jcGTCSO6nHH2pddYqmkaUq320VECCFQr9cBsBIVBbJcSdXQmK7Q6Qsnq54sj2gBplS896RpSpIkjI2NjVZitdh7jAOSK6trXcpC2GjlfP1esHD+GDYozjm893jvSZJkXyAWe+ssc6W5G9naLqkaw/pGxBrl1tVpJCrWWpxzI6GRgOQKCv2BYHPl5uUatROeSsVy7eIkU9UUiYoxBgDnHNbagw4U6yAWwpmphNvXT6HAhAZuLNRx1iDDWzHG/L6ZEbyJVLa2c54/PgsKgyzw5MHcqKC9nROK/aaDvwN4KYS7j959DHk2PtuYnBUBFUEVVBQRgzX7I/wNM7RmgEshhFXAcDSI9/6KHQZKAYkxDgA5SnOMcReI5kCcG8M42yM6iMDmL261eaOOnqrOAAAAAElFTkSuQmCC');
			}
			.icon-file {
				width: 16px;
				height: 16px;
				margin-right: 2px;
				display: inline-block;
				position: relative;
				top: 2px;
				background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAC4SURBVCjPdZFbDsIgEEWnrsMm7oGGfZrohxvU+Iq1TyjU60Bf1pac4Yc5YS4ZAtGWBMk/drQBOVwJlZrWYkLhsB8UV9K0BUrPGy9cWbng2CtEEUmLGppPjRwpbixUKHBiZRS0p+ZGhvs4irNEvWD8heHpbsyDXznPhYFOyTjJc13olIqzZCHBouE0FRMUjA+s1gTjaRgVFpqRwC8mfoXPPEVPS7LbRaJL2y7bOifRCTEli3U7BMWgLzKlW/CuebZPAAAAAElFTkSuQmCC');
			}
			]]>
			</xsl:text>
		</style>
	</xsl:template>
	
	<!-- attribution template -->
	<xsl:template name="famfamfamicons_attribution">
		<div class="gray" style="font-size: 12px; margin-top: 10px;">
			<xsl:text>Credits: SILK Icons by http://www.famfamfam.com/lab/icons/silk/</xsl:text>
		</div>
	</xsl:template>
	
	<!-- templates to get the file extension from a file specified in param path -->
	<xsl:template name="get-file-extension">
		<xsl:param name="path" />
		<xsl:choose>
		 <xsl:when test="contains( $path, '/' )">
		   <xsl:call-template name="get-file-extension">
			 <xsl:with-param name="path" select="substring-after($path, '/')" />
		   </xsl:call-template>
		 </xsl:when>
		 <xsl:when test="contains( $path, '.' )">
		   <xsl:call-template name="TEMP-get-file-extension">
			 <xsl:with-param name="x" select="substring-after($path, '.')" />
		   </xsl:call-template>
		 </xsl:when>
		 <xsl:otherwise>
		   <xsl:text></xsl:text>
		 </xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="TEMP-get-file-extension">
	   <xsl:param name="x" />
	   <xsl:choose>
		 <xsl:when test="contains($x, '.')">
		   <xsl:call-template name="TEMP-get-file-extension">
			 <xsl:with-param name="x" select="substring-after($x, '.')" />
		   </xsl:call-template>
		 </xsl:when>
		 <xsl:otherwise>
		   <xsl:value-of select="$x" />
		 </xsl:otherwise>
	   </xsl:choose>
	</xsl:template>
</xsl:stylesheet>