<html>
<script language="JavaScript">
<!---
function do_copy(sel)
{
	var i;
	for (i=0; i<sel.options.length; i++)
	if (sel.options[i].selected==true)
		document.pickform.abook_edit.value
			= sel.options[i].text;
	
	document.pickform.cmd.value = "edit_abook";
	document.pickform.submit();
}

function newwindow()
{
	msgWindow = open('||action||?cmd=msg_new&page=group.tpl&utoken=||putoken||&force_connection=true&&','ADDRESSBOOK','width=550,height=250,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes','POPUP');
	if (msgWindow.opener == null){
		msgWindow.opener = self;
	}
	if (msgWindow.opener.pickform == null){
        msgWindow.opener.pickform = document.pickform;
	}
	msgWindow.focus();
}
// -->
</script>

<head>
<title>Edit Pick List</title>
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" rules="none">
<tr valign="top">
	<td>||include||nfmenu.tpl||</td>
	<td>&nbsp;</td>
</tr>
<tr>
	<td>
		||ifdef||error||
			<center>
			<table border="1">		
				<tr>	
					<td><img src="||nwimg||/attention.gif"></td>
					<td bgcolor="ffffff">||error||</td>
				</tr>
			</table>
			</center>
		||endif||

		<form name="pickform" method="POST" action="||action||">
		<input type=hidden name="utoken" value="||utoken||">
		<input type=hidden name="force_connection" value="true">
		<input type=hidden name="cmd" value="">

		<table>
		<tr>
			<td valign="top">
				<center><h2><b>Edit Pick List</b></h2>
				<input type="submit" name="pick_save" value="save">
				<table>
				<tr>
					<td><textarea name="picklist" rows=8 cols=40>||picklist||</textarea></td>
				</tr>
				<tr>
					<td>
						<input type=checkbox name="autoadd" value="on" ||autoadd||>Add all addresses automatically<br>		
						<input type=checkbox name="autoadd2" value="on" ||autoadd2||>Add addresses you Email
					</td>
				</tr>
				</table>
				</center>
			</td>
			<td valign="top">
				<center><h2><b>Distribution List</b></h2>
				<input type="submit" name="pick_save" value="save">
				<table>
				<tr>
					<td><textarea name="dist_list" rows=8 cols=40>||dist_list||</textarea></td>
				</tr>
				<tr>
					<td><font size="-1">Example: Netwin=lynden, support-||product||@netwinsite.com</font></td>
				</tr>
				</table>
				</center>
			</td>
		</tr>
		</table>
		<hr>

		<table>
		<tr>
			<td>
				<input type="button" value="Create Group" onclick="newwindow();">
				</td>
			<td>
				To create a group in the Distribution List above right, just click on 'Create
				Group'. A new window will show you the recent email addresses (pick list) that you typed 
				or that you received.
			</td>
		</tr>
		</table>

		<hr>
		<center><h2><b>Address Book(s)</b></h2></center>

		<center>
		<table border cellspacing="0" cellpadding="0" width="100%">
		<tr width="100%">
			<td valign="top" width="30%">
				<table cellspacing="0" cellpadding="0">
					<tr>
						<td><b>Edit Address Book</b></td>
					</tr>
					<tr>
						<td>
							<input type="text" size=10 name="abook_edit" value="||abook_edit||">
							<select size="1" name="addr_books" onchange="do_copy(this)">
								<option>||addr_books||</option>
							</select>
						</td>
					</tr>
					<tr>
						<td>
							<input type="submit" name="edit_abook" value="Load Address Book">
							<input type="submit" name="del_abook" value="Delete Address Book">
						</td>
					</tr>
					<tr>
						<td><hr></td>
					</tr>
					<tr>
						<td><b>Use Public address book(s) from</b></td>
					</tr>
					<tr>
						<td><input type="text" size=25 name="gaddr_books" value="||gaddr_books||"></td>
					</tr>
					<tr>
						<td>You only need to enter the User Name. eg. Lynden, Ralph</td>
					</tr>
					<tr>
						<td><input type="submit" name="pick_save" value="save"></td>
					</tr>
					<tr>
						<td><p><b>Note:</b> Public Address Books are Named 'pub_xxxx'.</p></td>
					</tr>
					</table>
				</td>
				<td valign="top" width="70%">
					<table width="100%">
					<tr>
						<td><center><input type="submit" value="Add Address" name="create_addr"></td>
					</tr>
					<tr>
						<td><table bgcolor="#FFFFFF" width="100%" border="2" cellspacing="0" cellpadding="0"></td>
					</tr>
					<!-- Header -->	
					<tr>
						<th nowrap>Nickname</th>
						<th nowrap>Email Address</th>
						<th nowrap>Full Name</th>
						<th nowrap>Phone</th>
						<th nowrap>Mobile</th>
						<th nowrap>Fax</th>
					</tr>
					||begin_address||
						<tr>
							<td><a href="||action||?cmd=create_addr&nick_name=||href_text||name||&abook_edit=||abook_edit||&utoken=||utoken||">||html_text||name||</a></td>
							<td>||html_text||abk_email||</td>
							<td>||html_text||abk_full_name||</td>
							<td>||html_text||abk_phone||</td>
							<td>||html_text||abk_mobile||</td>
							<td>||html_text||abk_fax||</td>
						</tr>
					||end_address||
					</table>
				</td>
			</tr>
			</table>
			</td>
		</tr>
		</table>
		</center>
		</form>
	</td>
</tr>
</table>
</body>
</html>
