<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     default_iphone
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div class="page-head button-level">
    <h3><?php echo $this->__('Change Billing Address') ?></h3>
    <button type="button" class="form-button-alt" onclick="setLocation('<?php echo $this->getAddNewUrl() ?>')"><span><?php echo $this->__('Add New Address') ?></span></button>
</div>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<div class="content-box">
<?php $_index=0 ?>
<?php foreach ($this->getAddressCollection() as $_address): ?>
    <?php if($_index%3==0): ?><div class="col3-set box-set"><?php endif; ?>
    <div class="col-<?php echo ($_index%3+1) ?>">
        <div class="box">
            <p class="actions">
                <a href="<?php echo $this->getEditAddressUrl($_address) ?>"><?php echo $this->__('Edit Address') ?></a><span class="separator">|</span>
                <a href="<?php echo $this->getSetAddressUrl($_address) ?>"><strong><?php echo $this->__('Select Address') ?></strong></a>
            </p>
            <address>
                <?php echo $_address->format('html') ?>
                <?php if($this->isAddressDefaultBilling($_address)): ?>
                <br/><strong><?php echo $this->__('Default Billing') ?></strong>
                <?php endif; ?>
                <?php if($this->isAddressDefaultShipping($_address)): ?>
                <br/><strong><?php echo $this->__('Default Shipping') ?></strong>
                <?php endif; ?>
            </address>
        </div>
    </div>
    <?php $_index++ ?>
    <?php if($_index && $_index%3==0): ?></div><br/><?php endif; ?>
<?php endforeach; ?>
<?php if(!$_index || $_index%3!=0): ?></div><br/><?php endif; ?>
</div>
<div class="button-set">
    <a href="<?php echo $this->getBackUrl() ?>" class="left"><?php echo $this->__('&laquo; Back to Billing Information') ?></a>
</div>
