<?php
// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();
/*

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce
  
  osCommRes, Services Online
  http://www.oscommres.com

  Copyright (c) 2005 osCommRes

  Released under the GNU General Public License
  
  Freeway eCommerce from ZacWare
http://www.zac-ware.com/freeway

Copyright 2007 ZacWare Pty. Ltd
*/

function sbs_get_zone_name($country_id, $zone_id) {
    $zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($country_id) . "' and zone_id = '" . tep_db_input($zone_id) . "'");
    if (tep_db_num_rows($zone_query)) {
      $zone = tep_db_fetch_array($zone_query);
      return $zone['zone_name'];
    } else {
      return $default_zone;
    }
  }
 
 // Returns an array with countries
// TABLES: countries
  function sbs_get_countries($countries_id = '', $with_iso_codes = false) {
    $countries_array = array();
    if ($countries_id) {
      if ($with_iso_codes) {
        $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . tep_db_input($countries_id) . "' order by countries_name");
        $countries_values = tep_db_fetch_array($countries);
        $countries_array = array('countries_name' => $countries_values['countries_name'],
                                 'countries_iso_code_2' => $countries_values['countries_iso_code_2'],
                                 'countries_iso_code_3' => $countries_values['countries_iso_code_3']);
      } else {
        $countries = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . tep_db_input($countries_id) . "'");
        $countries_values = tep_db_fetch_array($countries);
        $countries_array = array('countries_name' => $countries_values['countries_name']);
      }
    } else {
      $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " order by countries_name");
      while ($countries_values = tep_db_fetch_array($countries)) {
        $countries_array[] = array('countries_id' => $countries_values['countries_id'],
                                   'countries_name' => $countries_values['countries_name']);
      }
    }

    return $countries_array;
  } 
  ////
function sbs_get_country_list($name, $selected = '', $parameters = '') { 
   $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); 
   $countries = sbs_get_countries(); 
   $size = sizeof($countries); 
   for ($i=0; $i<$size; $i++) { 
     $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); 
   } 

   return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); 
}

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php  tep_content_title_top(CATEGORY_PERSONAL); 
               // tep_content_title_top("Customer details");    	?>
 
  <tr>
    <td class="main"><table border="0" width="100%" cellspacing="2" cellpadding="2" >
      <tr>
        <td class="main" width="100%"><table border="0" cellspacing="0" cellpadding="2">
          <!-- <tr>
           <td width="110" class="main" align="right" nowrap="nowrap">&nbsp;<?php //echo ENTRY_CUSTOMERS_ID; ?></td>
            <td class="main" nowrap="nowrap">&nbsp;!-->
<?php
  //if ($is_read_only) {
    echo  tep_draw_hidden_field('customers_id',$account['customers_id']);

  //} else {
    //echo tep_draw_input_field('customer_id', $account['customers_id'],'size=7') . '&nbsp;' . ENTRY_CUSTOMERS_ID_TEXT;
  //}
?><!--</td>
          </tr>!-->
		  <tr>
            <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_FIRST_NAME; ?></td>
            <td class="main" nowrap="nowrap" width="240">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['customers_firstname'];
  } elseif ($error) {
    if ($entry_firstname_error) {
      echo tep_draw_input_field('firstname') . '&nbsp;' . ENTRY_FIRST_NAME_ERROR;
    } else { //echo tep_draw_separator('pixel_trans.gif', '186', '10');
      echo $firstname . tep_draw_hidden_field('firstname');
    }
  } else {
    echo tep_draw_input_field('firstname', $account['customers_firstname']) . '&nbsp;' . ENTRY_FIRST_NAME_TEXT;
  }
?></td>
	<?php if (ACCOUNT_SECOND_EMAIL=='false') { ?>
	<td class="main" nowrap="nowrap" align="left" width="110">&nbsp;<?php echo ENTRY_EMAIL_ADDRESS; ?></td>
            <td class="main" nowrap="nowrap" width="240">
<?php $em=false; 
	 $er=ENTRY_EMAIL_ADDRESS_ERROR;
  if ($is_read_only) {
    echo $account['customers_email_address'];
  } elseif ($error) {
    if ($entry_email_address_error) {
      echo tep_draw_input_field('email_address') . '&nbsp;' . $er;
    } elseif ($entry_email_address_check_error) {
      echo tep_draw_input_field('email_address') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
    } elseif ($entry_email_address_exists) {
      echo tep_draw_input_field('email_address') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
    } else {
    	$em=true;
      echo $email_address . tep_draw_hidden_field('email_address');
    }
  } else {
    echo tep_draw_input_field('email_address', $account['customers_email_address']) . '&nbsp;' . ENTRY_EMAIL_ADDRESS_TEXT;
  }
?></td><?php } else { ?>
	<td class="main" nowrap="nowrap" align="left" width="110">&nbsp;<?php echo ENTRY_EMAIL_ADDRESS; ?></td>
            <td class="main" nowrap="nowrap" width="240">
<?php $em=false; 
	 $er=ENTRY_EMAIL_ADDRESS_ERROR;
  if ($is_read_only) {
    echo $account['customers_email_address'];
  } elseif ($error) {
    if ($entry_email_address_error) {
      echo tep_draw_input_field('email_address') . '&nbsp;' . $er;
    } elseif ($entry_email_address_check_error) {
      echo tep_draw_input_field('email_address') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
    } elseif ($entry_email_address_exists) {
      echo tep_draw_input_field('email_address') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
    } else {
    	$em=true;	
      echo $email_address . tep_draw_hidden_field('email_address');
    }
  } else {	
    echo tep_draw_input_field('email_address', $account['customers_email_address']) . '&nbsp;' . ENTRY_EMAIL_ADDRESS_TEXT;
  }?></td><?php
}?>
   </tr>
          <tr>
            <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_LAST_NAME; ?></td>
            <td class="main" nowrap="nowrap" width="240">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['customers_lastname'];
  } elseif ($error) {
    if ($entry_lastname_error) {
      echo tep_draw_input_field('lastname') . '&nbsp;' . ENTRY_LAST_NAME_ERROR;
    } else {
      echo $lastname . tep_draw_hidden_field('lastname');
    }
  } else {
    echo tep_draw_input_field('lastname', $account['customers_lastname']) . '&nbsp;' . ENTRY_LAST_NAME_TEXT;
  }
?></td>
	<?php if (ACCOUNT_SECOND_EMAIL=='true') {?>
            <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_SECOND_EMAIL_ADDRESS; ?></td>
            <td class="main" nowrap="nowrap" width="240">
<?php $sec_mail=false;
  $er=ENTRY_SECOND_EMAIL_ADDRESS_ERROR;
  if($entry_second_email_address_match_check_error) $er=ENTRY_SECOND_EMAIL_ADDRESS_MATCH_ERROR;
  if ($is_read_only) {
    echo $account['customers_second_email_address'];
  } elseif ($error) {
    if ($entry_second_email_address_error || $entry_second_email_address_match_check_error) {
      echo tep_draw_input_field('second_email_address') . '&nbsp;' .$er ;
    } elseif ($entry_second_email_address_check_error) {
      echo tep_draw_input_field('second_email_address') . '&nbsp;' . ENTRY_SECOND_EMAIL_ADDRESS_CHECK_ERROR;
    } elseif ($entry_second_email_address_exists) {
      echo tep_draw_input_field('second_email_address') . '&nbsp;' . ENTRY_SECOND_EMAIL_ADDRESS_ERROR_EXISTS;
    } else {
    	$sec_mail=true;
      echo $second_email_address . tep_draw_hidden_field('second_email_address');
    }
  } else {
    echo tep_draw_input_field('second_email_address', $account['customers_second_email_address']);
  }
?></td>
     <?php } ?>
    </tr>
		</table></td>
      </tr>
	  <?php tep_content_title_bottom(); ?>
    </table></td>
  </tr>
  <?php //tep_content_title_top(CATEGORY_ADDRESS); ?>

<?php
  if (ACCOUNT_COMPANY == 'true') {
?>  
  <!--<tr>
    <td class="formAreaTitle"><br><?php //echo CATEGORY_COMPANY; ?></td>
  </tr>!-->
  <?php tep_content_title_top(CATEGORY_COMPANY); ?>
  <tr>
    <td class="main" width="100%"><table border="0" width="100%" cellspacing="2" cellpadding="2">
      <tr>
        <td class="main" width="100%"><table border="0" cellspacing="0" cellpadding="2" width="32%">
          <tr>
            <td class="main" width="110" align="left" nowrap="nowrap">&nbsp;<?php echo ENTRY_COMPANY; ?></td>
            <td class="main" nowrap="nowrap" width="240">&nbsp;
<?php
    if ($is_read_only) {
      echo $account['entry_company'];
    } elseif ($error) {
      if ($entry_company_error) {
        echo tep_draw_input_field('company') . '&nbsp;' . ENTRY_COMPANY_ERROR;
      } else {
        echo $company . tep_draw_hidden_field('company');
      }
    } else {
      echo tep_draw_input_field('company', $account['entry_company']) . '&nbsp;' . ENTRY_COMPANY_TEXT;
    }
?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
<?php tep_content_title_bottom();
  }
?>
  <?php tep_content_title_top(CATEGORY_ADDRESS); ?>
  <tr>
   <td class="main" width="100%"><table border="0" cellspacing="2" cellpadding="2" width="100%">
      <tr>
        <td class="main" width="100%"><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_STREET_ADDRESS; ?></td>
            <td class="main" nowrap="nowrap" width="240">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['entry_street_address'];
  } elseif ($error) {
    if ($entry_street_address_error) {
      echo tep_draw_input_field('street_address') . '&nbsp;' . ENTRY_STREET_ADDRESS_ERROR;
    } else { //echo tep_draw_separator('pixel_trans.gif','190','10');
      echo $street_address . tep_draw_hidden_field('street_address');
    }
  } else {
    echo tep_draw_input_field('street_address', $account['entry_street_address']) . '&nbsp;' . ENTRY_STREET_ADDRESS_TEXT;
  }
?></td>
	<td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_CITY; ?></td>
            <td class="main" nowrap="nowrap" width="240">
<?php
  if ($is_read_only) { 
    echo $account['entry_city'];
  } elseif ($error) {
    if ($entry_city_error) {
      echo tep_draw_input_field('city') . '&nbsp;' . ENTRY_CITY_ERROR;
    } else { 
      echo $city . tep_draw_hidden_field('city');
    }
  } else {
    echo tep_draw_input_field('city', $account['entry_city']) . '&nbsp;' . ENTRY_CITY_TEXT;
  }
?></td> <!--</tr></table></td>-->
  </tr>
<!--<tr> 
	 <td class="main" width="100%"><table border="0"  cellpadding="1" cellspacing="0">
	<tr>-->
 	<?php
  		if (ACCOUNT_SUBURB == 'true') {
	?>
     <!--  <td class="main" width="40%"><table border="0" cellpadding="1" cellspacing="0">
			<tr>-->
				<td class="main" nowrap="nowrap" width="110" align="left">&nbsp;<?php echo ENTRY_SUBURB; ?></td>
                <td class="main" nowrap="nowrap" width="240">&nbsp;
  <?php
    if ($is_read_only) {
      echo $account['entry_suburb'];
    } elseif ($error) {
      if ($entry_suburb_error) {
        echo tep_draw_input_field('suburb') . '&nbsp;' . ENTRY_SUBURB_ERROR;
      } else { //echo tep_draw_separator('pixel_trans.gif','160','10');
        echo $suburb . tep_draw_hidden_field('suburb');
      }
    } else {
      echo tep_draw_input_field('suburb', $account['entry_suburb']) . '&nbsp;' . ENTRY_SUBURB_TEXT;
    }
  ?><!--</td></tr></table>-->
  </td>

<?php
  } 
?>	<!--<td class="main" width="100%">
<table border="0" width="100%" cellpadding="1" cellspacing="0" align="left">
 	  <tr>--><?php
  		if (ACCOUNT_SUBURB == 'false') {
	?>
           <td class="main" nowrap="nowrap" width="110" align="left"></td>
            <td class="main" nowrap="nowrap" width="240"></td>
		<td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_COUNTRY; ?></td>
               <td class="main" nowrap="nowrap" width="240">
<?php
      $address['entry_country_id'] = STORE_COUNTRY;
	 if ($is_read_only) {       
	 	echo tep_get_country_name($account['entry_country_id']); } 
	elseif ($error) {
       if ($entry_country_error) {
		 echo sbs_get_country_list('country') . '&nbsp;' . ENTRY_COUNTRY_ERROR;
       } else {
         echo tep_get_country_name($country) . tep_draw_hidden_field('country');
       }
     } else {
       echo sbs_get_country_list('country', $account['entry_country_id'],'onchange="javascript:show_state();"') . '&nbsp;' . ENTRY_COUNTRY_TEXT;
     }
?></td><!--</tr></table></td>-->
    <?php } else { ?>
		<!--<td class="main" align="right" nowrap="nowrap" width="100%">
		<table border="0" width="100%" cellpadding="1" cellspacing="0" align="left">
 	 	  <tr><td class="main"><?php //echo tep_draw_separator('pixel_trans.gif','146','10');?></td> --><td class="main" nowrap="nowrap" width="110" align="left">&nbsp;<?php echo ENTRY_COUNTRY; ?></td>
              <td class="main" nowrap="nowrap">
<?php
      $address['entry_country_id'] = STORE_COUNTRY;
	 if ($is_read_only) {       
	 	echo tep_get_country_name($account['entry_country_id']);     } 
	elseif ($error) {
       if ($entry_country_error) {
		 echo sbs_get_country_list('country') . '&nbsp;' . ENTRY_COUNTRY_ERROR;
       } else {
         echo tep_get_country_name($country) . tep_draw_hidden_field('country');
       }
     } else {
       echo sbs_get_country_list('country', $account['entry_country_id'],'onchange="javascript:show_state();"') . '&nbsp;' . ENTRY_COUNTRY_TEXT;
     }
?></td><!--</tr></table></td></tr></table></td>-->
   <?php } ?>
    </tr><!--</table></td></tr>-->
          <tr>
		<!--  <td class="main" width="100%"><table width="100%" cellpadding="1" cellspacing="0" border="0"><tr>
		  <td class="main" width="100%"><table width="63%" cellpadding="1" cellspacing="0" border="0" align="left">
		  <tr>--><?php if (ACCOUNT_STATE == 'false') { ?>
		  <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_POST_CODE; ?></td>
            <td class="main" nowrap="nowrap" width="240">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['entry_postcode'];
  } elseif ($error) {
    if ($entry_post_code_error) {
      echo tep_draw_input_field('postcode') . '&nbsp;' . ENTRY_POST_CODE_ERROR;
    } else {
      echo $postcode . tep_draw_hidden_field('postcode');
    }
  } else {
    echo tep_draw_input_field('postcode', $account['entry_postcode']) . '&nbsp;' . ENTRY_POST_CODE_TEXT;
  }  ?></td><?php  } else{ ?> <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_POST_CODE; ?></td>
            <td class="main" nowrap="nowrap" width="240">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['entry_postcode'];
  } elseif ($error) {
    if ($entry_post_code_error) {
      echo tep_draw_input_field('postcode') . '&nbsp;' . ENTRY_POST_CODE_ERROR;
    } else {//echo tep_draw_separator('pixel_trans.gif','255','10');
      echo $postcode . tep_draw_hidden_field('postcode');
    }
  } else {
    echo tep_draw_input_field('postcode', $account['entry_postcode']) . '&nbsp;' . ENTRY_POST_CODE_TEXT;
  }
?></td>
<?php }
  if (ACCOUNT_STATE == 'true') {
  ?>
         	<!--<td class="main" width="100%"><table width="100%" cellpadding="1" cellspacing="0" border="0">
			<tr>-->
            <td class="main" nowrap="nowrap" align="left" width="110">&nbsp;<?php echo ENTRY_STATE; ?></td>
            <td class="main" nowrap="nowrap" width="240">
<?php
  
   if($state=='') $state = sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id']);
    if($state=='' && $account['entry_state']) $state=$account['entry_state']; 
    if ($is_read_only) { 
      echo sbs_get_zone_name($account['entry_country_id'], $account['entry_zone_id']);
    } elseif ($error) {
      if ($entry_state_error) {
        if ($entry_state_has_zones) {
          $zones_array = array(); 
          $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input($country) . "' order by zone_name");
          while ($zones_values = tep_db_fetch_array($zones_query)) {
            $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
          }
          echo tep_draw_pull_down_menu('state', $zones_array) . '&nbsp;' . ENTRY_STATE_ERROR;
        } else {
          echo tep_draw_input_field('state') . '&nbsp;' . ENTRY_STATE_ERROR;
        }
      } else { 
        echo $state . tep_draw_hidden_field('zone_id') . tep_draw_hidden_field('state');
      }
    } else {
    	echo tep_draw_input_field('state1',$state);
    	echo tep_draw_pull_down_menu('state',array(),'','style="display:none"');
    } 
?></td><!--</tr></table></td>-->
  <?php
     }?></tr>
        </table></td>
      </tr><!--</table></td></tr>!-->
	 <?php tep_content_title_bottom();?>
    </table></td> 
  </tr>
  <?php tep_content_title_top(CATEGORY_CONTACT); ?>
  <tr>
    <td class="main" nowrap="nowrap" width="100%"><table border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td class="main" nowrap="nowrap" width="100%"><table border="0" cellspacing="0" cellpadding="2">
		<tr>
<?php
  if (ACCOUNT_TELEPHONE == 'true') {
?>
       <!--   <tr>  !-->
	   		<!--<td class="main" width="500"><table border="0" cellpadding="1" cellspacing="0" width="100%"><tr>-->
            <td class="main" align="left" width="110"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
            <td class="main" nowrap="nowrap" width="240">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['customers_telephone'];
  } elseif ($error) {
    if ($entry_telephone_error) {
      echo tep_draw_input_field('telephone') . '&nbsp;' . ENTRY_TELEPHONE_NUMBER_ERROR;
    } else {//echo tep_draw_separator('pixel_trans.gif','195','10');
      echo $telephone . tep_draw_hidden_field('telephone');
    }
  } else {
    echo tep_draw_input_field('telephone', $account['customers_telephone']) . '&nbsp;' . ENTRY_TELEPHONE_NUMBER_TEXT;
  }
?>
    </td><!-- </tr></table></td>-->   <!--  </tr> !-->
<?php 
} //else { //echo '<td class="main"><table width="100%" cellpadding="1" cellspacing="1" border="0"><tr><td class="main" width="500">&nbsp;</td></tr></table></td>'; }
?>
<?php 
if (ACCOUNT_TELEPHONE == 'false') { if (ACCOUNT_SECOND_PHONE=='true') { ?>
	<!--<td class="main" width="100%"><table width="100%" border="0" cellpadding="1" cellspacing="0"><tr>-->
            <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_SECOND_TELEPHONE_NUMBER; ?></td>
            <td class="main" nowrap="nowrap" width="240">
<?php
  if ($is_read_only) {
    echo $account['customers_second_telephone'];
  } elseif ($error) {
    if ($entry_second_telephone_error) {
      echo tep_draw_input_field('second_telephone') . '&nbsp;' . ENTRY_SECOND_TELEPHONE_NUMBER_ERROR;
    } else { 
      echo $second_telephone . tep_draw_hidden_field('second_telephone');
    }
  } else {
    echo tep_draw_input_field('second_telephone', $account['customers_second_telephone']);
  }
?></td><!--</tr></table></td>--> <?php } } else { 
if (ACCOUNT_SECOND_PHONE=='true') { ?>
        <!--  <tr> !-->
		 <!--  <td class="main" width="100%"><table width="100%" border="0" cellpadding="1" cellspacing="0" align="center"><tr>-->
            <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_SECOND_TELEPHONE_NUMBER; ?></td>
            <td class="main" nowrap="nowrap" width="240">
<?php
  if ($is_read_only) {
    echo $account['customers_second_telephone'];
  } elseif ($error) {
    if ($entry_second_telephone_error) {
      echo tep_draw_input_field('second_telephone') . '&nbsp;' . ENTRY_SECOND_TELEPHONE_NUMBER_ERROR;
    } else { 
      echo $second_telephone . tep_draw_hidden_field('second_telephone');
    }
  } else {
    echo tep_draw_input_field('second_telephone', $account['customers_second_telephone']);
  }
?></td><!--</tr></table></td>-->
      <!--  </tr> !-->
<?php }} 
	 ?>
  </tr>    <!-- <tr><td class="main" colspan="4"><table width="100%" align="left" border="0" cellpadding="1" cellspacing="0">-->
  			<tr><?php if (ACCOUNT_SECOND_PHONE=='false') { ?>
            <td class="main" align="left" nowrap="nowrap" width="110">&nbsp;&nbsp;<?php echo ENTRY_MOBILE_NUMBER; ?></td>
			<td class="main" nowrap="nowrap">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['customers_fax'];
  } elseif ($error) {
    if ($entry_mobile_error) {
      echo tep_draw_input_field('mobile') . '&nbsp;' . ENTRY_MOBILE_NUMBER_ERROR;
    } else {
      echo $mobile . tep_draw_hidden_field('mobile');
    }
  } else {
      echo tep_draw_input_field('mobile', $account['customers_fax']) . '&nbsp;' . ENTRY_MOBILE_NUMBER_TEXT;
  }
?></td>
<?php } else {?>
			<!--<td class="main" colspan="4"><table width="100%" align="left" border="0" cellpadding="1" cellspacing="0">
  			<tr>-->
			<td class="main" align="left" nowrap="nowrap" width="110">&nbsp;<?php echo ENTRY_MOBILE_NUMBER; ?></td>
            <td class="main" nowrap="nowrap" colspan="3">&nbsp;
<?php
  if ($is_read_only) {
    echo $account['customers_fax'];
  } elseif ($error) {
    if ($entry_mobile_error) {
      echo tep_draw_input_field('mobile') . '&nbsp;' . ENTRY_MOBILE_NUMBER_ERROR;
    } else {
      echo $mobile . tep_draw_hidden_field('mobile');
    }
  } else {
      echo tep_draw_input_field('mobile', $account['customers_fax']) . '&nbsp;' . ENTRY_MOBILE_NUMBER_TEXT;
  }
	?></td><!--</tr></table></td>-->
  <?php } ?>        <!--</tr></table></td></tr></table></td>-->
      </tr>
		  <?php tep_content_title_bottom(CATEGORY_CONTACT); ?>
    </table></td>
  </tr></table></td></tr>
<!--</table>!-->