<script language="javascript" src="js/jupload.js" type="text/javascript"></script>
<script type="text/javascript"> 
<!-- //
function ajaxFileUpload(updir,divid,resize)
{ldelim}
	$("#loading_" + divid)
	.ajaxStart(function(){ldelim}
		$(this).show();
		document.getElementById('buttonUpload_' + divid).value = '{#Global_Wait#}';
		document.getElementById('buttonUpload_' + divid).disabled = true;
		
	{rdelim})
	.ajaxComplete(function(){ldelim}
		$(this).hide();
		document.getElementById('buttonUpload_' + divid).value = '{#Global_Upload#}';
		document.getElementById('buttonUpload_' + divid).disabled = false;
	{rdelim});

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

<div class="popbox">
<div class="header">{#Partners_imgEdit#}</div>
<form method="post" action="">

<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
  <td class="row_left" width="150">{#Global_Img#}</td>
  <td class="row_right">
  {if $res->Bild!=''}<img src="../{$res->Bild}" />{/if}  </td>
</tr>
<tr>
  <td class="row_left">{#Global_imgNew#}</td>
  <td class="row_right">
  <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>
       <input id="fileToUpload_1" type="file" size="20" name="fileToUpload_1" class="input" />
       <input type="button" class="button" id="buttonUpload_1" onclick="return ajaxFileUpload('','1','200');" value="{#Global_Upload#}" />
       <input type="hidden" name="newImg_1" id="newFile_1" />
       <!-- Uploadform -->  
  </td>
</tr>
</table>
<input type="hidden" name="save" value="1" />
<input type="submit" class="button big" value="{#Save#}" />
<input type="button" class="button big" onclick="window.close();" value="{#Close#}" />
</form>
</div>