<tbody name='new_user_sec' id='new_user_sec' class='off'>
<tr> 
    <td>
    <fieldset class='accountlabFormTABLE'>
    <legend><b><?php echo $BL->props->lang['new_customers_sign_up']; ?></b></legend>
	<table width='100%' border='0' cellspacing='0' cellpadding='2' align='center'>
        <tr> 
          <td valign='top' class='accountlabPlanDataTD' width='40%'>
			<?php echo $BL->props->lang['Email']; ?><font color='red'>*</font><br />
		    <span class="smaller"><?php echo $BL->props->lang['this_billing_login']; ?></span>
		  </td>
          <td valign='top' class='accountlabPlanDataTD'>
              <input name='email' id='email' type='text' class='accountlabInput' size='45' />
          </td>
        </tr>
        <tr> 
          <td valign='top' class='accountlabPlanDataTD'>
		  <?php echo $BL->props->lang['Password']; ?><font color='red'>*</font><br />
		  <span class="smaller"><?php echo $BL->props->lang['this_billing_pass']; ?></span>
		  </td>
          <td valign='top' class='accountlabPlanDataTD'>
              <input name='password1' id='password1' type='password' class='accountlabInput' size='10' />
          </td>
        </tr>
        <tr> 
          <td valign='top' class='accountlabPlanDataTD'> 
			<?php echo $BL->props->lang['password_confirm']; ?><font color='red'>*</font>
          </td>
          <td valign='top' class='accountlabPlanDataTD'>
              <input name='password2' id='password2' type='password' class='accountlabInput' size='10' />
          </td>
        </tr>
        <tr> 
          <td valign='top' class='accountlabPlanDataTD'></td>
          <td valign='top' class='accountlabPlanDataTD'></td>
        </tr>
        
<?php 
foreach($custom_fields as $cf){ 
    if($cf['field_name']!="country" && $cf['field_name']!="state" && $cf['field_name']!="vat_no"){
?>
        <tr> 
          <td height='21' valign='top' class='accountlabPlanDataTD'>
			<?php echo $BL->props->parseLang($cf['field_name']); ?><?php if(!$cf['field_optional'])echo "<font color='red'>*</font>"; ?>
          </td>
          <td valign='top' class='accountlabPlanDataTD'>
          <?php if($cf['field_type']=="text"){ ?>
             <input name='<?php echo $cf['field_name']; ?>' id='<?php echo $cf['field_name']; ?>' type='text' class='accountlabInput' size='25'  />
          <?php }else{ ?>
            <select name='<?php echo $cf['field_name']; ?>' id='<?php echo $cf['field_name']; ?>' class='accountlabInput'>
            <?php 
            $values = $BL->utils->Get_Trimmed_Array(explode(",",$cf['field_value'])); 
            $BL->utils->Remove_Empty_Elements($values);
            foreach($values as $value){
            ?>
            <option value='<?php echo $value; ?>'><?php echo $BL->props->parseLang($value); ?></option>
            <?php
            }
            ?>
            </select>
          <?php } ?>
		  </td>
        </tr>
    <?php }elseif($cf['field_name']=="country"){ ?>
        <tr> 
          <td valign='top' class='accountlabPlanDataTD'>
            <?php echo $BL->props->parseLang($cf['field_name']); ?><?php if(!$cf['field_optional'])echo "<font color='red'>*</font>"; ?>
          </td>
          <td valign='top' class='accountlabPlanDataTD'>
              <select name='country' id='country' class='accountlabInput' onblur="javascript:xajax_step3_listStates(xajax.$('country').value,'');">
                <option><?php echo $BL->props->lang['select_country']; ?></option>
                <?php foreach ($BL->props->country as $key => $value) { ?>
                 <option value='<?php echo $key; ?>'><?php echo $value; ?></option>
                <?php } ?>
              </select>
           </td>
        </tr>
    <?php }elseif($cf['field_name']=="state"){ ?>
        <tr> 
          <td valign='top' class='accountlabPlanDataTD'>
            <?php echo $BL->props->parseLang($cf['field_name']); ?><?php if(!$cf['field_optional'])echo "<font color='red'>*</font>"; ?>
          </td>
          <td valign='top' class='accountlabPlanDataTD'>
            <div id='state_selection' name='state_selection'> 
            <input type='text' size='25' name='state' id='state' class='accountlabInput' />
            </div>
          </td>
        </tr> 
    <?php }elseif($cf['field_name']=="vat_no"){ ?>
        <?php if ($conf['en_vat'] == 1) { ?>
        <tr> 
          <td valign='top' class='accountlabPlanDataTD'>
           <?php echo $BL->props->parseLang($cf['field_name']); ?><?php if(!$cf['field_optional'])echo "<font color='red'>*</font>"; ?>
          </td>
          <td valign='top' class='accountlabPlanDataTD'>
           <input name='vat_no' id='vat_no' class='accountlabInput' type='text'  size='25' />
          </td>
        </tr>
        <?php } ?>
<?php
    }
} 
?>
		</table>
        </fieldset>
	</td>
</tr>
</tbody>