<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript">
<!--
||ifdef||netscape_version||
	||define||amp||&||
||else||
	||define||amp||&amp;||
||endif||
var menuframe = null;
var menuform = null;

function findMenu(){
	if(!menuframe){
		if(window.opener){
			menuframe = window.opener.parent.frames[0];
		}
		else{
			menuframe = window.parent.parent.frames[0];
		}
		menuform = menuframe.document.menu;
	}
}

function mylistsubmit(cmd){
	findMenu();
	menuform.listcmd.value = cmd;
	menuform.cmd.value = "show";
	menuform.page.value = "framenew";
	menuform.submit();
}

function clickAddress(address){
	findMenu();
	menuform.my_from.value = address;
	menuform.not_new.value = "false";
	menuform.target = menuframe.openWindow();
	mylistsubmit("msg_new");
	if(navigator.userAgent.indexOf("4.") >= 0 || (navigator.userAgent.indexOf("MSIE") >= 0 && navigator.userAgent.indexOf("Mac") >= 0) ){
		setTimeout('menuform.not_new.value = "";menuform.redirect.value = "";', 1000);
	}else{
		menuform.not_new.value = "";
		menuform.redirect.value = "";
	}
	return;
}

function create(){
	document.pickform.abook_edit.value = document.pickform.abook_new.value;
	document.pickform.abook_list.value = document.pickform.abook_new.value;
	document.pickform.submit();
}

function do_copy(sel){
	var i;
	for (i=0; i<sel.options.length; i++){
		if (sel.options[i].selected==true){
			if (sel.options[i].value == "Groups")
				document.pickform.page.value = "group";
			else if (sel.options[i].value == "Recent Addresses")
				document.pickform.page.value = "pick_recent";
			else
				document.pickform.abook_edit.value = sel.options[i].value;
			break;
		}
	}
	document.pickform.cmd.value = "pick_edit";
	document.pickform.submit();
}

function externwindow(){
	msgWindow = open('||action||?cmd=ext_addr||amp||utoken=||putoken||||amp||||amp||','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 setTitle(){
	||ifequal||top||_top||
		window.top.document.title = "||cust_display_name|| - ||current_user|| - Address Book";
	||endif||
}

function importNew(){
	document.location = "||action||?cmd=import_new||amp||utoken=||utoken||";
}
// -->
</script>

||just_include||pickfcss.tpl||

<title>Address Book</title>
</head>

<body background="||cust_panel_background||" bgcolor="||cust_panel_bgcolor||" onload="setTitle();">

<center>

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


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

||ifempty||changing_address||

<form name="pickform" method="post" action="||action||">
<input type="hidden" name="utoken" value="||utoken||" />
<input type="hidden" name="cmd" value="pick_edit" />
<input type="hidden" name="abook_edit" value="||abook_edit||" />
<input type="hidden" name="abook_list" value="" />
<input type="hidden" name="page" value="" />

<table width="95%">
<tr>
	<td class="head" align="center">Address Book</td>
	<td></td>
	<td class="head" align="center">New Address Book</td>
	||ifdef||external_book||
		<td></td>
		<td></td>
		<td align="center"><input type="button" value="External Address Book" onclick="javascript:externwindow()" /></td>
	||endif||
</tr>
<tr>
	<td><select size="1" name="addr_books" onchange="do_copy(this)">
		||begin_book||
			<option value="||addr_book||" ||selected||>||trans_addr_book||</option>
		||end_book||
			<option value="Recent Addresses" selected="selected">Recent Addresses</option>
			<option value="Groups">Groups</option>
		</select></td>
	<td nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
	<td><input type="Text" name="abook_new" size="26"></td>
	<td><input type="button" value="Create" onclick="javascript:create()" /></td>
	<td width="100%">&nbsp;</td>
	<td align="center"><input type="button" value="Import an Address Book" onclick="javascript:importNew()"></td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" class="LT">
<tr bgcolor="#D6D6CE">
	<td width="100%" nowrap>Email Address</td>
</tr>
||define||color||1||
||begin_picklist||
	<tr nowrap class="L||color||">
		||ifequal||color||1|| ||define||color||0|| ||else|| ||define||color||1|| ||endif||
		<td nowrap><a href='javascript:clickAddress("||message_text||pick_full||")'>||html_text||pick_full||</a></td>
	</tr>
||end_picklist||
</table>
</form>
</center>

</body>
</html>
