HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /www/exchange0old/exchange/admin/cache/%%D0^D0F^D0F834A7%%traAddOrganisationNg.html.php
<?php /* Smarty version 2.6.19, created on 2024-07-08 12:55:07
         compiled from originators/traAddOrganisationNg.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'count', 'originators/traAddOrganisationNg.html', 773, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script src="<?php echo $_SESSION['base_url']; ?>
js/jquery.maskedinput.min.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo $_SESSION['admin_url']; ?>
js/auction.js"></script>
<script src="<?php echo $_SESSION['base_url']; ?>
js/jquery.simple-dtpicker.js" type="text/javascript"></script>
<link type="text/css" href="<?php echo $_SESSION['base_url']; ?>
css/jquery.simple-dtpicker.css" rel="stylesheet" />
<div id="body_portion">
	<div id="admin_menu">
		<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "left.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
		
		<div id="right_content">
			<script type="text/javascript" src="<?php echo $_SESSION['admin_url']; ?>
js/selecbox.js"></script>
			<script type="text/javascript">
				$(document).ready(function() {
					$('#Items').selectbox();
				});
			</script>
			<?php if (count ( $this->_tpl_vars['message'] ) > 0): ?>
			<div class="success-msgbox"><span>
				<?php $_from = $this->_tpl_vars['message']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['err'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['err']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['err']):
        $this->_foreach['err']['iteration']++;
?>
				<?php echo $this->_tpl_vars['message']; ?>

				<br>
				<?php endforeach; endif; unset($_from); ?>
				</span>
			</div>
			<?php endif; ?>
			
			<?php if ($this->_tpl_vars['errors']): ?>
			<div class="errors-msgbox">
				<?php $_from = $this->_tpl_vars['errors']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['err'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['err']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['err']):
        $this->_foreach['err']['iteration']++;
?>
				<span><?php echo $this->_tpl_vars['err']; ?>
</span><br>
				<?php endforeach; endif; unset($_from); ?>
			</div>
			<?php endif; ?>
			
			
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="margin_table">
				<tr>
					<td valign="top" align="left" width="2%" class="hdr_tl">&nbsp;</td>
					<td valign="top" align="left" class="hdr_tc">Create New Originator Organisation</td>
					<td align="right" class="hdr_tc">
						<a href="<?php echo $_SESSION['admin_url']; ?>
adminindex.php?do=traapplications" class="under_blue">Back</a>
					</td>
					<td valign="top" align="left" width="2%" class="hdr_tr">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" align="left" colspan="4" class="hdr_center">
						
						<form name="newOriginator" action="adminindex.php?do=insertoriginatororg" method="post">
							
							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr>
									<td colspan="3" align="left" valign="top">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr class="">
												<td align="left" valign="middle">&nbsp;</td>
											</tr>
											<tr class="">
												<td align="left" valign="middle" class="txt_12_red">
													&nbsp;&nbsp;<b>Please Note:</b> All fields marked with * require an input
												</td>
											</tr>
											<tr class="">
												<td align="left" valign="middle">&nbsp;</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td colspan="3" align="left" valign="top" class="inves_top_bg"><span>Originator User Details</span></td>
								</tr>
								<tr class="">
									<td width="50%" valign="top" align="left">
										<table width="100%" cellpadding="3" cellspacing="3" border="0" class="table table-hover table-striped table-responsive">
											<tbody>
												<tr>
													<td width="4%" valign="top" align="center" class="txt_11_red"> * </td>
													<td width="41%" valign="top" align="left"> Email : </td>
													<td width="49%" valign="top" align="left">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['username']; ?>
" name="username">
														<br/><span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['username']; ?>
</span>
														<p class="txt_11_cute">Spaces are not allowed</p>
													</td>
													<td width="6%" valign="top" align="right"></td>
												</tr>
												<tr>
													<td valign="top" align="center" class="txt_11_red"> * </td>
													<td valign="top" align="left"> Password :</td>
													<td valign="top" align="left">
														<input type="text" onkeyup="passwordStrength(this.value)" class="text_b" value="<?php echo $this->_tpl_vars['errval']['password']; ?>
" name="password" id="password">
														<div class="strength0" id="passwordDescription"></div>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['password']; ?>
</span>
													</td>
													<td valign="top" align="right"></td>
												</tr>
												<tr>
													<td valign="top" align="center" class="txt_11_red"> * </td>
													<td valign="top" align="left">Confirm Password :</td>
													<td valign="top" align="left">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['cpassword']; ?>
" name="cpassword">
														<br/><span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['cpassword']; ?>
</span>
														<p class="txt_11_cute"></p>
													</td>
													<td valign="top" align="right"></td>
												</tr>
											</tbody>
										</table>
									</td>
									<td valign="top" align="center" class="gray_1"></td>
									<td width="50%" valign="top" align="center">
										<table width="100%" cellpadding="3" cellspacing="3" border="0" class="table table-hover table-striped table-responsive">
											<tbody>
												<tr>
													<td align="center" width="4%" valign="top" class="txt_11_red"> * </td>
													<td align="left" width="41%" valign="top">First Name :</td>
													<td align="left" width="49%" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['first_name']; ?>
" name="first_name" id="first_name"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['first_name']; ?>
</span>
													</td>
													<td align="left" width="6%" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Last Name :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['last_name']; ?>
" name="last_name" id="last_name"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['last_name']; ?>
</span>
													</td>
													<td align="left" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Phone Number :</td>
													<td align="left" valign="top">
														<table width="80%" border="0" cellspacing="3" cellpadding="0">
															<tr>
																<td width="100%" align="left" valign="top">
																	<input type="text" value="<?php echo $this->_tpl_vars['errval']['phone']; ?>
" name="phone" id="phone" size="12" maxlength="32" class="text_b"/>
																</td>
															</tr>
															<tr>
																<td align="left" valign="top" class="txt_11_cute">Phone Number</td>
															</tr>
														</table>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['phone']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Other Number :</td>
													<td align="left" valign="top">
														<table width="80%" border="0" cellspacing="3" cellpadding="0">
															<tr>
																<td width="100%" align="left" valign="top">
																	<input type="text" value="<?php echo $this->_tpl_vars['errval']['other_phone']; ?>
" name="other_phone" id="other_phone" size="12" maxlength="32" class="text_b"/>
																</td>
															</tr>
															<tr>
																<td align="left" valign="top" class="txt_11_cute">Phone Number</td>
															</tr>
														</table>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['other_phone']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</table>
							
							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr>
									<td colspan="3" align="left" valign="top" class="inves_top_bg"><span>Organisation Details</span></td>
								</tr>
								<tr class="">
									<td width="50%" align="center" valign="top">
										<table width="100%" border="0" cellpadding="3" cellspacing="3" class="table table-hover table-striped table-responsive">
											<tr>
												<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
												<td width="41%" align="left" valign="top">Organisation Name&nbsp;:</td>
												<td width="49%" align="left" valign="top">
													<input type="text" name="organisation_name" id="organisation_name" value="<?php echo $this->_tpl_vars['errval']['organisation_name']; ?>
" class="text_b" /><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['organisation_name']; ?>
</span>
												</td>
												<td width="6%" align="right" valign="top">&nbsp;</td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
												<td align="left" valign="top">Organisation Trade Name :</td>
												<td align="left" valign="top">
													<input type="text" name="organisation_trade_name" value="<?php echo $this->_tpl_vars['errval']['organisation_trade_name']; ?>
" class="text_b" /><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['organisation_trade_name']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
												<td align="left" valign="top">Company Registration Number : <br/>
													<span class="txt_11_cute">example: IE123456A </span>
												</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['tax_number']; ?>
" name="tax_number" size="8" maxlength="12" class="text_b"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['tax_number']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
												<td align="left" valign="top">VAT Number : <br/>
													<span class="txt_11_cute">example: IE123456A </span>
												</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['vat_number']; ?>
" name="vat_number" size="12" maxlength="30" class="text_b"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['vat_number']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">NACE Category [NACEC] :</td>
												<td align="left" valign="top">
													<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/category_groups.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><br/>
													<span class="txt_11_cute"> For NACE Categories <a href="javascript:void(0);" onclick="window.open('/categories','','height=600,width=900,scrollbars=yes');" class="txt_blue">Click Here</a></span><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['siccat']; ?>
</span>
												</td>
												<td align="right" valign="top">&nbsp;</td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">NACE Description [NACED] :</td>
												<td align="left" valign="top">
													<span id="sicgpsapn"><select class="cmb_bx1" name="sicgp"><option value="">Please Choose</option></select></span><br/>
													<span class="txt_11_cute">For NACE Descriptions <a href="javascript:void(0);" onclick="window.open('/categories','','height=600,width=900,scrollbars=yes');" class="txt_blue">Click Here</a></span><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['sicgp']; ?>
</span>
												</td>
												<td align="right" valign="top">&nbsp;</td>
											</tr>
										</table>
									</td>
									<td align="center" valign="middle" class="gray_1"></td>
									<td width="50%" align="center" valign="top">
										<table width="100%" border="0" cellpadding="3" cellspacing="3" class="table table-hover table-striped table-responsive">
											<tr>
												<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
												<td width="41%" align="left" valign="top">Organisation Type&nbsp;:</td>
												<td width="49%" align="left" valign="top">
													<?php $this->assign('orgtype_name', 'organisation_type'); ?>
													<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/org_orgtype.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['organisation_type']; ?>
</span>
												</td>
												<td width="6%" align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Credebt&reg; Classification:</td>
												<td align="left" valign="top">
													<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/org_classification.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['org_classification']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Business Entity Type :</td>
												<td align="left" valign="top">
													<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/org_bentitytype.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['org_bentitytype']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr id="dropCompany">
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Parent Company Name :</td>
												<td align="left" valign="top">
													<input type="text" name="parent_company" value="<?php echo $this->_tpl_vars['errval']['parent_company']; ?>
" class="text_b"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['parent_company']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Country of Registration :</td>
												<td align="left" valign="top">
													<?php $this->assign('country_name', 'organisation_jurisdiction'); ?>
													<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/countries.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['organisation_jurisdiction']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Currency :</td>
												<td align="left" valign="top">
													<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/currencies.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Formation Year : <span class="txt_11_cute">(YYYY)</span></td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['formation_year']; ?>
" name="formation_year" size="4" maxlength="4" class="text_c_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['formation_year']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">No. of Employees :</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['total_employee']; ?>
" name="total_employee" size="4" maxlength="8" class="text_c_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['total_employee']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
												<td align="left" valign="top">Website :</td>
												<td align="left" valign="top">
													<input type="text" name="website" value="<?php echo $this->_tpl_vars['errval']['website']; ?>
" class="text_b"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['website']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
							
							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr>
									<td colspan="3" align="left" valign="top" class="inves_top_bg"><span>Trading Details</span></td>
								</tr>
								<tr class="">
									<td width="50%" align="center" valign="top">
										<table width="100%" border="0" cellpadding="3" cellspacing="3" class="table table-hover table-striped table-responsive">
											<tr>
												<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
												<td width="41%" align="left" valign="top">Facility Type :</td>
												<td width="49%" align="left" valign="top">
													<select id="credebt_facility_type" name="credebt_facility_type" class="cmb_bx1">
														<option value="">Select</option>
														<option value="fixed" <?php if ($this->_tpl_vars['errval']['credebt_facility_type'] == 'fixed'): ?>selected="selected"<?php endif; ?>>Fixed</option>
														<option value="variable" <?php if ($this->_tpl_vars['errval']['credebt_facility_type'] == 'variable'): ?>selected="selected"<?php endif; ?>>Variable</option>
													</select><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['credebt_facility_type']; ?>
</span>
												</td>
												<td width="6%" align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">d-ETR Purchase Price %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['purchase_price']; ?>
" name="purchase_price" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['purchase_price']; ?>
</span>
												</td>
												<td align="right" valign="top">&nbsp;</td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">d-ETR Sell Rate %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['agreed_rate']; ?>
" name="agreed_rate" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['agreed_rate']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">b/c-ETR Sell Rate %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['credit_agreed_rate']; ?>
" name="credit_agreed_rate" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['agreed_rate']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">d-ETR Face Value Charge %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['face_value_charge']; ?>
" name="face_value_charge" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['face_value_charge']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">b/c-ETR Face Value Charge %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['creditor_face_value_charge']; ?>
" name="creditor_face_value_charge" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['creditor_face_value_charge']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">ETR LDC Premium %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['ldc_premium']; ?>
" name="ldc_premium" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['ldc_premium']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">d-ETR Agent Commission %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['agent_commission']; ?>
" name="agent_commission" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['agent_commission']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">b/c-ETR Agent Commission %&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['creditor_agent_commission']; ?>
" name="creditor_agent_commission" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['creditor_agent_commission']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
										</table>
									</td>
									<td align="center" valign="middle" class="gray_1"></td>
									<td width="50%" align="center" valign="top">
										<table width="100%" border="0" cellpadding="3" cellspacing="3" class="table table-hover table-striped table-responsive">
											<tr>
												<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
												<td width="41%" align="left" valign="top">Creditor ETR Type :</td>
												<td width="49%" align="left" valign="top">
													<select name="etr_type" class="cmb_bx1">
														<option value="">Select</option>
														<?php $_from = $this->_tpl_vars['etr_types']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['etr_type']):
?>
														<option value="<?php echo $this->_tpl_vars['etr_type']; ?>
"
																<?php if ($this->_tpl_vars['etr_type'] == $this->_tpl_vars['errval']['etr_type']): ?> selected<?php endif; ?>><?php echo $this->_tpl_vars['etr_type']; ?>
-ETR</option>
																		<?php endforeach; endif; unset($_from); ?>
													</select><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['etr_type']; ?>
</span>
												</td>
												<td width="6%" align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Arrangement Fee&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['arrangement']; ?>
" name="arrangement" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['arrangement']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Membership Fee&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['membership']; ?>
" name="membership" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['membership']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Processing Fee&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['processing_fee']; ?>
" name="processing_fee" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['processing_fee']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Trade Fee&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['trade_fee']; ?>
" name="trade_fee" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['trade_fee']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Creditsafe Score&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['creditsafe_risk']; ?>
" name="creditsafe_risk" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['creditsafe_risk']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">Creditsafe Today's Limit&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['creditsafe_todays_limit']; ?>
" name="creditsafe_todays_limit" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['creditsafe_todays_limit']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">d-ETR Trade Limit&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['trade_limit']; ?>
" name="trade_limit" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['trade_limit']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
											<tr>
												<td align="center" valign="top" class="txt_11_red"> * </td>
												<td align="left" valign="top">b/c-ETR Trade Limit&nbsp;:</td>
												<td align="left" valign="top">
													<input type="text" value="<?php echo $this->_tpl_vars['errval']['trade_limit_c_etr']; ?>
" name="trade_limit_c_etr" size="4" maxlength="8" class="text_per_code"/><br/>
													<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['trade_limit_c_etr']; ?>
</span>
												</td>
												<td align="right" valign="top"></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
							
							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr>
									<td colspan="3" align="left" valign="top" class="inves_top_bg"><span>Organisation Addresses</span></td>
								</tr>
								<tr class="">
									<td width="50%" align="left" valign="top">
										<table width="100%" border="0" cellpadding="2" cellspacing="2" class="table table-hover table-striped table-responsive">
											<thead>
												<tr>
													<th colspan="4" style="height: 37px;">Registered Office Address</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">Address Line 1 :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" name="registered_address_line_one" id="registered_address_line_one" value="<?php echo $this->_tpl_vars['errval']['registered_address_line_one']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['registered_address_line_one']; ?>
</span>
													</td>
													<td width="6%" align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Address Line 2 :</td>
                                                    <td align="left" valign="top">
														<input type="text" name="registered_address_line_two" id="registered_address_line_two" value="<?php echo $this->_tpl_vars['errval']['registered_address_line_two']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['registered_address_line_two']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">City :</td>
													<td align="left" valign="top">
														<input type="text" name="registered_address_city" id="registered_address_city" value="<?php echo $this->_tpl_vars['errval']['registered_address_city']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['registered_address_city']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Area/County :</td>
													<td align="left" valign="top">
														<input type="text" name="registered_address_state" id="registered_address_state" value="<?php echo $this->_tpl_vars['errval']['registered_address_state']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['registered_address_state']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top"> Post Code :</td>
													<td align="left" valign="top">
														<input type="text" value="<?php echo $this->_tpl_vars['errval']['registered_address_zipcode']; ?>
" name="registered_address_zipcode" id="registered_address_zipcode" size="8" maxlength="8" class="text_b"/><br/>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['registered_address_zipcode']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Country :</td>
													<td align="left" valign="top">
														<span>
															<?php $this->assign('country_name', 'registered_address_country'); ?>
															<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/countries.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
														</span><br/>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['registered_address_country']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
                                            </tbody>
										</table>
									</td>
									<td align="center" valign="top" class="gray_1"></td>
									<td align="center" width="50%" valign="top">
										<table cellspacing="3" cellpadding="3" border="0" width="100%" class="table table-hover table-striped table-responsive">
											<thead>
												<tr>
													<th colspan="4">
														Primary Trading Address
														<select name="address_select" id="address_select" class="cmb_bx1" onchange="showSelectedRegaddr(this.value);">
															<option value="">Select</option>
															<option value="1" <?php if ($this->_tpl_vars['errval']['address_select'] == '1'): ?>selected="selected"<?php endif; ?> >Registered Office Address</option>
															<option value="0" <?php if ($this->_tpl_vars['errval']['address_select'] == '0'): ?>selected="selected"<?php endif; ?> >Other</option>
														</select>
														&nbsp;<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['address_select']; ?>
</span>
													</th>
												</tr>
											</thead>
											<tbody  id="wrk_addr" style="display:none;">
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">Address Line 1 :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['billing_address_line_one']; ?>
" name="billing_address_line_one" id="billing_address_line_one"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['billing_address_line_one']; ?>
</span></td>
													<td width="6%" valign="top" align="right"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Address Line 2 :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['billing_address_line_two']; ?>
" name="billing_address_line_two" id="billing_address_line_two"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['billing_address_line_two']; ?>
</span>
													</td>
													<td valign="top" align="right"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">City :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['billing_address_city']; ?>
" name="billing_address_city" id="billing_address_city"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['billing_address_city']; ?>
</span>
													</td>
													<td valign="top" align="right"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Area/County :</td>
													<td align="left" valign="top">
														<span id="w_dropState"><input type="text" class="text_b" tabindex="34" value="<?php echo $this->_tpl_vars['errval']['billing_address_state']; ?>
" name="billing_address_state" id="billing_address_state"><br/>
															<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['billing_address_state']; ?>
</span>
														</span>
													</td>
													<td width="7%" valign="top" align="right"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Post Code :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" maxlength="8" size="8" name="billing_address_zipcode" id="billing_address_zipcode" value="<?php echo $this->_tpl_vars['errval']['billing_address_zipcode']; ?>
"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['billing_address_zipcode']; ?>
</span>
													</td>
													<td width="7%" valign="top" align="right"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Country :</td>
													<td align="left" valign="top">
														<span>
															<?php $this->assign('country_name', 'billing_address_country'); ?>
															<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/countries.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
														</span><br/>
														<span style="color:#FF0000"><?php echo $this->_tpl_vars['errmsg']['billing_address_country']; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</table>

							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr>
									<td colspan="3" align="left" valign="top" class="inves_top_bg"><span>Bank Details</span></td>
								</tr>
								<tr class="">
									<td width="50%" valign="top" align="center">
										<table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive">
											<tbody>
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">Bank Account Name :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['account_name']; ?>
" name="account_name" id="account_name"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['account_name']; ?>
</span>
													</td>
													<td width="6%" align="left" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">IBAN Number :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['iban_code']; ?>
" name="iban_code" id="iban_code"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['iban_code']; ?>
</span>
													</td>
													<td align="left" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Swift Code :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['swift_code']; ?>
" name="swift_code" id="swift_code"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['swift_code']; ?>
</span>
													</td>
													<td align="left" valign="top"></td>
												</tr>
												<tr>
													<td colspan="4" align="center" valign="top"><b>OR</b></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"></td>
													<td align="left" valign="top">Bank Account Number :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['account_no']; ?>
" name="account_no" id="account_no"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['account_no']; ?>
</span>
													</td>
													<td align="left" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"></td>
													<td align="left" valign="top">Sort Code :</td>
													<td align="left" valign="top">
														<input type="text" size="8" maxlength="8" class="text_ph_code" value="<?php echo $this->_tpl_vars['errval']['sort_code']; ?>
" name="sort_code" id="sort_code"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['sort_code']; ?>
</span>
													</td>
													<td align="left" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
									<td valign="top" align="center" class="gray_1"></td>
									<td width="50%" valign="top" align="left">
										<table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive">
											<tbody>
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">Bank Name :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['errval']['organisation_bank']; ?>
" name="organisation_bank" id="organisation_bank"><br/>
														<span style="color: rgb(255, 0, 0);"><?php echo $this->_tpl_vars['errmsg']['organisation_bank']; ?>
</span>
													</td>
													<td width="6%" align="left" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Bank Account Currency :</td>
													<td align="left" valign="top">
														<?php $this->assign('currency_name', 'bank_currency'); ?>
														<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/currencies.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
													</td>
													<td align="right" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</table>

							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr id="director_heading">
									<td colspan="3" align="left" valign="top" class="inves_top_bg">
										<span>Director Details</span>
										<button type="button" class="btn btn-sm btn-primary" onclick="addDirector('#director_heading');">
											<i class="glyphicon glyphicon-plus" style="color: white;"></i> Add Director
										</button>
									</td>
								</tr>
								<?php $this->assign('director_id', 0); ?>
								<?php $this->assign('allDirectors', 0); ?>
								<?php $_from = $this->_tpl_vars['errval']['directors']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['index'] => $this->_tpl_vars['data']):
?>
        						<?php $this->assign('director_id', $this->_tpl_vars['director_id']+1); ?>
								<?php $this->assign('allDirectors', count($this->_tpl_vars['errval']['directors'])); ?>
								<tr id="director_<?php echo $this->_tpl_vars['director_id']; ?>
" class="">
									<td width="50%" valign="top" align="center">
										<table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive">
											<thead>
												<tr>
													<th colspan="4" style="height: 42px;">Director</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">First Name :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['data']['first_name']; ?>
" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][first_name]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][first_name]"><br/>
														<span style="color: rgb(255, 0, 0);"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][first_name]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td width="6%" align="left" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Last Name :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['data']['last_name']; ?>
" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][last_name]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][last_name]"><br/>
														<span style="color: rgb(255, 0, 0);"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][last_name]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span></span>
													</td>
													<td align="left" valign="top"></td>
												</tr>
												<tr>
													<td valign="top" align="center" class="txt_11_red"> * </td>
													<td valign="top" align="left">Email :</td>
													<td valign="top" align="left">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['data']['email_address']; ?>
" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][email_address]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][email_address]">
														<br/><span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][email_address]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
														<p class="txt_11_cute">Spaces are not allowed</p>
													</td>
													<td width="6%" valign="top" align="right"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Phone Number :</td>
													<td align="left" valign="top">
														<table width="80%" border="0" cellspacing="3" cellpadding="0">
															<tr>
																<td width="100%" align="left" valign="top">
																	<input type="text" value="<?php echo $this->_tpl_vars['data']['phone']; ?>
" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][phone]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][phone]" size="12" maxlength="32" class="text_b"/>
																</td>
															</tr>
															<tr>
																<td align="left" valign="top" class="txt_11_cute">Phone Number</td>
															</tr>
														</table>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][phone]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Consent Date &amp; Time :</td>
													<td align="left" valign="top">
														<input type="text" value="<?php echo $this->_tpl_vars['data']['consent_success_date']; ?>
" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][consent_success_date]" id="directors_<?php echo $this->_tpl_vars['director_id']; ?>
_consent_success_date" size="12" maxlength="32" class="text_b"/><br/><span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][consent_success_date]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
														<script type="text/javascript">
															$(function(){
																$('#directors_<?php echo $this->_tpl_vars['director_id']; ?>
_consent_success_date').appendDtpicker();
															});
														</script>
													</td>
													<td align="right" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
									<td valign="top" align="center" class="gray_1"></td>
									<td width="50%" valign="top" align="left">
										<table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive">
											<thead>
												<tr>
													<th colspan="4" style="text-align:right">
														<button type="button" class="btn btn-sm btn-default remove_name" title="Remove" onclick="removeDirector('<?php echo $this->_tpl_vars['director_id']; ?>
')"><i class="glyphicon glyphicon-remove"></i></button>
													</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">Address Line 1 :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][address_line_one]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][address_line_one]" value="<?php echo $this->_tpl_vars['data']['address_line_one']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][address_line_one]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td width="6%" align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Address Line 2 :</td>
                                                    <td align="left" valign="top">
														<input type="text" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][address_line_two]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][address_line_two]" value="<?php echo $this->_tpl_vars['data']['address_line_two']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][address_line_two]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">City :</td>
													<td align="left" valign="top">
														<input type="text" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][city]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][city]" value="<?php echo $this->_tpl_vars['data']['city']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][city]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Area/County :</td>
													<td align="left" valign="top">
														<input type="text" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][address_state]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][address_state]" value="<?php echo $this->_tpl_vars['data']['address_state']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][address_state]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Post Code :</td>
													<td align="left" valign="top">
														<input type="text" value="<?php echo $this->_tpl_vars['data']['area_code']; ?>
" name="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][area_code]" id="directors[<?php echo $this->_tpl_vars['director_id']; ?>
][area_code]" size="8" maxlength="8" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][area_code]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Country :</td>
													<td align="left" valign="top">
														<span>
															<?php $this->assign('country_name', "directors[".($this->_tpl_vars['director_id'])."][address_country]"); ?>
															<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/countries.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
														</span><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "directors[".($this->_tpl_vars['director_id'])."][address_country]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
								<?php endforeach; endif; unset($_from); ?>
							</table>

							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr id="contact_heading">
									<td colspan="3" align="left" valign="top" class="inves_top_bg">
										<span>Contact Details</span>
										<button type="button" class="btn btn-sm btn-primary" onclick="addContact('#contact_heading');">
											<i class="glyphicon glyphicon-plus" style="color: white;"></i> Add Contact
										</button>
									</td>
								</tr>
								<?php $this->assign('contact_id', 0); ?>
								<?php $this->assign('allContacts', 0); ?>
        						<?php $_from = $this->_tpl_vars['errval']['contacts']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['index'] => $this->_tpl_vars['data']):
?>
        						<?php $this->assign('contact_id', $this->_tpl_vars['contact_id']+1); ?>
								<?php $this->assign('allContacts', count($this->_tpl_vars['errval']['contacts'])); ?>
								<tr id="contact_<?php echo $this->_tpl_vars['contact_id']; ?>
" class="">
									<td width="50%" valign="top" align="center">
										<table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive">
											<thead>
												<tr>
													<th colspan="4" style="height: 42px;">Contact</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">First Name :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['data']['first_name']; ?>
" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][first_name]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][first_name]"><br/>
														<span style="color: rgb(255, 0, 0);"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][first_name]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td width="6%" align="left" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Last Name :</td>
													<td align="left" valign="top">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['data']['last_name']; ?>
" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][last_name]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][last_name]"><br/>
														<span style="color: rgb(255, 0, 0);"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][last_name]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="left" valign="top"></td>
												</tr>
												<tr>
													<td valign="top" align="center" class="txt_11_red"> * </td>
													<td valign="top" align="left">Email :</td>
													<td valign="top" align="left">
														<input type="text" class="text_b" value="<?php echo $this->_tpl_vars['data']['email_address']; ?>
" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][email_address]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][email_address]">
														<br/><span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][email_address]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
														<p class="txt_11_cute">Spaces are not allowed</p>
													</td>
													<td width="6%" valign="top" align="right"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Phone Number :</td>
													<td align="left" valign="top">
														<table width="80%" border="0" cellspacing="3" cellpadding="0">
															<tr>
																<td width="100%" align="left" valign="top">
																	<input type="text" value="<?php echo $this->_tpl_vars['data']['phone']; ?>
" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][phone]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][phone]" size="12" maxlength="32" class="text_b"/>
																</td>
															</tr>
															<tr>
																<td align="left" valign="top" class="txt_11_cute">Phone Number</td>
															</tr>
														</table>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][phone]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
									<td valign="top" align="center" class="gray_1"></td>
									<td width="50%" valign="top" align="left">
										<table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive">
											<thead>
												<tr>
													<th colspan="4" style="text-align:right">
														<button type="button" class="btn btn-sm btn-default remove_name" title="Remove" onclick="removeContact('<?php echo $this->_tpl_vars['contact_id']; ?>
')"><i class="glyphicon glyphicon-remove"></i></button>
													</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td width="4%" align="center" valign="top" class="txt_11_red"> * </td>
													<td width="41%" align="left" valign="top">Address Line 1 :</td>
													<td width="49%" align="left" valign="top">
														<input type="text" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][address_line_one]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][address_line_one]" value="<?php echo $this->_tpl_vars['data']['address_line_one']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][address_line_one]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td width="6%" align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Address Line 2 :</td>
                                                    <td align="left" valign="top">
														<input type="text" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][address_line_two]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][address_line_two]" value="<?php echo $this->_tpl_vars['data']['address_line_two']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][address_line_two]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">City :</td>
													<td align="left" valign="top">
														<input type="text" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][city]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][city]" value="<?php echo $this->_tpl_vars['data']['city']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][city]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red">&nbsp;</td>
													<td align="left" valign="top">Area/County :</td>
													<td align="left" valign="top">
														<input type="text" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][address_state]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][address_state]" value="<?php echo $this->_tpl_vars['data']['address_state']; ?>
" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][address_state]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Post Code :</td>
													<td align="left" valign="top">
														<input type="text" value="<?php echo $this->_tpl_vars['data']['area_code']; ?>
" name="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][area_code]" id="contacts[<?php echo $this->_tpl_vars['contact_id']; ?>
][area_code]" size="8" maxlength="8" class="text_b"/><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][area_code]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
												<tr>
													<td align="center" valign="top" class="txt_11_red"> * </td>
													<td align="left" valign="top">Country :</td>
													<td align="left" valign="top">
														<span>
															<?php $this->assign('country_name', "contacts[".($this->_tpl_vars['contact_id'])."][address_country]"); ?>
															<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/countries.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
														</span><br/>
														<span style="color:#FF0000"><?php $this->assign('tmpname', "contacts[".($this->_tpl_vars['contact_id'])."][address_country]"); ?><?php echo $this->_tpl_vars['errmsg'][$this->_tpl_vars['tmpname']]; ?>
</span>
													</td>
													<td align="right" valign="top"></td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
								<?php endforeach; endif; unset($_from); ?>
							</table>

							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tr>
									<td colspan="3" align="center" valign="top" class="dark_gray_bg">
										<input name="" value="Save" class="mem_bttn" tabindex="70" type="submit">
									</td>
								</tr>
							</table>
						</form>
	                </td>
				</tr>
				<tr>
					<td valign="top" align="left" width="2%" class="hdr_bl">&nbsp;</td>
					<td valign="top" align="left" width="" class="hdr_bc">&nbsp;</td>
					<td valign="top" align="left" width="" class="hdr_bc">&nbsp;</td>
					<td valign="top" align="left" width="2%" class="hdr_br">&nbsp;</td>
				</tr>
			</table>
		</div>
		<div class="clear"></div>
	</div>
</div>

<style>
.inves_top_bg {
  background: none repeat scroll 0 0 #555555;
  padding: 5px 0;
}
.inves_top_bg span {
  color: #FFFFFF;
  font-weight: bold;
  line-height: 28px;
  padding-left: 10px;
}
	
.dark_gray_bg {
	background: none repeat scroll 0 0 #808080;
    padding: 5px 0;
}
</style>

<script type="text/javascript">
	jQuery(function($){
		$("#sort_code").mask("99-99-99");
	});

var flag1=1;
var $i1=0;
var counter=4;
var allDirectors=<?php echo $this->_tpl_vars['allDirectors']; ?>
;
var allContacts=<?php echo $this->_tpl_vars['allContacts']; ?>
;
var directorCount=<?php echo $this->_tpl_vars['director_id']; ?>
;
var contactCount=<?php echo $this->_tpl_vars['contact_id']; ?>
;
	
//if same option. duplicate the address for Billing
//$(function() {
$(document).ready(function(){

  $("#org_bentitytype").change(function(){
    var str = $("#org_bentitytype option:selected").val();
    if( str == 12 || str  == 34 || str == 35 || str == 36 || str == 37 || str == 38 || str == 39)
    {
      $("#dropCompany").show();
    }
    else
    {
      $("#dropCompany").hide();
      $("#org_pcdetail").val('');
    }
  }); 
  
  <?php if ($this->_tpl_vars['errval']['org_bentitytype'] != ''): ?>
  var str = <?php echo $this->_tpl_vars['errval']['org_bentitytype']; ?>
;
  if( str == 12 || str  == 34 || str == 35 || str == 36 || str == 37 || str == 38 || str == 39){ 
    $("#dropCompany").show();
  }else{
    $("#dropCompany").hide();
    $("#org_pcdetail").val('');
  }
  <?php else: ?>
    $("#dropCompany").hide();
    $("#org_pcdetail").val('');
  <?php endif; ?>
	  
  <?php if ($this->_tpl_vars['errval']['address_select'] != ''): ?>
	$("#wrk_addr").show();
  <?php endif; ?>
	  
  if(directorCount==0) {
	  addDirector("#director_heading");
  }

  if(contactCount==0) {
	  addContact("#contact_heading");
  }
});

function showSelectedRegaddr(val) {
	
	var registeredAddr = new Array('registered_address_line_one','registered_address_line_two','registered_address_city','registered_address_state','registered_address_zipcode','registered_address_country');
	var tradingAddr = new Array('billing_address_line_one','billing_address_line_two','billing_address_city','billing_address_state','billing_address_zipcode','billing_address_country');
	
	if(val=='') {
		$("#wrk_addr").hide();
		cleanArray(tradingAddr);
	}
	else if (val==0) {
		$("#wrk_addr").show();
		cleanArray(tradingAddr);
	}
	else {
		$("#wrk_addr").show();
		copyArray(registeredAddr,tradingAddr);
	}
}
	
function copyArray(arr1,arr2) {
	for(inc=0;inc < arr1.length;inc++){
			document.getElementById(arr2[inc]).value=document.getElementById(arr1[inc]).value;
		}
}
	
function cleanArray(arr1) {
	for(inc=0;inc < arr1.length;inc++){
			document.getElementById(arr1[inc]).value='';
		}
}
	
function removeDirector(id) {
	if(allDirectors>=2) {
		allDirectors--;
		$('#director_'+id).remove();
	}
}

function addDirector(location) {
    directorCount++;
	allDirectors++;
    $(location).after('<tr id="director_'+directorCount+'" class=""><td width="50%" valign="top" align="center"><table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive"><thead><tr><th colspan="4" style="height: 42px;">Director</th></tr></thead><tbody><tr><td width="4%" align="center" valign="top" class="txt_11_red"> * </td><td width="41%" align="left" valign="top">First Name :</td><td width="49%" align="left" valign="top"><input type="text" class="text_b" name="directors['+directorCount+'][first_name]"><br/></td><td width="6%" align="left" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Last Name :</td><td align="left" valign="top"><input type="text" class="text_b" name="directors['+directorCount+'][last_name]"><br/></td><td align="left" valign="top"></td></tr><tr><td valign="top" align="center" class="txt_11_red"> * </td><td valign="top" align="left">Email :</td><td valign="top" align="left"><input type="text" class="text_b" name="directors['+directorCount+'][email_address]"><p class="txt_11_cute">Spaces are not allowed</p></td><td width="6%" valign="top" align="right"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Phone Number :</td><td align="left" valign="top"><table width="80%" border="0" cellspacing="3" cellpadding="0"><tr><td width="100%" align="left" valign="top"><input type="text" name="directors['+directorCount+'][phone]" size="12" maxlength="32" class="text_b"/></td></tr><tr><td align="left" valign="top" class="txt_11_cute">Phone Number</td></tr></table></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Consent Date &amp; Time :</td><td align="left" valign="top"><input type="text" name="directors['+directorCount+'][consent_success_date]" id="directors_'+directorCount+'_consent_success_date" size="12" maxlength="32" class="text_b"/><br/><script type="text/javascript">$(function(){$("#directors_'+directorCount+'_consent_success_date").appendDtpicker();});<\/script></td><td align="right" valign="top"></td></tr></tbody></table></td><td valign="top" align="center" class="gray_1"></td><td width="50%" valign="top" align="left"><table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive"><thead><tr><th colspan="4" style="text-align:right"><button type="button" class="btn btn-sm btn-default remove_name" title="Remove" onclick="removeDirector('+directorCount+')"><i class="glyphicon glyphicon-remove"></i></button></th></tr></thead><tbody><tr><td width="4%" align="center" valign="top" class="txt_11_red"> * </td><td width="41%" align="left" valign="top">Address Line 1 :</td><td width="49%" align="left" valign="top"><input type="text" name="directors['+directorCount+'][address_line_one]" class="text_b"/><br/></td><td width="6%" align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red">&nbsp;</td><td align="left" valign="top">Address Line 2 :</td>                                                    <td align="left" valign="top"><input type="text" name="directors['+directorCount+'][address_line_two]" class="text_b"/><br/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red">&nbsp;</td><td align="left" valign="top">City :</td><td align="left" valign="top"><input type="text" name="directors['+directorCount+'][city]" class="text_b"/><br/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red">&nbsp;</td><td align="left" valign="top">Area/County :</td><td align="left" valign="top"><input type="text" name="directors['+directorCount+'][address_state]" class="text_b"/><br/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Post Code :</td><td align="left" valign="top"><input type="text" name="directors['+directorCount+'][area_code]" size="8" maxlength="8" class="text_b"/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Country :</td><td align="left" valign="top"><span><?php $this->assign('country_name', "directors['+directorCount+'][address_country]"); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/countries_js.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></span><br/></td><td align="right" valign="top"></td></tr></tbody></table></td></tr>');
}
	
function removeContact(id) {
	if(allContacts>=2) {
		allContacts--;
		$('#contact_'+id).remove();
	}
}

	
function addContact(location) {
    contactCount++;
	allContacts++;
    $(location).after('<tr id="contact_'+contactCount+'" class=""><td width="50%" valign="top" align="center"><table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive"><thead><tr><th colspan="4" style="height: 42px;">Contact</th></tr></thead><tbody><tr><td width="4%" align="center" valign="top" class="txt_11_red"> * </td><td width="41%" align="left" valign="top">First Name :</td><td width="49%" align="left" valign="top"><input type="text" class="text_b" name="contacts['+contactCount+'][first_name]"><br/></td><td width="6%" align="left" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Last Name :</td><td align="left" valign="top"><input type="text" class="text_b" name="contacts['+contactCount+'][last_name]"><br/></td><td align="left" valign="top"></td></tr><tr><td valign="top" align="center" class="txt_11_red"> * </td><td valign="top" align="left">Email :</td><td valign="top" align="left"><input type="text" class="text_b" name="contacts['+contactCount+'][email_address]"><p class="txt_11_cute">Spaces are not allowed</p></td><td width="6%" valign="top" align="right"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Phone Number :</td><td align="left" valign="top"><table width="80%" border="0" cellspacing="3" cellpadding="0"><tr><td width="100%" align="left" valign="top"><input type="text" name="contacts['+contactCount+'][phone]" size="12" maxlength="32" class="text_b"/></td></tr><tr><td align="left" valign="top" class="txt_11_cute">Phone Number</td></tr></table></td><td align="right" valign="top"></td></tr></tbody></table></td><td valign="top" align="center" class="gray_1"></td><td width="50%" valign="top" align="left"><table width="100%" cellspacing="2" cellpadding="2" border="0" class="table table-hover table-striped table-responsive"><thead><tr><th colspan="4" style="text-align:right"><button type="button" class="btn btn-sm btn-default remove_name" title="Remove" onclick="removeContact('+contactCount+')"><i class="glyphicon glyphicon-remove"></i></button></th></tr></thead><tbody><tr><td width="4%" align="center" valign="top" class="txt_11_red"> * </td><td width="41%" align="left" valign="top">Address Line 1 :</td><td width="49%" align="left" valign="top"><input type="text" name="contacts['+contactCount+'][address_line_one]" class="text_b"/><br/></td><td width="6%" align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red">&nbsp;</td><td align="left" valign="top">Address Line 2 :</td>                                                    <td align="left" valign="top"><input type="text" name="contacts['+contactCount+'][address_line_two]" class="text_b"/><br/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red">&nbsp;</td><td align="left" valign="top">City :</td><td align="left" valign="top"><input type="text" name="contacts['+contactCount+'][city]" class="text_b"/><br/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red">&nbsp;</td><td align="left" valign="top">Area/County :</td><td align="left" valign="top"><input type="text" name="contacts['+contactCount+'][address_state]" class="text_b"/><br/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Post Code :</td><td align="left" valign="top"><input type="text" name="contacts['+contactCount+'][area_code]" size="8" maxlength="8" class="text_b"/></td><td align="right" valign="top"></td></tr><tr><td align="center" valign="top" class="txt_11_red"> * </td><td align="left" valign="top">Country :</td><td align="left" valign="top"><span><?php $this->assign('country_name', "contacts['+contactCount+'][address_country]"); ?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/countries_js.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></span><br/></td><td align="right" valign="top"></td></tr></tbody></table></td></tr>');
}
	
function passwordStrength(pwd) {
	document.getElementById('passwordDescription').style.display = "block";
	var strength = document.getElementById('passwordDescription');
	var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");
	var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");
	var enoughRegex = new RegExp("(?=.{6,}).*", "g");
	if(pwd.length==0) {
		strength.innerHTML = 'Type Password';
    strength.className = 'txt_12_blue';
  }
  else if (false == enoughRegex.test(pwd)) 
  {
    strength.innerHTML = 'More Characters';
    strength.className = 'txt_12_blue';
  }
  else if (strongRegex.test(pwd))
  {
    strength.innerHTML = 'Strong!';
    strength.className = 'txt_12_red';
  }
  else if (mediumRegex.test(pwd))
  {
    strength.innerHTML = 'Medium!';
    strength.className = 'txt_12_org';
  }
  else
  { 
    strength.innerHTML = 'Weak!';
    strength.className = 'txt_12_blue';
  }
}

$("#siccat").change(function(){
	$.post(
		"adminindex.php?do=getnacecat",
		{groupid: $("#siccat").val()},
		function(responseText){
			document.getElementById("sicgpsapn").innerHTML=responseText;
		});
});
</script>

<?php 
$value=$this->get_template_vars('errval');
if($value['siccat']!='') {
	echo '<script type="text/javascript">
 			$.ajax({ type: "POST",';
				if($value['sicgp'] !='')
				   echo 'url: "adminindex.php?do=getnacecat&sub="+'.$value['sicgp'].',';
				else
					echo 'url: "adminindex.php?do=getnacecat",';
			
			   echo 'data: "groupid="+'.$value['siccat'].',
			   success: function(msg){
					document.getElementById("sicgpsapn").innerHTML=msg;
			   }
 			});
			</script>';
}
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>