<form name="glossary_form" id ="glossary_form">
	<label for="glossary_index"><%= main.theme.getThemeItem('glossaryindex') %></label>:
	<select name="glossary_index" id="glossary_index">
	<% for (var i=0; i<main.glossary.sets.length; i++) { %>
		<% if (main.glossary.sets[i] == selset) { var issel = "selected" } else { var issel = ""; } %>
		<option name="<%= main.glossary.sets[i].setlabel %>" value="<%= main.glossary.sets[i].setkey %>" <%= issel %>/> <%= main.glossary.sets[i].setlabel %>
	<% } %>
	</select>
	<input type="button" name="selectindex" value="<%= main.theme.getThemeItem('selectbtn') %>" onClick="selectSet(glossary_form.glossary_index.options[glossary_form.glossary_index.options.selectedIndex].value);"/>
<br>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr>
		<td valign="top">
			<% if (selset) { %>
			<label for="glossary_list"><%= main.theme.getThemeItem('selectbtn') %> <%= main.theme.getThemeItem('termlabel') %></label>
			<select name="glossary_list" id="glossary_list" size="20" width="100">
				<% for (var i=0; i<selset.terms.length; i++) { %>
					<% if (selset.terms[i] == selterm) { %>
						<option name="<%= selset.terms[i].id %>" value="<%= selset.terms[i].id %>" selected /><%= selset.terms[i].term %>
					<% } else { %>
						<option name="<%= selset.terms[i].id %>" value="<%= selset.terms[i].id %>" /><%= selset.terms[i].term %>
					<% } %>
					<% } %>
				</select>
				<br>
				<input type="button" name="selectterm" value="<%= main.theme.getThemeItem('selectbtn') %>" onClick="selectTerm(glossary_form.glossary_list.options[glossary_form.glossary_list.options.selectedIndex].value);"/>
			<% } %>
		</td>
		<td width="50">&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td width="100%" align="left" valign="top">
			<% if (selterm) { %>
					<label for="glossary_term"><%= main.theme.getThemeItem('termlabel') %></label>:<br/>
					<textarea name="glossary_term" id="glossary_term" cols="80" rows="1" class="defbold" readonly><%= selterm.term %></textarea><br><br>
					<label for="glossary_def"><%= main.theme.getThemeItem('deflabel') %></label>:<br/>
					<textarea name="glossary_def" id="glossary_def" cols="80" rows="13" class="defbold" readonly><%= parseDefinition(selterm.definition) %></textarea><br>
				<br/>
			<% } else { %>
				&nbsp;
			<% } %>
		</td>
	</tr>
</table>
<br><br>
<input type="button" name="close" value="<%= main.theme.getThemeItem('closeglossary') %>" onClick="closeGlossary();"/>
</form>
<br>
<hr/>
<br>
