<form action="" method="post">
<div class="header">{#Navigation_list#}</div>
<div class="subheaders">{#Navigation_CategInf#}</div>
<table  width="100%"  border="0" cellspacing="0" cellpadding="4">
	<tr>
	<td width="100" class="headers">{$language_long_1}</td>
	<td width="100" class="headers">{$language_long_2}</td>
	<td width="100" class="headers">{$language_long_3}</td>
	<td width="100" class="headers">{#Navigation_tag#}</td>
	<td width="5" align="center" class="headers">{#Global_Position#}</td>
	<td width="100" align="center" class="headers">{#Global_Active#}</td>
	<td class="headers">{#Global_Actions#}</td>
	</tr>
	{foreach from=$navis item=c}
    {assign var=pos value=$pos+1}
	<tr class="{cycle name='d' values='second,first'}">
	<td width="100">
    <input type="hidden" name="nid[{$c->Id}]" value="{$c->Id}" />
    <input class="input" name="Name_1[{$c->Id}]" type="text" value="{$c->Name_1|koobispecialchars}" style="width:100px" /></td>
	<td width="100"><input class="input" name="Name_2[{$c->Id}]" type="text" value="{$c->Name_2|koobispecialchars}" style="width:100px" /></td>
	<td width="100"><input class="input" name="Name_3[{$c->Id}]" type="text" value="{$c->Name_3|koobispecialchars}" style="width:100px" /></td>
	<td width="100"><strong>&#123;navi id={$c->Id}&#125;</strong></td>
	<td width="5" align="center"><input class="input" name="Position[{$c->Id}]" type="text" size="3" maxlength="3" value="{$c->Position}" /></td>
	<td align="center">
     <label><input type="radio" name="Aktiv[{$c->Id}]" value="1" {if $c->Aktiv==1}checked{/if}> {#Yes#}</label>        
      <label><input type="radio" name="Aktiv[{$c->Id}]" value="0" {if $c->Aktiv==0}checked{/if}> {#No#}</label>
    </td>
	<td>
	  <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Edit width=150} href="index.php?do=navigation&sub=edit&id={$c->Id}"><img class="absmiddle" src="{$imgpath}/edit.png" alt="" border="" /></a>
      <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Global_Delete width=150} href="javascript:void(0);" onclick="if(confirm('{#Navigation_navdelc#}')) location.href='index.php?do=navigation&sub=deletenavi&id={$c->Id}'"><img class="absmiddle" src="{$imgpath}/delete.png" alt="" border="" /></a>      </td>
	</tr>
	{/foreach}
</table>
<input type="submit" class="button big" value="{#Save#}">
<input name="save" type="hidden" id="save" value="1">
</form>

<br />
<br />



<form method="post" action="" autocomplete="off" name="new" id="new">
{assign var=newpos value=$pos+1}
<div class="header">{#Navigation_newnav#}</div>
  <table width="100%" border="0" cellpadding="5" cellspacing="0">

    <tr>
      <td width="150" class="row_left">{#Global_Name#} ({$language_long_1})</td>
      <td class="row_right"><input class="input" name="Name_1" type="text"size="30" /></td>
    </tr>
    <tr>
      <td width="150" class="row_left">{#Global_Name#}  ({$language_long_2})</td>
      <td class="row_right"><input class="input" name="Name_2" type="text"size="30" /></td>
    </tr>
    <tr>
      <td width="150" class="row_left">{#Global_Name#}  ({$language_long_3})</td>
      <td class="row_right"><input class="input" name="Name_3" type="text"size="30" /></td>
    </tr>
    <tr>
      <td class="row_left">{#Global_Position#}</td>
      <td class="row_right"><input name="Position" type="text" class="input"size="4" maxlength="3" value="{$newpos}" /></td>
    </tr>
    <tr>
      <td class="row_left">{#Global_Active#}</td>
      <td class="row_right">
       <label><input type="radio" name="Aktiv" value="1" checked> {#Yes#}</label>        
      <label><input type="radio" name="Aktiv" value="0"> {#No#}</label>
      </td>
    </tr>
  </table>
<br />
<input type="submit" class="button" value="{#Save#}" />
<input name="new" type="hidden" id="new" value="1">
</form>



<script type="text/javascript">
{include file="$incpath/other/validate_js.tpl"}
{literal}
$.validator.setDefaults({
	submitHandler: function() 
	{ 
		document.forms['new'].submit();
		//alert("submitted!"); 
	}
});

$().ready(function() {
	// validate the comment form when it is submitted
	$("#new").validate(
	{ // validate
	rules: { // rules
				Name_1: {required: true,minLength: 2},
				Position: {required: true,range:[1,50]}
			} // end rules
			, // messages
			messages: 
			{
				/* MESSAGES */	
			}
	} // end validate
	);
}
)
{/literal}
</script>


