<script type="text/javascript" src="{$htmlBase}/frontend/wui/js/MapManageTmpl.js"></script>

<form name="add" id="add" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doTmplAdd', 'add');" enctype="" onsubmit="return checkTmplAdd();">
	<table name="mytable" class="mytable" id="table_add">
		<tbody>
			<tr><th class="cat" colspan="2"><h2>{$langTmplAdd}</h2></th></tr>
			<tr><td class="tdlabel" style="color:red;">{$langTmplName}</td><td class="tdfield"><input id="name" type="text" name="name" value="" onBlur="" /></td></tr>
			<tr><td></td><td><a href="javascript:formAddOption('add')">{$langTmplAddOption}</a></td></tr>
			<tr><td class="tdlabel" colspan="2" align="center"><input class="submit" type="submit" name="submit" id="commit" value="{$langTmplDoAdd}" /></td></tr>
		</tbody>
	</table>
	<input type="hidden" name="map" value="{$map}" />
</form>

<form name="modify" id="modify" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doTmplModify', 'modify');" enctype="" onsubmit="return checkTmplModify();">
	<table name="mytable" class="mytable" id="table_modify">
		<tbody>
			<tr><th class="cat" colspan="2"><h2>{$langTmplModify}</h2></th></tr>
			<tr>
				<td class="tdlabel" style="color:red;">{$langTmplName}</td>
				<td class="tdfield">
					<select id="name" name="name" onChange="putTmplOpts(this.value)" onBlur="">
						<option value=""></option>
						{foreach $templates template val}
						<option value="{$template}">{$template}</option>
						{/foreach}
					</select>
				</td>
			</tr>
			<tr><td></td><td><a href="javascript:formAddOption('modify')">{$langTmplAddOption}</a></td></tr>
			<tr><td class="tdlabel" colspan="2" align="center"><input class="submit" type="submit" name="submit" id="commit" value="{$langTmplDoModify}" /></td></tr>
		</tbody>
	</table>
	<input type="hidden" name="map" value="{$map}" />
</form>

<form name="delete" id="delete" method="POST" action="javascript:submitFrontendForm('{$htmlBase}/server/core/ajax_handler.php?mod=Map&amp;act=doTmplDelete', 'delete');" enctype="" onsubmit="return checkTmplDelete();">
	<table name="mytable" class="mytable" id="table_delete">
		<tr><th class="cat" colspan="2"><h2>{$langTmplDelete}</h2></th></tr>
		<tr>
			<td class="tdlabel">{$langTmplChoose}</td><td class="tdfield">
				<select id="name" name="name" onChange="" onBlur="">
					<option value=""></option>
					{foreach $templates template val}
					<option value="{$template}">{$template}</option>
					{/foreach}
				</select>
			</td>
		</tr>
		
		<tr><td class="tdlabel" colspan="2" align="center"><input class="submit" type="submit" name="submit" id="commit" value="{$langTmplDoDelete}" /></td></tr>
	</table>
	<input type="hidden" name="map" value="{$map}" />
</form>
