{literal}
<script language="javascript" src="js/jupload.js" type="text/javascript"></script>
<script type="text/javascript"> 
<!-- //
$().ajaxStop($.unblockUI); 

function test() { 
	
} 



function ajaxFileUpload(updir,divid,resize)
{
	$("#loading_" + divid)
	.ajaxStart(function(){
		$(this).show();
		document.getElementById('buttonUpload_' + divid).value = '{/literal}{#Global_Wait#}{literal}';
		document.getElementById('buttonUpload_' + divid).disabled = true;
		//document.getElementById('ajax_form').style.display = 'none';
		
	})
	.ajaxComplete(function(){
		$(this).hide();
		document.getElementById('buttonUpload_' + divid).value = '{/literal}{#Global_Upload#}{literal}';
		document.getElementById('buttonUpload_' + divid).disabled = false;
		//document.getElementById('ajax_form').style.display = '';
	});

	$.ajaxFileUpload
	(
		{
			url:'index.php?do=shop&sub=categ_icon_upload&updir=' + updir + '&divid=' + divid + '&resize=' + resize,
			secureuri:false,
			fileElementId:'fileToUpload_' + divid,
			dataType: 'json',
			success: function (data, status)
			{
				if(typeof(data.error) != 'undefined')
				{
					if(data.error != '')
					{
						document.getElementById('UpInf_' + divid).innerHTML  = data.error;
					}else
					{
						document.getElementById('UpInf_' + divid).innerHTML = data.msg;
						document.getElementById('newFile_' + divid).value =  data.html;
						
					}
				}
			},
			error: function (data, status, e)
			{
				document.getElementById('UpInf_' + divid).innerHTML = e;
			}
		}
	)
	
	return false;

}
// -->
</script>
{/literal}

<div class="popbox">
<div class="header">{#Shop_cat_edit#}</div>


<div class="header_inf">
<form method="post" action="">
<select class="input" onchange="eval(this.options[this.selectedIndex].value);" name="langcode" id="langcode">
<option id="l_1" value="if(confirm('{#Global_changeLangDoc#}')){ldelim} location.href='index.php?do=shop&sub=edit_categ&id={$smarty.request.id}&parent={$smarty.request.parent}&noframes=1&pop=1&langcode=1';{rdelim}else{ldelim} document.getElementById('l_{$smarty.request.langcode}').selected=true;{rdelim}" {if $smarty.request.langcode=='1'}selected="selected"{/if}>{#Shop_variants_editlang#}  - {$language_long_1|upper} - {#Shop_articles_editinb#}</option>
<option id="l_2" value="if(confirm('{#Global_changeLangDoc#}')){ldelim} location.href='index.php?do=shop&sub=name_text&langcode=2&langlong={$language_long_2}&id={$smarty.request.id}&pop=1';{rdelim}else{ldelim} document.getElementById('l_{$smarty.request.langcode}').selected=true;{rdelim}" {if $smarty.request.langcode=='2'}selected="selected"{/if}>{#Shop_variants_editlang#}  - {$language_long_2|upper} - {#Shop_articles_editinb#}</option>
<option id="l_3" value="if(confirm('{#Global_changeLangDoc#}')){ldelim} location.href='index.php?do=shop&sub=name_text&langcode=3&langlong={$language_long_3}&id={$smarty.request.id}&pop=1';{rdelim}else{ldelim} document.getElementById('l_{$smarty.request.langcode}').selected=true;{rdelim}"  {if $smarty.request.langcode=='3'}selected="selected"{/if}>{#Shop_variants_editlang#} - {$language_long_3|upper} - {#Shop_articles_editinb#}</option>


</select>
<img class="absmiddle" src="{$imgpath}/arrow_right.png" alt="" />
</form>
</div>
 <form name="form" action="" method="post" enctype="multipart/form-data">
 
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="table_back">

  <tr>
    <td width="160" nowrap="nowrap" class="row_left">{#Global_name#}</td>
    <td class="row_right"><input name="Name_1" type="text" class="input" size="40" value="{$row->Name|koobispecialchars}" /></td>
  </tr>
  <tr>
    <td width="160" nowrap="nowrap" class="row_left">{#Global_descr#}</td>
    <td class="row_right">{$Editor} </td>
  </tr>
  {if $row->Bild_Kategorie}
  <tr>
    <td width="160" nowrap="nowrap" class="row_left">
    <span {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_cat_catimageinf}>
    <img class="absmiddle" src="{$imgpath}/help.png" alt="" />    
    </span> 
    {#Shop_cat_catimage#}    </td>
    <td class="row_right">
    {$row->Bild_Kategorie}    </td>
    </tr>
    {/if}
    <tr>
    <td width="160" nowrap="nowrap" class="row_left">
    <span {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_cat_newcatimage_inf}>
    <img class="absmiddle" src="{$imgpath}/help.png" alt="" />    </span> 
    {#Shop_cat_newcatimage#}    </td>
    <td class="row_right">
 
	<!-- Uploadform  -->  
	<!-- Status Upload -->  
    <div id="UpInf_1"></div><div id="loading_1" align="center"  style="display:none;"><img style="margin-bottom:15px" src="{$imgpath}/loading.gif" alt="" /></div>
   <!-- Status Upload -->  
   <input id="fileToUpload_1" type="file" size="45" name="fileToUpload_1" class="input" />
   <input type="button" class="button" id="buttonUpload_1" onclick="return ajaxFileUpload('/uploads/shop/icons_categs/','1','120');" value="{#Global_Upload#}" />
   <input type="hidden" name="newImg_1" id="newFile_1" />
   <!-- Uploadform -->   
   </td>
  </tr>
  {if $row->Bild_Kategorie}
    <tr>
      <td width="160" nowrap="nowrap" class="row_left">{#Shop_cat_catimagedel#}</td>
      <td class="row_right"><input name="noImg_1" type="checkbox" id="noImg_1" value="1" /></td>
    </tr>
    {/if}
    {if $row->Bild_Navi && $smarty.request.parent==0}
    <tr>
      <td width="160" nowrap="nowrap" class="row_left">
      <img {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_cat_catnavimageinf} class="absmiddle" src="{$imgpath}/help.png" alt="" />
      {#Shop_cat_catnavimage#}      </td>
      <td class="row_right">{$row->Bild_Navi}</td>
    </tr>
    {/if}
    {if $smarty.request.parent==0}
    <tr>
    <td width="160" nowrap="nowrap" class="row_left">
    <img {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_cat_catnavimage_newinf} class="absmiddle" src="{$imgpath}/help.png" alt="" />
    {#Shop_cat_catnavimage_new#}        </td>
    <td class="row_right">
    
    <!-- Uploadform  -->  
	<!-- Status Upload -->  
    <div id="UpInf_2"></div><div id="loading_2" align="center"  style="display:none;"><img style="margin-bottom:15px" src="{$imgpath}/loading.gif" alt="" /></div>
   <!-- Status Upload -->  
   <input id="fileToUpload_2" type="file" size="45" name="fileToUpload_2" class="input" />
   <input type="button" class="button" id="buttonUpload_2" onclick="return ajaxFileUpload('/uploads/shop/navi_categs/','2','25');" value="{#Global_Upload#}" />
   <input type="hidden" name="newImg_2" id="newFile_2" />
   <!-- Uploadform -->    
   </td>
  </tr>
  {/if}
   {if $row->Bild_Navi}
    <tr>
      <td width="160" nowrap="nowrap" class="row_left">{#Shop_cat_catnavimagedel#}</td>
      <td class="row_right"><input name="noImg_2" type="checkbox" id="noImg_2" value="1" /></td>
    </tr>
    {/if}
    <tr>
    <td width="160" nowrap="nowrap" class="row_left">
    <img {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_cat_ustidinf} class="absmiddle" src="{$imgpath}/help.png" alt="" />
    {#Shop_cat_ustid#}    </td>
    <td class="row_right">
    <select class="input" name="UstId" id="UstId">
    {foreach from=$ust_elements item=ust}
      <option value="{$ust->Id}"{if $ust->Id==$row->UstId} selected="selected"{/if}>{$ust->Name} ({$ust->Wert}%)</option>
     {/foreach}
    </select>    </td>
  </tr>
  
  <tr>
    <td width="160" class="row_left">&nbsp;</td>
    <td class="row_right">
    <input class="button" type="submit" id="s" value="{#Global_save#}" />
      <input class="button" type="button" onclick="window.close();" value="{#Global_close#}" />
      <input type="hidden" name="id" value="{$smarty.request.id}" />
      <input type="hidden" name="categ_del_img" value="{$row->Bild_Kategorie_Del}" />
      <input type="hidden" name="navi_del_img" value="{$row->Bild_Navi_Del}" />
      <input type="hidden" name="save" value="1" />      </td>
  </tr>
</table>
</form>
</div>