<form action="" method="post">
<div class="header">{#Quicknavi#}</div>
<div class="subheaders">{#Quicknavi_newInf#}</div>
<table  width="100%"  border="0" cellspacing="0" cellpadding="4">
	<tr>
	<td width="70" class="headers">{$language_long_1}</td>
	<td width="70" class="headers">{$language_long_2}</td>
	<td width="70" class="headers">{$language_long_3}</td>
	<td width="70" class="headers">{#Navigation_doc#}</td>
	<td width="5" align="center" class="headers">{#Global_Position#}</td>
	<td width="5" align="center" class="headers">{#Global_Target#}</td>
	<td width="5" align="center" class="headers">{#Global_Active#}</td>
	<td class="headers"><img class="absmiddle" src="{$imgpath}/delete.png" alt="" border="0" /></td>
	</tr>
	{foreach from=$navis item=c}
    {assign var=pos value=$pos+1}
	<tr class="{cycle name='d' values='second,first'}">
	<td>
    <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:80px" /></td>
	<td><input class="input" name="Name_2[{$c->Id}]" type="text" value="{$c->Name_2|koobispecialchars}" style="width:80px" /></td>
	<td><input class="input" name="Name_3[{$c->Id}]" type="text" value="{$c->Name_3|koobispecialchars}" style="width:80px" /></td>
	<td><input class="input" name="Dokument[{$c->Id}]" type="text" value="{$c->Dokument|koobispecialchars}" style="width:150px" /></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">
    <select  style="width:100px" class="input" name="Ziel[{$c->Id}]">
      <option value="_self" {if $c->Ziel=='_self'}selected="selected"{/if}>{#Navigation_self#}</option>
      <option value="_blank" {if $c->Ziel=='_blank'}selected="selected"{/if}>{#Navigation_new#}</option>
    </select>
    </td>
	<td align="center">
    <select  style="width:50px" class="input" name="Aktiv[{$c->Id}]">
      <option value="1" {if $c->Aktiv=='1'}selected="selected"{/if}>{#Yes#}</option>
      <option value="0" {if $c->Aktiv=='0'}selected="selected"{/if}>{#No#}</option>
    </select>    </td>
	<td><input {popup sticky=$config_vars.POPSTICKY  text=$config_vars.DelInfChekbox} name="del[{$c->Id}]" type="checkbox" value="1" /></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">{#Quicknavi_new#}</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">{#Navigation_doc#}</td>
      <td class="row_right"><input class="input" name="Dokument" 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]},
				Dokument: {required: true}
			} // end rules
			, // messages
			messages: 
			{
				/* MESSAGES */	
			}
	} // end validate
	);
}
)
{/literal}
</script>


