<table align="center">
<tr><td><div id="<tmpl_var name=context>_person_result"><tmpl_var name=result escape=html></div></td></tr>
<tr><td><hr /></td></tr>
</table>
<form name="<tmpl_var name=context>_person_form" id="<tmpl_var name=context>_person_form" action="" method="post" onSubmit="return <tmpl_var name=context>_person_onsubmit()">
<table align="center">
<tr>
<td>Given names</td><td><input name="given_names" type="text" id="given_names" size="40" value="<tmpl_var name=given_names escape=html>" /></td><td></td>
<td>Preferred name</td><td><input name="preferred_name" type="text" id="preferred_name" size="40" value="<tmpl_var name=preferred_name escape=html>" /></td><td></td>
</tr>
<tr>
<td>Surname</td><td><input name="surname" type="text" id="surname" size="40" value="<tmpl_var name=surname escape=html>" /></td><td></td>
<td>Title</td><td><tmpl_var name=titles></td><td></td>
</tr>
<tr>
<td>Gender</td><td><tmpl_var name=genders></td><td></td>
<td>Broadcast</td><td><tmpl_var name=broadcasts></td><td></td>
</tr>
<tr>
<td>Communicate</td><td><tmpl_var name=communication_types></td><td></td>
<td>Role</td><td><tmpl_var name=roles></td><td></td>
</tr>
<tr>
<td align="center" colspan="6"><hr /></td>
</tr>
<tr>
<td>Phone 1</td><td><input name="phone_1" type="text" id="phone_1" size="40" value="<tmpl_var name=phone_1>" /></td><td><tmpl_var name=phone_number_types_1></td>
<td>Phone 2</td><td><input name="phone_2" type="text" id="phone_2" size="40" value="<tmpl_var name=phone_2>" /></td><td><tmpl_var name=phone_number_types_2></td>
</tr>
<tr>
<td>Phone 3</td><td><input name="phone_3" type="text" id="phone_3" size="40" value="<tmpl_var name=phone_3>" /></td><td><tmpl_var name=phone_number_types_3></td>
<td>Phone 4</td><td><input name="phone_4" type="text" id="phone_4" size="40" value="<tmpl_var name=phone_4>" /></td><td><tmpl_var name=phone_number_types_4></td>
</tr>
<tr>
<td align="center" colspan="6"><hr /></td>
</tr>
<tr>
<td>Email 1</td><td><input name="email_1" type="text" id="email_1" size="40" value="<tmpl_var name=email_1>" /></td><td><tmpl_var name=email_address_types_1></td>
<td>Email 2</td><td><input name="email_2" type="text" id="email_2" size="40" value="<tmpl_var name=email_2>" /></td><td><tmpl_var name=email_address_types_2></td>
</tr>
<tr>
<td>Email 3</td><td><input name="email_3" type="text" id="email_3" size="40" value="<tmpl_var name=email_3>" /></td><td><tmpl_var name=email_address_types_3></td>
<td>Email 4</td><td><input name="email_4" type="text" id="email_4" size="40" value="<tmpl_var name=email_4>" /></td><td><tmpl_var name=email_address_types_4></td>
</tr>
<tr>
<td align="center" colspan="6"><hr /></td>
</tr>
<tr>
<td>Home page</td><td><input name="home_page" type="text" id="home_page" size="40" value="<tmpl_var name=home_page escape=html>" /></td><td></td>
</tr>
<tr>
<td align="center" colspan="6"><hr /></td>
</tr>
</table>
<table align="center" width="100%">
<tr>
<tmpl_if name=reset_button>
<td align="center"><input type="reset" name="reset" value="Reset" /></td>
<tmpl_else>
<td align="center"><input type="button" id="close_person_form" name="close_person_form" onClick="tab_set.removeTab(person_tab); person_tab=null;  tab_set.set('activeTab', search_tab)" value="Close tab"/></td>
<td align="center"><input type="submit" name="submit_person_delete" id="submit_person_delete" value="Delete" onClick="document.<tmpl_var name=context>_person_form.action.value=102" /></td>
<td align="center"><input type="submit" name="submit_person_notes" id="submit_person_notes" value="Notes" onClick="document.<tmpl_var name=context>_person_form.action.value=104" /></td>
<td align="center"><!-- <input type="submit" name="submit_person_sites" id="submit_person_sites" value="Sites" onClick="document.<tmpl_var name=context>_person_form.action.value=106" /> --></td>
</tmpl_if>
<td align="center"><input type="submit" name="submit_person_<tmpl_var name=context>" id="submit_person_<tmpl_var name=context>" value="<tmpl_var name=go>" onClick="document.<tmpl_var name=context>_person_form.action.value=<tmpl_var name=action>" /></td>
</tr>
</table>
<input type="hidden" name="action" id="action" value="0" />
<input type="hidden" name="target_id" id="target_id" value="<tmpl_var name=target_id>" />
<input type="hidden" name="sid" id="sid" value="<tmpl_var name=sid>" />
</form>

<tmpl_if name=occupation_loop>
<form name="update_person_occupation_form" id="update_person_occupation_form" action="" method="post" onSubmit="return update_person_occupation_onsubmit()">
<table align="center">
<tr>
<td align="center" colspan="5"><hr /></td>
</tr>
<tmpl_loop name=occupation_loop>
<tr>
<td>Organization: </td><td><tmpl_var name=name>.</td><td>Occupation: </td><td><tmpl_var name=title></td>
<td><input type="checkbox" name="occupation_id_<tmpl_var name=occupation_id>" id="occupation_id_<tmpl_var name=occupation_id>" value="<tmpl_var name=occupation_id>"/></td>
</tr>
</tmpl_loop>
<tr>
<td align="center" colspan="5"><input type="submit" name="submit_occupation_delete" id="submit_occupation_delete" value="Delete occupation(s)" onClick="document.update_person_occupation_form.action.value=2" /></td>
</tr>
</table>
<input type="hidden" name="action" id="action" value="0" />
<input type="hidden" name="sid" id="sid" value="<tmpl_var name=sid>" />
</form>
</tmpl_if>
