<html>
<head>
<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.xcmd.value = "edit_abook";
	document.pickform.submit();
}

function externwindow()
{
        msgWindow = open('||action||?cmd=ext_addr&utoken=||putoken||&&','EXTERNADDR','width=550,height=450,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes','POPUP');
        if (msgWindow.opener == null) msgWindow.opener = self;
        if (msgWindow.opener.pickform == null) msgWindow.opener.pickform = document.pickform;
}

function newwindow()
{
        msgWindow = open('||action||?cmd=msg_new&page=group.tpl&utoken=||utoken||&&','CREATEGROUP','width=550,height=250,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=no','POPUP');
        if (msgWindow.opener == null) msgWindow.opener = self;
        if (msgWindow.opener.pickform == null) msgWindow.opener.pickform = document.pickform;
}

function prompt_user()
{
	x = confirm('Do you want to delete the entire Address Book?');
	if (x == true) {
		document.pickform.cmd.value = "del_abook";
		document.pickform.submit();
	}
}

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

||ifdef||background||
<body background="||nwimg||/||background||">
||else||
<body>
||endif||


||include||nfmenu.tpl||

||ifdef||error||
	<center>
	<table border="1">
		<tr>	<td><img src="||nwimg||/attention.gif">
			<td bgcolor="ffffff">||error||</td>
		</tr>
	</table>
	</center>
||endif||


<form name="pickform" method="POST" action="||b_action||">
	<input type=hidden name="utoken" value="||utoken||">
	<input type=hidden name="xcmd" value="">


	<center>
	<table>	<tr>	<td align=center><h2><b>Edit Pick List</b></h2></center></td>
			<td align=center><h2><b>Distribution List</b></h2></center></td>
		</tr>
		<tr>	<td align=center><input type=image border="0" src="||nwimg||/save.gif" name=pick_save></td>
			<td align=center><input type=image border="0" src="||nwimg||/save.gif" name=pick_save></td>
		</tr>
		<tr>	<td><textarea name="picklist" rows=8 cols=40>||picklist||</textarea></td>
			<td><textarea name="dist_list" rows=8 cols=40>||dist_list||</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>
			<td><font size="-1">Example: Netwin=lynden, john@1.2.3.4<br>
					Note: group names may not contain spaces</font></td>
		</tr>
	</table>
	</center>

<hr>
<table>
<tr><td><img border="0" src="||nwimg||/creategrp.gif"  alt="Distribution List" name="Distribution List" usemap="#ABooks">
	<map name="ABooks"><area coords="0,0,100,100" href="javascript:newwindow()"></map></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>

||ifdef||external_book||
<table>
<tr><td><img border="0" src="||nwimg||/external.gif"  alt="External Address Book" name="External Address Book" usemap="#ExtBooks">
	<map name="ExtBooks"><area coords="0,0,100,100" href="javascript:externwindow()"></map></td>
<td>	This is the external address book which is maintained by the Site Admin.
	It stores users information, and allows you to search for details.</td>
</tr>
</table>
||endif||

<hr>
	<center><h2><b>Address Book(s)</b></h2>
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr valign="top"><td><table width="100%" 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=image border="0" src="||nwimg||/reload.gif" alt="reload" name="edit_abook">
				<img border="0" src="||nwimg||/delete.gif" usemap="#deletebook">
				<map name="deletebook"><area coords="0,0,100,100" href="javascript:prompt_user()"></map>
				</td></tr>
			<tr><td><hr></td></tr>
			<tr><td><b>Use Public address book</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=image border="0" src="||nwimg||/save.gif" name=pick_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=image border="0" src="||nwimg||/add_addr.gif" alt="Add New Address" name="create_addr">
			<tr><td>
				<table bgcolor="#FFFFFF" width="100%" border="2" cellspacing="0" cellpadding="0">
					<!-- 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></tr>
				</table></tr>
			</table>
		</td>
	</table></center>
</form>

</body>
</html>
