<div class="actionPanelLeft">
	<div class="actionPanelRight p16">
		<div id="actionTop" class="right">
			<div class="button actionNext">
				<div class="buttonRight">
					<div class="buttonMiddle">{rs:NEXT}</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}
		<form method="post" id="editForm">
		<table width="100%" cellspacing="0" cellpadding="5" border="0">
		<tr class="line">
		<td><input type="radio" name="r[type]" value="all"{if:all} checked{/if}></td>
		<td><div class="labelBox">{rs:ALL_SUBSCRIBERS}</div></td>
		</tr>

		<tr>
		<td><input type="radio" name="r[type]" value="mail_groups"{if:mg_checked} checked{/if}></td>
		<td><div class="labelBox">{rs:MAILING_GROUPS}:</div></td>
		</tr>

		<tr class="line">
		<td><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" alt=""></td>
		<td>
			<div class="checkBoxItem">
				<div class="checkBox"><input type="checkbox" name="all_groups" id="all_groups" value=""></div>
				<div class="label"><label for="all_groups"><b>{rs:SELECT_ALL}</b></label></div>
			</div>
			{row:GROUPS_SELECT}
			<div class="checkBoxItem">
				<div class="checkBox"><input type="checkbox" name="r[group_id][]" id="group_{id}" value="{id}"{if:selected} checked{/if}></div>
				<div class="label"><label for="group_{id}">{title}</label></div>
			</div>
			{/row}
			<div class="br"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0"></div>
		</td>
		</tr>

		<tr>
		<td><input type="radio" name="r[type]" value="black_list"{if:bl_checked} checked{/if}></td>
		<td><div class="labelBox">{rs:TITLE_BLACK_LIST}</div></td>
		</tr>

		<tr class="line">
		<td><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" alt=""></td>
		<td>
			<div class="checkBoxItem">
				<div class="checkBox"><input type="checkbox" name="all_black_list" id="all_black_list" value=""></div>
				<div class="label"><label for="all_black_list"><b>{rs:SELECT_ALL}</b></label></div>
			</div>
			{row:BLACK_LIST_SELECT}
			<div class="checkBoxItem">
				<div class="checkBox"><input type="checkbox" name="r[black_list_id][]" id="black_list_{id}" value="{id}"{if:selected} checked{/if}></div>
				<div class="label"><label for="black_list_{id}">{title}</label></div>
			</div>
			{/row}
			<div class="br"><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0"></div>
		</td>
		</tr>

		{row:LINE}
		<tr class="line">
		<td><input type="radio" name="r[type]" value="{id}"{if:checked} checked{/if}></td>
		<td><div class="labelBox">{title}</div></td>
		</tr>
		{/row}

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

		<tr>
		<td><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" alt=""></td>
		<td><div class="labelBox">{rs:CVS_FORMAT}</div></td>
		</tr>

		<tr class="line">
		<td><img src="{global:PATH}img/spacer.gif" width="1" height="1" border="0" alt=""></td>
		<td>
			<table cellspacing="0" cellpadding="0" border="0">
			<tr class="noline">
			<td>{rs:DELIMITER}:</td>
			<td><img src="{global:PATH}img/spacer.gif" width="10" height="32" border="0" alt=""></td>
			<td><div class="inputBox small"><input type="text" name="r[delimiter]" value="{delimiter}"></div></td>
			</tr>
			<tr class="noline">
			<td>{rs:ENCLOSURE}:</td>
			<td><img src="{global:PATH}img/spacer.gif" width="10" height="32" border="0" alt=""></td>
			<td><div class="inputBox small"><input type="text" name="r[enclosure]" value="{enclosure}"></div></td>
			</tr>
			</table>
		</td>
		</tr>

		<tr>
		<td><img src="{global:PATH}img/spacer.gif" width="20" 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">{rs:INFO_EXPORT}</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 actionNext">
							<div class="buttonRight">
								<div class="buttonMiddle">{rs:NEXT}</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>
	$(".actionNext").click(function() {
		$("#editForm").submit();
	});
	$("input[name='all_groups']").click(function() {
		$("input[name*='r[group_id]']").attr('checked', this.checked);
	});
	$("input[name='all_black_list']").click(function() {
		$("input[name*='r[black_list_id]']").attr('checked', this.checked);
	});
	$("#editForm").keydown(function(event) {
  		if (event.keyCode == '13' && event.target.nodeName!='TEXTAREA') $(".actionNext").triggerHandler('click');
	});
</script>
