<script language="javascript" src="{$jspath}/jform.js" type="text/javascript"></script>
<script type="text/javascript"> 
{include file="$incpath/other/validate_js.tpl"}


<!-- //
$(document).ready(function()
{ldelim}
	$('#editForm').submit(function() 
	{ldelim}
		var options = {ldelim}
		target:'#output',
		//beforeSubmit:    function() {ldelim}document.getElementById('output').innerHTML = '<img src="{$imgpath}/loading.gif">';{rdelim},
		success:    function() {ldelim}
			/*alert('ok');*/
		{rdelim}
		/*,  timeout:   120000 */
		{rdelim}; 
		
		$(this).ajaxSubmit(options); 
		
		return false;  
	{rdelim}); 
{rdelim}); 


{literal}

// -->
</script>
{/literal}
<div class="popbox">
<div class="header">{#Gallery_ei_edit#}</div>

<form name="editForm" id="editForm" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
  <tr>
    <td valign="top">
 <fieldset>    
    <legend>{#Gallery_ei_cim#}</legend>
    <div class="gallery_preload" id="output">
    {$res->Img}
    <div style="clear:both"></div>
    </div>
    </fieldset>
    
    </td>
    <td width="300" valign="top">
        <fieldset>
<legend>{#Gallery_ei_saction#}</legend>
<input type="hidden" name="h" id="h" />
  <table width="100%" border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td>
      <input name="edit_action" type="radio" id="edit_action" onclick="document.getElementById('h').value='filled'" value="rotate" checked="checked"> 
      <select class="input" name="degrees">
        <option value="90" selected="selected">{#Gallery_ei_rclockwise#}</option>
        <option value="-90" >{#Gallery_ei_raclockwise#}</option>
      </select></td>
      </tr>
      
     
    <tr>
      <td><label><input {if $canfilter!=1}disabled="disabled"{/if} type="radio" name="edit_action" id="edit_action" value="grayout" onclick="document.getElementById('h').value='filled'"> {#Gallery_ei_togray#}</label></td>
      </tr>
    <tr>
      <td><label><input {if $canfilter!=1}disabled="disabled"{/if} type="radio" name="edit_action" id="edit_action" value="brightness" onclick="document.getElementById('h').value='filled'"> {#Gallery_ei_lighter#}</label></td>
      </tr>
    <tr>
      <td><label><input {if $canfilter!=1}disabled="disabled"{/if} type="radio" name="edit_action" id="edit_action" value="brightness_reduce" onclick="document.getElementById('h').value='filled'"> {#Gallery_ei_darker#}</label></td>
      </tr>
 
  </table>
  <input type="hidden" name="save" value="1" />
<input type="submit" class="button big"  name="button" id="button" value="{#Gallery_ei_button#}">
<input type="button" onclick="window.close();" class="button big" value="{#Close#}" />
</fieldset>


{if $ImgWarning}
<div class="error_box" style="padding:20px">
{$config_vars.Gallery_E_Warning|replace:'__DIM__':$ImgDim}
</div>
{/if}

   
    </td>
  </tr>
</table>









</form>

</div>