<div class="my-account">
	<div class="heading">
        <dl class="acctip">
            <dt><?php echo $heading_title; ?></dt>
        </dl>
    </div>
    <div id="address">
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
    <div class="f">
    
      <table width="100%">
    
        <tr>    
          <th width="180"><span class="required">*</span> <?php echo $entry_firstname; ?></th>
    
          <td><input type="text" class="elmbBlur input-text" name="firstname" value="<?php echo $firstname; ?>" />
    
            <?php if ($error_firstname) { ?>
    
            <span class="error"><?php echo $error_firstname; ?></span>
    
            <?php } ?></td>
    
        </tr>
    
        <tr>    
          <th><span class="required">*</span> <?php echo $entry_lastname; ?></th>
    
          <td><input type="text" class="input-text elmbBlur" name="lastname" value="<?php echo $lastname; ?>" />
    
            <?php if ($error_lastname) { ?>
    
            <span class="error"><?php echo $error_lastname; ?></span>
    
            <?php } ?></td>
    
        </tr>
    
        <tr>    
          <th><span class="required">*</span> <?php echo $entry_address_1; ?></th>
    
          <td><input type="text" class="elmbBlur input-text" name="address_1" value="<?php echo $address_1; ?>" />
    
            <?php if ($error_address_1) { ?>
    
            <span class="error"><?php echo $error_address_1; ?></span>
    
            <?php } ?>
    
          </td>
    
        </tr>       
    
        <tr>
    
          <th><span class="required">*</span> <?php echo $entry_postcode; ?></th>
    
          <td><input type="text" class="elmbBlur input-text" name="postcode" value="<?php echo $postcode; ?>" /></td>
    
        </tr>
    
        <tr>
    
          <th><span class="required">*</span> <?php echo $entry_city; ?></th>
    
          <td><input type="text" class="elmbBlur input-text" name="city" value="<?php echo $city; ?>" />
    
            <?php if ($error_city) { ?>
    
            <span class="error"><?php echo $error_city; ?></span>
    
            <?php } ?>
    
          </td>
    
        </tr>
    
        <tr>
    
          <th><span class="required">*</span> <?php echo $entry_country; ?></th>
    
          <td><select name="country_id" onchange="$('#zone').load('index.php?controller=account_address&action=zone&country_id='+this.value+'&zone_id=<?php echo $zone_id; ?>');">
    
              <?php foreach ($countries as $country) { ?>
    
              <?php if ($country['country_id'] == $country_id) { ?>
    
              <option value="<?php echo $country['country_id']; ?>" SELECTED><?php echo $country['name']; ?></option>
    
              <?php } else { ?>
    
              <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
    
              <?php } ?>
    
              <?php } ?>
    
            </select>
    
          </td>
    
        </tr>
    
        <tr>
    
          <th><span class="required">*</span> <?php echo $entry_zone; ?></th>
    
          <td id="zone"><select name="zone_id">
    
            </select></td>
    
        </tr>  
    
        <tr>
    
          <th><span class="required">*</span> <?php echo $entry_company; ?></th>
    
          <td><input type="text" class="elmbBlur input-text" name="company" value="<?php echo $company; ?>" style="display:inline-block; margin-right:10px;"/><label><font color="#FF0000"> (Mobile is better, please ingore country prefix)</font></label></td>
    
        </tr>
    
        <tr>
    
          <th><span class="required">*</span> <?php echo $entry_default; ?></th>
    
          <td><?php if ($default) { ?>
    
            <input type="radio" name="default" value="1" CHECKED />
    
            <?php echo $text_yes; ?>
    
            <input type="radio" name="default" value="0" style="margin-left:10px;"/>
    
            <?php echo $text_no; ?>
    
            <?php } else { ?>
    
            <input type="radio" name="default" value="1" />
    
            <?php echo $text_yes; ?>
    
            <input type="radio" name="default" value="0" CHECKED style="margin-left:10px;"/>
    
            <?php echo $text_no; ?>
    
            <?php } ?></td>
    
        </tr>
    
      </table>
      <div class="clearfix" style="margin-top:20px;">
      <div class="col-sm-12" style="padding-left:0;"><a class="btn_button btn_gray" onclick="window.history.back(-1)" style="vertical-align:inherit;"><i class="icon-back"></i>Back</a></div>
      <div class="col-sm-12" style="text-align:right;"><input type="submit" value="Save" class="right btn_button btn_orange" /></div>
      </div>
    </div>     
    </form>    
    </div>
</div>
<script type="text/javascript">
	$('#zone').load('index.php?controller=account_address&action=zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
	$(function() {
		$("input").focus(function() {
			$(this).addClass("inbg");
		}).blur(function() {
			$(this).removeClass("inbg");
		})
	})
</script>
