<?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     base_default
 * @copyright   Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div class="centinel" id="centinel">
    <h3><?php echo $this->__('Card Verification')?></h3>
    <p><?php echo $this->__('Please verify the card with the issuer bank:') ?></p>
    <iframe id="centinel_authenticate_iframe" src="<?php echo $this->getFrameUrl() ?>" style="width:99.5%; height:400px; position:relative; font-size:12px; background:#fff; font-weight:bold; white-space:nowrap; border:1px solid #ddd;"></iframe>
</div>
<script type="text/javascript">
//<![CDATA[
var centinelAutenticate = new Class.create();

centinelAutenticate.prototype = {
    initialize : function()
    {
        this.checkoutReviewSubmitBlockId = 'checkout-review-submit';
        this.checkoutReviewTableBlockId = 'checkout-review-table-wrapper';
        this.centinelBlockId = 'centinel';
    },

    start : function()
    {
        if($(this.checkoutReviewSubmitBlockId)) {
            $(this.checkoutReviewSubmitBlockId).hide();
        }
        if ($(this.checkoutReviewTableBlockId)) {
            $(this.checkoutReviewTableBlockId).hide();
        }
    },

    success : function()
    {
        if($(this.checkoutReviewSubmitBlockId)) {
            $(this.checkoutReviewSubmitBlockId).show();
        }
        if ($(this.checkoutReviewTableBlockId)) {
            $(this.checkoutReviewTableBlockId).show();
        }
        $(this.centinelBlockId).hide();
    }
}
centinel = new centinelAutenticate();
//for multishipping checkout
Event.observe(window, 'load', function(){centinel.start();});
//for onepage checkout
centinel.start();
//]]>
</script>
