<div class="actionPanelLeft">
	<div class="actionPanelRight p16">
		<div id="actionTop" class="right">
			<div class="button actionSave">
				<div class="buttonRight">
					<div class="buttonMiddle">{rs:ACTION_SAVE}</div>
				</div>
			</div>
			<div class="br"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" /></div>
		</div>
	</div>
</div>
<div class="middleLeft">
	<div class="middleRight p16">
		{ERROR}
		{MESSAGE}
		<form method="post" id="editForm">
		<table width="100%" cellspacing="0" cellpadding="5" border="0">
		<tr class="line">
		<td><div class="labelBox">{rs:MAIL_MODE}<span class="red">*</span>:</div></td>
		<td>
			<select name="r[mail_mode]" onchange="save.value=0; submit();">
			{row:MAIL_MODE_SELECT}<option value="{id}" {selected}>{title}</option>{/row}
			</select>
		</td>
		</tr>

		{if:mail_mode}
		<tr class="line">
		<td><div class="labelBox">{rs:AUTORESPONDER_SMTP}<span class="red">*</span>:</div></td>
		<td>
			<select name="r[autoresponder_smtp]">
			{row:AUTORESPONDER_SMTP_SELECT}<option value="{id}" {selected}>{title}</option>{/row}
			</select>
		</td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:AUTORESPONDER_POP3}<span class="red">*</span>:</div></td>
		<td>
			<select name="r[autoresponder_pop3]">
			{row:AUTORESPONDER_POP3_SELECT}<option value="{id}" {selected}>{title}</option>{/row}
			</select>
		</td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:CAMPAIGN_SCHEDULE_SMTP}<span class="red">*</span>:</div></td>
		<td>
			<select name="r[campaign_schedule_smtp]">
			{row:CAMPAIGN_SCHEDULE_SMTP_SELECT}<option value="{id}" {selected}>{title}</option>{/row}
			</select>
		</td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:CAMPAIGN_SCHEDULE_POP3}<span class="red">*</span>:</div></td>
		<td>
			<select name="r[campaign_schedule_pop3]">
			{row:CAMPAIGN_SCHEDULE_POP3_SELECT}<option value="{id}" {selected}>{title}</option>{/row}
			</select>
		</td>
		</tr>
		{/if}

		<tr class="line">
		<td><div class="labelBox">{rs:ENCODING}:</td>
		<td>
			<select name="r[encoding]">
			{row:ENCODING_SELECT}<option value="{id}" {selected}>{title}</option>{/row}
			</select>
		</td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:DEFAULT} {rs:MAIL_FROM}<span class="red">*</span>:</div></td>
		<td><div class="inputBox"><input type="text" name="r[mail_from]" value="{mail_from}"></div></td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:DEFAULT} {rs:MAIL_FROM_NAME}:</div></td>
		<td><div class="inputBox"><input type="text" name="r[mail_from_name]" value="{mail_from_name}"></div></td>
		</tr>

		{if:show_mail_count}
		<tr class="line">
		<td><div class="labelBox">{rs:MAIL_COUNT}:</div></td>
		<td><div class="inputBox small"><input type="text" name="r[mail_count]" value="{mail_count}"></div></td>
		</tr>
		{/if}

		<tr class="line">
		<td><div class="labelBox">{rs:DATE_FORMAT}:</div></td>
		<td>
			<select name="r[date_format]">
			{row:DATE_FORMAT_SELECT}<option value="{id}" {selected}>{title}</option>{/row}
			</select>
		</td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:EMAIL_ACTIVATION}:</div></td>
		<td><div class="checkBox"><input type="checkbox" name="r[email_activation]" value="1"{if:email_activation} checked{/if}></div></td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:UNSUBSCRIBE_CONFIRM}:</div></td>
		<td><div class="checkBox"><input type="checkbox" name="r[unsubscribe_confirm]" value="1"{if:unsubscribe_confirm} checked{/if}></div></td>
		</tr>

		<tr class="line">
		<td><div class="labelBox">{rs:SHOW_ENCODING}:</div></td>
		<td><div class="checkBox"><input type="checkbox" name="r[show_encoding]" value="1"{if:show_encoding} checked{/if}></div></td>
		</tr>

		<tr>
		<td><img src="{global:PATH}img/spacer.gif" width="270" height="1" border="0" alt=""></td>
		<td width="100%"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" alt=""></td>
		</tr>
		</table>
		<input type="hidden" name="save" value="1" class="hidden">
		</form>

	<div class="info"><span class="red">*</span> {rs:MSG_REQUIRED_FILL}</div>
	</div>
</div>
<div class="actionPanelLeft">
	<div class="actionPanelRight">
		<div class="actionPanelBottom">
			<div class="actionPanelBottomLeft">
				<div class="actionPanelBottomRight p16">
					<div id="actionBottom" class="right">
						<div class="button actionSave">
							<div class="buttonRight">
								<div class="buttonMiddle">{rs:ACTION_SAVE}</div>
							</div>
						</div>
						<div class="br"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" /></div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script>
	$(".actionSave").click(function() {
		$("#editForm").submit();
	});
	$("#editForm").keydown(function(event) {
  		if (event.keyCode == '13' && event.target.nodeName!='TEXTAREA') $(".actionSave").triggerHandler('click');
	});
</script>

