<script language="JavaScript">
<!---

function pressnick(value)
{
 if (opener.self.document.sendform.oo[0].checked == true) {
  if (opener.self.document.sendform.to.value != "")
   opener.self.document.sendform.to.value = ", " +
   opener.self.document.sendform.to.value;
  opener.self.document.sendform.to.value = value +
  opener.self.document.sendform.to.value;
 }
 if (opener.self.document.sendform.oo[1].checked == true) {
  if (opener.self.document.sendform.cc.value != "")
   opener.self.document.sendform.cc.value = ", " +
   opener.self.document.sendform.cc.value;
  opener.self.document.sendform.cc.value = value +
  opener.self.document.sendform.cc.value;
 }
 if (opener.self.document.sendform.oo[2].checked == true) {
  if (this.opener.self.document.sendform.bcc.value != "")
   opener.self.document.sendform.bcc.value = ", " +
   opener.self.document.sendform.bcc.value;
  opener.self.document.sendform.bcc.value = value +
  opener.self.document.sendform.bcc.value;
 }
 if (opener.self.document.sendform.oo[3].checked == true) {
  if (opener.self.document.sendform.reply.value != "")
   opener.self.document.sendform.reply.value = ", " +
   opener.self.document.sendform.reply.value;
  opener.self.document.sendform.reply.value = value +
  opener.self.document.sendform.reply.value;
 }
}


function do_copy(sel)
{
	var i;
	for (i=0; i<sel.options.length; i++)
	if (sel.options[i].selected==true)
		document.addrbook.abook_edit.value
			= sel.options[i].text;

	document.addrbook.xcmd.value = "addr_only";
	document.addrbook.submit();
}
// -->
</script>

<html>
<head>
<title>Address Book (||abook_edit||)</title>
</head>

<body onLoad="focus()">

||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="addrbook" method="POST" action="||action||">
<input type=hidden name="force_connection" value="true">
<input type=hidden name="utoken" value="||utoken||">
<input type=hidden name="abook_edit" value="||abook_edit||">
<input type=hidden name="xcmd" value="">

<table width="100%" cellspacing="0" cellpadding="0">
<tr valign="top">
	<td>
		<b>Edit Address Book:</b>
		<select size="1" name="addr_books" onchange="do_copy(this)">
			<option>||addr_books||</option>
		</select>
		<input type="submit" value="reload" name="addr_only">
	</td>
</tr>
<tr>
	<td valign="top" border="1" width="100%">
		<table bgcolor="#FFFFFF" width="100%" border="2" cellspacing="0" cellpadding="0">
		<!-- Header -->
		<tr>
			<th width="30%">Nickname</th>
			<th width="30%">Email Address</th>
			<th width="30%">Full Name</th>
		</tr>
		||begin_address||
		<tr>
			<td><a href="javascript:pressnick('||name||')">||html_text||name||</a></td>
			<td>||abk_email||</td>
			<td>||abk_full_name||</td>
		</tr>
		||end_address||
		</table>
	</td>
</tr>
</table>
</center>
</form>

</body>
</html>
