<html>
<head>
<title>External Address Book</title>
</head>

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

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


<form name="external_search">
	<input type="hidden" name="utoken" value="||utoken||">
	<input type="hidden" name="cmd" value="">

<center>
<h1>Add/Change Address Entry</h1>

||ifdef||ext_books||
	<table>
	<tr>	<td><b>Address Book:</b></td>
		<td><select name="book_selected" size="1" onchange="this.form.cmd.value='ext_addr';this.form.submit();">
			||begin_ext_book||
				||ifequal||book_selected||book_name||
					<option value="||book_name||" selected> ||book_name|| - ||book_text|| ||ifdef||book_edit||(edit)||endif||</option>
				||else||
					<option value="||book_name||" > ||book_name|| - ||book_text|| ||ifdef||book_edit||(edit)||endif||</option>
				||endif||
			||end_ext_book||
		</select>
		</td>
	</table>
||endif||


||ifdef||ext_search||
<table border="1">
<tr><td>
<table>
	||begin_ext_avail||
	||ifequal||field_name||record_id||
		<input type="hidden" name="ext_||field_name||." value="||build(ext_||field_name||.)||">
		||ifnempty||(ext_||field_name||.)||
			<tr>	<td align="right"><b>||field_text||:</b></td>
				<td><b>||build(ext_||field_name||.)||</b></td>
			</tr>
		||endif||
	||else||
		<tr>	<td align="right"><b>||field_text||:</b></td>
			<td>
			||ifequal||field_type||2||
			<!-- Number Field --->
				<input type="text" size="5" name="ext_||field_name||.x" value="||build(ext_||field_name||.x)||"></td>
			||else||
				||ifequal||field_type||4||
			<!-- Date Field --->
					<input type="text" size="2" maxlength="2" name="ext_||field_name||.dx" value="||build(ext_||field_name||.dx)||"><b>/</b>
					<input type="text" size="2" maxlength="2" name="ext_||field_name||.mx" value="||build(ext_||field_name||.mx)||"><b>/</b>
					<input type="text" size="4" maxlength="4" name="ext_||field_name||.yx" value="||build(ext_||field_name||.yx)||"> <b>d/m/y</b>
				||else||
			<!-- String Field (default) --->
					<input type="text" size="30" name="ext_||field_name||." value="||build(ext_||field_name||.)||">
				||endif||
			||endif||
			</td>
		</tr>
	||endif||
	||end_ext_avail||

	<tr><td align="center" colspan="2"><input type="submit" value="Update Address Book" name="ext_update"></td></tr>
</table>
</td></tr>
</table>
||else||
	<h2>Address Book does not support searching</h2>
||endif||

</center>

</form>


</body>
</html>
