
<script language="javascript" type="text/javascript">
<!--
{include file="$incpath/other/validate_js.tpl"}


$.validator.setDefaults({ldelim}
	submitHandler: function() 
	{ldelim}
		document.forms['editForm'].submit();
	{rdelim}
});

$().ready(function() 
{ldelim}
	$("#editForm").validate({ldelim}
	rules: {ldelim}
				Name_1: {ldelim}required: true{rdelim}
			{rdelim},
	messages: 
			{ldelim}
			{rdelim}
	{rdelim});
{rdelim});

// -->
</script>

<div class="popbox">
<div class="header">{if $new!=1}{#Global_CategEdit#}{else}{#Global_NewCateg#}{/if}</div>

<form name="editForm" id="editForm" method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="1">
  {if $new==1}
    <tr>
      <td class="row_left">{#Global_ParentCategory#}</td>
      <td class="row_right">
      <select  style="width:250px"  class="input" id="c" name="categ">
      <option value="0">-- {#Global_noParent#} --</option>
        {foreach from=$newscategs item=dd}
        <option value="{$dd->Id}">{$dd->visible_title} </option>
        {/foreach}
        </select>      </td>
    </tr>
   {/if}
    <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" value="{$res->Name_1|koobispecialchars}"></td>
    </tr>
    <tr>
      <td class="row_left">{#Global_name#} ({$language_long_2})</td>
      <td class="row_right"><input class="input" name="Name_2" type="text" value="{$res->Name_2|koobispecialchars}"></td>
    </tr>
    <tr>
      <td class="row_left">{#Global_name#} ({$language_long_3})</td>
      <td class="row_right"><input class="input" name="Name_3" type="text" value="{$res->Name_3|koobispecialchars}"></td>
    </tr>
    {if $new!=1}
    {/if}
  </table>

<input type="submit" class="button big" value="{#Save#}" />
<input type="button" onclick="window.close();" class="button big" value="{#Close#}" />
<input type="hidden" name="save" value="1" />
</form>

</div>

